class TProgram

Defined at line 883 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 887 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

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

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

int getNumUniformVariables ()
const TObjectReflection & getAtomicCounter (int index)
void dumpReflection ()
std::list<TShader *> & getShaders (EShLanguage stage)

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

TIntermediate * getIntermediate (EShLanguage stage)

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

int getNumLiveUniformVariables ()

can be used for glGetProgramiv(GL_ACTIVE_UNIFORMS)

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

int getNumLiveUniformBlocks ()

can be used for glGetProgramiv(GL_ACTIVE_UNIFORM_BLOCKS)

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

int getNumLiveAttributes ()

can be used for glGetProgramiv(GL_ACTIVE_ATTRIBUTES)

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

int getUniformIndex (const char * name)

can be used for glGetUniformIndices()

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

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

Defined at line 933 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 937 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getUniformBinding (int index)

returns the binding number

Defined at line 940 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 943 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 946 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 949 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 952 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 955 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

const TType * getUniformTType (int index)

returns a TType*

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

const char * getUniformBlockName (int index)

can be used for glGetActiveUniformBlockName()

Defined at line 961 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 964 of file ../../third_party/glslang/src/glslang/Public/ShaderLang.h

int getUniformBlockBinding (int index)

returns the block binding number

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

int getUniformBlockCounterIndex (int index)

returns block index of associated counter.

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

const TType * getUniformBlockTType (int index)

returns a TType*

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

const char * getAttributeName (int index)

can be used for glGetActiveAttrib()

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

int getAttributeType (int index)

can be used for glGetActiveAttrib()

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

const TType * getAttributeTType (int index)

returns a TType*

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

void ~TProgram ()
bool link (EShMessages )

Link Validation interface

const char * getInfoLog ()
unsigned int getLocalSize (int dim)
unsigned int getTileShadingRateQCOM (int dim)
int getReflectionIndex (const char * name)
int getReflectionPipeIOIndex (const char * name, const bool inOrOut)
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 ()
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.

Protected Methods

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