* Preprocessor related fix 1). Accoding to ESSL spec : All macro names containing two consecutive underscores ( __ ) are reserved for future use as predefined macro names, so just report a warning instead of error when the shader defines the macro names begining with '__'; 2. According to spec: If an implementation does not recognize the tokens following #pragma, then it will ignore that pragma, so report a compile-time warning intead of error for the following statement: #pragma debug(1.23) 3. The 'defined' macro should be allowed to expand and '__LINE__' should be allowed to be replaced with its original line number (otherwise, other expanding macros may change this value). 4. Add a flag 'indentifierSeen' in PPContext to indicate whether the any non-preprocessor tokens is existed before the extension directives, because the built-in symbols and functions are parsed before paring the user shader, so add a 'shaderSource' flag to check this error only for the user shader source; 5. Add missing type int16 and uint16. * Add test results, remove restriction of #extension. 1. Remove extension restriction in first line , as this is contraversy now. 2. The following shader is compiled failed as glslang consider the keyword 'defined' can not be undefined(in the 9th line: "#define defined BBB") The shader is as following: According to ES3.0 spec: It is an error to undefine or to redefine a built-in (pre-defined) macro name. This rule is aimed to the __LINE__, __FILE__, __VERSION__ and GL_ES, the keyword "defined" should not be restricted by this rule, so change the compile error to warning and make the following shader compile successfully. * 1. Using relaxedError to control error/warning report level. 2. remove #extension restriction. 3. Fix version related issue. 1. Using relaxedError to control error/warning report level. 2. remove #extension restriction. 3. Fix version related issue. * Add test results * Turn conditional warnings about pragma to unconditional ones.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| preprocessor | Loading commit data... | |
| Constant.cpp | Loading commit data... | |
| InfoSink.cpp | Loading commit data... | |
| Initialize.cpp | Loading commit data... | |
| Initialize.h | Loading commit data... | |
| IntermTraverse.cpp | Loading commit data... | |
| Intermediate.cpp | Loading commit data... | |
| LiveTraverser.h | Loading commit data... | |
| ParseContextBase.cpp | Loading commit data... | |
| ParseHelper.cpp | Loading commit data... | |
| ParseHelper.h | Loading commit data... | |
| PoolAlloc.cpp | Loading commit data... | |
| RemoveTree.cpp | Loading commit data... | |
| RemoveTree.h | Loading commit data... | |
| Scan.cpp | Loading commit data... | |
| Scan.h | Loading commit data... | |
| ScanContext.h | Loading commit data... | |
| ShaderLang.cpp | Loading commit data... | |
| SymbolTable.cpp | Loading commit data... | |
| SymbolTable.h | Loading commit data... | |
| Versions.cpp | Loading commit data... | |
| Versions.h | Loading commit data... | |
| attribute.cpp | Loading commit data... | |
| attribute.h | Loading commit data... | |
| gl_types.h | Loading commit data... | |
| glslang.m4 | Loading commit data... | |
| glslang.y | Loading commit data... | |
| glslang_tab.cpp | Loading commit data... | |
| glslang_tab.cpp.h | Loading commit data... | |
| intermOut.cpp | Loading commit data... | |
| iomapper.cpp | Loading commit data... | |
| iomapper.h | Loading commit data... | |
| limits.cpp | Loading commit data... | |
| linkValidate.cpp | Loading commit data... | |
| localintermediate.h | Loading commit data... | |
| parseConst.cpp | Loading commit data... | |
| parseVersions.h | Loading commit data... | |
| pch.h | Loading commit data... | |
| propagateNoContraction.cpp | Loading commit data... | |
| propagateNoContraction.h | Loading commit data... | |
| reflection.cpp | Loading commit data... | |
| reflection.h | Loading commit data... |