Commit Graph
9867 Commits
Author SHA1 Message Date
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
Henrik Rydgård d0f4e5c2d1 Visualize bounding boxes in ImGe debugger by drawing their corners 2026-06-03 13:46:30 +02:00
Henrik Rydgård 1624a6da83 Delete some old now-unused variables, and remove an accidental use. 2026-06-03 13:28:40 +02:00
Henrik Rydgård 7f4c51c141 Merge pull request #21752 from hrydgard/clean-nans-sw
Clean out NaNs and INFs from PosFloat vertex coordinates
2026-06-03 10:38:13 +02:00
Henrik Rydgård ab108f7f0c BBOX: Avoid z clipping issues by culling in clip space. 2026-06-03 10:05:21 +02:00
Henrik Rydgård 86212f5384 Correct minor shader generator bug for depthclamp case. 2026-06-02 15:58:47 +02:00
Henrik Rydgård 0dc6e36d19 Delete redundant implementation of vertex preview in SoftGpu 2026-06-02 15:43:11 +02:00
Henrik Rydgård 79328a99b3 Vertex preview works again in both debuggers. 2026-06-02 15:40:37 +02:00
Henrik Rydgård c46774c923 Fix the ImGe debugger vertex list 2026-06-02 14:53:37 +02:00
Henrik Rydgård bb573e6e0c Well, it builds, but doesn't work yet. 2026-06-02 12:33:53 +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 e6185ba6bb Clean out NaNs and INFs from vertex coordinates
This enables a behavior seen on the real PSP where 0 * NaN == 0 in the
GPU (NOTE: This means the vertex transform pipeline).

However, this
doesn't touch INFs unfortunately, and we need to modify those too...

This, together with #21715, finally fixes #20204 .
2026-06-02 10:52:39 +02:00
Henrik Rydgård 847953fd31 Fix wrong logic causing excessive software transform fallback if cull planes are missing. Minor cleanup. 2026-05-31 13:31:16 +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