mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-22 23:40:23 +01:00
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>
This commit is contained in:
parent
ef691885c9
commit
aa02884c4f
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue