vkd3d-shader/spirv: Declare I/O registers from the signature.
Merge request reports
Activity
added 33 commits
-
9f98e376...88caf877 - 28 commits from branch
wine:master
- 5691a29d - vkd3d-shader/spirv: Do not use the output_info array for patch constants.
- f582bbea - vkd3d-shader/tpf: Do not uninvert used masks for domain shader patch constants.
- 017e70aa - vkd3d-shader/dxil: Map SEMANTIC_KIND_TARGET to VKD3D_SHADER_SV_TARGET.
- 2c0b64f0 - vkd3d-shader/spirv: Declare I/O registers from the signature.
- 9e448670 - vkd3d-shader/dxil: No longer synthesize DCL instructions.
Toggle commit list-
9f98e376...88caf877 - 28 commits from branch
added 58 commits
-
9e448670...0c33f82f - 53 commits from branch
wine:master
- 07d0efed - vkd3d-shader/spirv: Do not use the output_info array for patch constants.
- b7f457ba - vkd3d-shader/tpf: Do not uninvert used masks for domain shader patch constants.
- b77f8246 - vkd3d-shader/dxil: Map SEMANTIC_KIND_TARGET to VKD3D_SHADER_SV_TARGET.
- 64908b2a - vkd3d-shader/spirv: Declare I/O registers from the signature.
- 95107f63 - vkd3d-shader/dxil: No longer synthesize DCL instructions.
Toggle commit list-
9e448670...0c33f82f - 53 commits from branch
added 27 commits
-
95107f63...45679a96 - 22 commits from branch
wine:master
- 88760305 - vkd3d-shader/spirv: Do not use the output_info array for patch constants.
- cabf9996 - vkd3d-shader/tpf: Do not uninvert used masks for domain shader patch constants.
- 75348dff - vkd3d-shader/dxil: Map SEMANTIC_KIND_TARGET to VKD3D_SHADER_SV_TARGET.
- 66cb2815 - vkd3d-shader/spirv: Declare I/O registers from the signature.
- d49bccea - vkd3d-shader/dxil: No longer synthesize DCL instructions.
Toggle commit list-
95107f63...45679a96 - 22 commits from branch
While debugging a test failure on MoltenVK I discovered that commit 66cb2815 triggers a validation failure in
test_shader_input_output_components()
:VUID-RuntimeSpirv-OpTypeVector-06816(ERROR / SPEC): msgNum: 79036675 - Validation Error: [ VUID-RuntimeSpirv-OpTypeVector-06816 ] Object 0: handle = 0x590000000059, type = VK_OBJECT_TYPE_SHADER_MODULE; Object 1: handle = 0x5a000000005a, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x4b60103 | vkCreateGraphicsPipelines(): pCreateInfos[0] starting at Location 2 Component 0 the Output (VK_SHADER_STAGE_VERTEX_BIT) has a Vec4 while Input (VK_SHADER_STAGE_FRAGMENT_BIT) as a Vec3. Enable VK_KHR_maintenance4 device extension to allow relaxed interface matching between input and output vectors. The Vulkan spec states: Any OpTypeVector output interface variables must not have a higher Component Count than a matching OpTypeVector input interface variable (https://www.khronos.org/registry/vulkan/specs/1.2/html/vkspec.html#VUID-RuntimeSpirv-OpTypeVector-06816)
The validation error seems to be related to the MoltenVK failure I'm debugging, but there must be something more because testing on the parent commit gets rid of the validation error, but not of the MoltenVK failure, which incidentally is:
[mvk-error] VK_ERROR_INITIALIZATION_FAILED: Render pipeline compile failed (Error code 3): Fragment input(s) `user(locn2_3)` mismatching vertex shader output type(s) or not written by vertex shader. d3d12:11826: Test 4: Test failed: Got {0.00000000e+00, 1.00000000e+00, 0.00000000e+00, 1.00000000e+00}, expected {0.00000000e+00, 1.00000000e+00, 0.00000000e+00, 2.50000000e-01} at (0, 0).
Even if the validation error is not the direct cause of the failure, it looks like something we'd want to fix anyway.
I intent to spend some more time on this, but if in the meantime somebody more expert of I/O interfaces wants to have a look, now you know!
The pipeline in question has a float3 and a float which are COLOR1 and COLOR2 respectively, and they get packed into the same registers. The VS merges the two together, but the PS doesn't. I'm not sure why, but it may have something to do with the fact that the PS consumes the COLOR1 but not the COLOR2. Conor, do you have an immediate idea here?
I discovered a similar instance in
test_shader_eval_attribute()
:VUID-RuntimeSpirv-OpTypeVector-06816(ERROR / SPEC): msgNum: 79036675 - Validation Error: [ VUID-RuntimeSpirv-OpTypeVector-06816 ] Object 0: handle = 0x240000000024, type = VK_OBJECT_TYPE_SHADER_MODULE; Object 1: handle = 0x250000000025, type = VK_OBJECT_TYPE_SHADER_MODULE; | MessageID = 0x4b60103 | vkCreateGraphicsPipelines(): pCreateInfos[0] starting at Location 1 Component 0 the Output (VK_SHADER_STAGE_VERTEX_BIT) has a Vec4 while Input (VK_SHADER_STAGE_FRAGMENT_BIT) as a Vec2. Enable VK_KHR_maintenance4 device extension to allow relaxed interface matching between input and output vectors. The Vulkan spec states: Any OpTypeVector output interface variables must not have a higher Component Count than a matching OpTypeVector input interface variable (https://www.khronos.org/registry/vulkan/specs/1.2/html/vkspec.html#VUID-RuntimeSpirv-OpTypeVector-06816)
Here again two different semantics are merged in the VS but not in the PS, which trigger a similar error. And again this seems to cause a failure in MoltenVK.
The difference is that this doesn't seem to be related to 66cb2815, it also happened before. But maybe it's useful to know anyway.