test(agc): read writable multisample readback fixtures through a sampled-only view #21713
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/21713"
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 androidbaklava on 2026-11-16T16:33:11Z.
What
agc_driver_multisample_readback_uploadfails on every Intel UHD Graphics run reported in #12522 (readback mismatch: format=13 first=0 byte=1 expected=0x1f actual=0x00). The fixture creates its writable surfaces withSTORAGE | SAMPLED | COLOR_ATTACHMENTusage and reads them through an image view that keeps the image's full usage. On Intel's Windows driver,texelFetchthrough such a view returns sample 0 for every sample index of a multisampled image; the rendered and uploaded data are correct.Measured on Intel UHD Graphics (8086:a7a8), driver 101.7084, every element size (1, 2, 4, 8, 16 bytes) and sample count (2, 4, 8), with temporary fixture changes that are not part of this PR:
VkImageViewUsageCreateInfousage isSAMPLEDonly: correct in every case.The driver already creates its sampled views of storage images with
VkImageViewUsageCreateInfo(MultisampleTarget.cpp,Texture.cpp), and color sample readback copies into a non-storage snapshot first, so only the fixture is affected. This PR gives writable fixture surfaces a sampled-onlyarrayViewfor readback and a separate storage-onlystorageViewforDispatchMultisampleImage, as the driver does. Non-writable surfaces are unchanged.Part of #12522: this fixes
multisample_readback_uploadonly.Overlap: #9508 rewrites the same
DispatchMultisampleImagecall inUpload; whichever lands second only has to keepsurface.storageViewin that call.Tested
Windows 11 Home, i7-13620H, Intel UHD Graphics (8086:a7a8), Intel driver 101.7084, WinLibs GCC 15.2.0 r7, Release,
BUILD_TESTING=ON.ctest -R "^agc_driver_multisample_readback"(9 tests) withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1:main8 of 9 (uploadfails); this change 9 of 9, in 3 of 3 rounds.-Vonmainand on this change withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_LOADER_DEBUG=layerand the LunarG SDK 1.4.363 layer. Both logs showInsert instance layer "VK_LAYER_KHRONOS_validation"for all 9 tests, neither containswas not found but was requested by env var VK_INSTANCE_LAYERS, and both have 0VUID-lines.Not tested on other GPUs; the change only narrows the usage of the fixture's own views.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T01:32:12Z.
Review: COMMENTED
Reviewed — no blocking findings
The review folder and repository reader are unavailable in this session, so the change could not be inspected and no verdict is justified.
What I ran
Not run. The pinned-head reader was not available as a callable tool.
Results
Findings
Blocking
None verified.
Non-blocking
None.
Not verified
Could not read the description, commits, diff, manifest, changed files, or repository context. Files read: none. Files reviewed: none. Excluded files: not verified.
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by mihiii1337 on 2026-11-23T02:57:03Z.
Review: APPROVED
Approved exact head
dc718c09e7. I built its clean local merge 2e765f2a71884d07eefaa3db9fde62d108834c4b, whose parents are the current PR base00f4a33029and this head.Hardware and runtime: physical Intel UHD 8086:a78b, Windows 11 build 26300, Intel driver 32.0.101.6127 through the pinned proprietary ICD, Khronos Validation 1.4.369, Release build, Vulkan required, shader cache disabled, and implicit layers disabled.
I ran the complete nine-test multisample-readback set in three counterbalanced serial rounds (base/change, change/base, base/change):
I also performed a narrow causal negative control. In the otherwise unchanged candidate I changed only the read-only array view's usage from SAMPLED_BIT back to the image's combined usage, while leaving the PR's separate storage view and every storage-view call site intact. After rebuilding, the upload test failed 3/3 with the exact same format-13 byte mismatch. I then restored the exact PR source blob, rebuilt, and the full nine-test set passed 9/9 again.
Across the 66 CTest processes in the main matrix, negative control and restored run, all 66 selected the A78B and loaded the requested Khronos layer. There were no skips, partial skips, VUIDs, synchronization hazards, device-loss messages or timeouts. Driver/layer/runtime artifacts stayed stable within every run; the PR ref stayed unchanged; the final source tree is clean and restored to the tested head. The restored executable was rebuilt rather than assumed byte-identical to the earlier link.
No blocking finding remains from this review.
AI-assisted: yes.