From: Francisco Casas fcasas@codeweavers.com
--- libs/vkd3d-shader/hlsl_codegen.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index fcce0322..5f84c2af 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -315,6 +315,9 @@ static void prepend_input_struct_copy(struct hlsl_ctx *ctx, struct list *instrs, struct hlsl_ir_load *field_load; struct hlsl_ir_constant *c;
+ if (hlsl_type_is_resource(field->type)) + continue; + if (!(c = hlsl_new_uint_constant(ctx, i, &var->loc))) return; list_add_after(&lhs->node.entry, &c->node.entry); @@ -410,6 +413,9 @@ static void append_output_struct_copy(struct hlsl_ctx *ctx, struct list *instrs, struct hlsl_ir_load *field_load; struct hlsl_ir_constant *c;
+ if (hlsl_type_is_resource(field->type)) + continue; + if (!(c = hlsl_new_uint_constant(ctx, i, &var->loc))) return; list_add_tail(instrs, &c->node.entry);