425 Commits

Author SHA1 Message Date
Henrik Rydgård d70697d3ae Vulkan simplification: in PipelineCacheKey, use shader IDs instead of pointers to shaders. 2026-07-09 18:40:58 +02:00
Henrik Rydgård 5f7281bd8e Remove old vestiges of geometry shader support 2026-07-08 18:25:08 +02:00
Henrik Rydgård a4d21d23bb Remove some remains of HW tessellation 2026-06-26 18:53:35 +02:00
Henrik Rydgård 623545bd24 Delete the "Hardware tessellation" feature.
Very hard to maintain and debug, not worth it.
2026-06-16 16:17:14 +02:00
Henrik Rydgård e0634f3df9 Assorted cleanup and tweaks 2026-06-13 13:34:41 +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 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 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 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 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 058b1af285 Revert to software on out-of-bounds projected depth 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 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 b1723086be Plumb through depth information (although not yet always generated) 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 f60e27a9b7 Just some refactoring of the GPUStatistics struct, and more use of StringWriter 2026-05-29 14:40:31 +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 65c99beea7 Remove some old debris 2026-05-19 15:43:25 +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 5aeb38412d Fix another valgrind warning 2026-02-19 11:46:14 +01:00
Henrik Rydgård 732288c03a Brave Story: Hack to make the bloom effect run much more efficiently.
Fixes #19820

Not ready for merge, it needs more checks and maybe a compat flag.
2026-01-23 23:13:04 +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 8ed898c5e6 GPU: Constify VertexDecoder pointers, remove in some cases 2025-05-14 15:13:59 +02:00
Henrik Rydgård 5d85d5ed22 Depth raster: Rename some variables, fix incorrect draw limit 2025-04-10 17:49:06 +02:00
Henrik Rydgård 2371fdfedd Rework depth raster to fully support software transform 2024-12-21 21:22:22 +01:00
Henrik Rydgård a344d0225f DepthRaster: Fix bug where we used the wrong vertex count. 2024-12-21 14:28:00 +01:00
Henrik Rydgård bdb5f3a91b Reorganize the depth vertex pipeline for future optimizations 2024-12-21 14:27:59 +01:00
Henrik Rydgård df6ed8cfc9 Do some cleanup of #includes in GPU 2024-12-18 13:57:26 +01:00
Henrik Rydgård abb2558535 When overriding skinning in sw transform mode, don't write/restore member variables 2024-12-17 18:52:49 +01:00
Henrik Rydgård 20ecbfdf57 Pass the VertexDecoder pointer around 2024-12-17 18:24:26 +01:00
Henrik Rydgård e74101a2fb applySkinInDecode belongs in the VertexTypeID, not in the options. 2024-12-17 18:24:18 +01:00
Henrik Rydgård 111d0c872d Global rename of FBChannel to Aspect, also make it a class enum 2024-12-15 22:24:05 +01:00
Henrik Rydgård 54d18bb343 Lift some more debugging functionality into GPUCommon 2024-12-15 14:03:05 +01:00
Henrik Rydgård b47c9b6dd2 Remove redundant call to SetColorUpdated 2024-12-15 13:44:35 +01:00
Henrik Rydgård 11dbae3457 Remove the "DispatchFlush" mechanism, not convinced it's a win 2024-12-15 13:42:05 +01:00
Henrik Rydgård 9e019ae246 Remove the notion of the GPU debugger being "Active". Now it's automatic. 2024-12-15 11:12:53 +01:00
Henrik Rydgård 0e6fc8e0e3 Assorted warning fixes 2024-11-28 15:02:26 +01:00
Henrik Rydgård 10db7de53c Prevent bound depal and framebuffer texture views from lingering between frames
Should help #19557
2024-10-29 08:11:39 +01:00
Henrik Rydgård 1221a6e928 Minor code cleanups 2024-10-28 17:50:34 +01:00
Henrik Rydgård 858f37b8fc Add a couple of asserts (to make things error out earlier) 2024-10-17 21:01:58 +02:00