diff --git a/specs/latest/1.0/index.html b/specs/latest/1.0/index.html index 1f00be6b3a..34284e8de3 100644 --- a/specs/latest/1.0/index.html +++ b/specs/latest/1.0/index.html @@ -28,7 +28,7 @@

WebGL Specification

-

Editor's Draft 14 September 2015

+

Editor's Draft 29 September 2015

This version:
@@ -3840,6 +3840,28 @@

GLSL ES Global Variable Initialization

content. +

GLSL ES Preprocessor "defined" Operator Generated By Macro Replacement

+ +

+ The C++ standard, which the GLSL ES preprocessor specification refers to, has undefined behavior + when the defined operator is generated by macro replacement when parsing the + controlling expression of an #if or #elif directive. When shader code + processed by the WebGL API generates the token defined during macro replacement + inside a preprocessor expression, that token must be immediately handled as the + defined operator before any further macro replacement. +

+ +

+ This has no effect on macro expansion outside preprocessor directives that handle the + defined operator. +

+ +
+ This behavior is enforced across GLES implementations by dEQP tests, so shaders created on other + platforms may rely on it. In addition, the ported dEQP tests in the WebGL conformance suite are + only valid if this behavior is specified. +
+

References