summaryrefslogtreecommitdiff
path: root/ir.cpp
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-05-03 17:08:01 -0700
committerEric Anholt <eric@anholt.net>2010-05-03 17:09:31 -0700
commit05a4e59c2410292f595cfe0cc552a86ae69b20d2 (patch)
treeb87a21bf014ceeec980f8f526eba4d12c53d5b31 /ir.cpp
parent3bc8b68436ad387cc395d6c0843bbf185d1739d0 (diff)
ir_to_mesa.cpp: Fix missing types on some ir_swizzles.
Debugging this took forever as I only looked at constructors in ir.cpp to find who wasn't setting up ->type. I dislike hiding code (as opposed to prototypes and definitions) in C++ header files, but in this case I have only myself to blame.
Diffstat (limited to 'ir.cpp')
-rw-r--r--ir.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/ir.cpp b/ir.cpp
index 6778997ac8..d2d8b4015b 100644
--- a/ir.cpp
+++ b/ir.cpp
@@ -307,6 +307,14 @@ ir_swizzle::ir_swizzle(ir_rvalue *val, unsigned x, unsigned y, unsigned z,
type = glsl_type::get_instance(val->type->base_type, mask.num_components, 1);
}
+ir_swizzle::ir_swizzle(ir_rvalue *val, ir_swizzle_mask mask)
+{
+ this->val = val;
+ this->mask = mask;
+ this->type = glsl_type::get_instance(val->type->base_type,
+ mask.num_components, 1);
+}
+
#define X 1
#define R 5
#define S 9