Repository navigation
Conversation
|
Thanks, the diagnosis is right: Before merging, one change on the fix itself. Refusing the shader means the dispatch never runs, while an 8×1 workgroup is perfectly valid on the console. In a compute wave, the console forms derivative quads from four consecutive lanes, not from a 2×2 block of local IDs. That is what
It would also be worth checking whether linear is the better mode for every compute shader, since it matches the hardware lane order; that can be a separate PR. |
06e5d83 to
52ad1ff
Compare
52ad1ff to
7924d81
Compare
|
Merged into AnyKyty (your commit, cherry-picked onto the current head; all checks were green). This is the fix I hoped for: Quads where the layout allows it, Linear for other four-lane groups, a refusal only when neither is valid, and both features in the profile. Thanks @mjnhbg3. |
What
Compute shaders that query image LOD can emit invalid SPIR-V when
DerivativeGroupQuadsKHRis paired with a local size whose X or Y dimension is odd. ChooseDerivativeGroupQuadsKHRfor compatible final 2D workgroups andDerivativeGroupLinearKHRfor other complete four-lane groups. Refuse incomplete guest groups or a group for which the device enables neither valid feature. Query and enable both Vulkan features, include them in the shader profile and cache header, and keepkyty_spirv_matchable to read the previous store header. Synthetic reduced shaders cover both modes and refusal; the patch contains no title data. The Vulkan SPIR-V environment defines the workgroup requirements.Rebased on
AnyKytyea03d75c73b65039a7acfdee424b8cb95771995b, the tip when this head was pushed.Tested
007a98c12a4base with only the reduced shader fixture, 2×2 and 4×2 emitted validator-accepted SPIR-V, while 8×1 emitted a module rejected byspirv-valwithVUID-StandaloneSpirv-DerivativeGroupQuadsKHR-10151. On the change, 2×2 and 4×2 select Quads; 8×1 selects Linear; 2×2 falls back to Linear if Quads is unavailable; wave64 on a host subgroup of 32 reshapes 8×1 to a valid 2×16 Quads layout; 1×1, 3×1, and 8×1 without Linear refuse explicitly. The emitted modules passspirv-val.kyty_spirv_matchpassed 1/1, including the immediately previous store-header fixture.vulkaninforeports both compute derivative features on Intel(R) Graphics, driver 32.0.101.8331.ea03d75c73band the rebased change each passedkyty_shim_cross_queue_label_orderandkyty_shim_recompiler_valid_spirv2/2 withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, andVK_LOADER_DEBUG=layer. Both logs showInsert instance layer "VK_LAYER_KHRONOS_validation"from SDK 1.4.350, no missing-layer warning, and zeroVUID-errors. The pre-rebase base and change passed the same pair with the same validation result.VUID-lines, and its offline summary passed. The pre-rebase lavapipe job stopped during Ubuntu package installation, before compilation or tests, when the security mirror returned HTTP 404 for twolibasound2packages; the rerun was denied with HTTP 403 for this contributor account.KYTY_*settings are documented.tools/check_conventions.py --base origin/AnyKyty,tools/check_kyty_settings.py,tools/debt_fold.py --check,git diff --check, andtools/pr_overlap.py --branch fix/kyty-compute-derivative-local-sizepassed. The requestedorigin/mainconvention check could not run because this fork has nomainbranch.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)