Commit Graph
9732 Commits
Author SHA1 Message Date
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 73fbea4b3b Make the shader compilation test for D3D happy 2026-06-11 00:24:21 +02:00
Henrik Rydgård c9623374b1 Fix some issues with sprite border fix for RECT primitives 2026-06-10 15:29:18 +02:00
Henrik Rydgård 63a51dc6c2 Minor code cleanup 2026-06-10 15:10:03 +02:00
Henrik Rydgård ef111c0297 FragmentShader: Add support for two more shader depal formats: CLUT8 and DEPTH16. Unused.. but maybe not for long. 2026-06-10 15:09:56 +02:00
Henrik Rydgård 83d82dcf66 Shader depal: Don't generate a big switch in the shader, generate specialized shaders instead. 2026-06-10 12:22:11 +02:00
Henrik Rydgård 8faf6d9a3d Oops, fix regression from previous PR 2026-06-10 11:42:24 +02:00
Henrik Rydgård cd0802b9c8 Remove redundant flag from vertex shader IDs 2026-06-10 10:46:05 +02:00
Henrik Rydgård 5c340ccd09 Remove the concept of scaled/offset depth buffers. 2026-06-10 10:41:30 +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 9c9e709bfa Restore and plug back in some of the texture invalidation logic. Fixes GT, not much other impact. 2026-06-09 23:49:54 +02:00
Henrik Rydgård ce7da78b17 Invalidate texture hashes on readbacks 2026-06-09 23:49:54 +02:00
Henrik Rydgård 5691440442 Clean out some more stuff we don't need anymore 2026-06-09 23:49:54 +02:00
Henrik Rydgård 1781f693b5 Implement the new SyncDomain concept for texture hashing, remove minihash 2026-06-09 23:49:54 +02:00
Henrik Rydgård 36bdde68f9 Delete the "Lazy texture cache" option 2026-06-09 23:49:54 +02:00
Henrik Rydgård 79a81186a6 Add some new stats (enqueues, stall address updates) 2026-06-09 23:49:54 +02:00
Henrik Rydgård c300c8fa82 Shrink the TexCacheEntry struct a bit 2026-06-09 11:25:51 +02:00
Henrik Rydgård a38c52601c Turn TexCacheEntry::TexStatus into an enum class 2026-06-09 11:25:51 +02:00
Henrik Rydgård 7ced074154 Rearrange the texture status flags, rename Full alpha to Solid alpha for textures 2026-06-09 11:25:50 +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 fdcf923c75 TexCache: Stop bitpacking the hash status into the status flags 2026-06-09 11:25:50 +02:00
Henrik Rydgård 54d5c1d5e3 Improve some initialization in CrossSIMD.h. Add comments about CLUT variants 2026-06-09 10:15:08 +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 644f1b6caf Fix SpriteBorderFix problem where it was affecting the main render 2026-06-07 19:38:35 +02:00
Henrik Rydgård 2da3df75d7 Oops, lost a check for smart 2D texture filtering 2026-06-07 17:38:28 +02:00
Henrik Rydgård a7f62d763a Make the MaxZ test a bit more lenient to fix Taiko no Tatsujin. Debugger improvement
Fixes #21797
2026-06-07 13:47:42 +02:00
Henrik Rydgård d19f8b72f9 Warning fixes 2026-06-06 14:24:16 +02:00
Henrik Rydgård 5bfc87ffd5 Improve the sprite border fix to work with RECTs, add some conditions 2026-06-06 12:31:41 +02:00
Henrik Rydgård cf9c0c5c84 Restructure the sprite detection, no longer require Smart 2D texture filtering to apply 2026-06-06 11:21:46 +02:00
Henrik Rydgård b84afa8a5b Fixes menus in NBA2K12.
Not sure if we can find a better way, I suppose
we could clamp vertex coordinates that are in this range instead, if it
turns out that this somehow breaks something.
2026-06-05 18:23:31 +02:00
Henrik Rydgård d59cdcad61 GTA sprite fix: Detect sprites, clip them slightly to avoid filtering artifacts 2026-06-05 11:48:46 +02:00
Henrik Rydgård 9ce5270e80 With our compatibility flag for depth rounding, truncate to 15 bits.
This matches some earlier test results by Unknown where we could see
that only every second value was used, and is the only explanation I can
come up with for the Afterburner problem, having now traced all the
depth math properly.

Fixes #21785 - and hopefully doesn't break anything else.
2026-06-05 00:50:30 +02:00
Henrik Rydgård 19d6850789 Apply the correct culling epsilons both in fastcull and in software transform. Fixes NBA again. 2026-06-05 00:18:06 +02:00
Henrik Rydgård 392a862be2 Merge pull request #21784 from hrydgard/smarter-2d-filter
Smart 2D texture filtering: Use the new vertex path to check for pixel mapping in transformed geometry
2026-06-04 17:24:40 +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 1867f0775e Avoid soft-transform-and-clip if the near plane matches the final clip plane, and a new compat flag isn't set
Fixes #21776

Since only two games are known to need the cull-after-clip behavior
(previously known as inversion), we flag those and avoid unnecessary
soft clipping.

I had hoped to find a dynamic check that would work, but haven't managed
to figure out a good one yet.

This will improve performance a little bit in some other games since we
can avoid clipping in software at all in many cases.
2026-06-04 14:49:22 +02:00
Henrik Rydgård 50e5f9c23a Small simplification and fix in VertexShaderGenerator 2026-06-04 12:45:20 +02:00
Henrik Rydgård 195455a7f4 Break out VertexReader, prepare VertexReader for CrossSIMD use in software transform 2026-06-04 12:45:17 +02:00
Henrik Rydgård 84c366971c Software transform: Scope some variables properly. Remove unnecessary & on parameter. 2026-06-04 12:45:17 +02:00
Henrik Rydgård 00d201b216 Correct software transform stats in all-cull and through mode cases 2026-06-04 12:45:17 +02:00
Henrik Rydgård c270e8766e Correct depth clear translation. Fixes #21780 2026-06-04 11:30:52 +02:00
Henrik Rydgård 652e3e2c22 Use fastcull on indexed draws too. 2026-06-04 11:24:15 +02:00
Henrik Rydgård 078197d790 Remove unnecessary scaling and then un-scaling of through-mode Z coordinates 2026-06-03 20:31:05 +02:00
Henrik Rydgård 382999b013 Merge pull request #21774 from hrydgard/assorted-fixes
Add default mappings for the right stick to many of our default keymaps
2026-06-03 19:11:50 +02:00
Henrik Rydgård 9f5d28ca6e Fix toggling pause with the bound pause key 2026-06-03 18:49:13 +02:00
Henrik Rydgård 2ea8a9ac1f Revert "Remove unnecessary scaling and then un-scaling of through-mode Z coordinates"
Didn't mean to commit this, it was supposed to go in a PR.

This reverts commit 6d4c70c67d.
2026-06-03 17:18:10 +02:00
Henrik Rydgård 6d4c70c67d Remove unnecessary scaling and then un-scaling of through-mode Z coordinates 2026-06-03 16:00:40 +02:00
Henrik Rydgård 48084e9c3e Cleanup, fix some oversights 2026-06-03 15:23:17 +02:00