summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp b/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp
index 46155fb43af..949414cc954 100644
--- a/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp
+++ b/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp
@@ -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);