mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Avoid shadowing "load" in lower_index_loads().
Found with -Wshadow.
This commit is contained in:
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
@ -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, ¶ms, &instr->loc)))
|
||||
if (!(resource_load = hlsl_new_resource_load(ctx, ¶ms, &instr->loc)))
|
||||
return false;
|
||||
hlsl_block_add_instr(block, load);
|
||||
hlsl_block_add_instr(block, resource_load);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user