From cac04a93974e7ae773b84e000a2b26391ee2f4bb Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 8 Oct 2010 11:14:48 -0700 Subject: [PATCH] i965: Fix new FS gen6 interpolation for sparsely-populated arrays. We'd overwrite the same element twice. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 710eb0bb721..bc49ee8fe0d 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -813,9 +813,9 @@ fs_visitor::emit_general_interpolation(ir_variable *ir) fs_reg(interp))); attr.reg_offset++; } - attr.reg_offset -= type->vector_elements; if (intel->gen < 6) { + attr.reg_offset -= type->vector_elements; for (unsigned int c = 0; c < type->vector_elements; c++) { emit(fs_inst(BRW_OPCODE_MUL, attr, -- 2.30.2