mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Use a switch in validate_static_object_references().
This commit is contained in:
parent
900433e371
commit
317bd46efd
Notes:
Henri Verbeet
2024-07-11 00:40:50 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/786
@ -2003,7 +2003,9 @@ static bool validate_static_object_references(struct hlsl_ctx *ctx, struct hlsl_
|
||||
{
|
||||
unsigned int start, count;
|
||||
|
||||
if (instr->type == HLSL_IR_RESOURCE_LOAD)
|
||||
switch (instr->type)
|
||||
{
|
||||
case HLSL_IR_RESOURCE_LOAD:
|
||||
{
|
||||
struct hlsl_ir_resource_load *load = hlsl_ir_resource_load(instr);
|
||||
|
||||
@ -2035,8 +2037,9 @@ static bool validate_static_object_references(struct hlsl_ctx *ctx, struct hlsl_
|
||||
note_non_static_deref_expressions(ctx, &load->sampler, "resource load sampler");
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (instr->type == HLSL_IR_RESOURCE_STORE)
|
||||
case HLSL_IR_RESOURCE_STORE:
|
||||
{
|
||||
struct hlsl_ir_resource_store *store = hlsl_ir_resource_store(instr);
|
||||
|
||||
@ -2052,6 +2055,10 @@ static bool validate_static_object_references(struct hlsl_ctx *ctx, struct hlsl_
|
||||
store->resource.var->name);
|
||||
note_non_static_deref_expressions(ctx, &store->resource, "accessed resource");
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user