vkd3d-shader/hlsl: Avoid shadowing "load" in lower_index_loads().

Found with -Wshadow.
This commit is contained in:
Zebediah Figura 2023-04-30 17:40:04 -05:00 committed by Alexandre Julliard
parent a4a1b4c557
commit 46e135f6a7
Notes: Alexandre Julliard 2023-12-07 22:48:02 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/506

View File

@ -1090,7 +1090,7 @@ static bool lower_index_loads(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr,
unsigned int dim_count = hlsl_sampler_dim_count(val->data_type->sampler_dim);
struct hlsl_ir_node *coords = index->idx.node;
struct hlsl_resource_load_params params = {0};
struct hlsl_ir_node *load;
struct hlsl_ir_node *resource_load;
assert(coords->data_type->class == HLSL_CLASS_VECTOR);
assert(coords->data_type->base_type == HLSL_TYPE_UINT);
@ -1104,9 +1104,9 @@ static bool lower_index_loads(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr,
params.coords = coords;
params.format = val->data_type->e.resource_format;
if (!(load = hlsl_new_resource_load(ctx, &params, &instr->loc)))
if (!(resource_load = hlsl_new_resource_load(ctx, &params, &instr->loc)))
return false;
hlsl_block_add_instr(block, load);
hlsl_block_add_instr(block, resource_load);
return true;
}