AGC (NVIDIA RTX 4060, Windows): agc_driver_msaa_dcc_unwatch refuses its 8-sample FMASK case after the DCC range turns compared #22930

Closed
opened 2026-11-18 13:49:23 +00:00 by BrDhaker · 0 comments
BrDhaker commented 2026-11-18 13:49:23 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by BrDhaker on 2026-11-18T13:49:23Z.


What happens

On an RTX 4060 the 8-sample FMASK case of agc_driver_msaa_dcc_unwatch is refused with "AGC graphics: writes to a resident multisampled DCC target or its metadata are not implemented (DCC range 0x200200000+0x1000, 8 samples)"; it passes on the Intel Arc iGPU in the same laptop.

Title, test or build step

ctest agc_driver_msaa_dcc_unwatch (agc_driver_alpha_to_coverage_tests --dcc-unwatch)

AnyPS5 commit

main 4caf45cf1e, plus one local test-only change to tools/tests/test_performance_bisect.py (unrelated)

System

Windows 11 Home (build 26300), WinLibs GCC 15.2.0, NVIDIA GeForce RTX 4060 Laptop GPU (NVIDIA 617.14); also Intel Arc Graphics iGPU (32.0.101.6556), where it passes

Host report

AnyPS5 host report (format 1)
commit: 9d71bdece99e
[system]
os: Windows 10.0.26300
cpu: Intel(R) Core(TM) Ultra 9 185H
cpu_threads: 22
memory_mib: 32151
cpu_gate: passed
[sdl]
linked: 2.33.0
compiled: 2.33.0
[gpu]
device: NVIDIA GeForce RTX 4060 Laptop GPU
type: discrete
vendor_id: 0x10de
device_id: 0x28a0
vulkan_api: 1.4.351
driver: NVIDIA
driver_info: 617.14
driver_version: 617.14.0.0
driver_version_raw: 0x9a438000
subgroup_size: 32
device_local_mib: 7956
candidates: Intel(R) Arc(TM) Graphics, NVIDIA GeForce RTX 4060 Laptop GPU
present_modes: unknown
present_mode_requested: default
[vulkan]
VK_KHR_8bit_storage: extension required present
VK_KHR_buffer_device_address: extension required present
VK_KHR_shader_float_controls: extension required present
bufferDeviceAddress: feature required present
fragmentStoresAndAtomics: feature required present
samplerAnisotropy: feature required present
shaderInt64: feature required present
shaderSignedZeroInfNanPreserveFloat32: feature required present
storageBuffer8BitAccess: feature required present
textureCompressionBC: feature required present
vertexPipelineStoresAndAtomics: feature required present
VK_EXT_external_memory_host: extension optional present
VK_EXT_fragment_shader_interlock: extension optional present
VK_EXT_hdr_metadata: extension optional present
VK_EXT_memory_budget: extension optional present
VK_EXT_mesh_shader: extension optional present
VK_EXT_present_mode_fifo_latest_ready: extension optional present
VK_EXT_provoking_vertex: extension optional present
VK_EXT_sample_locations: extension optional present
VK_EXT_sampler_filter_minmax: extension optional present
VK_EXT_shader_demote_to_helper_invocation: extension optional present
VK_EXT_shader_image_atomic_int64: extension optional present
VK_KHR_draw_indirect_count: extension optional present
VK_KHR_driver_properties: extension optional present
VK_KHR_fragment_shader_barycentric: extension optional present
VK_KHR_maintenance5: extension optional present
VK_KHR_present_mode_fifo_latest_ready: extension optional present
VK_KHR_shader_atomic_int64: extension optional present
VK_KHR_shader_clock: extension optional present
VK_KHR_shader_terminate_invocation: extension optional present
VK_KHR_spirv_1_4: extension optional present
[shader_cache]
state: disabled
[environment]
ANYPS5_GPU: 4060
ANYPS5_HOST_REPORT: 1
ANYPS5_NO_SHADER_CACHE: 1
ANYPS5_REQUIRE_VULKAN: 1
APS5_ASSERT_GPU_LOCK: 1
APS5_NO_PIPELINE_JOURNAL: 1

Steps to reproduce

Full Windows build with -DBUILD_TESTING=ON, then in PowerShell:

$env:ANYPS5_GPU = "4060"
$env:ANYPS5_REQUIRE_VULKAN = "1"
ctest --test-dir build -R "^agc_driver_msaa_dcc_unwatch$" -V

It stops in under a second. With ANYPS5_GPU = "Arc" the same command passes.

Log

[src/VulkanDevice.cpp:2443 VulkanDevice] Wave32 programs run on subgroups of 32: compute 1, mesh 1
[src/VulkanDevice.cpp:2447 VulkanDevice] single-wave wave64 compute spans full subgroups: 1, of any size: 0
[write-watch] host imports of write-watched memory keep the write watch: yes (4096 of 4096 scratch pages reported written at the import, 0 by its 4-byte settle read, 0 after it, 0 after a full GPU read, 0 after a second, 0 after a GPU write, 1 after a CPU store); direct host imports of private memory are settled and stay watched, separate shared aliases retain guest write tracking
AGC graphics: DCC unwatch did not preserve unchanged data or refused a real write incorrectly

The test's own message hides the driver's reason. Printing the caught exception in DccUnwatchTests gives, for mode 7 only:

AGC graphics: writes to a resident multisampled DCC target or its metadata are not implemented (DCC range 0x200200000+0x1000, 8 samples)

What was checked

Same result in 4 of 4 runs on the 4060, including runs on their own outside the parallel ctest run. The Arc iGPU in the same laptop, with the same build, passes every time.

I added temporary prints to checkDccCurrent in MultisampleTarget.cpp and to the test, then took them out again. This is what they showed for mode 7 (8 samples, CMASK and FMASK, FMASK page unwatched):

  • During the first resolve, before anything is unwatched, the resident target's DCC and CMASK ranges switch from watched to compared on the 4060. This happens in absorbDccFill, where GuestMemory::Watched is false for them. On the Arc they stay watched for the whole case.
  • The DCC bytes never change: EqualsCommittedUnsynced is true at every check.
  • The DCC block's stamp stays at 248 from the FMASK decompress through the draw, the resolve, the read-back and the FMASK Unwatch.
  • Inside the final ColorMetadataPass, before checkDccCurrent, the stamp becomes 275. copyCurrent returns false on the stamp mismatch (MultisampleTarget.cpp:979) without comparing bytes, and the target is refused.

From c10d1eae66 I understand that a driver or GPU store over a compared range's 64 KiB block is meant to count as a write, so I didn't change copyCurrent. The open question is what stores to the DCC block during that last pass. The DCC metadata is 4 KiB inside its own 64 KiB block, so it might be the Windows deferred read of a partial block that returns its pages as CPU stores (libSceAgcDriver debt, "Deferred host-import reads"), but I haven't confirmed which call stamps it.

Other failures in the same full run on the 4060 that I believe are known: agc_driver_stencil_plane_memory (#22427), agc_driver_store_over_untracked (#22670), and the setenv build failure (#22358).

I used Claude Code (an AI assistant) to help trace this; I checked the results myself on both GPUs.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6468651825 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/22930). Originally posted by [BrDhaker](https://github.com/BrDhaker) on 2026-11-18T13:49:23Z. --- ### What happens On an RTX 4060 the 8-sample FMASK case of agc_driver_msaa_dcc_unwatch is refused with "AGC graphics: writes to a resident multisampled DCC target or its metadata are not implemented (DCC range 0x200200000+0x1000, 8 samples)"; it passes on the Intel Arc iGPU in the same laptop. ### Title, test or build step ctest agc_driver_msaa_dcc_unwatch (agc_driver_alpha_to_coverage_tests --dcc-unwatch) ### AnyPS5 commit main 4caf45cf1e, plus one local test-only change to tools/tests/test_performance_bisect.py (unrelated) ### System Windows 11 Home (build 26300), WinLibs GCC 15.2.0, NVIDIA GeForce RTX 4060 Laptop GPU (NVIDIA 617.14); also Intel Arc Graphics iGPU (32.0.101.6556), where it passes ### Host report ```text AnyPS5 host report (format 1) commit: 9d71bdece99e [system] os: Windows 10.0.26300 cpu: Intel(R) Core(TM) Ultra 9 185H cpu_threads: 22 memory_mib: 32151 cpu_gate: passed [sdl] linked: 2.33.0 compiled: 2.33.0 [gpu] device: NVIDIA GeForce RTX 4060 Laptop GPU type: discrete vendor_id: 0x10de device_id: 0x28a0 vulkan_api: 1.4.351 driver: NVIDIA driver_info: 617.14 driver_version: 617.14.0.0 driver_version_raw: 0x9a438000 subgroup_size: 32 device_local_mib: 7956 candidates: Intel(R) Arc(TM) Graphics, NVIDIA GeForce RTX 4060 Laptop GPU present_modes: unknown present_mode_requested: default [vulkan] VK_KHR_8bit_storage: extension required present VK_KHR_buffer_device_address: extension required present VK_KHR_shader_float_controls: extension required present bufferDeviceAddress: feature required present fragmentStoresAndAtomics: feature required present samplerAnisotropy: feature required present shaderInt64: feature required present shaderSignedZeroInfNanPreserveFloat32: feature required present storageBuffer8BitAccess: feature required present textureCompressionBC: feature required present vertexPipelineStoresAndAtomics: feature required present VK_EXT_external_memory_host: extension optional present VK_EXT_fragment_shader_interlock: extension optional present VK_EXT_hdr_metadata: extension optional present VK_EXT_memory_budget: extension optional present VK_EXT_mesh_shader: extension optional present VK_EXT_present_mode_fifo_latest_ready: extension optional present VK_EXT_provoking_vertex: extension optional present VK_EXT_sample_locations: extension optional present VK_EXT_sampler_filter_minmax: extension optional present VK_EXT_shader_demote_to_helper_invocation: extension optional present VK_EXT_shader_image_atomic_int64: extension optional present VK_KHR_draw_indirect_count: extension optional present VK_KHR_driver_properties: extension optional present VK_KHR_fragment_shader_barycentric: extension optional present VK_KHR_maintenance5: extension optional present VK_KHR_present_mode_fifo_latest_ready: extension optional present VK_KHR_shader_atomic_int64: extension optional present VK_KHR_shader_clock: extension optional present VK_KHR_shader_terminate_invocation: extension optional present VK_KHR_spirv_1_4: extension optional present [shader_cache] state: disabled [environment] ANYPS5_GPU: 4060 ANYPS5_HOST_REPORT: 1 ANYPS5_NO_SHADER_CACHE: 1 ANYPS5_REQUIRE_VULKAN: 1 APS5_ASSERT_GPU_LOCK: 1 APS5_NO_PIPELINE_JOURNAL: 1 ``` ### Steps to reproduce Full Windows build with `-DBUILD_TESTING=ON`, then in PowerShell: ``` $env:ANYPS5_GPU = "4060" $env:ANYPS5_REQUIRE_VULKAN = "1" ctest --test-dir build -R "^agc_driver_msaa_dcc_unwatch$" -V ``` It stops in under a second. With `ANYPS5_GPU = "Arc"` the same command passes. ### Log ```text [src/VulkanDevice.cpp:2443 VulkanDevice] Wave32 programs run on subgroups of 32: compute 1, mesh 1 [src/VulkanDevice.cpp:2447 VulkanDevice] single-wave wave64 compute spans full subgroups: 1, of any size: 0 [write-watch] host imports of write-watched memory keep the write watch: yes (4096 of 4096 scratch pages reported written at the import, 0 by its 4-byte settle read, 0 after it, 0 after a full GPU read, 0 after a second, 0 after a GPU write, 1 after a CPU store); direct host imports of private memory are settled and stay watched, separate shared aliases retain guest write tracking AGC graphics: DCC unwatch did not preserve unchanged data or refused a real write incorrectly The test's own message hides the driver's reason. Printing the caught exception in DccUnwatchTests gives, for mode 7 only: AGC graphics: writes to a resident multisampled DCC target or its metadata are not implemented (DCC range 0x200200000+0x1000, 8 samples) ``` ### What was checked Same result in 4 of 4 runs on the 4060, including runs on their own outside the parallel ctest run. The Arc iGPU in the same laptop, with the same build, passes every time. I added temporary prints to `checkDccCurrent` in MultisampleTarget.cpp and to the test, then took them out again. This is what they showed for mode 7 (8 samples, CMASK and FMASK, FMASK page unwatched): - **During the first resolve**, before anything is unwatched, the resident target's DCC and CMASK ranges switch from watched to compared on the 4060. This happens in `absorbDccFill`, where `GuestMemory::Watched` is false for them. On the Arc they stay watched for the whole case. - **The DCC bytes never change**: `EqualsCommittedUnsynced` is true at every check. - **The DCC block's stamp stays at 248** from the FMASK decompress through the draw, the resolve, the read-back and the FMASK `Unwatch`. - **Inside the final `ColorMetadataPass`**, before `checkDccCurrent`, the stamp becomes 275. `copyCurrent` returns false on the stamp mismatch (`MultisampleTarget.cpp:979`) without comparing bytes, and the target is refused. From c10d1eae66 I understand that a driver or GPU store over a compared range's 64 KiB block is meant to count as a write, so I didn't change `copyCurrent`. The open question is what stores to the DCC block during that last pass. The DCC metadata is 4 KiB inside its own 64 KiB block, so it might be the Windows deferred read of a partial block that returns its pages as CPU stores (libSceAgcDriver debt, "Deferred host-import reads"), but I haven't confirmed which call stamps it. Other failures in the same full run on the 4060 that I believe are known: agc_driver_stencil_plane_memory (#22427), agc_driver_store_over_untracked (#22670), and the setenv build failure (#22358). I used Claude Code (an AI assistant) to help trace this; I checked the results myself on both GPUs.
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#22930
No description provided.