Mesa (glsl2): glsl2: Move constant_expression_value method to ir_rvalue.
Ian Romanick
idr at kemper.freedesktop.org
Wed Jul 21 00:14:39 UTC 2010
Module: Mesa
Branch: glsl2
Commit: e340854115f2562109c91fa908ffe6628432f989
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e340854115f2562109c91fa908ffe6628432f989
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Mon Jul 12 13:55:10 2010 -0700
glsl2: Move constant_expression_value method to ir_rvalue.
This prevents top-level callers from asking for the value of something
that is guaranteed not to have one.
---
src/glsl/ir.h | 4 ++--
src/glsl/ir_constant_expression.cpp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/glsl/ir.h b/src/glsl/ir.h
index 1d667be..b6cd1ba 100644
--- a/src/glsl/ir.h
+++ b/src/glsl/ir.h
@@ -71,8 +71,6 @@ public:
enum ir_node_type ir_type;
const struct glsl_type *type;
- class ir_constant *constant_expression_value();
-
/** ir_print_visitor helper for debugging. */
void print(void) const;
@@ -114,6 +112,8 @@ protected:
class ir_rvalue : public ir_instruction {
public:
+ class ir_constant *constant_expression_value();
+
virtual ir_rvalue *clone(struct hash_table *) const = 0;
virtual ir_rvalue * as_rvalue()
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index ca83497..44f4a64 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -96,7 +96,7 @@ public:
ir_constant *
-ir_instruction::constant_expression_value()
+ir_rvalue::constant_expression_value()
{
ir_constant_visitor visitor;
More information about the mesa-commit
mailing list