mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
ac: pass the unmodified number of components to load gs inputs
Currently both users of this would overflow an array when the input was a dual slot double as they expected the number of components to be a max of 4. Since we pass the type we can just let the functions handle doubles in a way they choose. Reviewed-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
2a68c6c6c8
commit
20bd0f6a2b
1 changed files with 2 additions and 2 deletions
|
|
@ -3136,8 +3136,8 @@ static LLVMValueRef visit_load_var(struct ac_nir_context *ctx,
|
||||||
|
|
||||||
return ctx->abi->load_inputs(ctx->abi, instr->variables[0]->var->data.location,
|
return ctx->abi->load_inputs(ctx->abi, instr->variables[0]->var->data.location,
|
||||||
instr->variables[0]->var->data.driver_location,
|
instr->variables[0]->var->data.driver_location,
|
||||||
instr->variables[0]->var->data.location_frac, ve,
|
instr->variables[0]->var->data.location_frac,
|
||||||
vertex_index, const_index, type);
|
instr->num_components, vertex_index, const_index, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned chan = comp; chan < ve + comp; chan++) {
|
for (unsigned chan = comp; chan < ve + comp; chan++) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue