Francisco Casas (@fcasas) commented about libs/vkd3d-shader/hlsl_codegen.c:
- LIST_FOR_EACH_ENTRY(var, &ctx->extern_vars, struct hlsl_ir_var, extern_entry)
- {
enum hlsl_regset regset;
if (!hlsl_type_is_resource(var->data_type))
continue;
if (!var->reg_reservation.reg_type)
continue;
regset = hlsl_type_get_regset(var->data_type);
if (var->regs[regset].allocated && !var->last_read)
{
}var->regs[regset].allocated = false; }
}
I am thinking on remove hlsl_type_get_regset(.) in future patches because it is not defined for structs (would probably reach unreacheable code here).
I think it is better to do this at the end of allocate_objects(.), and just for the regset that is passed as argument.