From: Conor McCarthy Subject: [PATCH vkd3d 1/5] vkd3d-shader: Apply 'Patch' decoration to builtin patch constant inputs. Message-Id: <20210914020039.10807-1-cmccarthy@codeweavers.com> Date: Tue, 14 Sep 2021 12:00:35 +1000 Prevents a crash in RADV due to an assertion failure when such inputs are present. Signed-off-by: Conor McCarthy --- libs/vkd3d-shader/spirv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 6f948c31..d607bc70 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -4548,6 +4548,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 { -- 2.32.0