Henrik Rydgård
e0634f3df9
Assorted cleanup and tweaks
2026-06-13 13:34:41 +02:00
Henrik Rydgård
c5931ea690
Unify more shader uniform update code, fix bug in fallback for Uint8x3ToFloat4.
2026-06-13 10:14:39 +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
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
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
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
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
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
1624a6da83
Delete some old now-unused variables, and remove an accidental use.
2026-06-03 13:28:40 +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
0e8ba0d6fe
Bugfixes, cleanup
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
eaacbbc226
D3D and OpenGL shader buildfixes
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
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
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
69c7c75124
Replace u_proj_through with a simple scale/offset
...
First reasonable output appears.
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ård and GitHub
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
Herman Semenoff
400d136f51
GPU: modernize use C++17 constexpr for precalculate compilation
2026-05-19 21:57:45 +03:00
Henrik Rydgård
736d054b8f
Remove the u_proj_though matrix from the uniform buffer
2026-05-19 16:33:45 +02:00
Henrik Rydgård
65c99beea7
Remove some old debris
2026-05-19 15:43:25 +02:00
Henrik Rydgård
e108828bcc
Unify Z handling between the backends
2026-05-19 15:17:44 +02:00
Henrik Rydgård
065a68ef4f
Split out screen rotation from the projection matrix
2026-05-17 10:58:54 +02:00
Henrik Rydgård
afb764e6ae
Rendering: Unify the Y-flipping state across backends (now only applied in-shader, not through matrices).
2026-05-14 23:30:06 +02:00
Henrik Rydgård
85de7fdc50
Add new flag that will simplify the GL path
2026-05-14 22:20:35 +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
Henrik Rydgård
5e6ec70280
Minor stuff
2026-03-01 12:09:43 +01:00