From: Józef Kucia jkucia@codeweavers.com
I missed this case before because apps don't seem to use SV_Position for hull shader inputs. vkd3d_siv_from_sysval() needs to be restored for hull shaders.
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- libs/vkd3d-shader/spirv.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index bb74400e0d50..c8e0c379897a 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -129,6 +129,20 @@ static const void *vkd3d_find_struct_(const struct vkd3d_struct *chain, return NULL; }
+static enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval(enum vkd3d_sysval_semantic sysval) +{ + switch (sysval) + { + case VKD3D_SV_NONE: + return VKD3D_SIV_NONE; + case VKD3D_SV_POSITION: + return VKD3D_SIV_POSITION; + default: + FIXME("Unhandled sysval %#x.\n", sysval); + return VKD3D_SIV_NONE; + } +} + #define VKD3D_SPIRV_VERSION 0x00010000 #define VKD3D_SPIRV_GENERATOR_ID 18 #define VKD3D_SPIRV_GENERATOR_VERSION 1 @@ -3590,6 +3604,9 @@ static uint32_t vkd3d_dxbc_compiler_emit_input(struct vkd3d_dxbc_compiler *compi return 0; }
+ if (compiler->shader_type == VKD3D_SHADER_TYPE_HULL && !sysval && signature_element->sysval_semantic) + sysval = vkd3d_siv_from_sysval(signature_element->sysval_semantic); + builtin = get_spirv_builtin_for_sysval(compiler, sysval);
component_idx = vkd3d_write_mask_get_component_idx(dst->write_mask);