Commit Graph
162 Commits
Author SHA1 Message Date
Unknown W. Brackets 06045b9459 GLES: Cache equal flag, load from cache. 2023-01-05 18:24:29 -08:00
Unknown W. Brackets de3c2783f4 Vulkan: Reload shaders if use flags change. 2023-01-05 18:24:29 -08: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 13d07f6ff4 Bump shader cache version 2023-01-05 13:12:11 +01:00
Henrik Rydgård 06d69e9953 Bump shader cache version 2023-01-04 11:10:38 +01:00
Henrik Rydgård 18d00b0718 Remove lmode flag bit from fragment and geometry shaders 2023-01-04 11:04:23 +01:00
Henrik RydgårdandGitHub 10dee90c83 Merge pull request #16628 from hrydgard/remove-fog-fshader-flag
Make fog-enable driven by uniform instead of fragment shader flag bit
2023-01-04 11:01:19 +01:00
Henrik RydgårdandGitHub 34c11c8acf Merge pull request #16584 from hrydgard/vertex-format-vshader-id
Pass in the vertex decoder to the shader ID computation
2023-01-04 10:26:18 +01:00
Henrik Rydgård 3dbe69f585 Cache version 2023-01-04 10:17:59 +01:00
Henrik Rydgård 9ceffa284d Vulkan: Add robustness against bad shader module compiles 2022-12-31 12:21:53 +01:00
Henrik Rydgård d2feb444b7 Bunch of defensive programming around shaders 2022-12-31 12:21:51 +01: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 49f6c461ad Reporting: Fix some header includes.
Particularly in Common, avoid including Core/Reporting.h.
2022-12-27 14:58:20 -08:00
Henrik Rydgård 00ebf4957f Make shader cache loading a bit more lenient. 2022-12-13 23:06:57 +01:00
Henrik Rydgård 65c721dce6 Rename Save/LoadCache to Save/LoadPipelineCache 2022-12-13 19:18:20 +01:00
Henrik Rydgård ee19db091f Add accessor for UseFlags 2022-12-13 18:27:45 +01:00
Henrik Rydgård 313a2b1327 Improve shader cache logging 2022-12-13 16:35:02 +01:00
Henrik Rydgård ad1cd40ff7 Bump shader cache versions before release, just to be safe. 2022-12-13 08:45:20 +01:00
Unknown W. Brackets 78ed8d45a7 Vulkan: Defer deletion of shader module promises. 2022-12-03 14:53:10 -08:00
Henrik Rydgård d72ad3b3f4 Fragment shader generator: Move the framebuffer fetch bit to the shader ID.
Will resolve a future issue in the multisampling PR, where the
GPU_USE_FRAMEBUFFER_FETCH flag changes at runtime if you switch between no AA and MSAA.

Just figured I'd get it in separately for safety.
2022-11-30 00:26:15 +01:00
Henrik Rydgård 970c266b41 Restore parallel GLSL builds 2022-11-08 00:30:21 +01:00
Henrik Rydgård 24d5cd087c Experiment (Vulkan): Temporarily disable GLSL parallel compilation on Android. For #16341 investigation. 2022-11-07 14:30:24 +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
Henrik RydgårdandGitHub 8cd602a9c6 Merge pull request #16257 from unknownbrackets/error-cleanup
Kernel: Fix reported StopThread error
2022-10-19 08:06:30 +02:00
Unknown W. Brackets a42064eb48 Vulkan: Correct some enum switch warnings.
Nice to log debug annotations anyway.
2022-10-18 21:52:38 -07:00
Henrik Rydgård 7c5fc3ccb5 Reorder the GPU USE flags a bit 2022-10-17 19:55:11 +02:00
Henrik Rydgård daca0b2109 Rename gstate_c.Supports to gstate_c.Use 2022-10-17 08:46:37 +02:00
Unknown W. Brackets aee2ad46a2 GPU: Verify generated shader buffer length.
Hardware tessellation + uberlighting + clamp was exceeding the buffer,
causing memory corruption.  Let's try to catch it, but also increase
buffers to be safe.
2022-10-05 21:41:09 -07:00
Henrik RydgårdandUnknown W. Brackets cdee10fe86 Vulkan: Basic geoshader code generation. 2022-10-02 07:42:17 -07:00
Unknown W. Brackets fbdb278168 Vulkan: Update shader cache format for geo shaders. 2022-10-02 07:42:16 -07: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
Unknown W. Brackets 38e16324f0 Vulkan: Clean up shader module tag. 2022-10-02 07:42:16 -07:00
Unknown W. Brackets 878a049f60 GPU: Add dirtying for geo shader state.
Not yet used, but dirtied at the right times.
2022-10-02 07:42:16 -07:00
Henrik Rydgård 07ca9e4656 Fold the "materialUpdate" flag into the light ubershader part.
This reduces the number of vertex shaders and thus pipelines by quite a
bit more in a few games, like Tekken and GoW, continuing the fight
against shader compile stutter.

The perf impact should be minimal if not positive due to less pipeline
changes.

GLES fixes

Make the vertex input declarations match (always declare fog input).  Fixes D3D11 validation

Tess fix
2022-09-26 12:06:16 +02:00
Henrik Rydgård 9d1355e137 Always do the vertex shader part of the fog computation.
In #16104, we drastically reduced the number of shader variants for
games that use flexible lighting setups. I looked at a few games and it
seems that a lot of games have the same shaders with fog on/off, while
fog is super cheap to compute. So let's just always do it, reducing
vertex shader variants further (though the amount of pipelines will probably
remain the same, since we still specialize the fragment shader).

Might also be worth adding a dynamic bool for the fragment shader, but
if so, doing it separately.
2022-09-26 09:30:54 +02:00
Henrik Rydgård 08d2cb4486 Bump the shader cache version 2022-09-24 22:40:42 +02:00
Henrik Rydgård b86648b352 Address feedback 2022-09-12 16:30:08 +02:00
Henrik Rydgård 4ad345d78d Better shader compile logging 2022-09-12 15:39:29 +02:00
Henrik Rydgård a2eaad5445 Debug-name shader modules with their shader desc strings 2022-09-12 15:39:29 +02:00
Henrik Rydgård 694dbe1271 Add ShaderDepalMode enum, use in shader ID. Replaces smoothed bit. 2022-09-11 14:40:01 +02:00
Henrik Rydgård 14b5a1a7cd Fix pipeline lifetime issue, misc. 2022-09-08 00:38:32 +02:00
Henrik Rydgård befcfb470c Fix shader caching. 2022-09-08 00:38:32 +02: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 2474eb6a72 Shader bit setup and code generation for logic-ops-in-shader 2022-09-04 11:14:47 +02:00
Henrik Rydgård 6b1e4806cf Don't parallelize shader compiles in debug mode, sync in debug allocator kills performance. 2022-09-03 23:07:39 +02:00
Henrik Rydgård fb3f417e77 Fix lying comment, log level reduction 2022-09-03 16:15:46 +02:00
Henrik Rydgård 6e605fa2bc Fix silly logic, fixes the shader leak. 2022-09-03 15:21:07 +02:00
Henrik Rydgård 8775837c11 Work towards finding the leak 2022-09-03 15:21:07 +02:00