Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl_codegen.c:
}
+static bool propagate_swizzle_chains(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr, void *context) +{
- struct hlsl_ir_swizzle *swizzle;
- struct hlsl_ir_node *next_val;
- unsigned int combined_swizzle;
- if (instr->type != HLSL_IR_SWIZZLE)
return false;
- swizzle = hlsl_ir_swizzle(instr);
- next_val = swizzle->val.node;
- combined_swizzle = swizzle->swizzle;
- while (next_val->type == HLSL_IR_SWIZZLE)
I guess, but thus far we've mostly been designing passes to do one transformation at a time, and just running them in a loop. I don't know that it makes much of a difference either way, though...