diff options
author | Marek Olšák <[email protected]> | 2016-10-02 22:01:38 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-10-04 16:12:16 +0200 |
commit | 71a5cf6f3b8c6baee8ec71f1a2bef3b2efa5b91a (patch) | |
tree | 219371e779730622f9143c03686ef1f263567cf3 /src/gallium/drivers/radeonsi/si_shader.c | |
parent | b2a694f079d6fc7c313c4e5882ea4154b307f984 (diff) |
radeonsi: don't declare LDS in PS when ds_bpermute is used
I guess this is not needed because dead code elimination removes
the declaration.
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Edward O'Callaghan <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_shader.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 7844ebdc892..30bf093b109 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -5009,8 +5009,6 @@ static void si_llvm_emit_ddxy( LLVMValueRef thread_id, tl, trbl, tl_tid, trbl_tid, val, args[2]; int idx; unsigned mask; - bool has_ds_bpermute = HAVE_LLVM >= 0x0309 && - ctx->screen->b.chip_class >= VI; thread_id = get_thread_id(ctx); @@ -5031,7 +5029,7 @@ static void si_llvm_emit_ddxy( val = LLVMBuildBitCast(gallivm->builder, emit_data->args[0], ctx->i32, ""); - if (has_ds_bpermute) { + if (ctx->screen->has_ds_bpermute) { args[0] = LLVMBuildMul(gallivm->builder, tl_tid, lp_build_const_int32(gallivm, 4), ""); args[1] = val; @@ -5738,7 +5736,8 @@ static void create_function(struct si_shader_context *ctx) for (; i < num_params; ++i) shader->info.num_input_vgprs += llvm_get_type_size(params[i]) / 4; - if (bld_base->info && + if (!ctx->screen->has_ds_bpermute && + bld_base->info && (bld_base->info->opcode_count[TGSI_OPCODE_DDX] > 0 || bld_base->info->opcode_count[TGSI_OPCODE_DDY] > 0 || bld_base->info->opcode_count[TGSI_OPCODE_DDX_FINE] > 0 || |