summaryrefslogtreecommitdiffstats
path: root/src/amd/common
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-01-22 18:23:27 +1100
committerTimothy Arceri <[email protected]>2018-01-29 11:14:23 +1100
commitfa29a9625e5cd9f37ba55f872c9a0bb64d5b6c9c (patch)
tree3d41091fb526b027a447f6a3805d60bbd03fd4c0 /src/amd/common
parent0aba967328cc058d3c1e22409f4d0a5623394e69 (diff)
ac: fix gs load inputs type
This fixes the scenario where the input is a struct. With this the Unreal engines Elemental demo now works on radeonsi. Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/common')
-rw-r--r--src/amd/common/ac_nir_to_llvm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 858f75bc172..e9885a5a26d 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -3191,16 +3191,17 @@ static LLVMValueRef visit_load_var(struct ac_nir_context *ctx,
}
if (ctx->stage == MESA_SHADER_GEOMETRY) {
+ LLVMTypeRef type = LLVMIntTypeInContext(ctx->ac.context, instr->dest.ssa.bit_size);
LLVMValueRef indir_index;
unsigned const_index, vertex_index;
get_deref_offset(ctx, instr->variables[0],
false, &vertex_index, NULL,
&const_index, &indir_index);
+
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,
- nir2llvmtype(ctx, instr->variables[0]->var->type));
+ vertex_index, const_index, type);
}
for (unsigned chan = comp; chan < ve + comp; chan++) {