xuxiandi / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Incorrect Conditional Scoping #252

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
void main() {
  int k = 3;

  if (true) int g = k = 4;
  else int q = k = 5;

  g = 3; // error but angle doesn't
  q = 4; // error but angle doesn't

  if (true) int g = 4; // ok but angle errors
  else int k = 10; // ok but angle errors

  if (true) { int g = 10; } // ok
  else { int k = 20; } // ok

  gl_FragColor = vec4(1.);
}

What version of the product are you using? On what operating system?

r887

Please provide any additional information below.

http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf 
Section 4.2.2

Original issue reported on code.google.com by kosmo...@gmail.com on 23 Nov 2011 at 11:15

GoogleCodeExporter commented 9 years ago

Original comment by dan...@transgaming.com on 5 Mar 2012 at 3:38

GoogleCodeExporter commented 9 years ago

Original comment by nicolas....@gmail.com on 8 Mar 2012 at 9:28

GoogleCodeExporter commented 9 years ago
Fixed in r1001.

Original comment by nicolas....@gmail.com on 9 Mar 2012 at 11:47

GoogleCodeExporter commented 9 years ago
r1016 fixes a related bug that was observed in the conformance test for this 
(shader-with-conditional-scoping.html).

Original comment by dan...@transgaming.com on 4 Apr 2012 at 3:49