summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-08-21 14:36:29 -0700
committerVinson Lee <[email protected]>2010-08-21 14:36:29 -0700
commit4a6eb492e86f74434504766ec551130ac6306e6d (patch)
tree460893268a223048f7119fe3ea220935848c2636 /src/gallium/auxiliary
parent489c787b80064b590016eecf2b8157760b0bc8a2 (diff)
util: Move loop variable declaration outside for loop.
Fixes build error with MSVC.
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_linkage.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_linkage.h b/src/gallium/auxiliary/util/u_linkage.h
index c30b56e6e47..4720e0ee603 100644
--- a/src/gallium/auxiliary/util/u_linkage.h
+++ b/src/gallium/auxiliary/util/u_linkage.h
@@ -56,9 +56,10 @@ void util_semantic_layout_from_set(unsigned char *layout, const struct util_sema
static INLINE void
util_semantic_table_from_layout(unsigned char *table, unsigned char *layout, unsigned char first_slot_value, unsigned char num_slots)
{
+ int i;
memset(table, 0xff, sizeof(table));
- for(int i = 0; i < num_slots; ++i)
+ for(i = 0; i < num_slots; ++i)
table[layout[i]] = first_slot_value + i;
}