diff options
author | Kenneth Graunke <[email protected]> | 2011-10-25 12:55:54 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2011-10-28 11:12:33 -0700 |
commit | 3b4d2eac6001b464df11b175bd14fd4d3c4e412f (patch) | |
tree | 95ce88691d1f06eca22611c3397e4af07d49033c /src/glsl/ir_reader.cpp | |
parent | 1e1a7011ee8f7e954b9f77985665495e53efae22 (diff) |
glsl: Remove pointless uses of glsl_type::get_base_type().
These are effectively doing type->get_base_type()->base_type, which is
equivalent to type->base_type. Just use that, as it's simpler.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/glsl/ir_reader.cpp')
-rw-r--r-- | src/glsl/ir_reader.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp index e3a3ed97d3a..6f50cc439b8 100644 --- a/src/glsl/ir_reader.cpp +++ b/src/glsl/ir_reader.cpp @@ -773,8 +773,6 @@ ir_reader::read_constant(s_expression *expr) return new(mem_ctx) ir_constant(type, &elements); } - const glsl_type *const base_type = type->get_base_type(); - ir_constant_data data = { { 0 } }; // Read in list of values (at most 16). @@ -787,7 +785,7 @@ ir_reader::read_constant(s_expression *expr) s_expression *expr = (s_expression*) it.get(); - if (base_type->base_type == GLSL_TYPE_FLOAT) { + if (type->base_type == GLSL_TYPE_FLOAT) { s_number *value = SX_AS_NUMBER(expr); if (value == NULL) { ir_read_error(values, "expected numbers"); @@ -801,7 +799,7 @@ ir_reader::read_constant(s_expression *expr) return NULL; } - switch (base_type->base_type) { + switch (type->base_type) { case GLSL_TYPE_UINT: { data.u[k] = value->value(); break; |