fix(agc): enable VK_KHR_sampler_mirror_clamp_to_edge for mirror-once guest samplers #13145
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/13145"
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 Prophet069 on 2026-10-30T04:15:54Z.
What
Guest clamp modes 3, 5 and 7 (mirror once) decode to
VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE, but the device never enabledVK_KHR_sampler_mirror_clamp_to_edge, so every such sampler is created invalidly (VUID-VkSamplerCreateInfo-addressModeU-01079and theaddressMode{U,V,W}-parameterVUIDs). The device now enables the extension when the physical device offers it and passes that toContext; on a device without it,Sampler::Validaterefuses a mirror-once sampler instead of creating it.RunMirrorOnceTestsinGuestSamplerResource.cppchecks each mirror-once mode on each axis with and without the extension.Tested
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(VVL vulkan-sdk-1.4.321.0; neither log containswas not found but was requested by env var VK_INSTANCE_LAYERS),ctest --test-dir build -R <the 63 tests of agc_shader_memory_tests, agc_driver_cmask_fast_clear_tests, agc_driver_graphics_tests and agc_driver_sample_multisample_target_tests> -Von main8c8b998620and on this branch, same machine and GPU: main 63/63 passed, 0VUID-; this branch 63/63 passed (including the new mirror-once cases), 0VUID-.agc_driver_image_gather_volumelogged 8VUID-lines from these samplers without this change and 0 with it. On current main no test creates a mirror-once sampler on a real device, so main's own run does not show them.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