diff options
author | Rob Clark <[email protected]> | 2016-05-01 10:06:57 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2016-05-04 11:25:55 -0400 |
commit | f0a1f3de27831d1ccb8a51fc0c99d63f25fd6e2a (patch) | |
tree | 95cd3b44ceba2ef8af455132cd8a6cd66208018e /src/gallium/drivers/freedreno/ir3 | |
parent | 1f04d4bf59e753e2b199c247911520dc1fb30511 (diff) |
freedreno/ir3: cp small negative integers too
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_cp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_cp.c b/src/gallium/drivers/freedreno/ir3/ir3_cp.c index 60c2830df93..6e71beed458 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_cp.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_cp.c @@ -438,7 +438,8 @@ reg_cp(struct ir3_cp_ctx *ctx, struct ir3_instruction *instr, iim_val = ~iim_val; /* other than category 1 (mov) we can only encode up to 10 bits: */ - if ((instr->opc == OPC_MOV) || !(iim_val & ~0x3ff)) { + if ((instr->opc == OPC_MOV) || + !((iim_val & ~0x3ff) && (-iim_val & ~0x3ff))) { new_flags &= ~(IR3_REG_SABS | IR3_REG_SNEG | IR3_REG_BNOT); src_reg = ir3_reg_clone(instr->block->shader, src_reg); src_reg->flags = new_flags; |