Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl_codegen.c:
uint32_t index)
{ const struct hlsl_ir_var *var;
unsigned int start, count;
LIST_FOR_EACH_ENTRY(var, &ctx->extern_vars, const struct hlsl_ir_var, extern_entry) { if (!var->regs[regset].allocated) continue;
if (index == var->regs[regset].id)
start = var->regs[regset].id;
count = var->regs[regset].count;
if (start <= index && index < start + count)
I can't remember offhand if we have a test for this, but is this supposed to be the used count or the register size?