1632 Commits
Author SHA1 Message Date
Henrik Rydgård 64e55324c7 Fix initialization bug in TextureCacheCommon 2026-06-14 14:02:09 +02:00
Henrik Rydgård e0634f3df9 Assorted cleanup and tweaks 2026-06-13 13:34:41 +02:00
Henrik Rydgård 87cc608df1 Add the necessary logic to use in-shader CLUT lookups for regular textures 2026-06-11 12:42:16 +02:00
Henrik Rydgård 0bf1d12053 Prepare for shader depal (CLUT palette lookup) for ordinary textures 2026-06-11 11:58:58 +02:00
Henrik Rydgård d33425d01d Split out the CLUT texture cache from "TextureShaderCache" 2026-06-11 10:57:30 +02:00
Henrik Rydgård f034cb45bb Unify UpdateCurrentClut between D3D11 and Vulkan (GLES is still different) 2026-06-11 10:40:21 +02:00
Henrik Rydgård 5265422c0e Remove the old "Fragment ubershader" setting. It's been on by default for years and is not really an ubershader. 2026-06-10 09:54:52 +02:00
Henrik Rydgård a38c52601c Turn TexCacheEntry::TexStatus into an enum class 2026-06-09 11:25:51 +02:00
Henrik Rydgård ec6c7b08f5 Add a common TextureAlpha enum, replacing CheckAlphaResult and ReplacedTextureAlpha. 2026-06-09 11:25:50 +02:00
Henrik Rydgård e0a961ddc5 Just some basic code cleanup in TextureCacheCommon. 2026-06-08 22:51:00 +02:00
Henrik Rydgård 2534eb4480 Disable anisotropic filtering for all flat draws.
May improve performance slightly, and should fix the last instances of #19555
2026-06-08 15:28:58 +02:00
Henrik Rydgård 169f473b95 Smart 2D texture filtering: Use the new vertex path to check for pixel mapping in transformed geometry
Previously, "Smart 2D texture filtering" was limited to through-mode
draws, but many games use fully transformed draws to do 2D elements.

An example of this is Outrun in the menus, and it's always been plagued by
horrible filtering artifacts.

With the improved Smart 2D texture filtering, the artifacts are gone!
Of course, instead of glitchy bilinear you instead get point sampled
texturing so it looks more pixellated, but no more ugly borders between letters
in the game.
2026-06-04 17:04:04 +02:00
Henrik Rydgård 5151df7366 Remove fbman, texcache parameters from SoftwareTransformParams 2026-06-02 11:39:33 +02:00
Henrik Rydgård 77d5ca3116 Remove the SoftwareTransform class, there's no state anymore 2026-06-02 11:39:33 +02:00
Henrik Rydgård 8113cb9147 Misc cleanup and renaming 2026-06-02 11:39:33 +02:00
Henrik Rydgård a317890c08 Remove the GPUDebugInterface class
Just a pointless extra layer in the class hiearchy, making it
unnecessarily hard to modify the interface.

Might as well hit GPUCommon directly.
2026-06-02 11:15:08 +02:00
Henrik Rydgård 702088c2d0 Fix backwards check for minZ/maxZ in fragment shader 2026-05-31 10:40:14 +02:00
Henrik Rydgård bdd72c08f3 Fix dirtying caused by clip flag state. This could probably be a bit smarter. 2026-05-30 21:47:21 +02:00
Henrik Rydgård f8b153ba2b Fix some issues with depth rounding, and depth clamp in D3D11 2026-05-30 19:07:59 +02:00
Henrik Rydgård 44ece6dfa2 Determine the clip flags directly when culling, simplifying the code. 2026-05-30 19:07:59 +02:00
Henrik Rydgård e75d9f8a5f Unify the bounding depth checks, correct them if minmax clip is needed 2026-05-30 19:07:59 +02:00
Henrik Rydgård 0eede05f5f Implement fragment shader depth clamp and min/max discard. Slow on some hardware, but it's a fallback. 2026-05-30 19:07:59 +02:00
Henrik Rydgård 66fd3e65d8 Remove some redundant function parameters 2026-05-30 19:07:59 +02:00
Henrik Rydgård 0b47955c64 Delete geometry shader culling support. Is mostly replaced, and will be fully replaced with software transform. 2026-05-30 19:07:59 +02:00
Henrik Rydgård 058b1af285 Revert to software on out-of-bounds projected depth 2026-05-30 19:07:59 +02:00
Henrik Rydgård 86f9618cb9 Fallback to software transform if draw intersects -W<Z<W 2026-05-30 19:07:59 +02:00
Henrik Rydgård 280ddbf86c Remove state from SoftwareTransform class 2026-05-30 19:07:59 +02:00
Henrik Rydgård d60d190236 Implement depth clamp (for safe cases) in the software transform pipeline, and make sure triangle culling is always done. 2026-05-30 19:07:59 +02:00
Henrik Rydgård b1723086be Plumb through depth information (although not yet always generated) 2026-05-30 19:07:58 +02:00
Henrik Rydgård 5808afef10 Implement minZ/maxZ through user clip planes 2026-05-30 19:07:58 +02:00
Henrik Rydgård ae98055cec Delete a lot of legacy depth and viewport code, fix OpenGL 2026-05-30 19:07:58 +02:00
Henrik Rydgård 62d8cf22de Move the viewport transform to software in SW transform mode
transform fix
2026-05-30 19:07:58 +02:00
Henrik Rydgård f60e27a9b7 Just some refactoring of the GPUStatistics struct, and more use of StringWriter 2026-05-29 14:40:31 +02:00
Henrik RydgårdandGitHub 5513fcb223 Merge pull request #21705 from GermanAizek/constexpr-cpp17
GPU: modernize use C++17 constexpr for precalculate compilation
2026-05-27 12:21:39 +02:00
Henrik Rydgård db99de8575 Rename BuildDrawParams to ProjectClipAndExpand, call it directly from Transform 2026-05-26 16:05:53 +02:00
Henrik Rydgård 9ad9a6c0bb DrawEngines: Move the clear-detection to a more sensible place, reorder things to make more sense. 2026-05-26 16:05:53 +02:00
Henrik Rydgård f40e487a61 Simplify the TransformedVertex struct 2026-05-24 12:48:26 +02:00
Henrik Rydgård 4a420c95c2 Remove some redundant device caps, show clip/cull/depth-clamp in system info 2026-05-21 11:59:26 +02:00
Herman Semenoff 400d136f51 GPU: modernize use C++17 constexpr for precalculate compilation 2026-05-19 21:57:45 +03:00
Henrik Rydgård 65c99beea7 Remove some old debris 2026-05-19 15:43:25 +02:00
Henrik Rydgård d243737c11 Revert "Convert the pre-rotation to just the matrix multiplication."
After the previous commit, the optimization is no longer needed, and
unnecessarily bloats the uniform buffer.

This reverts commit 62bcb1785e809649ba88b49e24c5217f457fa040.
2026-05-17 11:02:35 +02:00
Henrik Rydgård 4b93a870db Optimize out pre-rotation entirely from vertex shaders when not needed 2026-05-17 11:01:50 +02:00
Henrik Rydgård 27650fe3e4 Fix race condition during Vulkan startup 2026-05-13 23:09:04 +02:00
Henrik Rydgård 28166cb35d Add "allocation slack" to our pushbuffers. Fixes a memory overwrite bug
Reported by Joseph on Discord.

Sometimes, things could align perfectly so allocations happend exactly
at the end of a pushbuffer. At the same time, we allow our vertex decoder to write an extra few
bytes if it needs to for speed. Unfortunately I missed this interaction,
resulting in some uncommon crashes that were especially common with
heavy-geometry things like modified GTA LCS with PS2 assets, for
example.

The problem was reported with Vulkan, but our OpenGL backend had the
same issue too.
2026-05-13 15:55:34 +02:00
Herman SemenoffandHenrik Rydgård 1e2e04b9d2 shadermanagervk: fix possible typo in Clear() function
After set_invalid(), shader pointers are not nulled as in DirtyLastShader()
2026-04-28 10:45:45 +02:00
Henrik Rydgård d108fe25d1 Rework constant buffer loading, barrier fix 2026-04-23 13:32:06 +02:00
Henrik Rydgård 4c2be7f8af More work. Some initialization order problem. 2026-04-23 13:31:51 +02:00
Henrik Rydgård 4335a327cd Hackery to prepare for constant buffers in compute 2026-04-23 13:31:51 +02:00
Henrik Rydgård 799827e9fb Revert "Remove unnecessary bindings from compute shader descriptor layout"
This reverts commit 090efb9513.
2026-04-23 11:19:57 +02:00
Henrik Rydgård 090efb9513 Remove unnecessary bindings from compute shader descriptor layout 2026-04-13 10:04:02 -06:00