Henrik Rydgård
b65bbaf92c
Merge pull request #21678 from nintendo424/gpu-save-first-frame
...
gpu: Preserve first-frame font render targets
2026-05-27 12:22:47 +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
06a7793f57
Fix some y-flip issues in D3D11. It got broken by recent refactorings.
...
Fixes #21726
2026-05-26 15:51:24 +02:00
Henrik Rydgård
4be2a853b7
FastCull: Integrate the vertex position loading into the culling loop
2026-05-25 18:16:34 +02:00
Henrik Rydgård
82a888fd8e
Reimplement the fast culling using CrossSIMD
2026-05-25 18:16:34 +02:00
Henrik Rydgård
250abe0d56
Loongarch64 build fixes
2026-05-25 15:41:24 +02:00
Henrik Rydgård
37f6fda9c9
Add a CrossSIMD loongarch64 LSX implementation. Note: This is untested!
2026-05-25 15:40:22 +02:00
Henrik Rydgård
4a55fc6724
Prepare TestBoundingBoxFast for optimization
2026-05-25 13:37:27 +02:00
Henrik Rydgård
dd125b2e4d
Delete obsolete (and non-working) support for GPUs without non-pow-2 textures.
2026-05-24 14:15:34 +02:00
Henrik Rydgård
f40e487a61
Simplify the TransformedVertex struct
2026-05-24 12:48:26 +02:00
Henrik Rydgård
2eca0123f1
Correct culling in case of some weird viewport setups
2026-05-23 14:49:17 +02:00
Henrik Rydgård
fa856fbf68
Pass the culling unit tests.
2026-05-23 14:40:15 +02:00
Henrik Rydgård
a854a2bed1
Correct some comparisons for bbox
2026-05-23 14:40:15 +02:00
Henrik Rydgård
0d33cd0a65
Convert the BBOX/BJUMP culling to use the worldviewproj matrix and a screen space check.
2026-05-23 14:40:15 +02:00
Henrik Rydgård
7a093623e8
Sonnet NEON
2026-05-23 14:40:15 +02:00
Henrik Rydgård
1fb9446d5a
Optimize the SSE path
2026-05-23 14:40:15 +02:00
Henrik Rydgård
e64a61017e
Use the new method for NEON and fallback fast culling
2026-05-23 14:40:15 +02:00
Henrik Rydgård
dbba46bfb5
Simplify away some trivial math
2026-05-23 14:40:15 +02:00
Henrik Rydgård
893bc732a1
Fast culling: Use the worldviewproj matrix to avoid the need for planes
2026-05-23 14:40:15 +02:00
Henrik Rydgård
5cfbf50111
Keep updated products of view*proj and world*view*proj matrices. Use to simplify bbox culling.
2026-05-21 19:18:32 +02:00
Henrik Rydgård
736d054b8f
Remove the u_proj_though matrix from the uniform buffer
2026-05-19 16:33:45 +02:00
Henrik Rydgård
65c99beea7
Remove some old debris
2026-05-19 15:43:25 +02:00
Henrik Rydgård
e108828bcc
Unify Z handling between the backends
2026-05-19 15:17:44 +02:00
Henrik Rydgård
d243737c11
Revert "Convert the pre-rotation to just the matrix multiplication."
...
After the previous commit, the optimization is no longer needed, and
unnecessarily bloats the uniform buffer.
This reverts commit 62bcb1785e809649ba88b49e24c5217f457fa040.
2026-05-17 11:02:35 +02:00
Henrik Rydgård
4b93a870db
Optimize out pre-rotation entirely from vertex shaders when not needed
2026-05-17 11:01:50 +02:00
Henrik Rydgård
947217d1be
Convert the pre-rotation to just the matrix multiplication.
2026-05-17 10:59:40 +02:00
Henrik Rydgård
065a68ef4f
Split out screen rotation from the projection matrix
2026-05-17 10:58:54 +02:00
nintendo424
e5689d1adc
gpu: Preserve first-frame font render targets
...
Some games render HLE sceFont glyphs into small VRAM-backed framebuffers and immediately sample them as textures. This needs both the source glyph buffer and the temporary render target to be preserved before later commands overwrite or rebind them.
Save first-frame data from the previous render target before creating a new framebuffer, since ResizeFramebufFBO() makes the new framebuffer current. Also flush pending draws before PGF writes over a glyph buffer that may still be referenced by queued texture draws.
Backend software transform normally reports safe framebuffer size during draw flush, but first-frame readback can happen before queued draws reach that path. Estimate through-mode rectangle/triangle bounds before SubmitPrim() and feed those bounds to SetSafeSize(), using actual vertices clamped to scissor instead of a tiny-target heuristic.
Fixes missing text in Evangelion JO.
2026-05-15 12:23:14 -04: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
85de7fdc50
Add new flag that will simplify the GL path
2026-05-14 22:20:35 +02:00
Henrik Rydgård
28166cb35d
Add "allocation slack" to our pushbuffers. Fixes a memory overwrite bug
...
Reported by Joseph on Discord.
Sometimes, things could align perfectly so allocations happend exactly
at the end of a pushbuffer. At the same time, we allow our vertex decoder to write an extra few
bytes if it needs to for speed. Unfortunately I missed this interaction,
resulting in some uncommon crashes that were especially common with
heavy-geometry things like modified GTA LCS with PS2 assets, for
example.
The problem was reported with Vulkan, but our OpenGL backend had the
same issue too.
2026-05-13 15:55:34 +02:00
Henrik Rydgård
e0d6664e85
Fix issue with raw screenshots not always being cropped correctly
...
Fixes #21664
2026-05-12 10:12:41 +02:00
Henrik Rydgård
84c1755abe
Cleanup in TextureCacheCommon
2026-04-28 16:27:56 +02:00
Herman Semenoff
8f4fb77f79
gameinfocache: fbmanager: use const ref and modernize to for range C++17
...
From #21606
2026-04-28 10:54:55 +02:00
Herman Semenoff
5e2f51af8e
gpu: elf: using reserve() for optimize inserts in for loop
...
From #21611
2026-04-28 10:53:32 +02:00
Lin Runze
d1bf797e1b
loongarch: Fix Jit_WeightsU16Skin in VertexDecoderLoongArch64.cpp
2026-04-25 16:33:06 +08:00
Henrik Rydgård
d108fe25d1
Rework constant buffer loading, barrier fix
2026-04-23 13:32:06 +02:00
Henrik Rydgård
4c2be7f8af
More work. Some initialization order problem.
2026-04-23 13:31:51 +02:00
Henrik Rydgård
4335a327cd
Hackery to prepare for constant buffers in compute
2026-04-23 13:31:51 +02:00
Henrik Rydgård
8d99c71c12
Merge pull request #21527 from ZironZ/pr/gpu-texture-scaling-nnedi3-spline36-clean
...
NNEDI3 and Spline36 GPU texture scaling
2026-04-09 13:24:19 -06:00
Henrik Rydgård
6919d8a764
ImGeDebugger: In the textures window, properly write out the status flags.
2026-04-07 11:39:16 -06:00
Henrik Rydgård
7f53eeff08
Fix deferred texture scaling when GPU texture scaling is used. This partially broke GPU texture scaling partially on many mobile devices.
2026-04-07 11:36:59 -06:00
ZironZ
62bea77bd0
Add Vulkan multipass texture scaler infrastructure
2026-04-07 13:29:15 -04:00
Henrik Rydgård
0b154ca6ef
Depth raster: Handle triangles with culling disabled properly.
2026-03-31 18:17:01 -06:00
Henrik Rydgård
10b6c14a9e
Avoid memory access functions that can cause memory exceptions in ImDebugger. Minor opt.
2026-03-31 17:53:00 -06:00
Henrik Rydgård
df5ad56546
Merge pull request #21324 from hrydgard/silent-hill-shadows
...
WIP: Apply changes by fcrwr, fixing (mostly) shadows in Silent Hill: Shattered memories
2026-03-18 09:06:55 +01:00
Henrik Rydgård
30c717cb4a
Merge pull request #21386 from chealy/gpu-shader-optimizations
...
GPU: Shader optimizations using inversesqrt and dead code removal
2026-03-17 22:31:06 +01:00
Henrik Rydgård
c1f8421dc2
Merge pull request #21342 from fcrwr/block-transfer-clipping
...
Fix block transfer clipping
2026-03-17 22:28:04 +01:00
Henrik Rydgård
75453632f9
Handle inset adjustements on the C++ side, handle them better in the UI.
2026-03-14 18:13:37 +01:00