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.