class TProgram

Defined at line 879 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

Make one TProgram per set of shaders that will get linked together. Add all

the shaders that are to be linked together. After calling shader.parse()

for all shaders, call link().

N.B.: Destruct a linked program *before* destructing the shaders linked into it.

Protected Members

TPoolAllocator * pool
std::list<TShader *>[14] stages
TIntermediate *[14] intermediate
bool[14] newedIntermediate
TInfoSink * infoSink
TReflection * reflection
bool linked

Public Methods

void TProgram ()
void addShader (TShader * shader)

Defined at line 883 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

void ~TProgram ()
bool link (EShMessages )

Link Validation interface

const char * getInfoLog ()
const char * getInfoDebugLog ()
bool buildReflection (int opts)

call first, to do liveness analysis, index mapping, etc.; returns false on failure

unsigned int getLocalSize (int dim)
int getReflectionIndex (const char * name)
int getReflectionPipeIOIndex (const char * name, const bool inOrOut)
int getNumUniformVariables ()
const TObjectReflection & getUniform (int index)
int getNumUniformBlocks ()
const TObjectReflection & getUniformBlock (int index)
int getNumPipeInputs ()
const TObjectReflection & getPipeInput (int index)
int getNumPipeOutputs ()
const TObjectReflection & getPipeOutput (int index)
int getNumBufferVariables ()
const TObjectReflection & getBufferVariable (int index)
int getNumBufferBlocks ()
const TObjectReflection & getBufferBlock (int index)
int getNumAtomicCounters ()
const TObjectReflection & getAtomicCounter (int index)
void dumpReflection ()
TIoMapResolver * getGlslIoResolver (EShLanguage stage)

Get the IO resolver to use for mapIO

bool mapIO (TIoMapResolver * pResolver, TIoMapper * pIoMapper)

I/O mapping: apply base offsets and map live unbound variables

If resolver is not provided it uses the previous approach

and respects auto assignment and offsets.

std::list<TShader *> & getShaders (EShLanguage stage)

Defined at line 884 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

TIntermediate * getIntermediate (EShLanguage stage)

Defined at line 890 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getNumLiveUniformVariables ()

can be used for glGetProgramiv(GL_ACTIVE_UNIFORMS)

Defined at line 917 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getNumLiveUniformBlocks ()

can be used for glGetProgramiv(GL_ACTIVE_UNIFORM_BLOCKS)

Defined at line 920 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getNumLiveAttributes ()

can be used for glGetProgramiv(GL_ACTIVE_ATTRIBUTES)

Defined at line 923 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getUniformIndex (const char * name)

can be used for glGetUniformIndices()

Defined at line 926 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getPipeIOIndex (const char * name, const bool inOrOut)

Defined at line 928 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

const char * getUniformName (int index)

can be used for "name" part of glGetActiveUniform()

Defined at line 932 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getUniformBinding (int index)

returns the binding number

Defined at line 935 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

EShLanguageMask getUniformStages (int index)

returns Shaders Stages where a Uniform is present

Defined at line 938 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getUniformBlockIndex (int index)

can be used for glGetActiveUniformsiv(GL_UNIFORM_BLOCK_INDEX)

Defined at line 941 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getUniformType (int index)

can be used for glGetActiveUniformsiv(GL_UNIFORM_TYPE)

Defined at line 944 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getUniformBufferOffset (int index)

can be used for glGetActiveUniformsiv(GL_UNIFORM_OFFSET)

Defined at line 947 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getUniformArraySize (int index)

can be used for glGetActiveUniformsiv(GL_UNIFORM_SIZE)

Defined at line 950 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

const TType * getUniformTType (int index)

returns a TType*

Defined at line 953 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

const char * getUniformBlockName (int index)

can be used for glGetActiveUniformBlockName()

Defined at line 956 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getUniformBlockSize (int index)

can be used for glGetActiveUniformBlockiv(UNIFORM_BLOCK_DATA_SIZE)

Defined at line 959 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getUniformBlockBinding (int index)

returns the block binding number

Defined at line 962 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getUniformBlockCounterIndex (int index)

returns block index of associated counter.

Defined at line 965 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

const TType * getUniformBlockTType (int index)

returns a TType*

Defined at line 968 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

const char * getAttributeName (int index)

can be used for glGetActiveAttrib()

Defined at line 971 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getAttributeType (int index)

can be used for glGetActiveAttrib()

Defined at line 974 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

const TType * getAttributeTType (int index)

returns a TType*

Defined at line 977 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

Protected Methods

bool linkStage (EShLanguage , EShMessages )
bool crossStageCheck (EShMessages )