mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/hlsl: Introduce hlsl_block_add_resource_load().
This commit is contained in:
committed by
Henri Verbeet
parent
b9ebf87114
commit
f8c53fae37
Notes:
Henri Verbeet
2025-03-12 22:21:12 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Francisco Casas (@fcasas) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1413
@@ -1214,7 +1214,6 @@ 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 *resource_load;
|
||||
|
||||
VKD3D_ASSERT(coords->data_type->class == HLSL_CLASS_VECTOR);
|
||||
VKD3D_ASSERT(coords->data_type->e.numeric.type == HLSL_TYPE_UINT);
|
||||
@@ -1227,10 +1226,7 @@ static bool lower_index_loads(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr,
|
||||
params.resource = val;
|
||||
params.coords = coords;
|
||||
params.format = val->data_type->e.resource.format;
|
||||
|
||||
if (!(resource_load = hlsl_new_resource_load(ctx, ¶ms, &instr->loc)))
|
||||
return false;
|
||||
hlsl_block_add_instr(block, resource_load);
|
||||
hlsl_block_add_resource_load(ctx, block, ¶ms, &instr->loc);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user