Commit Graph

169 Commits

Author SHA1 Message Date
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 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 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 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 058b1af285 Revert to software on out-of-bounds projected depth 2026-05-30 19:07:59 +02:00
Henrik Rydgård 49557580e9 disable debug colors 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 280ddbf86c Remove state from SoftwareTransform class 2026-05-30 19:07:59 +02:00
Henrik Rydgård 5cc2f71038 Software transform: More Z clamping updates 2026-05-30 19:07:59 +02:00
Henrik Rydgård 83dcd24043 Small SIMD optimization in software transform 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 a6b146b74b Some work on software transform 2026-05-30 19:07:59 +02:00
Henrik Rydgård f55adcc3a1 Apply a small depth bias to simulate rounding of Z. Fix min/max clip plane math 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 d3543e16b3 Simplify line expansion 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 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
Henrik Rydgård 65c99beea7 Remove some old debris 2026-05-19 15:43:25 +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 991d7bdfab VertexDecoder: Refactor away lowerbound/upperbound parameters 2026-02-05 13:26:17 +01:00
Henrik Rydgård 6cfea96e58 Remove D3D9 support, to make future changes easier 2025-06-10 15:07:16 +02:00
Henrik Rydgård 8ed898c5e6 GPU: Constify VertexDecoder pointers, remove in some cases 2025-05-14 15:13:59 +02:00
Henrik Rydgård 41b77bf1ae More log cleanup 2025-04-14 22:27:51 +02:00
Henrik Rydgård e633505f41 Actually, let's just delete the old reporting checks. There aren't many mysteries left here. 2025-04-11 08:57:02 +02:00
Henrik Rydgård 6f7a848113 Move some checks out of the hot path in the software transform 2025-04-11 08:57:02 +02:00
Henrik Rydgård 449e3e1360 Very minor soft transform optimization 2024-12-28 18:45:03 +01:00
Henrik Rydgård c91169e702 Restore removed <algorithm> includes.
Turns out these were needed after all. For some reason, on Windows and
Mac, <algorithm> gets auto-included by something else so I don't notice
when it's missing, and MSVC's include dependency tracker doesn't see it
either.
2024-12-19 09:53:07 +01:00
Henrik Rydgård df6ed8cfc9 Do some cleanup of #includes in GPU 2024-12-18 13:57:26 +01:00
Henrik Rydgård ee297e974d Move more code into SoftwareTransformCommon, cleanup 2024-12-18 13:57:26 +01:00
Henrik Rydgård a07da939ef Some NormalizeVertices interface cleanup 2024-12-17 19:13:38 +01:00
Henrik Rydgård fec232f8a8 GPU: Move things around a little, out of DrawEngine. 2024-12-17 19:13:38 +01:00
Henrik Rydgård 14bb7a6062 Reduce Windows debugger crashes on shutdown 2024-10-29 11:20:03 +01:00
Henrik Rydgård 096985f51f Provoking vertex (software transform): Simpler solution
Simply rotate each primitive in the index buffer to simulate a different provoking vertex.

Since at this point we have already generated a plain primitive index
buffer, it's easy to manipulate like this.

An even better solution would be to generate rotated index buffers
directly during decode, although that code is super critical and does
not need more complexity..

We could now also enable this for hardware transform but I'm leaving
that for later.
2024-07-17 14:40:52 +02:00
Henrik Rydgård 6b1e57a840 We never draw non-indexed in software transform mode, so get rid of the path. 2024-07-17 14:40:52 +02:00
Henrik Rydgård 665f03ff62 Add provoking vertex to caps, flip the flag around 2024-07-17 14:40:52 +02:00
Henrik Rydgård e01ca5b057 Logging API change (refactor) (#19324)
* Rename LogType to Log

* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.

* Mac/ARM64 buildfix

* Do the same with the hle result log macros

* Rename the log names to mixed case while at it.

* iOS buildfix

* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Herman Semenov b57dab2812 [GPU] Make static and const methods if possible 2024-04-05 17:04:31 +03:00
Henrik Rydgård cb79783539 Expand primitives: Check the vertex count too.
Still getting a few crashes, let's get rid of the last of them from this,
hopefully.
2024-01-28 22:48:40 +01:00
Henrik Rydgård 103d8b1019 Don't apply smart 2d texture filter to video. 2024-01-18 23:38:44 +01:00