Commit Graph

193 Commits

Author SHA1 Message Date
Henrik Rydgård
d479b74ed9 v1.17.1 2024-02-04 14:08:02 +01:00
Henrik Rydgård
493122a2fc v1.17 2024-01-27 14:48:00 +01:00
Henrik Rydgård
126d88ecfc Back out clearly inconsequential/useless .reserve() calls 2023-12-29 08:27:56 +01:00
Herman Semenov
0748ce610f [GPU/Common/D3D11/Directx9/GLES/Vulkan] Using reserve if possible 2023-12-15 14:08:22 +03:00
Henrik Rydgård
ced821169e Bump shader cache versions 2023-10-09 19:39:25 +02:00
Henrik Rydgård
48d3efc473 Bump shader cache versions again, just because. 2023-09-27 17:38:15 +02:00
Henrik Rydgård
01035f48a4 Fix for crash when changing backends in-game 2023-09-26 00:13:53 +02: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
dbd3045f87 Join the shader cache load thread on exit 2023-09-24 01:07:08 +02:00
Henrik Rydgård
9a515c851f Vulkan: Extend the cacheLock usage in GetShaders (was unsafe, though mildly) 2023-09-24 00:58:45 +02:00
Henrik Rydgård
6a8f65b566 Some assert paranoia, remove unused "failed_" variable 2023-09-23 10:09:32 +02:00
Henrik Rydgård
1aab1c4b09 Be a bit smarter when loading the shader cache, avoid duplicating work 2023-09-21 10:44:04 +02:00
Henrik Rydgård
052747aa30 Add reporting of GLSL shader gen errors 2023-09-11 15:37:35 +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
162b363063 Bump shader cache version, just because. 2023-09-09 15:13:52 +02:00
Henrik Rydgård
6d8069dfd1 Vulkan: Remove the remains of the input attachment experiment
Haven't been using these for a while.

I've come to the conclusion here that I think it's better to try to
deal with the issues using safe workarounds like copies, instead of
relying on features with somewhat iffy driver support that are not
universal across APIs anyway.
2023-06-13 20:46:27 +02:00
Henrik Rydgård
72cf531759 Bump shader cache version 2023-05-25 10:19:01 +02:00
Henrik Rydgård
b42670cf59 Manually revert the rest of the lmode optimization 2023-05-09 18:44:24 +02:00
Henrik Rydgård
f42c682d34 Revert "Merge pull request #16628 from hrydgard/remove-fog-fshader-flag"
This reverts commit 10dee90c83, reversing
changes made to 34c11c8acf.
2023-05-08 22:01:38 +02:00
Henrik Rydgård
14887d6b04 Bump shader cache version (should have done it in the release) 2023-05-06 16:15:32 +02:00
Henrik Rydgård
d7605c6877 Use dedicated threads for the shader object creation. Bypasses the deadlock possibility. 2023-02-01 11:15:33 +01:00
Henrik Rydgård
6b0903f566 Add facility to run tasks on dedicated threads using the ThreadManager interface.
Useful for things that should be run ASAP even if the threadpool is full,
at a small extra cost. (Not recommended for very small tasks).

Considering using this to resolve the deadlocks in #16802.
2023-01-31 11:07:40 +01:00
Henrik Rydgård
784e8ab782 Fix a race condition during Vulkan shader cache load.
Could lead to unnecessary pipelines being created.
2023-01-13 10:35:04 +01:00
Henrik Rydgård
beed3c06d2 Vulkan: Don't use non-indexed draws for pure tristrips and fans, creates extra pipelines.
Bump shader cache version
2023-01-11 22:57:23 +01:00
Henrik Rydgård
3d376b0ab7 Remove the rather redundant DoTexture flag from vshaders.
Slightly reduces the number of unique vertex shaders but doesn't do much
for the pipeline count, as the fragment shader has a tex flag. Still
worth doing for the simplification.
2023-01-11 14:16:46 +01:00
Henrik Rydgård
088d0c39dc Remove the FS_TEXTURE_AT_OFFSET fragment shader flag 2023-01-10 12:37:21 +01:00
Henrik Rydgård
c7c48abb37 Switch the 2x flag to a uniform 2023-01-10 12:36:28 +01:00
Henrik Rydgård
d4ce134292 Shader generator: Move FS_TEX_ALPHA to a uniform bool.
Part of #16567
2023-01-10 09:42:54 +01:00
Henrik Rydgård
cf52324e9e Vulkan: Fix pipeline cache clearing.
Extracted from #16759 and bugfixed. Fixes a leak of Vulkan pipelines.

I guess another way would be to queue the variants for destruction at
the same time as we queue the callback, but I like this better.
2023-01-09 09:49:55 +01:00
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ård
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ård
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