aco: preserve more fields when combining additions into SMEM

Totals from 11 (0.01% of 127638) affected shaders:

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Fixes: 93c8ebfa78 ('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>
(cherry picked from commit e1900ee2c7)
This commit is contained in:
Rhys Perry 2020-04-30 16:10:42 +01:00 committed by Eric Engestrom
parent 6e1c660ffd
commit 189fac5855
2 changed files with 5 additions and 1 deletions

View file

@ -4045,7 +4045,7 @@
"description": "aco: preserve more fields when combining additions into SMEM",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"master_sha": null,
"because_sha": "93c8ebfa780ebd1495095e794731881aef29e7d3"
},

View file

@ -876,6 +876,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());
}