diff options
author | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-11 16:52:09 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-06-11 17:12:23 -0700 |
commit | b74b43e4ba27a9b2e9da0f3499af261a4b997b00 (patch) | |
tree | 1c8e542557c73cebc9a9fa522de084c74e9829a3 /glsl_types.cpp | |
parent | 4976e57448b2d4ca753e95ef2162758542a69a77 (diff) |
Use statically typed ir_constant constructors wherever possible
Diffstat (limited to 'glsl_types.cpp')
-rw-r--r-- | glsl_types.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/glsl_types.cpp b/glsl_types.cpp index 4b6a61a13c..290756d453 100644 --- a/glsl_types.cpp +++ b/glsl_types.cpp @@ -359,8 +359,7 @@ generate_mat_body_from_scalar(exec_list *instructions, inst = new ir_assignment(lhs, rhs, NULL); instructions->push_tail(inst); - const float z = 0.0f; - ir_constant *const zero = new ir_constant(glsl_type::float_type, &z); + ir_constant *const zero = new ir_constant(0.0f); for (unsigned i = 1; i < column_type->vector_elements; i++) { ir_dereference *const lhs_ref = new ir_dereference_variable(column); @@ -382,7 +381,7 @@ generate_mat_body_from_scalar(exec_list *instructions, swiz[5 - i], swiz[6 - i], column_type->vector_elements); - ir_constant *const idx = new ir_constant(glsl_type::int_type, &i); + ir_constant *const idx = new ir_constant(int(i)); ir_dereference *const lhs = new ir_dereference_array(declarations[16], idx); @@ -413,7 +412,7 @@ generate_mat_body_from_N_scalars(exec_list *instructions, */ for (unsigned i = 0; i < column_type->vector_elements; i++) { for (unsigned j = 0; j < row_type->vector_elements; j++) { - ir_constant *row_index = new ir_constant(glsl_type::int_type, &i); + ir_constant *row_index = new ir_constant(int(i)); ir_dereference *const row_access = new ir_dereference_array(declarations[16], row_index); |