Zebediah Figura (@zfigura) commented about libs/vkd3d-shader/hlsl_codegen.c:
{
var = load->sampler.var;
if (!hlsl_regset_index_from_deref(ctx, &load->sampler, HLSL_REGSET_SAMPLERS, &index))
{
hlsl_error(ctx, &instr->loc, VKD3D_SHADER_ERROR_HLSL_NONCONSTANT_INDEX,
"Non-constant index in resource load's sampler.");
return false;
}
var->objects_usage[HLSL_REGSET_SAMPLERS][index].used = true;
}
- }
- return false;
+}
+static bool request_object_registers_for_allocation(struct hlsl_ctx *ctx)
This name isn't my favourite, I can't immediately tell what it means. How about something like "calculate_var_register_sizes"?
Do we need to return non-void here?