Closed GoogleCodeExporter closed 9 years ago
Initializers at global scope are legal:
"Declarations of globals without a storage qualifier, or with just the const
qualifier, may include initializers, in which case they will be initialized
before the first line of main() is executed." (GLSL ES 1.0.17 spec, sec 4.3, pg
29) Your example is a valid use of global initializer, and shouldn't fail.
Given that it's failing in IE 11 (which does not use ANGLE), but does work on
IS X (where Chrome uses ANGLE for shader validation) it's likely an issue
either in HLSL translation or in the D3D shader compiler. (If the former, than
IE has a similar bug in their translation logic to ANGLE.) We'll take a closer
look; thanks for the report!
Original comment by shannonw...@chromium.org
on 22 Jan 2015 at 12:46
Yeah, I think this is a shader translator bug. We use global proxy variables
for varyings, which get initialized after the global statics, and we end up
with the uninitialized varying values stored in the global static.
I can take a look at this, we should add a WebGL test as well.
Original comment by jmad...@chromium.org
on 22 Jan 2015 at 3:08
Fixed in https://chromium-review.googlesource.com/243581. Still needs a WebGL
test, I think. Leaving this bug open, and cc'ing Mo and Brandon to check on the
WebGL test presence.
Original comment by jmad...@chromium.org
on 24 Feb 2015 at 10:07
Merging this into 988.
Original comment by jmad...@chromium.org
on 29 Apr 2015 at 2:56
Original issue reported on code.google.com by
the.sp...@gmail.com
on 21 Jan 2015 at 11:24