[2/2] panfrost/midgard: Use inverted forms

Submitted by Alyssa Rosenzweig on April 25, 2019, 10:37 p.m.

Details

Message ID 20190425223744.4324-3-alyssa@rosenzweig.io
State New
Headers show
Series "Add inverted bitwise forms to NIR" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Alyssa Rosenzweig April 25, 2019, 10:37 p.m.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
---
 src/gallium/drivers/panfrost/midgard/midgard_compile.c | 5 +++++
 src/gallium/drivers/panfrost/midgard/midgard_compile.h | 5 ++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.c b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
index 742217c5a97..8e8f563732e 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_compile.c
+++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.c
@@ -1182,8 +1182,13 @@  emit_alu(compiler_context *ctx, nir_alu_instr *instr)
                 ALU_CASE(fcos, fcos);
 
                 ALU_CASE(iand, iand);
+                ALU_CASE(iandnot, iandnot);
+                ALU_CASE(inand, inand);
                 ALU_CASE(ior, ior);
+                ALU_CASE(iornot, iornot);
+                ALU_CASE(inor, inor);
                 ALU_CASE(ixor, ixor);
+                ALU_CASE(inxor, inxor);
                 ALU_CASE(inot, inand);
                 ALU_CASE(ishl, ishl);
                 ALU_CASE(ishr, iasr);
diff --git a/src/gallium/drivers/panfrost/midgard/midgard_compile.h b/src/gallium/drivers/panfrost/midgard/midgard_compile.h
index 0724582d62c..6a894566a20 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard_compile.h
+++ b/src/gallium/drivers/panfrost/midgard/midgard_compile.h
@@ -107,7 +107,10 @@  static const nir_shader_compiler_options midgard_nir_options = {
         .lower_extract_byte = true,
         .lower_extract_word = true,
 
-        .native_integers = true
+        .native_integers = true,
+
+        .bitwise_dest_invertable = true,
+        .bitwise_src_invertable = true,
 };
 
 #endif