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
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
991d7bdfab
VertexDecoder: Refactor away lowerbound/upperbound parameters
2026-02-05 13:26:17 +01:00
Henrik Rydgård
10759dc8b9
DrawEngineCommon: Avoid using member variables as loop counters, bad for perf
2026-01-30 14:10:36 +01:00
Henrik Rydgård
8728be5455
Fix joining TRIANGLE_LIST draws with a vertex count non-divisible by 3
...
Fixes #7503
2026-01-23 18:54:22 +01: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
9d1f8a2575
Don't forget to update the vertex addr even when culling 2D draws
...
Fixes #20454
2025-06-06 17:53:49 +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
bddd3c2a30
Minor stuff
2025-04-17 18:45:55 +02:00
Henrik Rydgård
5d85d5ed22
Depth raster: Rename some variables, fix incorrect draw limit
2025-04-10 17:49:06 +02:00
Henrik Rydgård
b080f7da6b
Small depth raster refactor
2025-04-10 17:13:48 +02:00
Henrik Rydgård
fd88f79d07
CrossSIMD: Fix more no-simd fallbacks. The depth rasterizer now works in TEST_FALLBACK mode.
2025-02-10 11:51:22 -06:00
Henrik Rydgård
c78fa60431
Add better way to check if CrossSIMD has been natively implemented
2025-01-28 10:56:52 +01:00
Henrik Rydgård
9caf37d28f
Turn off depth raster if SIMD not available
2025-01-28 10:54:43 +01:00
Henrik Rydgård
bd8e423358
Add some comments
2025-01-22 09:47:00 +01:00
Henrik Rydgård
206d4d1fea
Implement the low-quality depth raster mode, default to it on Android/iOS.
...
I really can't tell much of a difference in practice...
2024-12-31 11:19:38 +01:00
Henrik Rydgård
d325bb872b
Prepare for tiled depth raster
2024-12-29 10:05:32 +01:00
Henrik Rydgård
c23c3e8d03
Measure the available time for "background depth raster". The idea is viable.
2024-12-29 09:45:55 +01:00
Henrik Rydgård
6d539cc5e0
More fixes
2024-12-28 23:50:42 +01:00
Henrik Rydgård
aec17d8829
Actually queue up depth draws
2024-12-28 23:21:54 +01:00
Henrik Rydgård
4ef3ac474a
Just minor cleanup and prep in depth raster
2024-12-28 23:16:59 +01:00
Henrik Rydgård
25d79afd47
Small rename, remove some obsolete reporting
2024-12-28 23:05:07 +01:00
Henrik Rydgård
1e8eb88bf0
Unify the ends of the two depth draw paths
2024-12-28 19:22:23 +01:00
Henrik Rydgård
6136c7f5ef
More reorg
2024-12-28 18:51:37 +01:00
Henrik Rydgård
66926e28c1
Simplify / fix through mode triangles
2024-12-28 18:51:37 +01:00
Henrik Rydgård
3c3dfe5273
Reorganize depth raster draw state handling
2024-12-28 18:51:34 +01:00
Henrik Rydgård and GitHub
eec7853efe
More SIMD: Add some matrix operations to CrossSIMD ( #19773 )
...
* More CrossSIMD functionality
* Use the new SIMD API for the matrix multiplies
2024-12-28 18:45:14 +01:00
Henrik Rydgård and GitHub
8c069917b5
Depth raster optimizations: Merge viewport into projection matrix, prepare for further SIMD-ification ( #19769 )
...
* Remove some old redundant reports
* Fix scissor off by one
* More CrossSIMD
* Move the viewport scale out to the proj matrix
* DepthRaster: Also merge the viewport translation into the projection matrix.
* Depth raster: Do the triangle clipping in batches of 4 triangles
* Cleanup
2024-12-28 10:36:39 +01:00
Henrik Rydgård
03f09aebd7
Enable software depth raster for Wipeout, Midnight Club LA, Resistance.
...
Adds a setting to control it under speedhacks, named "Lens flare
occlusion". The setting includes a low quality mode which is not yet
implemented.
2024-12-22 10:48:46 +01:00
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