AGC (Intel iGPU, Windows): stencil sampled through the native D32S8 sample shadow is lost; three native_depth tests fail #16883
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by gabichuuuuu on 2026-11-07T19:54:34Z.
What happens
Three native multisample depth tests fail every run on an Intel integrated GPU and pass on the NVIDIA laptop GPU in the same machine and build:
agc_driver_native_depth_stencil_viewAGC graphics: a native D32S8 sample read through the depth and stencil views in one dispatch lost its depth, its stencil or the stencil view's component mappingagc_driver_native_depth_uniform_planesAGC graphics: a uniform stencil plane without HTILE was not imported into every sample: sample 257 holds 0, the plane 195(first case, 2 samples)agc_driver_native_depth_publicationAGC graphics: native D32S8 publication lost live samples, HTILE, padding or guest writesThe new
agc_driver_native_depth_publication_without_htilefrom #15688 fails the same way there (a written D32S8 owner without HTILE did not publish its stencil samples and padding). The tests that only check stencil through stencil tests on the attachment (native_depth_stencil,separate_stencil,aliased_stencil) pass; the failing ones all sample the stencil aspect from a shader.Title, test or build step
The three ctests above. No title.
AnyPS5 commit
main6b733c4ef2, nothing merged on top. Also seen on4e44ed59b2, and with #16363, #16364, #16365 and #16301 merged (no change).System
Windows 11 x64, Intel integrated GPU (one queue, subgroup 32, Vulkan 1.4.323, Intel driver 101.70xx) and an NVIDIA laptop GPU (driver 610) in the same laptop. WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON.Host report
Not included: no title run, and the test logs above already show the device choice and queue setup.
Steps to reproduce
Each test stops within a few seconds; 3 of 3 runs fail. With
ANYPS5_GPU=NVIDIAthey pass.Log
Intel iGPU,
4e44ed59b2(same messages on6b733c4ef2):What was checked
4e44ed59b2and6b733c4ef2; same messages every time.VUID-lines, but the validation layer isn't installed on this machine, so that says nothing.Cause, narrowed down. All three go through the sample shadow in
Graphics/src/DepthSurface.cpp. WhenuseSampleShadowis chosen (:590), the D32S8 attachment is copied withvkCmdCopyImageinto a sampled-only image (refreshSampleShadow,:1646, stencil included once a stencil read happens) and the stencil view is made on that copy. Both GPUs here report both paths as supported (shadowOk=1 directOk=1) and pick the shadow.I ran
main6b733c4ef2with two local experiments (not proposed as-is):main6b733c4ef2APS5_NO_IMAGE_SLABS=1VkImageCopyregions instead of one*
^agc_driver_native_depth_(stencil|separate_stencil|aliased_stencil|clears|expand_gate)$, which sample depth through the same shadow.So on this Intel driver, depth survives the shadow path and stencil doesn't, whether it is copied together with depth or on its own, while sampling the attachment's stencil directly works. I haven't separated whether the copy or the later stencil sample of the shadow image loses it. I found nothing invalid in the copy itself (same sample count and aspects,
GENERALon both sides, barriers around it), so this may be a driver bug, but I can't run the validation layer on this machine to confirm. Whatever the fix, it should follow from device capabilities, not the vendor; preferring the direct path when it is supported passes on both GPUs here, but I don't know why the shadow is preferred today.The experiment patch, for reproduction (
EXP_NO_SAMPLE_SHADOW=1selects the direct path and the line prints the choice):AI-assisted: yes.