diff options
author | Timothy Arceri <[email protected]> | 2017-11-07 21:27:18 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-12-04 12:52:18 +1100 |
commit | 7ef1e42c14fb23592e8e003f7a80db9a43cb9bc9 (patch) | |
tree | 9badad6b218c80e8ad991c32c68db4363c19602b /src/gallium/drivers/radeonsi/si_shader.c | |
parent | e51ecbe980b56a312b43afd668b3990c8799a348 (diff) |
radeonsi: pass llvm type to si_llvm_emit_fetch_64bit()
v2: use LLVMBuildBitCast() directly
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index e8b4ec7b986..c3b5f58cd26 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1063,7 +1063,8 @@ static LLVMValueRef buffer_load(struct lp_build_tgsi_context *bld_base, value2 = ac_build_buffer_load(&ctx->ac, buffer, 1, NULL, base, offset, swizzle * 4 + 4, 1, 0, can_speculate, false); - return si_llvm_emit_fetch_64bit(bld_base, type, value, value2); + return si_llvm_emit_fetch_64bit(bld_base, tgsi2llvmtype(bld_base, type), + value, value2); } /** @@ -1096,7 +1097,8 @@ static LLVMValueRef lds_load(struct lp_build_tgsi_context *bld_base, lo = lds_load(bld_base, TGSI_TYPE_UNSIGNED, swizzle, dw_addr); hi = lds_load(bld_base, TGSI_TYPE_UNSIGNED, swizzle + 1, dw_addr); - return si_llvm_emit_fetch_64bit(bld_base, type, lo, hi); + return si_llvm_emit_fetch_64bit(bld_base, tgsi2llvmtype(bld_base, type), + lo, hi); } dw_addr = lp_build_add(&bld_base->uint_bld, dw_addr, @@ -1375,7 +1377,7 @@ static LLVMValueRef fetch_input_gs( value2 = ac_build_buffer_load(&ctx->ac, ctx->esgs_ring, 1, ctx->i32_0, vtx_offset, soffset, 0, 1, 0, true, false); - return si_llvm_emit_fetch_64bit(bld_base, type, + return si_llvm_emit_fetch_64bit(bld_base, tgsi2llvmtype(bld_base, type), value, value2); } return bitcast(bld_base, type, value); @@ -1978,7 +1980,8 @@ static LLVMValueRef fetch_constant( lo = fetch_constant(bld_base, reg, TGSI_TYPE_UNSIGNED, swizzle); hi = fetch_constant(bld_base, reg, TGSI_TYPE_UNSIGNED, swizzle + 1); - return si_llvm_emit_fetch_64bit(bld_base, type, lo, hi); + return si_llvm_emit_fetch_64bit(bld_base, tgsi2llvmtype(bld_base, type), + lo, hi); } idx = reg->Register.Index * 4 + swizzle; |