summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-06-03 16:31:14 -0700
committerEric Anholt <eric@anholt.net>2010-06-24 15:05:21 -0700
commit76720647566db8126b9f29a0e705ba03ebcdad27 (patch)
tree049ac71259126e77a5c2dc8c9c75a3082ded9245
parentf4bd7f262e43301158f059af90176a476ffdbf60 (diff)
ir_to_mesa: Handle constant matrices.
There's not much to it since we're not actually storing constant data yet.
-rw-r--r--ir_to_mesa.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/ir_to_mesa.cpp b/ir_to_mesa.cpp
index afb5ad0e46..2ec2b11f03 100644
--- a/ir_to_mesa.cpp
+++ b/ir_to_mesa.cpp
@@ -943,8 +943,6 @@ ir_to_mesa_visitor::visit(ir_constant *ir)
{
ir_to_mesa_src_reg src_reg;
- assert(!ir->type->is_matrix());
-
assert(ir->type->base_type == GLSL_TYPE_FLOAT ||
ir->type->base_type == GLSL_TYPE_UINT ||
ir->type->base_type == GLSL_TYPE_INT ||
@@ -957,11 +955,13 @@ ir_to_mesa_visitor::visit(ir_constant *ir)
/* FINISHME: Do something with the constant values for now.
*/
src_reg.file = PROGRAM_CONSTANT;
- src_reg.index = this->next_constant++;
+ src_reg.index = this->next_constant;
src_reg.swizzle = SWIZZLE_NOOP;
src_reg.reladdr = false;
src_reg.negate = 0;
+ this->next_constant += type_size(ir->type);
+
this->result = src_reg;
}