fix(agc): name every layer in whole-image storage texture barriers #15438
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15438"
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 CodingBreadd on 2026-11-03T09:51:42Z.
What
Whole-image barriers and clears on storage textures in
Texture.cpppassedgeometry.imageLayersaslayerCount. A 3D storage image is created withVK_IMAGE_CREATE_2D_ARRAY_COMPATIBLE_BITand one array layer, so the count is 1. Withoutmaintenance9that means every depth slice. Withmaintenance9it means one slice, and the rest of the volume would not be synchronised. The validation layer reportsWARNING-VkImageSubresourceRange-layerCount-compatibilityfor these calls.The 14 whole-image ranges in
StorageTexture(upload,writeBackWindows,writeBackLayers,FlushDumpSelectedand the other barrier and clear sites using{COLOR, 0, mipCount, 0, imageLayers}) now useVK_REMAINING_ARRAY_LAYERS. These ranges are only passed tovkCmdPipelineBarrierandvkCmdClearColorImage, never read as a number. For 2D and array images the result is unchanged. The two barrier-pair sites also cover all layers of the source image instead of assuming the destination's count.Sampled
Textureimages are not created2D_ARRAY_COMPATIBLEand are left unchanged.Tested
Arch Linux,
main4f41f4c375vs this branch, same machine, Release build. Command:ctest --test-dir build -R '^agc_|shader|recompiler|spirv|video_out|videoout'withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation. Neither log containswas not found but was requested by env var VK_INSTANCE_LAYERS.ANYPS5_GPU=NVIDIA): 1323/1323 passed on bothmainand this branch.layerCount-compatibilitywarnings went from 100 (11 tests) to 0. No newVUID-. The onlyVUID-on both isVkPipelineColorBlendStateCreateInfo-pAttachments-00605inagc_driver_prepared_exportsandagc_driver_srgb8_color_target, which is #11990.ANYPS5_GPU=llvmpipe), the 11 affected tests (agc_driver_image_store_array_through_volume,agc_driver_layered_volume_{draw,submit,mesh,vertex,vertex_no_gpl},agc_driver_mesh_provoking_layer,agc_driver_storage_write_back_no_window,agc_driver_volume_mip_targets,agc_driver_volume_direct_readback,agc_storage_idle_writeback_race): 11/11 passed, no warnings, noVUID-.VK_KHRONOS_VALIDATION_DEBUG_ACTION=VK_DBG_LAYER_ACTION_BREAK) under gdb for each affected test.Overlap: draft #6280 changes the mip-level argument of the same lines (
descriptor.mipCounttogeometry.imageLevels). The two changes touch different arguments, so whichever lands second resolves to{..., 0, geometry.imageLevels, 0, VK_REMAINING_ARRAY_LAYERS}.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)🤖 Generated with Claude Code