From: Zebediah Figura zfigura@codeweavers.com
This only affects clip and cull distances. The HLSL compiler emits these using dcl_input, but the previous shader (vertex or TES) will write them as a SPIRV builtin, and hence we want to read this as a SPIRV builtin as well.
This fixes validation errors in Wine's test_clip_distance(). --- libs/vkd3d-shader/spirv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index cc0b63e82..a6700e66f 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -4479,7 +4479,8 @@ static uint32_t spirv_compiler_emit_input(struct spirv_compiler *compiler, element_idx = shader_register_get_io_indices(reg, array_sizes); signature_element = &shader_signature->elements[element_idx];
- if (compiler->shader_type == VKD3D_SHADER_TYPE_HULL && !sysval && signature_element->sysval_semantic) + if ((compiler->shader_type == VKD3D_SHADER_TYPE_HULL || compiler->shader_type == VKD3D_SHADER_TYPE_GEOMETRY) + && !sysval && signature_element->sysval_semantic) sysval = vkd3d_siv_from_sysval(signature_element->sysval_semantic);
builtin = get_spirv_builtin_for_sysval(compiler, sysval);