mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-24 23:20:23 +01:00
i965: fix bogus swizzle in brw_cubemap_normalize
When used with a cube array in VS, failed assertion in ir_validate:
Assignment count of LHS write mask channels enabled not
matching RHS vector size (3 LHS, 4 RHS).
To fix this, swizzle the RHS correctly for the writemask.
This showed up in the ARB_texture_gather tests, which exercise cube
arrays in the VS.
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Cc: "9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(cherry picked from commit 0d7fc10bcd)
This commit is contained in:
parent
2eb55601bb
commit
88513d6485
1 changed files with 6 additions and 4 deletions
|
|
@ -92,10 +92,12 @@ brw_cubemap_normalize_visitor::visit_leave(ir_texture *ir)
|
|||
/* coordinate.xyz *= expr */
|
||||
assign = new(mem_ctx) ir_assignment(
|
||||
new(mem_ctx) ir_dereference_variable(var),
|
||||
new(mem_ctx) ir_expression(ir_binop_mul,
|
||||
ir->coordinate->type,
|
||||
new(mem_ctx) ir_dereference_variable(var),
|
||||
expr));
|
||||
new(mem_ctx) ir_swizzle(
|
||||
new(mem_ctx) ir_expression(ir_binop_mul,
|
||||
ir->coordinate->type,
|
||||
new(mem_ctx) ir_dereference_variable(var),
|
||||
expr),
|
||||
0, 1, 2, 0, 3));
|
||||
assign->write_mask = WRITEMASK_XYZ;
|
||||
base_ir->insert_before(assign);
|
||||
ir->coordinate = new(mem_ctx) ir_dereference_variable(var);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue