Commit Graph
1581 Commits
Author SHA1 Message Date
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
Unknown W. Brackets b9b59f7806 GPU: Mask away unused bits in framebuf/zbuf ptr.
Lower 4 bits are ignored during rendering, and mirrors (even even the 8
bit at the top) are ignored.
2022-10-02 20:44:35 -07:00
Unknown W. Brackets 2832edcc37 Vulkan: Allow configuring geometry shaders on/off. 2022-10-02 07:42:22 -07:00
Unknown W. Brackets 8df956b036 Vulkan: Block geometry shaders on older Mali.
They're too slow to be usable.
2022-10-02 07:42:22 -07:00
Unknown W. Brackets 2ce0cda333 Vulkan: Enable geo shader for culling.
The compat setting was really for some previously buggy cases that
couldn't work without cull.
2022-10-02 07:42:22 -07:00
Henrik RydgårdandUnknown W. Brackets ac248338be Vulkan: Cull in geoshader, hack to on for now. 2022-10-02 07:42:17 -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
Unknown W. Brackets 87171cef98 GPU: Add geometry path for shader writer.
Not yet used.
2022-10-01 12:45:43 -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 9f3dfe7ebe Vulkan: Don't compile pipeline variants that don't make sense given their flags.
Ran into this with cache files from previous version of my change.

Also bumping the shader cache ID again to avoid this in other ways, but
good to be robust here.
2022-09-24 22:39:22 +02:00
Unknown W. Brackets c76d31dfa8 GPU: Cleanup unused CheckAlpha() funcs. 2022-09-24 02:00:03 -07:00
Henrik Rydgård 1259283c2e More tweaks, fix crash on exit (double-join thread) 2022-09-23 22:10:29 +02:00
Henrik Rydgård 7884e4ccb3 Another uninitialized variable (VAI minihash/hash) 2022-09-23 12:33:16 +02:00
Henrik Rydgård ac7ca963db Make valgrind happy 2022-09-23 12:24:43 +02:00
Henrik Rydgård 8e30a7ccfc Vulkan: Don't have renderpasses store/load depth buffers when we don't use them 2022-09-22 10:06:05 +02:00
Henrik Rydgård aa19712fc3 Unify depth texture and framebuffer fetch checks 2022-09-20 10:47:49 +02:00
Henrik Rydgård 09bcf3ec13 Unify range culling detection 2022-09-20 10:15:04 +02:00
Henrik Rydgård 1ae7c0132c Start unifying setting of the GPU feature flags, now that thin3d has feature detection. 2022-09-20 10:07:01 +02:00
Henrik Rydgård 262a306b9a Flag shader blending as broken on Adreno for now. 2022-09-16 19:19:42 +02:00
Henrik Rydgård 5f5277a409 Need to have input attachments in the descriptor pool. 2022-09-16 19:19:42 +02:00
Henrik Rydgård ce82fce8de Use subpass dependencies to implement shader framebuffer read in Vulkan. 2022-09-16 19:19:42 +02:00
Henrik Rydgård d6d7a15d25 Get depal-from-dynamic-CLUT working 2022-09-14 22:18:35 +02:00
Henrik Rydgård abd58199ce Add way to bind cached textures to a DrawContext 2022-09-14 22:18:35 +02:00
Henrik Rydgård 0ed1f3d461 Switch multiple bools as parameters to DecodeTextureLevel to a flags enum. 2022-09-14 18:40:08 +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årdandGitHub 75efcd9dfd Merge pull request #16000 from unknownbrackets/gedebugger
Cleanup some crashes in GE debugger or with large textures
2022-09-11 19:41:11 +02:00
Henrik Rydgård 694dbe1271 Add ShaderDepalMode enum, use in shader ID. Replaces smoothed bit. 2022-09-11 14:40:01 +02:00
Unknown W. Brackets 6c6d817ce7 Vulkan: Avoid crash if large texture attempted.
Doesn't do the clamp/wrap thing, but at least this won't crash.
2022-09-10 20:14:37 -07:00
Henrik RydgårdandGitHub f3c097680e Merge pull request #15982 from hrydgard/renderpass-refactor
Vulkan: Refactor renderpass handling
2022-09-08 09:35:55 +02:00
Henrik Rydgård 974cd38b1f Some more debug names to vulkan objects 2022-09-08 09:16:40 +02:00
Unknown W. Brackets e6b4495e22 GPU: Make NotifyConfigChanged() calls consistent.
They're generally centralized in Common.
2022-09-07 23:41:00 -07:00
Henrik Rydgård 14b5a1a7cd Fix pipeline lifetime issue, misc. 2022-09-08 00:38:32 +02:00
Henrik Rydgård 77819c6f80 Lifetime fixes, cleanups 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 b15c65540e Fix the new logic-op-in-shader on OpenGL and D3D11
Also disable BlueToAlpha for now for Outrun and DiRT 2, it breaks the
water effect somehow. Will come back to it later.
2022-09-04 22:53:05 +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 ec173559f8 Additional cleanup 2022-09-04 00:10:55 +02:00
Henrik Rydgård ceda7aef49 Add log functions to state structs 2022-09-04 00:10:55 +02:00
Henrik Rydgård 87b14fe1c2 Some more renaming and refactoring, extracted from a future PR 2022-09-04 00:10:55 +02:00
Henrik Rydgård 8e39018b95 Channel mask refactor 2022-09-04 00:10:54 +02:00
Henrik Rydgård 5f1ffeae70 Correct LogicOp API support detection 2022-09-04 00:08:40 +02:00