zenilib
0.5.3.0
|
#include <ShHandle.h>
Inherits TShHandleBase.
Inherited by TranslatorESSL, TranslatorGLSL, and TranslatorHLSL.
Public Member Functions | |
TCompiler (ShShaderType type, ShShaderSpec spec) | |
virtual | ~TCompiler () |
bool | compile (const char *const shaderStrings[], size_t numStrings, int compileOptions) |
virtual TCompiler * | getAsCompiler () |
const TVariableInfoList & | getAttribs () const |
ShHashFunction64 | getHashFunction () const |
TInfoSink & | getInfoSink () |
int | getMappedNameMaxLength () const |
NameMap & | getNameMap () |
TSymbolTable & | getSymbolTable () |
const TVariableInfoList & | getUniforms () const |
bool | Init (const ShBuiltInResources &resources) |
![]() | |
TShHandleBase () | |
virtual | ~TShHandleBase () |
virtual TranslatorHLSL * | getAsTranslatorHLSL () |
Additional Inherited Members | |
![]() | |
TPoolAllocator | allocator |
Definition at line 58 of file ShHandle.h.
TCompiler::TCompiler | ( | ShShaderType | type, |
ShShaderSpec | spec | ||
) |
Definition at line 58 of file Compiler.cpp.
References LongNameMap::GetInstance().
|
virtual |
Definition at line 71 of file Compiler.cpp.
References ASSERT, and LongNameMap::Release().
|
protected |
Definition at line 247 of file Compiler.cpp.
References BuiltInFunctionEmulator::Cleanup(), ArrayBoundsClamper::Cleanup(), TInfoSink::debug, TInfoSinkBase::erase(), TInfoSink::info, and TInfoSink::obj.
Referenced by compile().
|
protected |
Definition at line 361 of file Compiler.cpp.
References TIntermNode::traverse().
Referenced by compile().
bool TCompiler::compile | ( | const char *const | shaderStrings[], |
size_t | numStrings, | ||
int | compileOptions | ||
) |
Definition at line 100 of file Compiler.cpp.
References TSymbolTable::atBuiltInLevel(), TSymbolTable::atGlobalLevel(), clearResults(), collectAttribsUniforms(), detectCallDepth(), enforcePackingRestrictions(), enforceTimingRestrictions(), EPrefixError, EPrefixInternalError, TParseContext::fragmentPrecisionHigh, TInfoSink::info, isWebGLBasedSpec(), limitExpressionComplexity(), mapLongVariableNames(), BuiltInFunctionEmulator::MarkBuiltInFunctionsForEmulation(), ForLoopUnroll::MarkForLoopsWithIntegerIndicesForUnrolling(), ArrayBoundsClamper::MarkIndirectArrayBoundsForClamping(), NULL, TIntermediate::outputTree(), PaParseStrings(), TSymbolTable::pop(), TIntermediate::postProcess(), TInfoSinkBase::prefix(), TSymbolTable::push(), TIntermediate::remove(), rewriteCSSShader(), SetGlobalParseContext(), SH_ATTRIBUTES_UNIFORMS, SH_CLAMP_INDIRECT_ARRAY_BOUNDS, SH_CSS_SHADERS_SPEC, SH_DEPENDENCY_GRAPH, SH_EMULATE_BUILT_IN_FUNCTIONS, SH_ENFORCE_PACKING_RESTRICTIONS, SH_INTERMEDIATE_TREE, SH_LIMIT_CALL_STACK_DEPTH, SH_LIMIT_EXPRESSION_COMPLEXITY, SH_MAP_LONG_VARIABLE_NAMES, SH_OBJECT_CODE, SH_SOURCE_PATH, SH_TIMING_RESTRICTIONS, SH_UNROLL_FOR_LOOP_WITH_INTEGER_INDEX, SH_VALIDATE_LOOP_INDEXING, translate(), TParseContext::treeRoot, and validateLimitations().
Referenced by ShCompile().
|
protected |
Definition at line 262 of file Compiler.cpp.
References DetectCallDepth::detectCallDepth(), EPrefixError, TInfoSink::info, DetectCallDepth::kErrorMaxDepthExceeded, DetectCallDepth::kErrorMissingMain, DetectCallDepth::kErrorNone, DetectCallDepth::kErrorRecursion, TInfoSinkBase::prefix(), TIntermNode::traverse(), and UNREACHABLE.
Referenced by compile().
|
protected |
Definition at line 347 of file Compiler.cpp.
References RestrictFragmentShaderTiming::enforceRestrictions(), TInfoSink::info, and RestrictFragmentShaderTiming::numErrors().
Referenced by enforceTimingRestrictions().
|
protected |
Definition at line 367 of file Compiler.cpp.
References VariablePacker::CheckVariablesWithinPackingLimits().
Referenced by compile().
|
protected |
Definition at line 299 of file Compiler.cpp.
References enforceFragmentShaderTimingRestrictions(), enforceVertexShaderTimingRestrictions(), TInfoSink::info, sort_controllers::output, TDependencyGraphOutput::outputAllSpanningTrees(), SH_FRAGMENT_SHADER, and SH_WEBGL_SPEC.
Referenced by compile().
|
protected |
Definition at line 354 of file Compiler.cpp.
References RestrictVertexShaderTiming::enforceRestrictions(), TInfoSink::info, and RestrictVertexShaderTiming::numErrors().
Referenced by enforceTimingRestrictions().
|
protected |
Definition at line 395 of file Compiler.cpp.
Referenced by TranslatorESSL::translate(), and TranslatorGLSL::translate().
|
protected |
Definition at line 400 of file Compiler.cpp.
Referenced by TranslatorESSL::translate(), and TranslatorGLSL::translate().
|
inlinevirtual |
Reimplemented from TShHandleBase.
Definition at line 62 of file ShHandle.h.
|
inline |
Definition at line 71 of file ShHandle.h.
Referenced by getVariableInfo(), and ShGetInfo().
|
protected |
Definition at line 405 of file Compiler.cpp.
Referenced by TranslatorESSL::translate(), and TranslatorGLSL::translate().
|
protected |
Definition at line 385 of file Compiler.cpp.
|
inline |
Definition at line 75 of file ShHandle.h.
Referenced by ShGetInfo(), TranslatorGLSL::translate(), and TranslatorESSL::translate().
|
inline |
Definition at line 70 of file ShHandle.h.
Referenced by ShGetInfo(), ShGetInfoLog(), ShGetObjectCode(), TranslatorESSL::translate(), and TranslatorGLSL::translate().
int TCompiler::getMappedNameMaxLength | ( | ) | const |
Definition at line 380 of file Compiler.cpp.
References MAX_SHORTENED_IDENTIFIER_SIZE.
|
inline |
Definition at line 76 of file ShHandle.h.
Referenced by ShGetInfo(), ShGetNameHashingEntry(), TranslatorESSL::translate(), and TranslatorGLSL::translate().
|
protected |
Definition at line 390 of file Compiler.cpp.
Referenced by TranslatorHLSL::translate().
|
inlineprotected |
Definition at line 81 of file ShHandle.h.
|
inlineprotected |
Definition at line 80 of file ShHandle.h.
Referenced by TranslatorESSL::translate(), and TranslatorGLSL::translate().
|
inline |
Definition at line 77 of file ShHandle.h.
Referenced by TranslatorESSL::translate(), and TranslatorGLSL::translate().
|
inline |
Definition at line 72 of file ShHandle.h.
Referenced by getVariableInfo(), and ShGetInfo().
bool TCompiler::Init | ( | const ShBuiltInResources & | resources | ) |
Definition at line 77 of file Compiler.cpp.
References ShBuiltInResources::ArrayIndexClampingStrategy, ShBuiltInResources::FragmentPrecisionHigh, ShBuiltInResources::HashFunction, InitBuiltInSymbolTable(), InitExtensionBehavior(), ShBuiltInResources::MaxCallStackDepth, ShBuiltInResources::MaxExpressionComplexity, ShBuiltInResources::MaxFragmentUniformVectors, ShBuiltInResources::MaxVertexUniformVectors, ArrayBoundsClamper::SetClampingStrategy(), and SH_VERTEX_SHADER.
Referenced by ShConstructCompiler().
|
protected |
Definition at line 209 of file Compiler.cpp.
References TPublicType::array, assert, EbpHigh, EbpMedium, EbtFloat, EbtInt, IdentifyBuiltIns(), InsertBuiltInFunctions(), TSymbolTable::isEmpty(), TPublicType::matrix, TSymbolTable::push(), TSymbolTable::setDefaultPrecision(), SH_FRAGMENT_SHADER, SH_VERTEX_SHADER, TPublicType::size, and TPublicType::type.
Referenced by Init().
|
protected |
Definition at line 325 of file Compiler.cpp.
References TDependencyGraph::beginUserDefinedFunctionCalls(), TDependencyGraph::endUserDefinedFunctionCalls(), TIntermTraverser::getMaxDepth(), TInfoSink::info, TGraphFunctionCall::traverse(), and TIntermNode::traverse().
Referenced by compile().
|
protected |
Definition at line 373 of file Compiler.cpp.
References ASSERT, map, and TIntermNode::traverse().
Referenced by compile().
|
protected |
Definition at line 287 of file Compiler.cpp.
References TIntermNode::traverse().
Referenced by compile().
|
protectedpure virtual |
Implemented in TranslatorHLSL, TranslatorESSL, and TranslatorGLSL.
Referenced by compile().
|
protected |
Definition at line 293 of file Compiler.cpp.
References TInfoSink::info, ValidateLimitations::numErrors(), and TIntermNode::traverse().
Referenced by compile().