Basic infrastructure for redeclaring built-in variables (like gl_FragCoord) so shaders can change their type/layout.

A modifiable copy is made at the shader's global scope.


git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@23103 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2013-09-17 18:45:24 +00:00
parent 5f753e0222
commit b84b700d90
4 changed files with 77 additions and 39 deletions

View file

@ -121,6 +121,7 @@ public:
bool containsSampler(const TType& type);
void nonInitConstCheck(TSourceLoc, TString& identifier, TPublicType& type);
void nonInitCheck(TSourceLoc, TString& identifier, TPublicType& type);
TVariable* redeclare(TSourceLoc, const TString&, const TType&, bool& newDeclaration);
void paramCheck(TSourceLoc, TStorageQualifier qualifier, TType* type);
void nestedBlockCheck(TSourceLoc);
void nestedStructCheck(TSourceLoc);
@ -212,6 +213,7 @@ protected:
TQualifier globalUniformDefaults;
TQualifier globalInputDefaults;
TQualifier globalOutputDefaults;
// TODO: desktop functionality: track use of gl_FragDepth before redeclaration
};
} // end namespace glslang