Repository navigation
vk_sampler_test: enable shaderDrawParameters for the translated vs_ids (VUID-08740 on ps_ssharp) - #4067
vk_sampler_test: enable shaderDrawParameters for the translated vs_ids (VUID-08740 on ps_ssharp)#4067TreXito wants to merge 1 commit into
Conversation
vs_ids.spv reads BaseVertex / BaseInstance for the zero-based v0 / v3 and so declares the DrawParameters capability. vk_harness and vk_texture_test enable VkPhysicalDeviceVulkan11Features::shaderDrawParameters for it; vk_sampler_test did not, so every ps_ssharp case created a module that breaks VUID-VkShaderModuleCreateInfo-pCode-08740 (reported by VK_LAYER_KHRONOS_validation). Query the feature with the Vulkan 1.2 ones and enable it when the device has it, as vk_harness does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Kam471
left a comment
There was a problem hiding this comment.
Tested 4eb8d084 on Windows 11, RTX 5070 Ti (Vulkan 1.4.357).
- Built
vk_sampler_testand the runner'svk_harness/vk_compute_test/vk_store_testfrom this branch. python -I scripts/run_gpu_tests.py --build ... --filter sshar-> 1/1 passed; translator 2 shaders, 2 translated, 2 pass spirv-val.ps_ssharp-> 8 S#/T# cases, 4096 pixels each exact.
The vertex shader now creates its module with shaderDrawParameters enabled, so the vs_ids module that declares DrawParameters no longer fails VUID-08740; the eight sampler/format cases still produce exact pixels. No game files; no blocker.
|
Reproduced on Windows: NVIDIA GeForce RTX 3070, driver 617.42, Windows 11 24H2, MSVC 19.44, VK_LAYER_KHRONOS_validation 1.4.350 (forced with
The same numbers as on Linux/580.173. So the missing AI-assisted (Claude). |
vk_sampler_testdrawsps_ssharpwith the translatedvs_ids.spv. That vertex shader reads BaseVertex / BaseInstance for the zero-based v0 / v3 (#436), so it declares theDrawParameterscapability.vk_harnessandvk_texture_testenableVkPhysicalDeviceVulkan11Features::shaderDrawParametersfor it.vk_sampler_testnever did, so everyps_ssharpS# case creates a shader module that breaks VUID-VkShaderModuleCreateInfo-pCode-08740:Found while proving TEST-877 (#4005, #4025) under the validation layer. The fix queries the feature together with the Vulkan 1.2 ones and enables it when the device has it, the same as
vk_harness. One file, +8/-1.The other 16 tests that report this VUID in a validation run go through
vk_texture_test, wheref12.pNext = &m8unlinks the Vulkan 1.1 features on maintenance8 drivers. #3347 fixes that, and this PR doesn't touch it.Tested on RTX 3060 Ti, driver 580.173.02, Linux, Khronos validation layer 1.4.357. Base main aa2988c against this branch (4eb8d08). Every
ps_ssharpcase fromcheck.SAMPLER_CASES(8) was drawn with the suite's ownvs_ids.spv/ps_ssharp.spv:vk_sampler_test, 8 casesVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation<out.raw>) of all 8 cases are byte-identical across main without the layer and the other three runs.python -I scripts/run_gpu_tests.pyon this branch: 164/210 passed, 46 skipped, the same as main.ps_ssharp: PASS, 8 S#/T# cases, 4096 pixels each exact.vk_sampler_test.cpppassesg++ -std=c++20 -fsyntax-onlyagainst Vulkan-Headers.AI-assisted (Claude Code).
🤖 Generated with Claude Code