Fix #1983: __ is okay starting with ES 300, rather than 310.

This commit is contained in:
John Kessenich
2019-11-23 01:29:02 -07:00
parent 86258aab80
commit 38b4db48f9
4 changed files with 18 additions and 11 deletions

View File

@@ -219,6 +219,9 @@ int init1 = gl_FrontFacing ? 1 : 2; // ERROR, non-const initializer
int init2 = gl_FrontFacing ? 1 : 2;
#define A__B // error
int a__b; // error
#pragma STDGL invariant(all)
#line 3000

View File

@@ -83,9 +83,11 @@ ERROR: 0:193: '.length' : not supported for this version or the enabled extensio
ERROR: 0:194: '.' : cannot apply to an array: method
ERROR: 0:194: 'a' : can't use function syntax on variable
ERROR: 0:214: 'non-constant global initializer (needs GL_EXT_shader_non_constant_global_initializers)' : not supported for this version or the enabled extensions
ERROR: 0:222: '#define' : names containing consecutive underscores are reserved, and an error if version < 300: A__B
ERROR: 0:223: 'a__b' : identifiers containing consecutive underscores ("__") are reserved, and an error if version < 300
ERROR: 0:3000: '#error' : line of this error should be 3000
ERROR: 0:3002: '' : syntax error, unexpected IDENTIFIER, expecting LEFT_BRACE or COMMA or SEMICOLON
ERROR: 77 compilation errors. No code generated.
ERROR: 79 compilation errors. No code generated.
Shader version: 100
@@ -421,6 +423,7 @@ ERROR: node is still EOpNull!
0:? 5.000000
0:? 'init1' ( global mediump int)
0:? 'init2' ( global mediump int)
0:? 'a__b' ( global mediump int)
Linked fragment stage:
@@ -573,4 +576,5 @@ ERROR: node is still EOpNull!
0:? 5.000000
0:? 'init1' ( global mediump int)
0:? 'init2' ( global mediump int)
0:? 'a__b' ( global mediump int)

View File

@@ -1,9 +1,9 @@
300BuiltIns.frag
ERROR: 0:6: 'float' : type requires declaration of default precision qualifier
ERROR: 0:70: 'noise2' : no matching overloaded function found
ERROR: 0:72: 't__' : identifiers containing consecutive underscores ("__") are reserved, and an error if version <= 300
ERROR: 0:75: '#define' : names containing consecutive underscores are reserved, and an error if version <= 300: __D
ERROR: 4 compilation errors. No code generated.
WARNING: 0:72: 't__' : identifiers containing consecutive underscores ("__") are reserved
WARNING: 0:75: '#define' : names containing consecutive underscores are reserved: __D
ERROR: 2 compilation errors. No code generated.
Shader version: 300