AGC: agc_driver_sample_order tests read a depth target as all zeros on an NVIDIA Windows device and pass on Intel #9313

Closed
opened 2026-10-21 18:08:22 +00:00 by kanza-cm · 3 comments
kanza-cm commented 2026-10-21 18:08:22 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by kanza-cm on 2026-10-21T18:08:22Z.


The three sample-order execution tests fail on Windows with an NVIDIA GPU and pass with the integrated Intel GPU on the same machine. Their depth readback comes back as zeros.

Environment. Windows 11, NVIDIA GeForce RTX 3070 Laptop GPU (driver 32.0.16.1078) and Intel UHD Graphics (driver 30.0.101.2079), WinLibs GCC 15.2.0, Release, -DANYPS5_RELINKER_ONLY=OFF -DBUILD_TESTING=ON, main d34da5d69.

Observed. ctest -R "^agc_driver_sample_order":

845 - agc_driver_sample_order (Failed)
  2x scene with the standard locations: the slopes did not leave depth both at and below the clear value
988 - agc_driver_sample_order_grid_reference (Failed)
  the composite of uniform renders: the slopes did not leave depth both at and below the clear value
989 - agc_driver_sample_order_recipe_depth_locations (Failed)
  pixel (0,0)'s locations in every pixel: the clear between the recorded draw and its replay left depth other than the clear value

The rest of the suite passes: 1858 of 1861 tests.

Diagnostic. CheckScene counts the samples that hold the clear value. Instrumented locally (not committed), the 2x scene reports:

2x scene with the standard locations: samples=2 total=4096 cleared=0 below=4096 min=0 max=0 clear=0.9375

Every sample reads depth 0.0 instead of either the clear value (0.9375) or a slope value, so the depth target the readback sees is untouched, not merely different in rasterization. The colour checks in the same scene pass (z and w hold their own sample index), so the colour side and the sample locations reach the host correctly.

A/B on the same binary. With ANYPS5_GPU unset the device is the RTX 3070 and the test fails; with ANYPS5_GPU="Intel(R) UHD Graphics" it passes, and the device log confirms Selected GPU name=Intel(R) UHD Graphics vendor=0x8086 device=0x9a60.

Why CI does not see it. The Windows job configures with -DANYPS5_AGC_EXECUTION_TESTS=F16ToF32Unpack;F64FmaSubnormals;RegistrationPrepareShutdown, so tests/execution/SampleOrder.cpp is replaced by ExecutionTestNotBuilt.cpp and never compiled; the Linux job runs Vulkan tests on lavapipe. A Windows NVIDIA (or Intel) host is therefore the only place these run.

Hypothesis. RenderCheckerboard first draws a full-screen ClearDepth quad into a depth-only pass (depthOnly.depthWrite = true, locations = nullopt), then the slopes with VK_COMPARE_OP_LESS, and reads the surface through DepthSurfaceOrderTarget. On NVIDIA the write never reaches the surface that view resolves; whether the pass stores to a transient image, or the host copy-back for a guest-backed depth surface is skipped, is not established.

Not known: whether a title reaches this path; no title was run, and no AMD or macOS host was tried.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5965936438 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9313). Originally posted by [kanza-cm](https://github.com/kanza-cm) on 2026-10-21T18:08:22Z. --- The three sample-order execution tests fail on Windows with an NVIDIA GPU and pass with the integrated Intel GPU on the same machine. Their depth readback comes back as zeros. **Environment.** Windows 11, NVIDIA GeForce RTX 3070 Laptop GPU (driver 32.0.16.1078) and Intel UHD Graphics (driver 30.0.101.2079), WinLibs GCC 15.2.0, Release, `-DANYPS5_RELINKER_ONLY=OFF -DBUILD_TESTING=ON`, `main` `d34da5d69`. **Observed.** `ctest -R "^agc_driver_sample_order"`: ``` 845 - agc_driver_sample_order (Failed) 2x scene with the standard locations: the slopes did not leave depth both at and below the clear value 988 - agc_driver_sample_order_grid_reference (Failed) the composite of uniform renders: the slopes did not leave depth both at and below the clear value 989 - agc_driver_sample_order_recipe_depth_locations (Failed) pixel (0,0)'s locations in every pixel: the clear between the recorded draw and its replay left depth other than the clear value ``` The rest of the suite passes: 1858 of 1861 tests. **Diagnostic.** `CheckScene` counts the samples that hold the clear value. Instrumented locally (not committed), the 2x scene reports: ``` 2x scene with the standard locations: samples=2 total=4096 cleared=0 below=4096 min=0 max=0 clear=0.9375 ``` Every sample reads depth 0.0 instead of either the clear value (0.9375) or a slope value, so the depth target the readback sees is untouched, not merely different in rasterization. The colour checks in the same scene pass (`z` and `w` hold their own sample index), so the colour side and the sample locations reach the host correctly. **A/B on the same binary.** With `ANYPS5_GPU` unset the device is the RTX 3070 and the test fails; with `ANYPS5_GPU="Intel(R) UHD Graphics"` it passes, and the device log confirms `Selected GPU name=Intel(R) UHD Graphics vendor=0x8086 device=0x9a60`. **Why CI does not see it.** The Windows job configures with `-DANYPS5_AGC_EXECUTION_TESTS=F16ToF32Unpack;F64FmaSubnormals;RegistrationPrepareShutdown`, so `tests/execution/SampleOrder.cpp` is replaced by `ExecutionTestNotBuilt.cpp` and never compiled; the Linux job runs Vulkan tests on lavapipe. A Windows NVIDIA (or Intel) host is therefore the only place these run. **Hypothesis.** `RenderCheckerboard` first draws a full-screen `ClearDepth` quad into a depth-only pass (`depthOnly.depthWrite = true`, `locations = nullopt`), then the slopes with `VK_COMPARE_OP_LESS`, and reads the surface through `DepthSurfaceOrderTarget`. On NVIDIA the write never reaches the surface that view resolves; whether the pass stores to a transient image, or the host copy-back for a guest-backed depth surface is skipped, is not established. Not known: whether a title reaches this path; no title was run, and no AMD or macOS host was tried.
MaxLikesCode commented 2026-10-21 19:06:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MaxLikesCode on 2026-10-21T19:06:06Z.


This is the failure #9056 fixes. The tests bind the multisampled depth surface's own view as a sampled image, but that surface is created without VK_IMAGE_USAGE_SAMPLED_BIT (it is sampled through a shadow image since #7318). The descriptor is invalid (VUID-VkWriteDescriptorSet-descriptorType-00337 under the validation layer), so what the read returns is up to the driver: zeros on your 3070, the drawn depth on the UHD. #9056 copies the depth aspect into a test image with sampled usage and reads the copy; only the tests change.

On an RTX 4090 (Windows 11, driver 617.42) the three tests fail on main with the messages above and pass with #9056 (report). The other runs on #9056 show the same on an RTX 3080, an RTX 4070 Ti and a Radeon 680M. If #9056 fixes it on your 3070 too, this issue closes with it.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6324222333 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9313#issuecomment-6324222333). Originally posted by [MaxLikesCode](https://github.com/MaxLikesCode) on 2026-10-21T19:06:06Z. --- This is the failure #9056 fixes. The tests bind the multisampled depth surface's own view as a sampled image, but that surface is created without `VK_IMAGE_USAGE_SAMPLED_BIT` (it is sampled through a shadow image since #7318). The descriptor is invalid (`VUID-VkWriteDescriptorSet-descriptorType-00337` under the validation layer), so what the read returns is up to the driver: zeros on your 3070, the drawn depth on the UHD. #9056 copies the depth aspect into a test image with sampled usage and reads the copy; only the tests change. On an RTX 4090 (Windows 11, driver 617.42) the three tests fail on `main` with the messages above and pass with #9056 ([report](https://github.com/boykopovar/AnyPS5/pull/9056#issuecomment-6318857404)). The other runs on #9056 show the same on an RTX 3080, an RTX 4070 Ti and a Radeon 680M. If #9056 fixes it on your 3070 too, this issue closes with it. AI-assisted: yes (Claude Code)
akkadbakkad89 commented 2026-10-21 19:24:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by akkadbakkad89 on 2026-10-21T19:24:38Z.


Confirmed on an RTX 3070 (Windows 11, driver 617.42, main 1698d1ea6a): the same three tests fail on main with the exact messages quoted here, and pass with #9056 — agc_driver_sample_order and _recipe_depth_locations pass, _grid_reference skips (this device does not keep depth drawn at custom sample locations, same as the RTX 3080 datapoint), _planning passes. Details posted on #9056.

One note on the Intel side: on an older Intel UHD 630 (0x9bc5, only 1x1 sample-location grids, no shaderStorageImageMultisample) agc_driver_sample_order and _recipe_depth_locations fail identically with and without the patch — pre-existing capability failures with different signatures (a stencil-byte mismatch and the custom-location readback disagreement), not the depth-view bug this issue tracks.

AI-assisted: yes (Devin).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6324601223 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9313#issuecomment-6324601223). Originally posted by [akkadbakkad89](https://github.com/akkadbakkad89) on 2026-10-21T19:24:38Z. --- Confirmed on an RTX 3070 (Windows 11, driver 617.42, `main` `1698d1ea6a`): the same three tests fail on `main` with the exact messages quoted here, and pass with #9056 — `agc_driver_sample_order` and `_recipe_depth_locations` pass, `_grid_reference` skips (this device does not keep depth drawn at custom sample locations, same as the RTX 3080 datapoint), `_planning` passes. Details posted on #9056. One note on the Intel side: on an older Intel UHD 630 (`0x9bc5`, only 1x1 sample-location grids, no `shaderStorageImageMultisample`) `agc_driver_sample_order` and `_recipe_depth_locations` fail identically with and without the patch — pre-existing capability failures with different signatures (a stencil-byte mismatch and the custom-location readback disagreement), not the depth-view bug this issue tracks. AI-assisted: yes (Devin).
milescoviello commented 2026-10-21 19:37:45 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-21T19:37:45Z.


#9056 fixes this. The three tests bind the depth surface's own view as a sampled image, but when the surface uses #7318's sampled shadow that image has no SAMPLED usage, and the NVIDIA driver reads back other depth (zeros here). #9056 reads through a sampled copy instead. @akkadbakkad89 confirmed it on an RTX 3070 on Windows (comment), as did runs on an RTX 3080, 4090 and 4070 Ti.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6324855275 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/9313#issuecomment-6324855275). Originally posted by [milescoviello](https://github.com/milescoviello) on 2026-10-21T19:37:45Z. --- #9056 fixes this. The three tests bind the depth surface's own view as a sampled image, but when the surface uses #7318's sampled shadow that image has no `SAMPLED` usage, and the NVIDIA driver reads back other depth (zeros here). #9056 reads through a sampled copy instead. @akkadbakkad89 confirmed it on an RTX 3070 on Windows ([comment](https://github.com/boykopovar/AnyPS5/pull/9056#issuecomment-6324595351)), as did runs on an RTX 3080, 4090 and 4070 Ti. 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#9313
No description provided.