vkd3d-shader/hlsl: Return an error expression when an invalid subscript is used.

This commit is contained in:
Elizabeth Figura
2024-08-29 12:48:23 -05:00
committed by Henri Verbeet
parent 7905c47765
commit bb74180659
Notes: Henri Verbeet 2024-10-28 18:10:10 +01:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1214
2 changed files with 12 additions and 11 deletions

View File

@@ -4445,8 +4445,6 @@ static void hlsl_ctx_cleanup(struct hlsl_ctx *ctx)
rb_destroy(&ctx->functions, free_function_rb, NULL);
hlsl_block_cleanup(&ctx->static_initializers);
/* State blocks must be free before the variables, because they contain instructions that may
* refer to them. */
LIST_FOR_EACH_ENTRY_SAFE(scope, next_scope, &ctx->scopes, struct hlsl_scope, entry)
@@ -4462,6 +4460,8 @@ static void hlsl_ctx_cleanup(struct hlsl_ctx *ctx)
}
}
hlsl_block_cleanup(&ctx->static_initializers);
LIST_FOR_EACH_ENTRY_SAFE(scope, next_scope, &ctx->scopes, struct hlsl_scope, entry)
{
LIST_FOR_EACH_ENTRY_SAFE(var, next_var, &scope->vars, struct hlsl_ir_var, scope_entry)