[Mesa-dev] [PATCH] r600/sb: Do not distribute neg in expr_handler::fold_assoc() when folding multiplications.

2016-03-09 Thread Xavier B
From: xavier Previously it was doing this transformation for a Trine 3 shader: MUL R6.x.12,R13.x.23, 0.5|3f00 -MULADD R4.x.12,-R6.x.12, 2|4000, 1|3f80 +MULADD R4.x.12,-R13.x.23, -1|bf80, 1|3f80 Bugzilla: https://bugs.freedesktop.org/show_b

[Mesa-dev] r600g/sb: fix a bug in constants folding optimisation pass

2015-01-30 Thread Xavier B.
r600g/sb: fix a bug in constants folding optimisation pass: ADD R6.y.1,R5.w.1, ~1|3f80 ADD R6.y.2,|R6.y.1|, -0.0001|b8d1b717 was wrongly being converted to ADD R6.y.1,R5.w.1, ~1|3f80 ADD R6.y.2,R5.w.1, -1.0001|bf800347 because abs() modif

[Mesa-dev] [bug 47201] r600g: fix abs() support on ALU 3-source-operands instructions

2015-01-30 Thread Xavier B.
Hi, Since alu does not support abs() modifier on source operands, spill and apply the modifiers to a temp register when needed. fixes https://bugs.freedesktop.org/show_bug.cgi?id=47201 I got hit by this bug while testing and debugging a game using the st/nine. And I made a tentative fix that wo