diff options
author | Timothy Arceri <[email protected]> | 2018-01-18 12:01:33 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-01-19 08:09:04 +1100 |
commit | 3bccb5dba9415f98f7a3dbb7c43a5eace64b4ec6 (patch) | |
tree | 2c2ff1520a783c9432e2049d5ea4129d6644bf67 /src/amd | |
parent | 3153d742078d9842d867e8affddf0b157de762f0 (diff) |
ac: fix visit_ssa_undef() for doubles
V2: use LLVMIntTypeInContext()
Fixes: f4e499ec7914 "radv: add initial non-conformant radv vulkan driver"
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/common/ac_nir_to_llvm.c | 5 |
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 02a46dab4db..cd400376a0e 100644 --- a/src/amd/common/ac_nir_to_llvm.c +++ b/src/amd/common/ac_nir_to_llvm.c @@ -5055,12 +5055,13 @@ static void visit_ssa_undef(struct ac_nir_context *ctx, const nir_ssa_undef_instr *instr) { unsigned num_components = instr->def.num_components; + LLVMTypeRef type = LLVMIntTypeInContext(ctx->ac.context, instr->def.bit_size); LLVMValueRef undef; if (num_components == 1) - undef = LLVMGetUndef(ctx->ac.i32); + undef = LLVMGetUndef(type); else { - undef = LLVMGetUndef(LLVMVectorType(ctx->ac.i32, num_components)); + undef = LLVMGetUndef(LLVMVectorType(type, num_components)); } _mesa_hash_table_insert(ctx->defs, &instr->def, undef); } |