diff options
author | Eric Anholt <eric@anholt.net> | 2012-05-10 15:38:11 -0700 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2012-05-18 16:08:34 -0700 |
commit | 1f90817e3cc5739efdf94a723921d77e38a6f5f1 (patch) | |
tree | 1c4356ee72b4332bc31e18b903167eeb46348bb3 | |
parent | 19745022237e3ff48896348468a3ff241b2d30af (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 <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
(cherry picked from commit aa02884c4fdcbc20cf7ac89ec50f9d6c8d1e1682)
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 4 |
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 3f6939b675..4eee22543c 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp @@ -1436,7 +1436,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; @@ -1461,7 +1461,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; |