summaryrefslogtreecommitdiff
path: root/ast_to_hir.cpp
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-06-11 16:52:09 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-11 17:12:23 -0700
commitb74b43e4ba27a9b2e9da0f3499af261a4b997b00 (patch)
tree1c8e542557c73cebc9a9fa522de084c74e9829a3 /ast_to_hir.cpp
parent4976e57448b2d4ca753e95ef2162758542a69a77 (diff)
Use statically typed ir_constant constructors wherever possible
Diffstat (limited to 'ast_to_hir.cpp')
-rw-r--r--ast_to_hir.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp
index 927a9e4..1c0b98b 100644
--- a/ast_to_hir.cpp
+++ b/ast_to_hir.cpp
@@ -1257,22 +1257,22 @@ ast_expression::hir(exec_list *instructions,
case ast_int_constant:
type = glsl_type::int_type;
- result = new ir_constant(type, & this->primary_expression);
+ result = new ir_constant(this->primary_expression.int_constant);
break;
case ast_uint_constant:
type = glsl_type::uint_type;
- result = new ir_constant(type, & this->primary_expression);
+ result = new ir_constant(this->primary_expression.uint_constant);
break;
case ast_float_constant:
type = glsl_type::float_type;
- result = new ir_constant(type, & this->primary_expression);
+ result = new ir_constant(this->primary_expression.float_constant);
break;
case ast_bool_constant:
type = glsl_type::bool_type;
- result = new ir_constant(type, & this->primary_expression);
+ result = new ir_constant(bool(this->primary_expression.bool_constant));
break;
case ast_sequence: {