summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-06-12 16:31:33 -0600
committerBrian Paul <[email protected]>2012-06-12 16:31:36 -0600
commit82ce93a8fdcb18b17263a388fa0bd8dbc1889857 (patch)
tree72fe0704aa2542511ecba8b0df45844ea3283176 /src
parenta74c4fb89dee398a955415f0b5641bd9c5888c75 (diff)
mesa: move variable declaration out of loop to fix MSVC build
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/shaderobj.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index d5ebf54af8e..16800ae5ec6 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -278,7 +278,8 @@ _mesa_clear_shader_program_data(struct gl_context *ctx,
struct gl_shader_program *shProg)
{
if (shProg->UniformStorage) {
- for (unsigned i = 0; i < shProg->NumUserUniformStorage; ++i)
+ unsigned i;
+ for (i = 0; i < shProg->NumUserUniformStorage; ++i)
_mesa_uniform_detach_all_driver_storage(&shProg->UniformStorage[i]);
ralloc_free(shProg->UniformStorage);
shProg->NumUserUniformStorage = 0;