aco: preserve more fields when combining additions into SMEM
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 30 Apr 2020 15:10:42 +0000 (16:10 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 28 May 2020 10:34:03 +0000 (10:34 +0000)
Totals from 11 (0.01% of 127638) affected shaders:

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 93c8ebfa780 ('aco: Initial commit of independent AMD compiler')
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4880>

src/amd/compiler/aco_optimizer.cpp

index 04385c1fe805b4ba8b789cfad4cb54beaf883356..c6228691b36826879e4058d8ab70ecd530db8093 100644 (file)
@@ -889,6 +889,10 @@ void label_instruction(opt_ctx &ctx, Block& block, aco_ptr<Instruction>& instr)
                   new_instr->definitions[0] = smem->definitions[0];
                new_instr->can_reorder = smem->can_reorder;
                new_instr->barrier = smem->barrier;
+               new_instr->glc = smem->glc;
+               new_instr->dlc = smem->dlc;
+               new_instr->nv = smem->nv;
+               new_instr->disable_wqm = smem->disable_wqm;
                instr.reset(new_instr);
                smem = static_cast<SMEM_instruction *>(instr.get());
             }