Module: Mesa Branch: master Commit: cf5dda334945e2cbfaf5f83fd32c3fa01f436d81 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=cf5dda334945e2cbfaf5f83fd32c3fa01f436d81
Author: Rob Clark <robdcl...@gmail.com> Date: Mon Jun 4 13:31:47 2018 -0400 freedreno/ir3: don't cp absneg into meta:fi If using a fanin (collect) to collect of consecutive registers together, we can CP mov's into the fanin, but not (abs) or (neg). No places that allow those modifiers are consuming a fanin anyways. But this caused an absneg to be lost between a ldgb and stgb for shaders like: outputs[n] = abs(input[n]) Signed-off-by: Rob Clark <robdcl...@gmail.com> --- src/gallium/drivers/freedreno/ir3/ir3_cp.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cp.c b/src/gallium/drivers/freedreno/ir3/ir3_cp.c index e3a3a9db69..0ee8ea2e0e 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_cp.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_cp.c @@ -543,6 +543,10 @@ instr_cp(struct ir3_cp_ctx *ctx, struct ir3_instruction *instr) if (reg->flags & IR3_REG_ARRAY) continue; + /* Don't CP absneg into meta instructions, that won't end well: */ + if (is_meta(instr) && (src->opc != OPC_MOV)) + continue; + reg_cp(ctx, instr, reg, n); } _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit