mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
ir3: Don't copy propagate arrays in ir3_cp
We don't check whether there's an intervening write in this pass, which makes it incorrect. ir3_cp_postsched does check correctly, but we were accidentally doing it here anyway for some sources. While we're here, delete some code that was only used in the array case. Fixes:f370e954("freedreno/ir3: handle const/immed/abs/neg in cp") Reviewed-by: Rob Clark <robdclark@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10076> (cherry picked from commit5a70c4d4a0)
This commit is contained in:
parent
83b4735393
commit
3a9c2e073e
2 changed files with 4 additions and 11 deletions
|
|
@ -67,7 +67,7 @@
|
|||
"description": "ir3: Don't copy propagate arrays in ir3_cp",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "f370e95421f553ace931a02743c96be80fd62dc8"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -338,6 +338,9 @@ reg_cp(struct ir3_cp_ctx *ctx, struct ir3_instruction *instr,
|
|||
struct ir3_register *src_reg = src->regs[1];
|
||||
unsigned new_flags = reg->flags;
|
||||
|
||||
if (src_reg->flags & IR3_REG_ARRAY)
|
||||
return false;
|
||||
|
||||
combine_flags(&new_flags, src);
|
||||
|
||||
if (!ir3_valid_flags(instr, n, new_flags)) {
|
||||
|
|
@ -412,16 +415,6 @@ reg_cp(struct ir3_cp_ctx *ctx, struct ir3_instruction *instr,
|
|||
return true;
|
||||
}
|
||||
|
||||
if ((src_reg->flags & IR3_REG_RELATIV) &&
|
||||
!conflicts(instr->address, reg->instr->address)) {
|
||||
src_reg = ir3_reg_clone(instr->block->shader, src_reg);
|
||||
src_reg->flags = new_flags;
|
||||
instr->regs[n+1] = src_reg;
|
||||
ir3_instr_set_address(instr, reg->instr->address);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/* NOTE: seems we can only do immed integers, so don't
|
||||
* need to care about float. But we do need to handle
|
||||
* abs/neg *before* checking that the immediate requires
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue