[PATCH vkd3d v7 4/6] vkd3d-shader/hlsl: Perform a copy propagation pass.

Zebediah Figura (she/her) zfigura at codeweavers.com
Thu Nov 18 11:56:12 CST 2021


On 11/18/21 11:28, Matteo Bruni wrote:
> If we want to go ahead with this dynamic / arbitrary variable size
> thing (which I still don't like, but I give up), at least let's avoid
> a separate allocation for the values, i.e.
> 
> struct copy_propagation_variable
> {
>      struct rb_entry entry;
>      struct hlsl_ir_var *var;
>      struct copy_propagation_value values[];
> };
> 
> variable = hlsl_alloc(ctx, offsetof(struct copy_propagation_variable,
> values[var->data_type->reg_size]);

FWIW, I think that limiting it to a vector is the right thing to do as 
well, but I'm also fine with this as a temporary measure, until we can 
split up vectors.



More information about the wine-devel mailing list