webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TCompiler Class Referenceabstract

#include <Compiler.h>

Inheritance diagram for TCompiler:
TShHandleBase TranslatorESSL TranslatorGLSL TranslatorHLSL

Classes

class  UnusedPredicate
 

Public Member Functions

 TCompiler (sh::GLenum type, ShShaderSpec spec, ShShaderOutput output)
 
 ~TCompiler () override
 
TCompilergetAsCompiler () override
 
bool Init (const ShBuiltInResources &resources)
 
TIntermBlockcompileTreeForTesting (const char *const shaderStrings[], size_t numStrings, ShCompileOptions compileOptions)
 
bool compile (const char *const shaderStrings[], size_t numStrings, ShCompileOptions compileOptions)
 
int getShaderVersion () const
 
TInfoSinkgetInfoSink ()
 
bool isComputeShaderLocalSizeDeclared () const
 
const sh::WorkGroupSizegetComputeShaderLocalSize ()
 
void clearResults ()
 
const std::vector< sh::Attribute > & getAttributes () const
 
const std::vector< sh::OutputVariable > & getOutputVariables () const
 
const std::vector< sh::Uniform > & getUniforms () const
 
const std::vector< sh::Varying > & getVaryings () const
 
const std::vector< sh::InterfaceBlock > & getInterfaceBlocks () const
 
ShHashFunction64 getHashFunction () const
 
NameMapgetNameMap ()
 
TSymbolTablegetSymbolTable ()
 
ShShaderSpec getShaderSpec () const
 
ShShaderOutput getOutputType () const
 
const std::stringgetBuiltInResourcesString () const
 
bool shouldRunLoopAndIndexingValidation (ShCompileOptions compileOptions) const
 
const ShBuiltInResourcesgetResources () const
 
- Public Member Functions inherited from TShHandleBase
 TShHandleBase ()
 
virtual ~TShHandleBase ()
 

Protected Member Functions

sh::GLenum getShaderType () const
 
bool InitBuiltInSymbolTable (const ShBuiltInResources &resources)
 
void setResourceString ()
 
bool checkCallDepth ()
 
bool validateOutputs (TIntermNode *root)
 
bool validateLimitations (TIntermNode *root)
 
void collectVariables (TIntermNode *root)
 
virtual void initBuiltInFunctionEmulator (BuiltInFunctionEmulator *emu, ShCompileOptions compileOptions)
 
virtual void translate (TIntermNode *root, ShCompileOptions compileOptions)=0
 
bool enforcePackingRestrictions ()
 
void useAllMembersInUnusedStandardAndSharedBlocks (TIntermNode *root)
 
void initializeOutputVariables (TIntermNode *root)
 
void initializeGLPosition (TIntermNode *root)
 
bool limitExpressionComplexity (TIntermNode *root)
 
const TExtensionBehaviorgetExtensionBehavior () const
 
const char * getSourcePath () const
 
const TPragmagetPragma () const
 
void writePragma (ShCompileOptions compileOptions)
 
unsigned int * getTemporaryIndex ()
 
bool isVaryingDefined (const char *varyingName)
 
const ArrayBoundsClampergetArrayBoundsClamper () const
 
ShArrayIndexClampingStrategy getArrayIndexClampingStrategy () const
 
const BuiltInFunctionEmulatorgetBuiltInFunctionEmulator () const
 
virtual bool shouldCollectVariables (ShCompileOptions compileOptions)
 
virtual bool shouldFlattenPragmaStdglInvariantAll ()=0
 

Protected Attributes

std::vector< sh::Attributeattributes
 
std::vector< sh::OutputVariableoutputVariables
 
std::vector< sh::Uniformuniforms
 
std::vector< sh::ShaderVariableexpandedUniforms
 
std::vector< sh::Varyingvaryings
 
std::vector< sh::InterfaceBlockinterfaceBlocks
 
bool variablesCollected
 
- Protected Attributes inherited from TShHandleBase
TPoolAllocator allocator
 

Constructor & Destructor Documentation

◆ TCompiler()

TCompiler::TCompiler ( sh::GLenum  type,
ShShaderSpec  spec,
ShShaderOutput  output 
)

◆ ~TCompiler()

TCompiler::~TCompiler ( )
override

Member Function Documentation

◆ checkCallDepth()

bool TCompiler::checkCallDepth ( )
protected

◆ clearResults()

void TCompiler::clearResults ( )

◆ collectVariables()

void TCompiler::collectVariables ( TIntermNode root)
protected

◆ compile()

bool TCompiler::compile ( const char *const  shaderStrings[],
size_t  numStrings,
ShCompileOptions  compileOptions 
)

◆ compileTreeForTesting()

TIntermBlock * TCompiler::compileTreeForTesting ( const char *const  shaderStrings[],
size_t  numStrings,
ShCompileOptions  compileOptions 
)

◆ enforcePackingRestrictions()

bool TCompiler::enforcePackingRestrictions ( )
protected

◆ getArrayBoundsClamper()

const ArrayBoundsClamper & TCompiler::getArrayBoundsClamper ( ) const
protected

◆ getArrayIndexClampingStrategy()

ShArrayIndexClampingStrategy TCompiler::getArrayIndexClampingStrategy ( ) const
protected

◆ getAsCompiler()

TCompiler* TCompiler::getAsCompiler ( )
inlineoverridevirtual

Reimplemented from TShHandleBase.

◆ getAttributes()

const std::vector<sh::Attribute>& TCompiler::getAttributes ( ) const
inline

◆ getBuiltInFunctionEmulator()

const BuiltInFunctionEmulator & TCompiler::getBuiltInFunctionEmulator ( ) const
protected

◆ getBuiltInResourcesString()

const std::string& TCompiler::getBuiltInResourcesString ( ) const
inline

◆ getComputeShaderLocalSize()

const sh::WorkGroupSize& TCompiler::getComputeShaderLocalSize ( )
inline

◆ getExtensionBehavior()

const TExtensionBehavior & TCompiler::getExtensionBehavior ( ) const
protected

◆ getHashFunction()

ShHashFunction64 TCompiler::getHashFunction ( ) const
inline

◆ getInfoSink()

TInfoSink& TCompiler::getInfoSink ( )
inline

◆ getInterfaceBlocks()

const std::vector<sh::InterfaceBlock>& TCompiler::getInterfaceBlocks ( ) const
inline

◆ getNameMap()

NameMap& TCompiler::getNameMap ( )
inline

◆ getOutputType()

ShShaderOutput TCompiler::getOutputType ( ) const
inline

◆ getOutputVariables()

const std::vector<sh::OutputVariable>& TCompiler::getOutputVariables ( ) const
inline

◆ getPragma()

const TPragma& TCompiler::getPragma ( ) const
inlineprotected

◆ getResources()

const ShBuiltInResources & TCompiler::getResources ( ) const

◆ getShaderSpec()

ShShaderSpec TCompiler::getShaderSpec ( ) const
inline

◆ getShaderType()

sh::GLenum TCompiler::getShaderType ( ) const
inlineprotected

◆ getShaderVersion()

int TCompiler::getShaderVersion ( ) const
inline

◆ getSourcePath()

const char * TCompiler::getSourcePath ( ) const
protected

◆ getSymbolTable()

TSymbolTable& TCompiler::getSymbolTable ( )
inline

◆ getTemporaryIndex()

unsigned int* TCompiler::getTemporaryIndex ( )
inlineprotected

◆ getUniforms()

const std::vector<sh::Uniform>& TCompiler::getUniforms ( ) const
inline

◆ getVaryings()

const std::vector<sh::Varying>& TCompiler::getVaryings ( ) const
inline

◆ Init()

bool TCompiler::Init ( const ShBuiltInResources resources)

◆ initBuiltInFunctionEmulator()

virtual void TCompiler::initBuiltInFunctionEmulator ( BuiltInFunctionEmulator emu,
ShCompileOptions  compileOptions 
)
inlineprotectedvirtual

Reimplemented in TranslatorGLSL.

◆ InitBuiltInSymbolTable()

bool TCompiler::InitBuiltInSymbolTable ( const ShBuiltInResources resources)
protected

◆ initializeGLPosition()

void TCompiler::initializeGLPosition ( TIntermNode root)
protected

◆ initializeOutputVariables()

void TCompiler::initializeOutputVariables ( TIntermNode root)
protected

◆ isComputeShaderLocalSizeDeclared()

bool TCompiler::isComputeShaderLocalSizeDeclared ( ) const
inline

◆ isVaryingDefined()

bool TCompiler::isVaryingDefined ( const char *  varyingName)
protected

◆ limitExpressionComplexity()

bool TCompiler::limitExpressionComplexity ( TIntermNode root)
protected

◆ setResourceString()

void TCompiler::setResourceString ( )
protected

◆ shouldCollectVariables()

virtual bool TCompiler::shouldCollectVariables ( ShCompileOptions  compileOptions)
inlineprotectedvirtual

Reimplemented in TranslatorHLSL.

◆ shouldFlattenPragmaStdglInvariantAll()

virtual bool TCompiler::shouldFlattenPragmaStdglInvariantAll ( )
protectedpure virtual

◆ shouldRunLoopAndIndexingValidation()

bool TCompiler::shouldRunLoopAndIndexingValidation ( ShCompileOptions  compileOptions) const

◆ translate()

virtual void TCompiler::translate ( TIntermNode root,
ShCompileOptions  compileOptions 
)
protectedpure virtual

◆ useAllMembersInUnusedStandardAndSharedBlocks()

void TCompiler::useAllMembersInUnusedStandardAndSharedBlocks ( TIntermNode root)
protected

◆ validateLimitations()

bool TCompiler::validateLimitations ( TIntermNode root)
protected

◆ validateOutputs()

bool TCompiler::validateOutputs ( TIntermNode root)
protected

◆ writePragma()

void TCompiler::writePragma ( ShCompileOptions  compileOptions)
protected

Member Data Documentation

◆ attributes

std::vector<sh::Attribute> TCompiler::attributes
protected

◆ expandedUniforms

std::vector<sh::ShaderVariable> TCompiler::expandedUniforms
protected

◆ interfaceBlocks

std::vector<sh::InterfaceBlock> TCompiler::interfaceBlocks
protected

◆ outputVariables

std::vector<sh::OutputVariable> TCompiler::outputVariables
protected

◆ uniforms

std::vector<sh::Uniform> TCompiler::uniforms
protected

◆ variablesCollected

bool TCompiler::variablesCollected
protected

◆ varyings

std::vector<sh::Varying> TCompiler::varyings
protected

The documentation for this class was generated from the following files: