Mesa (master): i965/fs: Use different name for inner loop counter

Ian Romanick idr at kemper.freedesktop.org
Fri Mar 25 18:28:20 UTC 2011


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

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Thu Mar 24 18:01:37 2011 -0700

i965/fs: Use different name for inner loop counter

'i' is already used for the outer loop.  This caused some problems
while doing other work in this area.  No bug exists here... until you
want to use the outer loop counter in the inner loop.

---

 src/mesa/drivers/dri/i965/brw_fs.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index ecc4d48..74596e9 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -440,8 +440,8 @@ fs_visitor::setup_builtin_uniform_values(ir_variable *ir)
 	  * the array/matrix/structure we're trying to fill in.
 	  */
 	 int last_swiz = -1;
-	 for (unsigned int i = 0; i < 4; i++) {
-	    int swiz = GET_SWZ(element->swizzle, i);
+	 for (unsigned int j = 0; j < 4; j++) {
+	    int swiz = GET_SWZ(element->swizzle, j);
 	    if (swiz == last_swiz)
 	       break;
 	    last_swiz = swiz;




More information about the mesa-commit mailing list