Use extension framework to enable #include directive.

This patch introduces a new extension, GL_GOOGLE_include_directive,
to enable support #include directives. It depends on the extension
GL_GOOGLE_cpp_style_line_directive.
This commit is contained in:
Lei Zhang
2015-07-16 17:33:10 -04:00
parent 7be4b8282d
commit 9c1280b225
11 changed files with 51 additions and 13 deletions

View File

@@ -0,0 +1,13 @@
ERROR: 0:8000: '#include' : required extension not requested: GL_GOOGLE_include_directive
ERROR: 0:8000: '#include' : must be followed by a file designation
ERROR: 0:8001: '#include' : required extension not requested: GL_GOOGLE_include_directive
ERROR: 0:8001: '#include' : must be followed by a file designation
ERROR: 0:8002: '#include' : required extension not requested: GL_GOOGLE_include_directive
ERROR: 0:8002: '#error' : unexpected include directive
ERROR: 0:8003: '#include' : required extension not requested: GL_GOOGLE_include_directive
ERROR: 0:8003: '#include' : extra content after file designation
ERROR: 0:8004: '#include' : required extension not requested: GL_GOOGLE_include_directive
ERROR: 0:8004: '#error' : unexpected include directive
ERROR: 10 compilation errors. No code generated.

View File

@@ -1,6 +1,7 @@
#line 8000
#include
#include 123
#include "foo"
#include "foo" garbage
#include "no-eol"
#line 8000
#include
#include 123
#include "foo"
#include "foo" garbage
#include "no-eol"

View File

@@ -0,0 +1,7 @@
#extension GL_GOOGLE_include_directive : enable
#line 8000
#include
#include 123
#include "foo"
#include "foo" garbage
#include "no-eol"

View File

@@ -4,7 +4,8 @@ preprocessor.edge_cases.vert
preprocessor.errors.vert
preprocessor.extensions.vert
preprocessor.function_macro.vert
preprocessor.include.vert
preprocessor.include.enabled.vert
preprocessor.include.disabled.vert
preprocessor.line.vert
preprocessor.line.frag
preprocessor.pragma.vert