summaryrefslogtreecommitdiff
path: root/src/glsl/ir.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-11-18 17:11:17 -0800
committerIan Romanick <ian.d.romanick@intel.com>2010-11-18 18:19:45 -0800
commitad87f2ddc7e6b95e3dd5bbe4d2b19703d305c74e (patch)
treeb218028a8a70a77b0e35a73edf5f605a7771f773 /src/glsl/ir.cpp
parent83e93b6008213ad86607027e8434ecaccc8b1a2c (diff)
glsl: Make is_zero and is_one virtual methods of ir_rvalue
This eliminates the need in some cames to validate that an rvalue is an ir_constant before checking to see if it's 0 or 1.
Diffstat (limited to 'src/glsl/ir.cpp')
-rw-r--r--src/glsl/ir.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index 8c5441d332..574ef3e183 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -31,6 +31,16 @@ ir_rvalue::ir_rvalue()
this->type = glsl_type::error_type;
}
+bool ir_rvalue::is_zero() const
+{
+ return false;
+}
+
+bool ir_rvalue::is_one() const
+{
+ return false;
+}
+
/**
* Modify the swizzle make to move one component to another
*