diff options
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index fc7ae582990..15d1c6a6985 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -891,6 +891,10 @@ fs_visitor::emit_texture_gen4(ir_texture *ir, fs_reg dst, fs_reg coordinate, emit(MOV(fs_reg(MRF, base_mrf + mlen + i), coordinate)); coordinate.reg_offset++; } + /* zero the others. */ + for (int i = ir->coordinate->type->vector_elements; i<3; i++) { + emit(MOV(fs_reg(MRF, base_mrf + mlen + i), fs_reg(0.0f))); + } /* gen4's SIMD8 sampler always has the slots for u,v,r present. */ mlen += 3; } else if (ir->op == ir_txd) { |