Commit Graph
180 Commits
Author SHA1 Message Date
Henrik Rydgård 19434ff303 Keep the depth in floating point to save some conversions 2024-12-22 10:32:19 +01:00
Henrik Rydgård 0629a98f97 Add some depth raster stats 2024-12-22 10:32:15 +01: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 820e7369b9 Speed up DepthRasterClipIndexedTriangles with CrossSIMD 2024-12-21 14:28:00 +01:00
Henrik Rydgård 67078d439b Depth raster: Switch to a SoA data layout for the screen space verts 2024-12-21 14:28:00 +01:00
Henrik Rydgård bdf4b69207 Warning fixes, minor cleanup 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 5326d87f9c Rename CrossSIMD to SIMDHeader, but also keep CrossSIMD.h (will have a future use) 2024-12-19 15:15:43 +01:00
Henrik Rydgård ee297e974d Move more code into SoftwareTransformCommon, cleanup 2024-12-18 13:57:26 +01:00
Henrik Rydgård 0b06cd1379 Actually avoid looking up the vertex decoder more than once 2024-12-17 22:42:07 +01:00
Henrik Rydgård 15b4f0c299 Lookup the decoder outside of DrawEngine 2024-12-17 19:27:01 +01:00
Henrik Rydgård 61b14df329 Delete obsolete empty function ClearTrackedVertexArrays 2024-12-17 19:15:25 +01:00
Henrik Rydgård a2a089b8c1 Remove the member function NormalizeVertices 2024-12-17 19:15:03 +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 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 11dbae3457 Remove the "DispatchFlush" mechanism, not convinced it's a win 2024-12-15 13:42:05 +01:00
Henrik Rydgård 2c8e78408b Add basic vertex data viewer (with the same flaws as the old one) 2024-12-06 09:29:12 +01:00
Henrik Rydgård 68fdb522cb Fix small accuracy issue in through-mode 2D culling 2024-12-01 16:02:48 +01:00
Henrik Rydgård d3b6d12067 Cull through-mode 2D draws against scissor rectangle
Helps texture replacement load performance in Fate Extra CCC (it does a lot
of off-screen drawing), and may help in other situations too.
2024-12-01 14:54:55 +01:00
Henrik Rydgård 1221a6e928 Minor code cleanups 2024-10-28 17:50:34 +01:00
Henrik Rydgård 7e952ab795 Delete unused code, fix a comment. 2024-10-23 10:55:46 +02:00
Henrik Rydgård 3a4defe210 DrawEngineCommon: Enforce the limit on vertex decoding
Should help #18894 which draws using a nonsense index buffer sometimes,
causing problems since we decode the whole range...
2024-09-26 00:41:01 +02:00
Henrik RydgårdandGitHub 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 f22249cef5 Reject zero-vertex-count draws.
I thought all the code was safe against it, but it isn't.
2023-12-29 14:09:45 +01:00
Henrik Rydgård 126d88ecfc Back out clearly inconsequential/useless .reserve() calls 2023-12-29 08:27:56 +01:00
Henrik Rydgård ac208505a5 Remove bad debug assert 2023-12-21 11:48:52 +01:00
Henrik Rydgård 61acce195c Avoid decoding indices when we don't need them. 2023-12-20 14:25:19 +01:00
Henrik Rydgård f86189c951 Show vertex decoders separately in profiles 2023-12-19 12:25:54 +01:00
Herman Semenov 0748ce610f [GPU/Common/D3D11/Directx9/GLES/Vulkan] Using reserve if possible 2023-12-15 14:08:22 +03:00
Henrik Rydgård 71aaad23fb Fix issue with zero-vertex draw calls. Though, should maybe just filter them out earlier. 2023-12-10 12:21:07 +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 904ce4f7e1 Quickfix regression in Outrun 2023-12-09 18:32:26 +01:00
Henrik Rydgård 7e85d3d10a Disable the new culling on RISC-V for now. 2023-12-09 16:49:02 +01:00
Henrik Rydgård 4e2a1bf81c NEON: vcvtq can scale directly, no need for a mul by const. 2023-12-09 16:48:59 +01:00
Henrik Rydgård 99548be8a3 NEON culling: Use mla operations to shave off some more cycles. ARM32 compat. 2023-12-09 16:36:01 +01:00
Henrik Rydgård 6a7ef83f4b NEON-optimize the culling 2023-12-09 15:55:51 +01:00
Henrik Rydgård 5b44e25150 SSE-optimize the frustum culling 2023-12-09 15:55:51 +01:00
Henrik Rydgård 62c936babf Flip the cull plane data around to avoid transforming each vertex multiple times. 2023-12-09 15:55:51 +01:00
Henrik Rydgård a043962447 World space planes 2023-12-09 15:55:51 +01:00
Henrik Rydgård dbf796bb66 Fastcull: SSE/NEON-optimize 16-bit position conversion 2023-12-09 15:55:51 +01:00
Henrik Rydgård 89d8ef87ec Use a less accurate but faster frustum cull for the general draws. 2023-12-09 15:55:51 +01:00
Henrik Rydgård 0905b6a5ad Frustum-cull small draws
Some games do a poor job of culling stuff, and some transparent
sprites can be very expensive if they cause a copy.
Skipping them if outside the viewport makes sense in that case.

One example are the flame sprites in #17797 .

Additionally, we should be able to cull through-mode draws easily, this
one doesn't even try.
2023-12-09 15:55:51 +01:00
Henrik Rydgård aec0606ba4 Optimize the bounding box code for more vertex formats 2023-11-26 13:40:37 +01:00
Henrik Rydgård e4ea4831e9 Delete the vertex cache option from the code. 2023-10-10 15:43:43 +02:00
Henrik Rydgård 078018a943 Move the clockwise calculation out of DrawEngineCommon 2023-10-10 13:16:34 +02:00