Re: [Mesa-dev] [glsl] indvar in ir_loop

2013-10-25 Thread Liu Xin
Ian, I am sure I comes across trouble for the following code. (function main (signature void (parameters ) ( (loop ((declare () int i@0x8d19434)) ((constant int (0)) ) ((constant int (32)) ) ((constant int (1)) ) ( (call foo ((var_ref sampler2d@0x8eef134) (var_ref

[Mesa-dev] [glsl] indvar in ir_loop

2013-10-11 Thread Liu Xin
Hi, Mesa developers, According to glsl v1.0, we have loop construct: for (for-init-statement; condition(opt); expression) statement-no-new-scope Variables declared in for-init-statement or condition are only in scope until the end of the statement-no-new-scope of the for loop. let's assume I

Re: [Mesa-dev] [glsl] indvar in ir_loop

2013-10-11 Thread Ian Romanick
On 10/10/2013 11:14 PM, Liu Xin wrote: Hi, Mesa developers, According to glsl v1.0, we have loop construct: for (for-init-statement; condition(opt); expression) statement-no-new-scope Variables declared in for-init-statement or condition are only in scope until the end of the