Mesa (master): i965: Fix new FS gen6 interpolation for sparsely-populated arrays.

Eric Anholt anholt at kemper.freedesktop.org
Fri Oct 8 19:01:21 UTC 2010


Module: Mesa
Branch: master
Commit: cac04a93974e7ae773b84e000a2b26391ee2f4bb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cac04a93974e7ae773b84e000a2b26391ee2f4bb

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Oct  8 11:14:48 2010 -0700

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 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 710eb0b..bc49ee8 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,




More information about the mesa-commit mailing list