panfrost/midgard: Lower source modifiers for ints
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>
Mon, 25 Mar 2019 02:49:04 +0000 (02:49 +0000)
committerAlyssa Rosenzweig <alyssa@rosenzweig.io>
Tue, 26 Mar 2019 23:35:36 +0000 (23:35 +0000)
commiteffe6fb08d9bfda2b5991e67ade3b3126bc30697
treeb871e07b4e43e5ad60a6f2f5ce162e5ce4627197
parent3208c9d9a2a5800521bd123d699bdbf2c52855a9
panfrost/midgard: Lower source modifiers for ints

On Midgard, float ops support standard source modifiers (abs/neg) and
destination modifiers (sat/pos/round). Integer ops do not support these,
however. To cope, we use native NIR source modifiers for floats, but
lower them away to iabs/ineg for integers, implementing those ops
simultaneously to avoid regressions.

Fixes the integer tests in
dEQP-GLES2.functional.shaders.operator.unary_operator.minus.*

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
src/gallium/drivers/panfrost/midgard/helpers.h
src/gallium/drivers/panfrost/midgard/midgard_compile.c
src/gallium/drivers/panfrost/midgard/midgard_nir.h
src/gallium/drivers/panfrost/midgard/midgard_nir_algebraic.py