summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-05-10 15:38:11 -0700
committerEric Anholt <[email protected]>2012-05-17 10:05:23 -0700
commitaa02884c4fdcbc20cf7ac89ec50f9d6c8d1e1682 (patch)
tree2ec52f1e812f4a695e7cd4aa3ec4ca4b0cb6c905 /src/mesa
parentef691885c92abcd085d89fc30feeda87961773ab (diff)
i965/vs: Fix up swizzle for dereference_array of matrices.
Fixes assertion failure in piglit: vs-mat2-struct-assignment.shader_test vs-mat2-array-assignment.shader_test Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index a7d71b3b5ff..c2b103331aa 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -1454,7 +1454,7 @@ vec4_visitor::visit(ir_dereference_array *ir)
}
/* If the type is smaller than a vec4, replicate the last channel out. */
- if (ir->type->is_scalar() || ir->type->is_vector())
+ if (ir->type->is_scalar() || ir->type->is_vector() || ir->type->is_matrix())
src.swizzle = swizzle_for_size(ir->type->vector_elements);
else
src.swizzle = BRW_SWIZZLE_NOOP;
@@ -1479,7 +1479,7 @@ vec4_visitor::visit(ir_dereference_record *ir)
}
/* If the type is smaller than a vec4, replicate the last channel out. */
- if (ir->type->is_scalar() || ir->type->is_vector())
+ if (ir->type->is_scalar() || ir->type->is_vector() || ir->type->is_matrix())
this->result.swizzle = swizzle_for_size(ir->type->vector_elements);
else
this->result.swizzle = BRW_SWIZZLE_NOOP;