Commit Graph

154 Commits

Author SHA1 Message Date
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
Henrik Rydgård dac4c7adb0 Add checks against overrunning the index buffer space 2024-01-15 10:25:18 +01:00
Henrik Rydgård db94b0b696 Pass the limit on the number of indices to generate to BuildDrawingParams. 2024-01-15 10:09:04 +01:00
Henrik Rydgård cf5d76faf5 Continue replacing 'maxIndex' with 'numDecodedVerts'. Not an ideal name but better. 2024-01-14 23:41:05 +01:00
Henrik Rydgård 4360fe786c Add a setting for smart 2D texture filtering 2024-01-12 11:10:53 +01:00
Henrik Rydgård 8de7a97883 Check small triangle draws in through-mode for pixel mapping too 2024-01-11 14:32:52 +01:00
Henrik Rydgård e3841ddb4a Accept 1D stretch as pixel mapped 2024-01-11 12:56:03 +01:00
Henrik Rydgård 944b3c5be5 Add pixel mapping detection for through mode RECT primitives 2024-01-11 12:56:03 +01:00
Henrik Rydgård 6e12465dc4 Move through-mode UV scaling for rects from Transform to ExpandRectangles 2024-01-11 12:56:03 +01:00
Henrik Rydgård 0b6ea4b2e5 Use the Tokimeki / old Juiced 2 method for Breath of Fire III
Allows us to delete a bunch of complex code.
2024-01-11 10:44:13 +01:00
Henrik Rydgård aca3bbc9a0 DrawEngine: Remove the confusing MaxIndex accessor, replace with directly reading numDecodedVerts_ 2023-12-10 11:58:47 +01:00
Henrik Rydgård db421165c0 Merge pull request #18172 from hrydgard/more-lenient-clear-detection
Make clear detection a bit more lenient
2023-09-29 09:52:08 +02:00
Henrik Rydgård abbd1c83bd Revert "Merge pull request #18184 from hrydgard/expand-lines-mem-fix"
This reverts commit 65b995ac6c, reversing
changes made to 01c3c3638f.
2023-09-27 20:04:37 +02:00
Henrik Rydgård 81f47caf2f Clarify the primitive expansion, add reporting 2023-09-22 10:27:02 +02:00
Henrik Rydgård 966144fa64 Bounds check writing to the index buffer when expanding lines/rects/points 2023-09-20 19:26:36 +02:00
Henrik Rydgård 3f2ef508c9 Make it easier to reason about space in the inds buffer by moving an offset instead of the pointer. 2023-09-20 19:23:24 +02:00