vkd3d-shader/ir: Expand index range write masks to cover all element masks.
Merge request reports
Activity
added 1 commit
- 77e0a00a - vkd3d-shader/ir: Expand index range write masks to cover all element masks.
Somewhat like my comment in !536 (merged), could we get a test?
Looks like it can only occur in hull shaders, so a shader runner test is not possible, but I can add a d3d12 test.
Please do. (In principle there's no reason we couldn't add hull shader support to the shader runner, but it probably makes sense to wait with that until we have a need for that from the HLSL compiler side.)
This turns out to be quite messy and results from FXC weirdness. I ran into a new problem with the test:
dcl_indexrange
exceeds its required bounds and sweeps upSV_Position
into the array. The patch for this may be too hacky for upstream, since it's not known to occur in the wild. In the test I tried to avoid it by usingSV_Position
only in the DS and PS, but it failed to render. I changedstruct data
tostruct ds_data
and declared a newstruct data
containingPOSITION
instead, and hadds_main
output ads_data
, andps_main
receive one. I don't know why that would be a problem so maybe I misunderstand how this should work.
added 4 commits
- b295726c - vkd3d-shader/ir: Expand index range write masks to cover all element masks.
- adfb0a35 - tests: Test punned array access in patch constant functions.
- 76d142ee - vkd3d-shader: Make the control point count the outer dimension of I/O arrays.
- d15a03b3 - vkd3d-shader/tpf: Validate sysvals in index range declarations.
Toggle commit listadded 74 commits
-
d15a03b3...68b898fc - 70 commits from branch
wine:master
- 4f64eb7e - vkd3d-shader/ir: Expand index range write masks to cover all element masks.
- a00937ba - tests: Test punned array access in patch constant functions.
- a0318ccf - vkd3d-shader: Make the control point count the outer dimension of I/O arrays.
- 846564c3 - vkd3d-shader/tpf: Validate sysvals in index range declarations.
Toggle commit list-
d15a03b3...68b898fc - 70 commits from branch
mentioned in merge request !564
added 19 commits
-
846564c3...16962ac6 - 15 commits from branch
wine:master
- 418e8d81 - vkd3d-shader/ir: Expand index range write masks to cover all element masks.
- b8561d6f - tests: Test punned array access in patch constant functions.
- 4c30b238 - vkd3d-shader: Make the control point count the outer dimension of I/O arrays.
- c4009347 - vkd3d-shader/tpf: Validate sysvals in index range declarations.
Toggle commit list-
846564c3...16962ac6 - 15 commits from branch
Test
test_hull_shader_punned_array()
currently emits this validation error:VUID-RuntimeSpirv-OpEntryPoint-08743(ERROR / SPEC): msgNum: -1986897773 - Validation Error: [ VUID-RuntimeSpirv-OpEntryPoint-08743 ] Object 0: handle = 0x270000000027, type = VK_OBJECT_TYPE_SHADER_MODULE; Object 1: handle = 0x280000000028, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x89925893 | vkCreateGraphicsPipelines(): pCreateInfos[0] (SPIR-V Interface) VK_SHADER_STAGE_TESSELLATION_CONTROL_BIT declared input at Location 2 Component 3 but it is not an Output declared in VK_SHADER_STAGE_VERTEX_BIT. The Vulkan spec states: Any user-defined variables shared between the OpEntryPoint of two shader stages, and declared with Input as its Storage Class for the subsequent shader stage, must have all Location slots and Component words declared in the preceding shader stage's OpEntryPoint with Output as the Storage Class (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-RuntimeSpirv-OpEntryPoint-08743)
It might or might not be related to this MR, I haven't debugged yet.
I see no validation failure on my machine, but I do see the issue. The VS declares
o2.xyz
and the HS accesses it as part of a punned array of four rows of.xyzw
. There's no way to tell the requirement in the VS, and we can't handle the array access in the HS without declaring row 2 as.xyzw
.