Intel UHD 770: agc_driver_sample_multisample_target fails since #5881, sampled fetches in GENERAL miss per-sample storage writes #6957
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 savvaniss on 2026-10-16T21:10:45Z.
agc_driver_sample_multisample_targetfails on the Intel UHD 770 since #5881 (5c42e97f4, @codingreapermaps). It passes on the RX 9070 XT.It fails on every run on
maina7f108030with #6452 (needed to build on Windows), and also with #6647, #6255 and #6436 merged. Bisect: the test passes on both GPUs at5c42e97f4^ (eb901bcf4). At5c42e97f4it fails on the UHD 770 and passes on the RX 9070 XT. The failing check was added by #5881, which was tested on an NVIDIA MX450 and on lavapipe.Mechanism: on this driver, a compute program writes the samples of a multisampled image with
OpImageWrite. A later sampledOpImageFetchinVK_IMAGE_LAYOUT_GENERALthen returns sample 0's value for every sample index. The writes themselves land, because a typed storage read sees them.R16G16B16A16_SFLOATwithVK_SAMPLE_COUNT_4_BITand AnyPS5's usage (color attachment, transfer src/dst, sampled, storage), inGENERALthroughout. The program:vkCmdClearColorImage;imageStoreto one sample of every pixel;ALL_COMMANDSmemory barrier (MEMORY_WRITEtoMEMORY_READ | MEMORY_WRITE);texelFetches every sample through asampler2DMS, and another thatimageLoads every sample through anrgba16fimage2DMS.texelFetch, store to sample 1texelFetch, store to sample 0texelFetch, store to samples 1-3imageLoad(rgba16f), each of the aboveThe result on the UHD 770 does not change with any of these variations:
rgba16finstead of one with no formatimageStoreinstead ofvkCmdClearColorImageMUTABLE_FORMATR8G8B8A8_UNORM,R32G32B32A32_SFLOATandR32_SFLOATat 2, 4 and 8 samplesThe read is correct only when the image moves from
GENERALtoSHADER_READ_ONLY_OPTIMALafter the stores and is sampled in that layout. Moving it back toGENERALbefore sampling does not help, and neither does aGENERALtoGENERALimage barrier.GENERALallows every access, so this looks like a driver bug. AnyPS5 hits it:MultisampleTarget::Sampled(MultisampleTarget.cpp:228) waits for the stores with a memory barrier (SettleStorageWrites). It then binds the target through the borrowed-imageTextureconstructor, which setsGENERAL(Texture.cpp:787).Shaders of the standalone program (glslangValidator -V --target-env vulkan1.1)
Not the cause: the UHD 770 reports
shaderStorageImageReadWithoutFormat = false, sostorageImageWithoutFormat(VulkanDevice.cpp:1615) and with itContext::singlePassStorageare off there. That flag only selectsStorageTexture's single-pass path, andMultisampleTargetStorageViewdoes not use that path. The stores needshaderStorageImageWriteWithoutFormatandshaderStorageImageMultisample, which the UHD 770 reports. The test's loads are sampled fetches. The standalone program fails the same way with a typed store.Possible ways forward:
SHADER_READ_ONLY_OPTIMAL.Which one to take is your call. I found no other issue or PR that covers this; it is listed in #5503.
Windows 11 Pro 26300, i7-14700K, MinGW-w64 GCC 15.2.0 (winlibs), Release. Intel UHD Graphics 770, driver 32.0.101.7088 (Vulkan 1.4.323). AMD Radeon RX 9070 XT, driver 32.0.31041.1004 (Vulkan 1.4.349).
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T21:36:57Z.
I traced the current path:
MultisampleTarget::Sampled()settles storage writes with a memory barrier but leaves the target inGENERAL, and the borrowedTextureview also advertisesGENERAL. I am testing an explicit transition toSHADER_READ_ONLY_OPTIMALfor sampling, with a transition back toGENERALbefore attachment, storage-write, or resolve use. The existingagc_driver_sample_multisample_targettest exercises storage-write followed by sampled-read. I have not validated this on an Intel GPU; local build/test validation is still in progress.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T22:31:24Z.
Update on local validation: I refreshed the candidate against current
main(57f2a5901, including #5939) and preserved its DCC guard/CMASK behavior while adding the sampled-layout transitions. The modified graphics driver and the graphics, recorder, and focused multisample test targets build on Linux/GCC 12.2 after a temporary one-token workaround for an unrelated current-main dependent-template parse error; that source was restored afterward. Conventions and diff checks pass. The focusedagc_driver_sample_multisample_targetCTest aborts before assertions at AnyPS5’s host CPU guard on this Xeon E5-1620 v2 (missing LZCNT, BMI1/2, MOVBE, AVX2, and FMA), so I have no local runtime-pass or Intel UHD 770 result to report. The existing test exercises storage writes followed by sampled fetches and now checks the read-only layout. I am coordinating the sharedSampled()/Texturepath with #6635 and #6683, which cover separate MSAA array-view and sample-order behavior, before publishing the follow-up.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T22:56:46Z.
I opened #6971 with the layout transition fix and a regression assertion for the sampled view layout. On Linux, the graphics, recorder, and focused multisample-target executables built successfully; CTest stops at the host CPU-feature guard before assertions, so I have no local runtime or UHD 770 result. I also compiled the relevant sources in a local integration preview with #6635 and #6683, including the sample-order storage path. If you can rerun
agc_driver_sample_multisample_targeton the UHD 770 with #6971, the result would verify the reported driver-specific behavior.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T00:54:34Z.
Integration update: open PR #6973 now carries the exact #6635 head
ebc6ea3baand #6971 headf65cecddawith authorship preserved. The composed path keeps initialization inGENERAL, uses the tracked read-only layout for sampled views, and returns toGENERALbefore attachment/storage reuse. The maintained report on #6973 records checks on NVIDIA, AMD, and llvmpipe, including four focused llvmpipe runs.This is integration evidence, not a retest on the affected Intel UHD 770, so the Intel-specific result remains unverified. #6635 is still open and #6971 remains draft per the requested merge order; #6973 is also open.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T05:30:19Z.
Thanks for the Intel/AMD retest and the isolated readback experiment. It looks like the failing
agc_driver_multisample_readback_uploadhelper exercises a lower-level path separate from #6973'sMultisampleTarget::Sampled()transition, and the files overlap #6973. Are you planning to turn the experiment into a focused follow-up (or would you be comfortable with me carrying it while preserving your authorship)? I won't copy the local-only diff into a competing PR without coordinating first.Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-18T20:46:20Z.
@MarcZX10 Please carry it; you don't need to keep my authorship. I won't open it myself because both files it touches,
Graphics/src/MultisampleReadback.cppandtests/execution/MultisampleReadback.cpp, exist only in #6973's stack (not onmainf3059421f), so a separate PR would have to stack on #6973 anyway. The diff in my #6973 comment is all there is.When it is in a head, I'll rerun the
agc_driver_multisample_readback*tests and the rest of the multisample group on the UHD 770 and the RX 9070 XT and post the result there.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T09:23:22Z.
I carried the readback-layout experiment into a two-commit stacked PR: Amoenus/AnyPS5#3. It targets the exact head of #6973 because the readback files are introduced by that stack; the parent branch itself is unchanged.
The conventions and whitespace checks pass. The configured Linux test target is built, but
agc_driver_multisample_readback_uploadaborts before its assertions on this Xeon host because it lacks the CPU features AnyPS5 requires. I have not claimed a local GPU/runtime pass. When convenient, could you run the offered UHD 770 and RX 9070 XT readback tests against the stacked head?Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-20T09:36:54Z.
Additional Linux diagnostic result:
agc_driver_multisample_readback_uploadpassed 1/1 on Mesa llvmpipe (LLVM 15.0.6) with Khronos validation loaded. Supported 4x cases for 1-, 2-, 4-, 8- and 16-byte elements passed, along with padded 17x5-to-64x32 uploads at XOR 0 and 0x8100. The device lacks the tested 2x/8x support, so those subcases skipped; there were no missing-layer messages, VUIDs or validation errors.The Xeon normally stops at AnyPS5's CPU-feature guard. I bypassed only that guard in a temporary diagnostic build, then restored the source and rebuilt with the guard enabled. This run used a broader local MSAA integration worktree with the same readback-layout change, not PR #3's exact stacked head; it is not physical-GPU validation. Full details are recorded in Amoenus/AnyPS5#3.