148 Commits

Author SHA1 Message Date
Henrik Rydgård e0634f3df9 Assorted cleanup and tweaks 2026-06-13 13:34:41 +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 d33425d01d Split out the CLUT texture cache from "TextureShaderCache" 2026-06-11 10:57: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 1781f693b5 Implement the new SyncDomain concept for texture hashing, remove minihash 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 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 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 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 652e3e2c22 Use fastcull on indexed draws too. 2026-06-04 11:24:15 +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 44ece6dfa2 Determine the clip flags directly when culling, simplifying the code. 2026-05-30 19:07:59 +02:00
Henrik Rydgård 189dde8115 Cache the cull matrix. Minor bbox optimization. 2026-05-30 19:07:59 +02:00
Henrik Rydgård 116d91fcaa Viewport-scissor dirty state cleanup 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 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 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 5ad24adc93 Cleanup, increase the max cull count. Flatout water works now. 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 86efaeee7e Increase the minimum vertex count for checking fast-cull. This fixes #10914 in hardware transform (by forwarding to software) 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 8b84fd555d Apply triangle near-clipping in software transform.
Fixes, but only in SW transform, #10914

Re-enable range culling, oops.
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 08f4c8fae8 Compute min/max Z and W from the culling loop, use to cull some more 2026-05-30 19:07:58 +02:00
Henrik Rydgård f0d715feaa During culling, evaluate minZ,maxZ,minW,maxW, and use them to cull some things. Also, assorted vshader work. 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 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 b65bbaf92c Merge pull request #21678 from nintendo424/gpu-save-first-frame
gpu: Preserve first-frame font render targets
2026-05-27 12:22:47 +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 2eca0123f1 Correct culling in case of some weird viewport setups 2026-05-23 14:49:17 +02:00
Henrik Rydgård 0d33cd0a65 Convert the BBOX/BJUMP culling to use the worldviewproj matrix and a screen space check. 2026-05-23 14:40:15 +02:00
Henrik Rydgård 5cfbf50111 Keep updated products of view*proj and world*view*proj matrices. Use to simplify bbox culling. 2026-05-21 19:18:32 +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
nintendo424 e5689d1adc gpu: Preserve first-frame font render targets
Some games render HLE sceFont glyphs into small VRAM-backed framebuffers and immediately sample them as textures. This needs both the source glyph buffer and the temporary render target to be preserved before later commands overwrite or rebind them.

Save first-frame data from the previous render target before creating a new framebuffer, since ResizeFramebufFBO() makes the new framebuffer current. Also flush pending draws before PGF writes over a glyph buffer that may still be referenced by queued texture draws.

Backend software transform normally reports safe framebuffer size during draw flush, but first-frame readback can happen before queued draws reach that path. Estimate through-mode rectangle/triangle bounds before SubmitPrim() and feed those bounds to SetSafeSize(), using actual vertices clamped to scissor instead of a tiny-target heuristic.

Fixes missing text in Evangelion JO.
2026-05-15 12:23:14 -04:00
Henrik Rydgård 0a1be41fa7 Additional fixes to ZipFileLoader 2026-03-08 12:33:46 +01:00
Henrik Rydgård bae1a7c7f9 Add "FastEmulatedGPU" compat flag. For games like Outrun that have intermittent slowdowns on hardware, it's unnecessary under emulation. 2026-02-26 10:44:16 +01:00
Henrik Rydgård eb234a1563 Finish the split. Greatly simplifies the render code in EmuScreen. 2026-02-08 10:46:16 +01:00
Henrik Rydgård 2ea94534e6 Split up FramebufferManagerCommon::CopyDisplayToOutput 2026-02-08 10:17:42 +01:00
Henrik Rydgård f01aaeafb1 Split CopyDisplayToOutput in preparation for the next step 2026-02-08 01:06:32 +01:00
Henrik Rydgård 64461329e7 More minor fixes and cleanups 2026-01-02 14:20:20 +01:00
Henrik Rydgård 7853881210 GPU header cleanup: Avoid including GPUCommon.h in some places 2025-11-23 20:37:37 +01:00
Henrik Rydgård 67010ff2af Split the display layout config between landscape and portrait orientations 2025-11-05 12:49:51 +01:00
Henrik Rydgård 9d1f8a2575 Don't forget to update the vertex addr even when culling 2D draws
Fixes #20454
2025-06-06 17:53:49 +02:00
Henrik Rydgård 3e0fea509d Improve sanity checks for vertex ranges in GPU 2025-05-14 09:39:14 +02:00
Henrik Rydgård dd38e8d012 GPU constify 2025-05-14 09:39:14 +02:00
Henrik Rydgård 8accc57df7 Avoid using shader blending (with framebuffer copy) if skip-buffer-effects is enabled
Fixes #20267
2025-04-17 19:18:59 +02:00
Henrik Rydgård c23c3e8d03 Measure the available time for "background depth raster". The idea is viable. 2024-12-29 09:45:55 +01:00