vkd3d-shader/spirv: Apply 'Patch' decorations to builtin patch constant inputs.

Prevents a crash in radv when such inputs are present.

Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Conor McCarthy 2021-11-17 13:05:58 +01:00 committed by Alexandre Julliard
parent 312de24b9a
commit 9a1f6c7daf

View File

@ -4582,6 +4582,8 @@ static uint32_t vkd3d_dxbc_compiler_emit_input(struct vkd3d_dxbc_compiler *compi
if (builtin)
{
input_id = vkd3d_dxbc_compiler_emit_builtin_variable(compiler, builtin, storage_class, array_size);
if (reg->type == VKD3DSPR_PATCHCONST)
vkd3d_spirv_build_op_decorate(builder, input_id, SpvDecorationPatch, NULL, 0);
}
else
{