vkd3d-shader/hlsl: Use a structure for matrix swizzles.

This commit is contained in:
Elizabeth Figura
2024-07-20 12:26:56 -05:00
committed by Henri Verbeet
parent 70e2148fcb
commit a905a78a96
Notes: Henri Verbeet 2024-12-12 17:48:24 +01:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1297
5 changed files with 88 additions and 44 deletions

View File

@ -1705,7 +1705,7 @@ bool hlsl_fold_constant_swizzles(struct hlsl_ctx *ctx, struct hlsl_ir_node *inst
src = hlsl_ir_constant(swizzle->val.node);
for (i = 0; i < swizzle->node.data_type->dimx; ++i)
value.u[i] = src->value.u[hlsl_swizzle_get_component(swizzle->swizzle, i)];
value.u[i] = src->value.u[hlsl_swizzle_get_component(swizzle->u.vector, i)];
if (!(dst = hlsl_new_constant(ctx, instr->data_type, &value, &instr->loc)))
return false;