AGC (Radeon 780M, Windows): agc_driver_depth_plane_partial_store_buffer_copy fails intermittently (22 of 80); the draw at 0.6 passes 64 texels short #13867

Closed
opened 2026-10-31 10:19:31 +00:00 by sharveshprabhu · 0 comments
sharveshprabhu commented 2026-10-31 10:19:31 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by sharveshprabhu on 2026-10-31T10:19:31Z.


What happens

On a Radeon 780M, agc_driver_depth_plane_partial_store_buffer_copy fails intermittently at a draw at depth 0.6 did not pass LESS exactly over the unit the guest wrote 0.75 into; when it fails, the draw passes 9152 texels instead of 9216.

Title, test or build step

agc_driver_depth_plane_partial_store_buffer_copy

AnyPS5 commit

main e8c25dd3ba, nothing merged on top, built with WinLibs GCC 15.2.0 r7 (the build.yml package).

System

Windows 11 Home 10.0.26300, AMD Ryzen 7 260, AMD Radeon 780M (1002:1900, driver 32.0.32015.7029) and NVIDIA GeForce RTX 5060 Laptop GPU in the same machine, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON.

Steps to reproduce

$env:ANYPS5_GPU = "780M"
$env:ANYPS5_REQUIRE_VULKAN = "1"
ctest --test-dir build-winlibs -R '^agc_driver_depth_plane_partial_store_buffer_copy$' --repeat until-fail:40 --output-on-failure

ctest already sets ANYPS5_NO_SHADER_CACHE=1 and APS5_NO_HOST_IMPORT=1 for this test. The counts below are from separate ctest runs, one test run each, not from until-fail.

Log

AGC graphics: a draw at depth 0.6 did not pass LESS exactly over the unit the guest wrote 0.75 into

Run by run, first WinLibs batch (. passed, F failed):

780M      ......F....F..F...F..F.F................   6 of 40
RTX 5060  ........................................   0 of 40
Full ctest -V output of a failing run (WinLibs build, paths shortened to <work>)
UpdateCTestConfiguration  from :<work>/a5/build-winlibs/DartConfiguration.tcl
Test project <work>/a5/build-winlibs
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1858
    Start 1858: agc_driver_depth_plane_partial_store_buffer_copy

Test command: <work>/a5\build-winlibs\tests\agc_driver_depth_plane_partial_store_tests.exe "--buffer-copy"
Working Directory: <work>/a5
Environment variables: 
 ANYPS5_NO_SHADER_CACHE=1
 APS5_NO_HOST_IMPORT=1
 APS5_NO_PIPELINE_JOURNAL=1
Environment variable modifications: 
 PATH=path_list_prepend:<work>/a5/build-winlibs/core/libs/libs/unpatched
Test timeout computed to be: 30
[time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine)
[src/HostCpu.cpp:220 operator()] host CPU AMD Ryzen 7 260 w/ Radeon 780M Graphics: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEOPT, XSAVEC, SSE4A, PREFETCHW, CLZERO, OS AVX state (XCR0); lacks none
[src/VulkanDevice.cpp:1172 VulkanDevice] VulkanDevice constructor window=0000000000000000
[src/VulkanDevice.cpp:1181 VulkanDevice] Vulkan loader loaded library=00007ff89cf80000
[src/VulkanDevice.cpp:1221 VulkanDevice] Vulkan instance created instance=0000021382061330
[src/VulkanDevice.cpp:1232 VulkanDevice] Physical device count=2
[src/VulkanDevice.cpp:1266 VulkanDevice] Physical device candidate=00000214491eb530 name=AMD Radeon(TM) 780M Graphics api=0x404167 type=1
[src/VulkanDevice.cpp:1266 VulkanDevice] Physical device candidate=00000214491ebce0 name=NVIDIA GeForce RTX 5060 Laptop GPU api=0x40415f type=2
[src/VulkanDevice.cpp:1314 VulkanDevice] Physical device selected physical=00000214491eb530 queueFamily=0
[src/VulkanDevice.cpp:1328 VulkanDevice] Selected GPU name=AMD Radeon(TM) 780M Graphics vendor=0x1002 device=0x1900 subgroup=64
[src/VulkanDevice.cpp:1330 VulkanDevice] Memory heap 0 size=2698.1 MiB flags=0x0
[src/VulkanDevice.cpp:1330 VulkanDevice] Memory heap 1 size=5396.2 MiB flags=0x3
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 0 heap=1 flags=0x1
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 1 heap=0 flags=0x6
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 2 heap=1 flags=0x7
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 3 heap=0 flags=0xe
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 4 heap=1 flags=0xc1
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 5 heap=0 flags=0xc6
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 6 heap=1 flags=0xc7
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 7 heap=0 flags=0xce
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 8 heap=1 flags=0x1
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 9 heap=0 flags=0x6
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 10 heap=1 flags=0x7
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 11 heap=0 flags=0xe
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 12 heap=1 flags=0xc1
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 13 heap=0 flags=0xc6
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 14 heap=1 flags=0xc7
[src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 15 heap=0 flags=0xce
[src/VulkanDevice.cpp:1435 VulkanDevice] Shader clock driver=1 narrowSubgroupClock=0
[gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 1 samples 2x2, 2 samples 2x2, 4 samples 2x2, 8 samples 2x2; maxSampleLocationGridSize for every count 2x2
[src/VulkanDevice.cpp:1812 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1
[src/VulkanDevice.cpp:2074 VulkanDevice] Wave32 programs run on subgroups of 32: compute 1, mesh 1
[src/VulkanDevice.cpp:2227 VulkanDevice] Vulkan device ready device=0000021449868ac0 queue=00000214498504a0 family=0
[float-controls] f32 denormal flush: hardware (0 of 5472 probe results differ from the emulated flush, 39 ms)
[src/Texture.cpp:2978 upload] StorageTexture upload submit
[src/Texture.cpp:2980 upload] StorageTexture upload done
[src/Texture.cpp:2978 upload] StorageTexture upload submit
[src/Texture.cpp:2980 upload] StorageTexture upload done
[src/Texture.cpp:2978 upload] StorageTexture upload submit
[src/Texture.cpp:2980 upload] StorageTexture upload done
AGC graphics: a draw at depth 0.6 did not pass LESS exactly over the unit the guest wrote 0.75 into
1/1 Test #1858: agc_driver_depth_plane_partial_store_buffer_copy ...***Failed    0.50 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) =   0.63 sec

The following tests FAILED:
	1858 - agc_driver_depth_plane_partial_store_buffer_copy (Failed)
Errors while running CTest
Output from these tests are in: <work>/a5/build-winlibs/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.

With a temporary print of the draw's result before the Require (local only), 25 runs on an MSYS2 GCC 16.2 build of the same commit:

19  passed06=9216 expected=9216   Passed
 6  passed06=9152 expected=9216   Failed

What was checked

Build, 40 serial runs Radeon 780M RTX 5060
WinLibs GCC 15.2.0 r7, main only 6 failed 0 failed
Same build, second batch 16 failed not run
MSYS2 GCC 16.2.0, main plus a local change equivalent to #13668 (needed for that toolchain to start libkernel) 7 failed 0 failed
  • The RTX 5060 never failed in either batch run on it.
  • Five other variants, 40 runs each on the MSYS2 build, never failed on either GPU: agc_driver_depth_plane_partial_store, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch and agc_driver_depth_plane_cpu_write_after_memo.
  • RequireUnit(plane, 4, 0.75f, UnitTexels, ...) passes in every failing run. So the shortfall is on the GPU side (plane copy or draw), not in guest memory.
  • It does not follow the iGPU's memory use. In the second WinLibs batch, with the 780M's dedicated usage read before each run (512 MiB carve-out), 16 failed at 307-382 MiB and 24 passed at 307-376 MiB.
  • OBS's implicit Vulkan layer, disabled with DISABLE_VULKAN_OBS_CAPTURE=1: 13 of 40 failed (MSYS2 build).
  • Synchronization validation on the MSYS2 build (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_KHRONOS_VALIDATION_VALIDATE_SYNC=true, layer 1.4.363 from MSYS2): 5 runs, 1 failed, no VUID- or SYNC-HAZARD lines. Loader insertion was checked with VK_LOADER_DEBUG=layer in a separate run.
  • Adding VK_ACCESS_TRANSFER_WRITE_BIT to the barrier before vkCmdCopyImageToBuffer in copyPlane's buffer path (DepthSurface.cpp): 10 of 40 failed (MSYS2 build).
  • The test was added by #11685 and #11692, tested on Linux (RTX 4090, and RX 6650 XT with RADV). Open #12120 reads depth planes into storage images in a compute pass, but copies back into the depth plane keep the buffer path.
  • Not checked: which 64 texels are wrong, and whether they are the same ones every time.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6133730233 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/13867). Originally posted by [sharveshprabhu](https://github.com/sharveshprabhu) on 2026-10-31T10:19:31Z. --- ### What happens On a Radeon 780M, `agc_driver_depth_plane_partial_store_buffer_copy` fails intermittently at `a draw at depth 0.6 did not pass LESS exactly over the unit the guest wrote 0.75 into`; when it fails, the draw passes 9152 texels instead of 9216. ### Title, test or build step `agc_driver_depth_plane_partial_store_buffer_copy` ### AnyPS5 commit `main` `e8c25dd3ba`, nothing merged on top, built with WinLibs GCC 15.2.0 r7 (the `build.yml` package). ### System Windows 11 Home 10.0.26300, AMD Ryzen 7 260, AMD Radeon 780M (`1002:1900`, driver 32.0.32015.7029) and NVIDIA GeForce RTX 5060 Laptop GPU in the same machine, WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`. ### Steps to reproduce ``` $env:ANYPS5_GPU = "780M" $env:ANYPS5_REQUIRE_VULKAN = "1" ctest --test-dir build-winlibs -R '^agc_driver_depth_plane_partial_store_buffer_copy$' --repeat until-fail:40 --output-on-failure ``` ctest already sets `ANYPS5_NO_SHADER_CACHE=1` and `APS5_NO_HOST_IMPORT=1` for this test. The counts below are from separate `ctest` runs, one test run each, not from `until-fail`. ### Log ``` AGC graphics: a draw at depth 0.6 did not pass LESS exactly over the unit the guest wrote 0.75 into ``` Run by run, first WinLibs batch (`.` passed, `F` failed): ``` 780M ......F....F..F...F..F.F................ 6 of 40 RTX 5060 ........................................ 0 of 40 ``` <details> <summary>Full <code>ctest -V</code> output of a failing run (WinLibs build, paths shortened to <code>&lt;work&gt;</code>)</summary> ``` UpdateCTestConfiguration from :<work>/a5/build-winlibs/DartConfiguration.tcl Test project <work>/a5/build-winlibs Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 1858 Start 1858: agc_driver_depth_plane_partial_store_buffer_copy Test command: <work>/a5\build-winlibs\tests\agc_driver_depth_plane_partial_store_tests.exe "--buffer-copy" Working Directory: <work>/a5 Environment variables: ANYPS5_NO_SHADER_CACHE=1 APS5_NO_HOST_IMPORT=1 APS5_NO_PIPELINE_JOURNAL=1 Environment variable modifications: PATH=path_list_prepend:<work>/a5/build-winlibs/core/libs/libs/unpatched Test timeout computed to be: 30 [time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine) [src/HostCpu.cpp:220 operator()] host CPU AMD Ryzen 7 260 w/ Radeon 780M Graphics: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEOPT, XSAVEC, SSE4A, PREFETCHW, CLZERO, OS AVX state (XCR0); lacks none [src/VulkanDevice.cpp:1172 VulkanDevice] VulkanDevice constructor window=0000000000000000 [src/VulkanDevice.cpp:1181 VulkanDevice] Vulkan loader loaded library=00007ff89cf80000 [src/VulkanDevice.cpp:1221 VulkanDevice] Vulkan instance created instance=0000021382061330 [src/VulkanDevice.cpp:1232 VulkanDevice] Physical device count=2 [src/VulkanDevice.cpp:1266 VulkanDevice] Physical device candidate=00000214491eb530 name=AMD Radeon(TM) 780M Graphics api=0x404167 type=1 [src/VulkanDevice.cpp:1266 VulkanDevice] Physical device candidate=00000214491ebce0 name=NVIDIA GeForce RTX 5060 Laptop GPU api=0x40415f type=2 [src/VulkanDevice.cpp:1314 VulkanDevice] Physical device selected physical=00000214491eb530 queueFamily=0 [src/VulkanDevice.cpp:1328 VulkanDevice] Selected GPU name=AMD Radeon(TM) 780M Graphics vendor=0x1002 device=0x1900 subgroup=64 [src/VulkanDevice.cpp:1330 VulkanDevice] Memory heap 0 size=2698.1 MiB flags=0x0 [src/VulkanDevice.cpp:1330 VulkanDevice] Memory heap 1 size=5396.2 MiB flags=0x3 [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 0 heap=1 flags=0x1 [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 1 heap=0 flags=0x6 [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 2 heap=1 flags=0x7 [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 3 heap=0 flags=0xe [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 4 heap=1 flags=0xc1 [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 5 heap=0 flags=0xc6 [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 6 heap=1 flags=0xc7 [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 7 heap=0 flags=0xce [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 8 heap=1 flags=0x1 [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 9 heap=0 flags=0x6 [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 10 heap=1 flags=0x7 [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 11 heap=0 flags=0xe [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 12 heap=1 flags=0xc1 [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 13 heap=0 flags=0xc6 [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 14 heap=1 flags=0xc7 [src/VulkanDevice.cpp:1331 VulkanDevice] Memory type 15 heap=0 flags=0xce [src/VulkanDevice.cpp:1435 VulkanDevice] Shader clock driver=1 narrowSubgroupClock=0 [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 1 samples 2x2, 2 samples 2x2, 4 samples 2x2, 8 samples 2x2; maxSampleLocationGridSize for every count 2x2 [src/VulkanDevice.cpp:1812 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1 [src/VulkanDevice.cpp:2074 VulkanDevice] Wave32 programs run on subgroups of 32: compute 1, mesh 1 [src/VulkanDevice.cpp:2227 VulkanDevice] Vulkan device ready device=0000021449868ac0 queue=00000214498504a0 family=0 [float-controls] f32 denormal flush: hardware (0 of 5472 probe results differ from the emulated flush, 39 ms) [src/Texture.cpp:2978 upload] StorageTexture upload submit [src/Texture.cpp:2980 upload] StorageTexture upload done [src/Texture.cpp:2978 upload] StorageTexture upload submit [src/Texture.cpp:2980 upload] StorageTexture upload done [src/Texture.cpp:2978 upload] StorageTexture upload submit [src/Texture.cpp:2980 upload] StorageTexture upload done AGC graphics: a draw at depth 0.6 did not pass LESS exactly over the unit the guest wrote 0.75 into 1/1 Test #1858: agc_driver_depth_plane_partial_store_buffer_copy ...***Failed 0.50 sec 0% tests passed, 1 tests failed out of 1 Total Test time (real) = 0.63 sec The following tests FAILED: 1858 - agc_driver_depth_plane_partial_store_buffer_copy (Failed) Errors while running CTest Output from these tests are in: <work>/a5/build-winlibs/Testing/Temporary/LastTest.log Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely. ``` </details> With a temporary print of the draw's result before the `Require` (local only), 25 runs on an MSYS2 GCC 16.2 build of the same commit: ``` 19 passed06=9216 expected=9216 Passed 6 passed06=9152 expected=9216 Failed ``` ### What was checked | Build, 40 serial runs | Radeon 780M | RTX 5060 | |---|---|---| | WinLibs GCC 15.2.0 r7, `main` only | 6 failed | 0 failed | | Same build, second batch | 16 failed | not run | | MSYS2 GCC 16.2.0, `main` plus a local change equivalent to #13668 (needed for that toolchain to start libkernel) | 7 failed | 0 failed | - The RTX 5060 never failed in either batch run on it. - Five other variants, 40 runs each on the MSYS2 build, never failed on either GPU: `agc_driver_depth_plane_partial_store`, `agc_driver_depth_plane_partial_store_unimported`, `agc_driver_depth_plane_cpu_write_after_page_unwatch`, `agc_driver_depth_plane_cpu_write_after_partial_unwatch` and `agc_driver_depth_plane_cpu_write_after_memo`. - `RequireUnit(plane, 4, 0.75f, UnitTexels, ...)` passes in every failing run. So the shortfall is on the GPU side (plane copy or draw), not in guest memory. - It does not follow the iGPU's memory use. In the second WinLibs batch, with the 780M's dedicated usage read before each run (512 MiB carve-out), 16 failed at 307-382 MiB and 24 passed at 307-376 MiB. - OBS's implicit Vulkan layer, disabled with `DISABLE_VULKAN_OBS_CAPTURE=1`: 13 of 40 failed (MSYS2 build). - Synchronization validation on the MSYS2 build (`VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `VK_KHRONOS_VALIDATION_VALIDATE_SYNC=true`, layer 1.4.363 from MSYS2): 5 runs, 1 failed, no `VUID-` or `SYNC-HAZARD` lines. Loader insertion was checked with `VK_LOADER_DEBUG=layer` in a separate run. - Adding `VK_ACCESS_TRANSFER_WRITE_BIT` to the barrier before `vkCmdCopyImageToBuffer` in `copyPlane`'s buffer path (`DepthSurface.cpp`): 10 of 40 failed (MSYS2 build). - The test was added by #11685 and #11692, tested on Linux (RTX 4090, and RX 6650 XT with RADV). Open #12120 reads depth planes into storage images in a compute pass, but copies back into the depth plane keep the buffer path. - Not checked: which 64 texels are wrong, and whether they are the same ones every time. AI-assisted: yes (Claude Code)
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#13867
No description provided.