Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl.c:
return 1;
}
+enum hlsl_regset hlsl_type_get_regset(struct hlsl_ctx *ctx, const struct hlsl_type *type) +{
- unsigned int k;
- if (type->type == HLSL_CLASS_OBJECT)
- {
for (k = 0; k <= HLSL_REGSET_LAST_OBJECT; ++k)
{
if (type->reg_size[k] > 0)
return k;
}
vkd3d_unreachable();
This feels like the wrong way to go about this. Shouldn't we be deriving this information from the base type?
(Note also that type->reg_size should eventually go away...)