Commit Graph

77 Commits

Author SHA1 Message Date
刘皓 5716cbd41d Use the libretro VFS interface in libretro builds 2026-01-01 00:24:01 -05:00
Henrik Rydgård 8ed898c5e6 GPU: Constify VertexDecoder pointers, remove in some cases 2025-05-14 15:13:59 +02:00
Henrik Rydgård dfca3dd87a Work around annoying assert in debug memory allocator on 32-bit Windows 2024-09-25 23:24:25 +02:00
Herman Semenov b57dab2812 [GPU] Make static and const methods if possible 2024-04-05 17:04:31 +03:00
Henrik Rydgård 6e303e8f1d Vulkan: Simplify GetShaders and DirtyLastShader, making them internally consistent. 2023-09-24 11:55:15 +02:00
Henrik Rydgård d31ba393af Don't load the shader cache on a separate thread - all it does is already async 2023-09-24 10:53:23 +02:00
Henrik Rydgård 964f606a9c Fix some issues around geometry shaders - like, loading them from shader cache while disabled 2023-09-24 01:29:38 +02:00
Henrik Rydgård 6a8f65b566 Some assert paranoia, remove unused "failed_" variable 2023-09-23 10:09:32 +02:00
Henrik Rydgård 10f93875c6 Fix the semantics of DenseHashMap to be consistent even when inserting nulls 2023-09-11 12:07:18 +02:00
Henrik Rydgård 700b1cd6a7 More conversion to pushPool 2023-03-15 01:25:03 +01:00
Unknown W. Brackets 9e46a30c13 GPU: Correct some missing override specifiers. 2023-02-26 15:58:58 -08:00
Henrik Rydgård c74f5b2189 Prepare for unifying more stuff 2023-02-25 16:01:32 +01:00
Unknown W. Brackets 23d254ec21 Vulkan: Clear items as they're loaded from cache.
It's possible we could hit a double insert assert since we're on a
background thread.
2023-01-05 18:24:29 -08:00
Unknown W. Brackets 3f20562b9f Vulkan: Store saw equal depth flag in cache. 2023-01-05 18:24:29 -08:00
Henrik Rydgård f069de2dd2 Pass the vertex decoder into the vertex shader IDs generator
Instead of just the vertex type.

This will allow things like the vertex decoder supplying defaults, in
order to reduce the number of unique vertex shaders at the cost of
slightly larger vertex data.

This doesn't actually do that yet though, it's just a refactor that can
be done separately.

Part of #16567
2022-12-30 22:57:05 +01:00
Unknown W. Brackets 6c36f03a0d GPU: Purify vertTypeIsSkinningEnabled(). 2022-11-06 08:40:54 -08:00
Henrik Rydgård d3804ec2e5 Misc multiview hackery 2022-10-27 11:05:58 +02:00
Unknown W. Brackets d16caa71af Vulkan: Add geometry shader ID tracking.
We're still not generating them, yet.  But this tracks the objects and
IDs through the pipeline.
2022-10-02 07:42:16 -07:00
Henrik Rydgård e828df9f25 Split each renderpass/framebuffer into multiple "compatibility classes" (RenderPassType). 2022-09-08 00:32:03 +02:00
Henrik Rydgård 6e605fa2bc Fix silly logic, fixes the shader leak. 2022-09-03 15:21:07 +02:00
Henrik Rydgård ec0586ba50 Use promises to hold shader modules, for later asyncification 2022-09-03 15:21:07 +02:00
Henrik Rydgård b84cda2876 Plumb the computed pipeline state into ComputeFragmentShaderID. 2022-09-02 22:16:57 +02:00
Unknown W. Brackets 7ec62a32b4 GPU: More consistently clear ptrs on DeviceLost().
Rather get a null pointer crash than confusing buggy use-after-free
excitement.
2022-08-23 20:15:30 -07:00
Unknown W. Brackets 8a5f07b860 Vulkan: Don't cache vulkan_ with draw context.
Since we can get the VulkanContext cheaply from the draw context, it's
easier to make sure things stay up to date.
2021-11-14 15:25:28 -08:00
Unknown W. Brackets e85a8b0f5b Global: Cleanup class init order warnings. 2021-02-15 11:59:45 -08:00
Unknown W. Brackets a73c15babc GPU: Correct shader gen with weights as floats.
For now, this supports the option.  We should probably just move to
everything being floats, but we already prefer software skinning.

Fixes #13903.
2021-01-10 08:52:28 -08:00
Henrik Rydgård f4ea3ccf22 Move the generic vertex shader generator into GPU/Common and rename it. 2020-11-01 19:58:54 +01:00
Henrik Rydgård 0b1b36921e Move the now-renamed fragment shader generator to GPU/Common. 2020-10-31 19:03:14 +01:00
Henrik Rydgård b7d674411e Test parsing of generated OpenGL shaders too (by using glslang). 2020-10-31 18:32:43 +01:00
Henrik Rydgård 2977c56a12 Complete the vertex shader merge, deleting the Vulkan-specific vertex shader generator. 2020-10-25 08:34:35 +01:00
Henrik Rydgård 020fb55a65 Completes the merge, deleting the Vulkan-specific fragment shader generator. 2020-10-23 10:03:44 +02:00
Henrik Rydgård 886a8b1ac6 Remove Timer.cpp/h. Move various collections into Common/Data/Collections. 2020-10-05 21:05:23 +02:00
Henrik Rydgård 0e3a84b4a8 Move most GPU things to Common.
It works after the move, on Windows and Android at least.

Deletes the D3DX9 shader compiler loader, which was not used.
2020-10-04 23:39:02 +02:00
Henrik Rydgård 9e41fafd0d Move math and some file and data conversion files out from native to Common.
Buildfixing

Move some file util files

Buildfix

Move KeyMap.cpp/h to Core where they belong better.

libretro buildfix attempt

Move ini_file

More buildfixes
2020-10-04 09:12:46 +02:00
Henrik Rydgård 3162f30158 Merge base/basictypes.h into Common/Common.h (mostly). 2020-09-29 15:51:51 +02:00
Unknown W. Brackets ac60e2ecd4 GPU: Track HW tess at start of frame too.
This also makes it so we don't force the setting off when you change
backends, and just ignore it if unsupported.
2020-04-04 11:52:32 -07:00
Unknown W. Brackets c42fb72419 GPU: Update uniforms w/ consistent render mode too. 2020-04-04 11:03:07 -07:00
Unknown W. Brackets 1f594f3fb5 GPU: Track draw in shader manager.
With device restore etc. everywhere.
2018-12-23 12:55:37 -08:00
Henrik Rydgård 36fd2711d6 Revert "Remove further remains of hardware skinning."
This reverts commit 40db61a680.
2018-04-10 12:22:41 +02:00
Henrik Rydgård 1bb7be489f Remove some unused tracking of whether lighting is used by a shader 2018-03-17 10:33:50 +01:00
Henrik Rydgård 614cabb115 Implement pipeline/shader cache for Vulkan, to avoid shader compile stutters on second and subsequent runs.
The raw pipeline cache got pretty large. Instead, store IDs like GL.

There's still a disabled option to store the pipeline cache objects.
2018-03-16 21:03:03 +01:00
Henrik Rydgård 40db61a680 Remove further remains of hardware skinning. Fixes #10661 2018-03-05 00:03:47 +01:00
Unknown W. Brackets 4731a2918c GPU: Use more typesafe shader IDs.
Since they really are fairly distinct, let's make sure we can't mix them
accidentally.
2017-12-02 09:07:27 -08:00
Henrik Rydgård d5f8d484dd Tiny cleanups. 2017-11-04 10:08:53 +01:00
Henrik Rydgård 6a1fa728d8 Remove Globals.h 2017-08-31 17:15:22 +02:00
Henrik Rydgård 2f85e6516e Minor optimizations (use the new hashmap in a few more places) 2017-08-20 19:18:46 +02:00
Henrik Rydgård b9b2656e93 More vulkan microoptimizations. Add more profiler scopes. 2017-08-18 13:48:11 +02:00
Henrik Rydgard 26f208a212 Unify "DrawPixels" 2017-02-15 23:06:22 +01:00
Henrik Rydgard 175b97ef34 Start stubbing out a new D3D11 backend 2017-02-08 17:35:41 +01:00
Henrik Rydgard e17d3e1e7a Vulkan: Forgot to extend a few more dirtyflag variables to 64-bit. Avoid a warning. 2017-01-24 20:19:06 +01:00