summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
diff options
context:
space:
mode:
authorNicolai Hähnle <nicolai.haehnle@amd.com>2016-10-07 12:54:34 +0200
committerNicolai Hähnle <nicolai.haehnle@amd.com>2016-10-07 18:02:26 +0200
commit13e3e68e72678ef886806fa5401d5b0b2ad92bc3 (patch)
treeb887b7a586963e4b1e360bbdfc681cde10047b3e /src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
parentb84234fd28ceb7c8527a50759df7aa9da8005ecb (diff)
gallium/radeon: avoid redundant work with overlapping in/out arrays
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c')
-rw-r--r--src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
index 8e364c90f0..da4a030a9e 100644
--- a/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
+++ b/src/gallium/drivers/radeon/radeon_setup_tgsi_llvm.c
@@ -680,7 +680,8 @@ static void emit_declaration(struct lp_build_tgsi_context *bld_base,
{
unsigned idx;
for (idx = decl->Range.First; idx <= decl->Range.Last; idx++) {
- if (ctx->load_input) {
+ if (ctx->load_input &&
+ ctx->input_decls[idx].Declaration.File != TGSI_FILE_INPUT) {
ctx->input_decls[idx] = *decl;
if (bld_base->info->processor != PIPE_SHADER_FRAGMENT)
@@ -706,6 +707,8 @@ static void emit_declaration(struct lp_build_tgsi_context *bld_base,
for (idx = decl->Range.First; idx <= decl->Range.Last; idx++) {
unsigned chan;
assert(idx < RADEON_LLVM_MAX_OUTPUTS);
+ if (ctx->soa.outputs[idx][0])
+ continue;
for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
ctx->soa.outputs[idx][chan] = lp_build_alloca_undef(
&ctx->gallivm,