From: Conor McCarthy cmccarthy@codeweavers.com
--- libs/vkd3d-shader/spirv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index dcf957ea..9f9015ee 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -2228,6 +2228,7 @@ struct spirv_compiler uint32_t sample_positions_id;
enum vkd3d_shader_type shader_type; + bool is_dxil;
unsigned int branch_id; unsigned int loop_id; @@ -2428,6 +2429,7 @@ static struct spirv_compiler *spirv_compiler_create(const struct vkd3d_shader_ve rb_init(&compiler->symbol_table, vkd3d_symbol_compare);
compiler->shader_type = shader_version->type; + compiler->is_dxil = shader_version->major >= 6;
if ((shader_interface = vkd3d_find_struct(compile_info->next, INTERFACE_INFO))) { @@ -9480,7 +9482,7 @@ static int spirv_compiler_generate_spirv(struct spirv_compiler *compiler, compiler->location.column = 0; compiler->location.line = 1;
- if ((result = vkd3d_shader_normalise(parser)) < 0) + if (!compiler->is_dxil && (result = vkd3d_shader_normalise(parser)) < 0) return result;
instructions = parser->instructions;