glsl: force creation of new scope for for-loop body
authorBrian Paul <brianp@vmware.com>
Sat, 10 Jan 2009 18:40:20 +0000 (11:40 -0700)
committerBrian Paul <brianp@vmware.com>
Sat, 10 Jan 2009 18:40:20 +0000 (11:40 -0700)
commit6333005f7aea3e5d1d86a5c47b3fa2a1ed2f3ff0
treee366b0c255dc07f9c6b8fea4c3ead1bd1a6aae7c
parent1d352b42a106ed0c3cd0831fa681d07794b7ff3d
glsl: force creation of new scope for for-loop body

Fixes regression in progs/demos/convolution.c due to loop unrolling.
This also allows the following to be compiled correctly:
for (int i = 0; i < n; i++) {
   int i;
   ...
}
This fix is a bit of a hack, however.  The better fix would be to change
the slang_shader.syn grammar.  Will revisit that...
src/mesa/shader/slang/slang_compile.c