325 Commits
Author SHA1 Message Date
Stenzek ccfc60ec94 GPU/HW: Remove extra barrier on VRAM download
Seems to work around download texture corruption on AMD/Vulkan/Windows.
2025-01-10 20:06:56 +10:00
Stenzek d25cffebd5 GPU/HW: Disable depth testing with semitransparency
But provide an option to enable it.
2025-01-09 21:45:14 +10:00
Stenzek d9c9b3038d GPU/HW: Fix ROV depth being written with semitransparency 2025-01-09 21:21:12 +10:00
Stenzek 7d2898b94c GPU/HW: Exclude 2D polygons from depth buffer
Fixes UI getting obscured in Kingsley's Adventure.
2025-01-09 21:21:12 +10:00
Stenzek 670dc461c1 GPU/HW: Slight re-shuffling of field offsets
Free up some bits in the middle.
2025-01-07 23:20:26 +10:00
Stenzek 4c801c3ff3 GPUDevice: Move size-matches check into ResizeTexture() 2025-01-07 23:20:25 +10:00
Stenzek b9186139d0 GPU/HW: Use sized tristrips instead of fullscreen quads 2025-01-07 23:20:25 +10:00
Stenzek c5bd4101b3 GPU: Refactor and simplify deinterlacing
Both HW and SW deal with half-height buffers coming in now.
2024-12-30 14:36:17 +10:00
Stenzek 9cba1decad GPU/HW: Compiler warning fix 2024-12-29 22:34:39 +10:00
Stenzek b7832e609f GPU/HW: Vectorize flipped sprite handling 2024-12-29 17:25:55 +10:00
Stenzek 1a211e0a21 GPU/HW: Fix mask bit regression from FF8 fix
Fixes overbright polygons appearing in Silent Hill.
2024-12-29 17:25:54 +10:00
Stenzek 799f5bdf97 GPU: Assume vertex commands are 8-byte aligned 2024-12-28 20:24:22 +10:00
Stenzek c2589461e9 GPU/HW: Remove extra debug group pop 2024-12-28 20:24:21 +10:00
Stenzek 74fd217afb GPU/HW: Always update/load/save CLUT
We have the headroom with multithreading now, and it prevents issues
saving/loading state in loading screens in some games.
2024-12-28 20:24:21 +10:00
Stenzek 25b0bb752a GPU/HW: Try truncating culled vertices
What is this monstrosity? Final Fantasy VIII relies on X coordinates
being truncated during scanline drawing, with negative coordinates
becoming positive and vice versa. Fortunately the bits that we need
are consistent across the entire polygon, so we can get away with
truncating the vertices. However, we can't do this to all vertices,
because other game's vertices break in various ways. For example,
+1024 becomes -1024, which is a valid vertex position as the ending
coordinate is exclusive. Therefore, 1024 is never truncated, only
1023. Luckily, FF8's vertices get culled as they do not intersect
with the clip rectangle, so we can do this fixup only when culled,
and everything seems happy.
2024-12-28 20:24:21 +10:00
Stenzek c99625e4c3 GPU: Move vertex culling to GPU thread
i.e. push all primitives through unless they are oversized, which the
GPU will definitely skip.

Needed because of coordinate truncation in Final Fantasy VIII, these
scenes will now render correctly with the software renderer again.
2024-12-28 20:24:09 +10:00
Stenzek b03127b206 GPU: Move background dumping to HW+GPU thread
And only dump when the mask bit check is not enabled.

The replacements are gated by the mask bit check anyway, so there's
no point dumping anything that can't be replaced.
2024-12-25 15:53:53 +10:00
Stenzek b8fa97e1a7 GPU: Fix sprite texture filtering with TC enabled 2024-12-24 00:24:37 +10:00
Stenzek 9a22ac3c70 GPU/HW: Download VRAM when enabling sw-for-readbacks 2024-12-23 17:55:47 +10:00
Stenzek 0b4e302c22 GPU: Implement PGXP for lines 2024-12-22 16:48:45 +10:00
Stenzek 62285dcf33 Settings: Split into GPU and main settings
That way the GPU thread copy doesn't need fields it never touches.
2024-12-21 14:53:15 +10:00
Stenzek 2d659fc3eb GPU: Move backend work off CPU thread 2024-12-19 23:32:15 +10:00
Stenzek 831c982f3b System: Rewrite memory save state handling
Makes it more friendly to GPU thread.
2024-12-19 22:42:28 +10:00
Stenzek e91ae5f1b9 GPU/HW: Only compile page texture shaders if TC is enabled
Knocks about 1/4 off the total pipelines with the default config.
2024-12-14 15:56:46 +10:00
Stenzek d8af8e4a60 GPU/HW: Fix possibly-stale display with MSAA+Show VRAM 2024-12-11 22:04:21 +10:00
Stenzek 6d080c1a3f GPU: Fix additional GL_POP() causing validation errors 2024-12-06 14:51:57 +10:00
Stenzek cbc22a89f7 GPU/HW: Fix TC + SW-For-Readbacks combo 2024-12-02 20:45:02 +10:00
Stenzek 0faa9cf650 Build: Add Devel configuration
Gets you debug assertions and logging, while still producing an
optimized executable.
2024-12-01 23:21:33 +10:00
Stenzek aafc029682 Misc: Un-namespace Timer 2024-11-29 20:13:37 +10:00
Stenzek 97700b85de GPU/HW: Clear ROV depth on fill/copy/write
It wasn't being specified before, whoops.
2024-11-27 17:52:31 +10:00
Stenzek 4edae3cdd0 GPU/HW: Depth buffer needs to be a RT in ROV mode 2024-11-27 12:56:01 +10:00
Stenzek 5fd79254bd GPU: Fix crash when toggling software renderer 2024-11-26 12:58:12 +10:00
Stenzek 57595c47af GPU/TextureCache: Move replacement cache onto the GPU
And enforce a maximum. Should sort out the upload spam.
2024-11-25 19:37:28 +10:00
Stenzek dec468966c GPU/HW: Fix sprite mode triggering on screen-aligned UVs
Some polygons just end up being perfect. For example, Croc 2
minecart level.
2024-11-25 15:39:45 +10:00
Stenzek 7b230dc4c1 GPU/HW: MSAA samples change needs to recreate pipelines
Otherwise Metal/Vulkan go boom boom.
2024-11-24 23:29:29 +10:00
Stenzek 3ff1b04576 GPUDevice: Support generating mipmaps 2024-11-24 23:29:28 +10:00
Stenzek 5c03e1d940 Misc: Fix alignment errors on ARM32 2024-11-23 18:52:45 +10:00
Stenzek babaffcce9 GPU/HW: Don't enable no-color-perspective when unsupported
i.e. GLES
2024-11-13 21:07:02 +10:00
Stenzek 99e65282f6 GPU/HW: Prefer shader over image copy if not dirty 2024-10-27 15:35:19 +10:00
Stenzek c6b74684de GPU/HW: Split shaders into resolution independent/dependent
Avoids recompiling everything on resolution change.
2024-10-27 15:15:20 +10:00
Stenzek 6cf8ac340b GPU/HW: Make copy/write shaders resolution independent 2024-10-27 15:15:20 +10:00
Stenzek aa0c0068ce GPU/HW: Move shadergen parameters to functions 2024-10-27 13:50:47 +10:00
Stenzek 1ae2dcf192 GPU: Propagate initialization error to caller
Avoids double error popup.
2024-10-26 01:41:29 +10:00
Stenzek 43ed92415d GPU/HW: Fix assert triggering in debug mode 2024-10-19 17:05:06 +10:00
Stenzek eb46142ee7 GPUDevice: Extract swap chain to separate class 2024-10-18 20:48:29 +10:00
Stenzek 219e890da5 GPU/HW: Write through VRAM transfers
Reduces the chances of rendering nothing after device loss.
2024-10-14 18:20:48 +10:00
Stenzek 08bdffac64 GPU/HW: Fix toggling texture replacement settings 2024-10-05 13:50:36 +10:00
Stenzek 71bb953253 GPU/HW: Handle redundant texture window updates
Significantly reduces draw count in THPS2.

~150 draw calls per frame to ~70.
2024-10-05 13:06:45 +10:00
Stenzek e06f1f1002 GPU: Add hardware texture cache 2024-09-29 13:37:47 +10:00
Stenzek c46ec398dc GPU: Move software fill/write/copy into rasterizer namespace 2024-09-26 18:30:46 +10:00