Commit Graph

1315 Commits

Author SHA1 Message Date
Henrik Rydgård
d2feb444b7 Bunch of defensive programming around shaders 2022-12-31 12:21:51 +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
Unknown W. Brackets
0496ca32ff Global: Cleanup some minor includes and typos. 2022-12-27 08:33:07 -08:00
Unknown W. Brackets
e5dbdba638 GPU: Keep prevPrim_ set on flush.
For continuing previous verts, see #16612.  We still don't handle these
quite accurately (outside software rendering), but this should be better.
2022-12-18 07:14:19 -08:00
Henrik Rydgård
6bb0115e73 Quickfix for texture uploads after #16599 2022-12-16 14:57:52 +01:00
Henrik Rydgård
26884150d7 Remove the 0th descriptor set, move everything else back to 0 2022-12-16 13:05:40 +01:00
Henrik Rydgård
11366a2ded Don't refer directly to g_Config.iMultiSampleLevel, it can contain unsupported modes. 2022-12-14 16:43:37 +01:00
Henrik Rydgård
41e5b1e95a Plumb through multiSampleLevel so PipelineManager doesn't read config. 2022-12-14 16:43:37 +01:00
Unknown W. Brackets
8c1a247b7b Vulkan: Cleanup some logspam. 2022-12-13 18:29:23 -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
427cae67cb Enable some wordwrapping in shader viewer, show variant bitmask 2022-12-13 16:28:59 +01:00
Henrik Rydgård
80a0c97e9e Drop the input attachment descriptor from the layout when unused 2022-12-13 15:17:39 +01:00
Henrik Rydgård
73cd9fac7d Tiny optimization in PipelineDesc 2022-12-13 15:16:11 +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
f44852bb18 Global: Cleanup virtual/override specifiers.
Also missing virtual destructors, hidden non-overrides, etc.
2022-12-10 21:13:36 -08:00
Henrik Rydgård
cdb830f390 Minor optimization/cleanup 2022-12-10 12:05:40 +01:00
Unknown W. Brackets
78ed8d45a7 Vulkan: Defer deletion of shader module promises. 2022-12-03 14:53:10 -08:00
Unknown W. Brackets
53eedf06e3 Vulkan: Track pipeline desc using a refcount.
Not very safe to not allow deletes, and don't want to force Draw objects
on the deleter (this is referenced by them.)
2022-12-03 14:52:06 -08:00
Henrik Rydgård
238c9439e3
Merge pull request #16491 from unknownbrackets/cleanup
Quick cleanup
2022-12-03 16:38:32 +01:00
Unknown W. Brackets
e50eae1bfb GPU: Cleanup some bounds checks, assignments. 2022-12-03 07:17:12 -08:00
Henrik Rydgård
0f12d44e59 Remove some unused/unnecessary code 2022-12-03 12:05:10 +01:00
Henrik Rydgård
92df6b832c Safer and simpler alternative to cbfa4bf.
See #16483
2022-12-03 12:05:08 +01:00
Henrik Rydgård
02b8bf33fb
Merge pull request #16458 from hrydgard/desktop-friendly-msaa
Implement MSAA support for desktop GPUs in Vulkan
2022-12-03 11:22:41 +01:00
Lubos
b41a782fcd Revert "Centralize ClearCacheNextFrame"
This reverts commit cbfa4bfc8e.
2022-12-02 14:32:27 +01:00
Henrik Rydgård
8a3e92aa38 Not pretty, but with this, you can switch MSAA level at runtime. 2022-12-01 23:41:31 +01:00
Henrik Rydgård
8208768c15 Add a pipeline flag for USES_DISCARD. Will be used for the MSAA quality setting. 2022-12-01 22:49:00 +01:00
Henrik Rydgård
4dfce4f6bc Basically working MSAA on desktop GPUs! Some glitches remain. 2022-12-01 22:49:00 +01:00
Henrik Rydgård
06af304c8d Multisampling groundwork 2022-12-01 22:49:00 +01:00
Unknown W. Brackets
4866518b84
Merge pull request #16477 from hrydgard/invalidation-refactor
Add a flags parameter to InvalidateCachedState and rename it Invalidate.
2022-12-01 11:05:04 -08:00
Henrik Rydgård
331d024a8c Add a flags parameter to InvalidateCachedState and rename it Invalidate.
Also rename the old InvalidationFlags enum to InvalidateCallbackFlags.
2022-12-01 19:15:38 +01:00
Henrik Rydgård
40ae99073b Remove std::string from VulkanTexture 2022-12-01 12:17:03 +01: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
Unknown W. Brackets
1d00824528 Vulkan: Only use geometry shaders with accurate z.
Just to be safe, since that's what it's most well tested with.
2022-11-26 23:28:57 -08:00
Henrik Rydgård
3dd45c6561 Can't forget the texture in the callback, breaks texture-from-framebuffer-copy.
Was probably redundant anyway.
2022-11-24 11:02:21 +01:00
Henrik Rydgård
70d1d8fa07 Replace the "GetCurrentStepId"-based state invalidation with callbacks 2022-11-24 10:52:42 +01:00
Henrik Rydgård
ddd2c6e343
Merge pull request #16409 from hrydgard/preserve-framebuffers
Preserve framebuffer on pause screen even if render resolution is changed
2022-11-22 10:03:47 +01:00
Henrik Rydgård
8f103f3f47 Extract the Vulkan descriptor binding cleanup from #16345 2022-11-21 20:30:20 +01:00
Henrik Rydgård
cbfa4bfc8e Centralize ClearCacheNextFrame 2022-11-21 18:13:13 +01:00
Henrik Rydgård
ce5a1b8b7e Some minor "centralization" 2022-11-21 17:55:30 +01:00
Henrik Rydgård
37ec31dedd Fix resizing issue. Took some refactoring. 2022-11-20 12:57:32 +01:00
Unknown W. Brackets
4a367148e6 GPU: Centralize more GPU_USE flags, like depth. 2022-11-13 08:04:47 -08:00
Unknown W. Brackets
66668d4b3f Vulkan: Correct alpha in Adreno workaround. 2022-11-12 17:41:48 -08:00
Unknown W. Brackets
70c3205564 GPU: Correct equal depth checks. 2022-11-09 20:34:29 -08:00
Unknown W. Brackets
1c0a37f252 GPU: Correct vertex decoder in software transform.
It was meant to flip to skin in decode.
2022-11-09 07:07:39 -08:00
Unknown W. Brackets
745d9ad320 GPU: Avoid enabling depth test pointlessly.
See #16015.  Attempting to avoid a driver bug.
2022-11-08 20:06:08 -08:00
Unknown W. Brackets
855d16ffb3 GPU: Prefer scaling depth to 16-bit if using 24.
In most cases, this will be a lot faster than pixel depth rounding, and
may avoid more issues in vertex rounding.
2022-11-08 20:06:08 -08:00
Unknown W. Brackets
3333f2a5aa GPU: Avoid clears for non-simple depth values.
Some drivers don't round depth the same way for a clear vs for drawing,
which can cause mismatches.  We only do this if we see equals-style depth
comparison funcs used in drawing.
2022-11-08 20:06:08 -08:00