sharpemu/tests/SharpEmu.Libs.Tests/Agc
Arseny Yankovsky ea9be7484f
AGC: correct GS program registers, stop dropping rect-list draws, add a missing size export (#734)
Three defects found while bringing up a PS5 title. None are title-specific.

SPI_SHADER_PGM_LO_GS / HI_GS were 0x8A/0x8B, which are actually
SPI_SHADER_PGM_RSRC1/RSRC2_GS. Reading them as an address produced a
58-bit value (observed live: 0x30004622C008300). The correct offsets are
0x88/0x89, consistent with SPI_SHADER_PGM_CHKSUM_GS = 0x80 and
SPI_SHADER_PGM_LO_ES = 0xC8 already in the table.

Draw translation dropped any RECT_LIST draw whose vertex program exported
no parameters while the pixel shader had interpolated inputs. A
disposition census over a real run measured this deleting ~620 of every
5000 draws (12%). Rect lists are what AMD drivers emit for clears, blits
and resolves, so the guard was deleting clears and leaving previous frame
contents on screen as trails. Rendering a draw whose interpolants are
undefined is strictly better than deleting it.

sceAgcDcbDrawIndexIndirectMultiGetSize was unimplemented while
sceAgcDcbDrawIndexIndirectMulti emits an eight-dword packet. A title that
sizes its command buffer from the missing export under-reserves by three
dwords. NID derived with Ps5Nid.Compute, which reproduces the committed
NIDs of the neighbouring exports.

Tests: AgcContextRegisterTests and AgcShaderStageRegisterTests drive real
PM4 packets through sceAgcDriverSubmitDcb and assert what the parser
retained for the context and SH register dictionaries, via two new
internal accessors; neither dictionary had any test surface, which is why
register questions previously cost five-minute game runs.
2026-08-01 17:30:02 +03:00
..
AgcCommandBufferChainTests.cs AGC: follow command-buffer branches across arena switches (#720) 2026-07-31 12:12:35 +03:00
AgcContextRegisterTests.cs AGC: correct GS program registers, stop dropping rect-list draws, add a missing size export (#734) 2026-08-01 17:30:02 +03:00
AgcEventQueueTests.cs Kernel: correct equeue event delivery and waiter lifetime (#723) 2026-07-31 12:13:15 +03:00
AgcFusedShaderTests.cs fix(gta): restore wiped GTA foundation and gameplay path (PPSA04264) (#650) 2026-07-27 01:58:55 +03:00
AgcLabelProducerRetentionTests.cs Combined: Pad, AGC, Metal, Vulkan, Ampr, overlay, and CPU hot-path fixes (#727) 2026-07-31 12:14:02 +03:00
AgcPredicationTests.cs [VideoOut] Add Bink2 support via FFMPEG bridge (#527) 2026-07-22 21:41:41 +03:00
AgcPrimStateHullVariantTests.cs fix(gta): restore wiped GTA foundation and gameplay path (PPSA04264) (#650) 2026-07-27 01:58:55 +03:00
AgcRectListIndexHelpersTests.cs fix(gta): restore wiped GTA foundation and gameplay path (PPSA04264) (#650) 2026-07-27 01:58:55 +03:00
AgcResourceOwnerTests.cs [VideoOut] Add Bink2 support via FFMPEG bridge (#527) 2026-07-22 21:41:41 +03:00
AgcShaderStageRegisterTests.cs AGC: correct GS program registers, stop dropping rect-list draws, add a missing size export (#734) 2026-08-01 17:30:02 +03:00
AgcSubmitCompletionEventTests.cs AGC: deliver compute-queue completion events at the queue fence (#721) 2026-07-31 12:12:43 +03:00
AgcTextureTransportTests.cs fix(gpu): support Gen5 flat memory and 3D images (#587) 2026-07-24 15:44:58 +03:00
AgcVertexMetadataTests.cs fix(gta): restore wiped GTA foundation and gameplay path (PPSA04264) (#650) 2026-07-27 01:58:55 +03:00
AgcWaitRegMemTests.cs [VideoOut] Add Bink2 support via FFMPEG bridge (#527) 2026-07-22 21:41:41 +03:00
DetileComputeSpirvTests.cs feat(gpu): GPU compute detile for guest tiled textures (Vulkan + Metal) (#592) 2026-07-24 20:13:02 +03:00
Gen5FmaMixSpirvTests.cs Shader: lower VOP3P V_FMA_MIX_F32/LO/HI (was dropping Unity HDR shaders) (#466) 2026-07-20 14:37:40 +03:00
Gen5ScalarMemoryFallbackTests.cs [Tests] Isolate Gen5 scalar fallback test from parallel static mutation (#488) 2026-07-21 12:59:03 +03:00
Gen5ShaderAtomicDecodeTests.cs [AGC] Implement RDNA2 buffer/image/DS 32-bit atomic instructions (#222) 2026-07-16 17:28:39 +03:00
Gen5ShaderDecoderBoundaryTests.cs shader: allow larger bounded Gen5 programs (#514) 2026-07-22 14:46:15 +03:00
Gen5ShaderProgramTests.cs perf(shader): cache pixel export masks (#288) 2026-07-17 04:17:39 +03:00
Gen5SpirvAtomicTranslationTests.cs [AGC] Implement RDNA2 buffer/image/DS 32-bit atomic instructions (#222) 2026-07-16 17:28:39 +03:00
Gen5VertexInputSpirvTests.cs fix(gpu): one vertex attribute per guest stream view (#718) 2026-07-31 12:12:26 +03:00
Gen5WaveMaskSpirvTests.cs Shader: test a wave mask consumed as a per-lane predicate at the lane bit (#465) 2026-07-20 14:18:20 +03:00
GnmTilingDetileTests.cs fix(gta): restore wiped GTA foundation and gameplay path (PPSA04264) (#650) 2026-07-27 01:58:55 +03:00
GpuWaitRegistryProducedRetentionTests.cs Combined: Pad, AGC, Metal, Vulkan, Ampr, overlay, and CPU hot-path fixes (#727) 2026-07-31 12:14:02 +03:00