summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-03-01 15:37:25 +1100
committerTimothy Arceri <[email protected]>2018-03-06 11:44:06 +1100
commit20bd0f6a2bd631aec06d5bdbcf72fa562ec8a9a2 (patch)
tree183e53e464322b07eddae9fb9267042eaadf2fde /src/amd
parent2a68c6c6c8785e3f844791475df8423a6968ddfd (diff)
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 <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index d2df2837c8a..1fe09de4848 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -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,
instr->variables[0]->var->data.driver_location,
- instr->variables[0]->var->data.location_frac, ve,
- vertex_index, const_index, type);
+ instr->variables[0]->var->data.location_frac,
+ instr->num_components, vertex_index, const_index, type);
}
for (unsigned chan = comp; chan < ve + comp; chan++) {