Mesa (master): glsl: Add bit_xor builder

Ian Romanick idr at kemper.freedesktop.org
Tue Sep 27 19:07:02 UTC 2016


Module: Mesa
Branch: master
Commit: 7f64041cee3101c673be6d7bffbb03dab69ccca4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7f64041cee3101c673be6d7bffbb03dab69ccca4

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Tue Sep  6 23:17:51 2016 -0700

glsl: Add bit_xor builder

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/compiler/glsl/ir_builder.cpp | 6 ++++++
 src/compiler/glsl/ir_builder.h   | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/compiler/glsl/ir_builder.cpp b/src/compiler/glsl/ir_builder.cpp
index d68647f..f430100 100644
--- a/src/compiler/glsl/ir_builder.cpp
+++ b/src/compiler/glsl/ir_builder.cpp
@@ -417,6 +417,12 @@ bit_or(operand a, operand b)
 }
 
 ir_expression*
+bit_xor(operand a, operand b)
+{
+   return expr(ir_binop_bit_xor, a, b);
+}
+
+ir_expression*
 lshift(operand a, operand b)
 {
    return expr(ir_binop_lshift, a, b);
diff --git a/src/compiler/glsl/ir_builder.h b/src/compiler/glsl/ir_builder.h
index b483ebf..231fbfc 100644
--- a/src/compiler/glsl/ir_builder.h
+++ b/src/compiler/glsl/ir_builder.h
@@ -168,6 +168,7 @@ ir_expression *logic_or(operand a, operand b);
 ir_expression *bit_not(operand a);
 ir_expression *bit_or(operand a, operand b);
 ir_expression *bit_and(operand a, operand b);
+ir_expression *bit_xor(operand a, operand b);
 ir_expression *lshift(operand a, operand b);
 ir_expression *rshift(operand a, operand b);
 




More information about the mesa-commit mailing list