563 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 536c4ace73 Fix the ugly line on Ridge Racer lens flares
Turns out we were not updating one column and row of the lens flare
image, which is done in a strange way by the game (CLUT in framebuffer).

Some math of the game is a little off and for some reason it's not
noticeable on hardware.
2026-06-14 01:09:33 +02:00
Henrik Rydgård 7c1f052b87 ImGe debugger fix 2026-06-13 17:09:06 +02:00
Henrik Rydgård d6e0dd1478 Always enable the secondary texture cache 2026-06-13 13:34:41 +02:00
Henrik Rydgård 40a345bff8 Fix a filtering issue, enable this for Fushigi no Dungeon 4. 2026-06-12 23:52:50 +02:00
Henrik Rydgård 484b94c3f3 Build and warning fixes 2026-06-12 17:28:52 +02:00
Henrik Rydgård f3e590b059 Experiment with a compat flag that forces shader depal 2026-06-12 12:19:17 +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 4f925fa5f2 Minor code cleanup 2026-06-11 11:59:00 +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 63a51dc6c2 Minor code cleanup 2026-06-10 15:10:03 +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 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 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 5bfc87ffd5 Improve the sprite border fix to work with RECTs, add some conditions 2026-06-06 12:31:41 +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ård dd125b2e4d Delete obsolete (and non-working) support for GPUs without non-pow-2 textures. 2026-05-24 14:15:34 +02:00
Henrik Rydgård 84c1755abe Cleanup in TextureCacheCommon 2026-04-28 16:27:56 +02:00
Henrik Rydgård 6919d8a764 ImGeDebugger: In the textures window, properly write out the status flags. 2026-04-07 11:39:16 -06:00
Henrik Rydgård 7f53eeff08 Fix deferred texture scaling when GPU texture scaling is used. This partially broke GPU texture scaling partially on many mobile devices. 2026-04-07 11:36:59 -06:00
Henrik Rydgård df5ad56546 Merge pull request #21324 from hrydgard/silent-hill-shadows
WIP: Apply changes by fcrwr, fixing (mostly) shadows in Silent Hill: Shattered memories
2026-03-18 09:06:55 +01:00
Henrik Rydgård ffd21dba00 Quick workaround for Gripshift.
Fixes #21367
2026-03-07 18:59:03 +01:00
fcrwr f3c98442d5 Apply changes by fcrwr, fixing (mostly) shadows in Silent Hill: Shattered Memories
The game actually implements proper shadow mapping using some wicked
trickery, including framebuffer color reinterpretation. This finally
gets it working, by filling in some gaps in the existing mechanisms.

Unfortunately there's some precision issue that needs to be looked at,
as it can currently look quite stripy, very typical of shadow mapping.
2026-03-02 19:23:43 +01:00
Henrik Rydgård 8ceffa08cb Ignore extreme Y offsets when matching framebuffers.
Fixes #15828
2026-02-12 11:03:46 +01:00
Henrik Rydgård 5d080d1de8 Add a quick check against bad clut vs depth texture framebuffer matches
See #15828 and #20847
2026-02-10 15:51:49 +01:00
Henrik Rydgård 7d987cd78b Make fast_matrix_mul_4x4 inlineable 2026-01-30 14:10:32 +01:00
Henrik Rydgård 475390a968 Add workaround for Tales of Phantasia X.
Fixes #21162
2026-01-29 23:16:51 +01:00
Henrik Rydgård 5f7a937466 Rename ValidSize to ClampValidSizeAt 2025-12-30 20:31:07 +01:00
Henrik Rydgård fb521408c7 Avoid calling IsValidRange with zero length 2025-12-30 20:31:07 +01:00
Henrik Rydgård 33b87578c5 Revive old alignment utility functions, give them better names. 2025-09-03 20:48:51 +02:00
Henrik Rydgård 77e894c64d Fix more D3D11 lifecycle problems. Removed some ComPtr that got in the way 2025-08-01 18:20:44 +02:00
Henrik Rydgård 435f523997 Replacement textures: Don't spend frame time waiting for a texture to be finished
It's better to finish rendering the frame and have the texture ready for
the next one, without wasting CPU.

However, if the user set their texture load speed to "Instant", that
means they never want to see any original textures. So in that case, we
do still wait.

Fixes #20519
2025-06-13 23:31:02 +02:00
Henrik Rydgård 6cfea96e58 Remove D3D9 support, to make future changes easier 2025-06-10 15:07:16 +02:00
Henrik Rydgård bdf08c84fd Move the ImGui texture cache viewer out of core 2025-05-26 19:02:57 +02:00
Henrik Rydgård f3127346d4 Add a setting (in developer tools) to control texture replacement load speed 2025-04-22 20:57:32 +02:00
Henrik Rydgård 0f18f054ab Make the frame-time budget for uploading replacement textures take framerate into account 2025-04-22 20:19:43 +02:00
Henrik Rydgård 37e5aaa34a Vulkan: Auto Max Quality: Avoid conflict between aniso filtering and nearest filtering.
Fixes #19555
2025-04-15 11:10:36 +02:00
Henrik Rydgård 9ce9e43481 Make some uses of the erase-iter idiom safer and more consistent 2025-02-04 10:31:17 -06:00