diff options
author | Marek Olšák <[email protected]> | 2017-11-09 23:25:34 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-11-25 17:16:56 +0100 |
commit | 39b098dafb76c842d9220bfc10c23c2c91e655db (patch) | |
tree | 7b0008d736f78d8ac75980099e298514b8b74bec | |
parent | b6b4b2c6d825c056033c4111a67e83111b5f02e8 (diff) |
radeonsi: do 64-bit LDS loads recursively
Reviewed-by: Nicolai Hähnle <[email protected]>
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index e6b14f92056..d7c130a7060 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1090,17 +1090,19 @@ static LLVMValueRef lds_load(struct lp_build_tgsi_context *bld_base, TGSI_NUM_CHANNELS); } + /* Split 64-bit loads. */ + if (tgsi_type_is_64bit(type)) { + LLVMValueRef lo, hi; + + 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); + } + dw_addr = lp_build_add(&bld_base->uint_bld, dw_addr, LLVMConstInt(ctx->i32, swizzle, 0)); value = ac_lds_load(&ctx->ac, dw_addr); - if (tgsi_type_is_64bit(type)) { - LLVMValueRef value2; - dw_addr = lp_build_add(&bld_base->uint_bld, dw_addr, - ctx->i32_1); - value2 = ac_lds_load(&ctx->ac, dw_addr); - return si_llvm_emit_fetch_64bit(bld_base, type, value, value2); - } return bitcast(bld_base, type, value); } |