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
84c366971c
Software transform: Scope some variables properly. Remove unnecessary & on parameter.
2026-06-04 12:45:17 +02:00
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
79328a99b3
Vertex preview works again in both debuggers.
2026-06-02 15:40: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
a317890c08
Remove the GPUDebugInterface class
...
Just a pointless extra layer in the class hiearchy, making it
unnecessarily hard to modify the interface.
Might as well hit GPUCommon directly.
2026-06-02 11:15:08 +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
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
62d8cf22de
Move the viewport transform to software in SW transform mode
...
transform fix
2026-05-30 19:07:58 +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
7853881210
GPU header cleanup: Avoid including GPUCommon.h in some places
2025-11-23 20:37:37 +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
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
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
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
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
944b3c5be5
Add pixel mapping detection for through mode RECT primitives
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
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
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
Unknown W. Brackets
a7b7bf7826
Global: Set many read-only params as const.
...
This makes what they do and which args to use clearer, if nothing else.
2022-12-10 21:13:36 -08:00
Unknown W. Brackets
2718e81c0e
GPU: Expand lines to triangles.
2021-10-31 14:46:46 -07:00
Unknown W. Brackets
b3a8e013f6
GPU: Expand points into triangles for higher res.
2021-10-31 13:06:06 -07:00
Unknown W. Brackets
4fb09859fd
GPU: Refactor out rectangle expansion.
...
Just so it's cleaner when the same is done for lines.
2021-10-31 11:09:04 -07:00
Unknown W. Brackets
5128480d74
GPU: Implement cull behavior in sw transform.
2021-10-30 21:04:16 -07:00
Unknown W. Brackets
159eab5141
GPU: Set projection matrix per backend.
...
There's a bit of variance, so this keeps the central code clean.
2021-10-30 18:20:36 -07:00
Unknown W. Brackets
3730460bc5
GPU: Move swtransform flippedY to params.
2021-10-30 18:17:22 -07:00
Unknown W. Brackets
ea1f0a1195
Vulkan: Match safe size behavior on all backends.
...
Before, we would not mark a safe size for some Vulkan clears where depth
was not cleared, deviating from other backends. We also never detected
that on PowerVR. This makes things more consistent.
2020-05-23 00:25:39 -07:00
Unknown W. Brackets
ef43ec5f33
GPU: Split up software transform into phases.
2020-05-08 23:09:24 -07:00
Unknown W. Brackets
48980d8786
GLES: Simplify the framebuf offset detection.
...
It's clearly not been understood well as changes were made, so let's dump
a bunch of comments on it.
2020-05-07 23:12:14 -07:00
Unknown W. Brackets
dca159c47e
GPU: Correct sw flat shading color on Vulkan/D3D.
...
It was only correct on GLES before. This only fixes software transform.
2018-06-06 05:53:50 -07:00
Henrik Rydgård
734d9c494c
Fix bug in Vulkan non-buffered where clears could extend outside the frame, since Vulkan clears do not respect scissors.
2017-12-02 11:05:10 +01:00
Unknown W. Brackets
8efbcf8d42
Use draws for alpha/stencil only clear in Vulkan.
2016-03-20 19:31:02 +01:00
Henrik Rydgard
5d0d67140f
Reverse Y when checking for rotated rects in Direct3D 9. Fixes #7738 .
2015-05-12 20:01:04 +02:00