From ad87f2ddc7e6b95e3dd5bbe4d2b19703d305c74e Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Thu, 18 Nov 2010 17:11:17 -0800 Subject: 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. --- src/glsl/ir.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/glsl/ir.cpp') 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 * -- cgit v1.2.3