mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/hlsl: Pass the target block to hlsl_new_store_component().
This commit is contained in:
committed by
Henri Verbeet
parent
5ab5a721a1
commit
9e3ac35669
Notes:
Henri Verbeet
2025-03-05 14:16:50 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Francisco Casas (@fcasas) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1401
@@ -1135,7 +1135,6 @@ static bool lower_complex_casts(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr
|
||||
{
|
||||
struct hlsl_ir_node *component_load, *cast;
|
||||
struct hlsl_type *dst_comp_type;
|
||||
struct hlsl_block store_block;
|
||||
unsigned int src_idx;
|
||||
|
||||
if (broadcast)
|
||||
@@ -1160,9 +1159,8 @@ static bool lower_complex_casts(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr
|
||||
|
||||
cast = hlsl_block_add_cast(ctx, block, component_load, dst_comp_type, &arg->loc);
|
||||
|
||||
if (!hlsl_new_store_component(ctx, &store_block, &var_deref, dst_idx, cast))
|
||||
if (!hlsl_block_add_store_component(ctx, block, &var_deref, dst_idx, cast))
|
||||
return false;
|
||||
hlsl_block_add_block(block, &store_block);
|
||||
}
|
||||
|
||||
if (!(load = hlsl_new_var_load(ctx, var, &instr->loc)))
|
||||
@@ -1199,7 +1197,6 @@ static bool lower_matrix_swizzles(struct hlsl_ctx *ctx, struct hlsl_ir_node *ins
|
||||
|
||||
for (i = 0; i < instr->data_type->e.numeric.dimx; ++i)
|
||||
{
|
||||
struct hlsl_block store_block;
|
||||
struct hlsl_ir_node *load;
|
||||
|
||||
k = swizzle->u.matrix.components[i].y * matrix_type->e.numeric.dimx + swizzle->u.matrix.components[i].x;
|
||||
@@ -1207,9 +1204,8 @@ static bool lower_matrix_swizzles(struct hlsl_ctx *ctx, struct hlsl_ir_node *ins
|
||||
if (!(load = hlsl_add_load_component(ctx, block, swizzle->val.node, k, &instr->loc)))
|
||||
return false;
|
||||
|
||||
if (!hlsl_new_store_component(ctx, &store_block, &var_deref, i, load))
|
||||
if (!hlsl_block_add_store_component(ctx, block, &var_deref, i, load))
|
||||
return false;
|
||||
hlsl_block_add_block(block, &store_block);
|
||||
}
|
||||
|
||||
if (!(var_load = hlsl_new_var_load(ctx, var, &instr->loc)))
|
||||
@@ -3564,13 +3560,10 @@ static bool lower_trig(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, struct
|
||||
|
||||
for (i = 0; i < type->e.numeric.dimx; ++i)
|
||||
{
|
||||
struct hlsl_block store_block;
|
||||
|
||||
sincos = hlsl_block_add_unary_expr(ctx, block, op, comps[i], &instr->loc);
|
||||
|
||||
if (!hlsl_new_store_component(ctx, &store_block, &var_deref, i, sincos))
|
||||
if (!hlsl_block_add_store_component(ctx, block, &var_deref, i, sincos))
|
||||
return false;
|
||||
hlsl_block_add_block(block, &store_block);
|
||||
}
|
||||
|
||||
if (!(var_load = hlsl_new_load_index(ctx, &var_deref, NULL, &instr->loc)))
|
||||
|
||||
Reference in New Issue
Block a user