Add getStage() and getIntermediate() methods for consumers. Also removed dead options and update test file.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26126 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2014-03-28 17:49:10 +00:00
parent f5dd2f5c7c
commit 585982e32a
4 changed files with 18 additions and 34 deletions

View file

@ -126,6 +126,7 @@ public:
int getVersion() const { return version; }
void setProfile(EProfile p) { profile = p; }
EProfile getProfile() const { return profile; }
EShLanguage getStage() const { return language; }
void setTreeRoot(TIntermNode* r) { treeRoot = r; }
TIntermNode* getTreeRoot() const { return treeRoot; }
void addMainCount() { ++numMains; }

View file

@ -223,21 +223,6 @@ SH_IMPORT_EXPORT int ShExcludeAttributes(const ShHandle, int *attributes, int co
//
SH_IMPORT_EXPORT int ShGetUniformLocation(const ShHandle uniformMap, const char* name);
// These are currently unused in the front end, but consumers of the front-end still
// be rely on them:
enum TDebugOptions {
EDebugOpNone = 0x000,
EDebugOpIntermediate = 0x001,
EDebugOpAssembly = 0x002,
EDebugOpObjectCode = 0x004,
EDebugOpLinkMaps = 0x008,
EDebugOpSuppressInfolog = 0x010,
EDebugOpMemoryLeakMode = 0x020,
EDebugOpTexturePrototypes = 0x040,
EDebugOpRelaxedErrors = 0x080,
EDebugOpGiveWarnings = 0x100,
};
#ifdef __cplusplus
} // end extern "C"
#endif
@ -282,7 +267,7 @@ void FinalizeProcess();
// provide the shader through setStrings(), then call parse(), then query
// the info logs.
//
// N.B.: Does not yet support having the same TShader instance being linked multiple programs.
// N.B.: Does not yet support having the same TShader instance being linked into multiple programs.
//
// N.B.: Destruct a linked program *before* destructing the shaders linked into it.
//
@ -292,9 +277,12 @@ public:
virtual ~TShader();
void setStrings(const char* const* s, int n) { strings = s; numStrings = n; }
bool parse(const TBuiltInResource*, int defaultVersion, bool forwardCompatible, EShMessages);
const char* getInfoLog();
const char* getInfoDebugLog();
EShLanguage getStage() const { return stage; }
protected:
TPoolAllocator* pool;
EShLanguage stage;
@ -329,6 +317,8 @@ public:
const char* getInfoLog();
const char* getInfoDebugLog();
TIntermediate* getIntermediate(EShLanguage stage) const { return intermediate[stage]; }
// Reflection Interface
bool buildReflection(); // call first, to do liveness analysis, index mapping, etc.; returns false on failure
int getNumLiveUniformVariables(); // can be used for glGetProgramiv(GL_ACTIVE_UNIFORMS)