Source/ThirdParty/ANGLE: Updated ANGLE to latest git commit (047373aa3eb408be62be52ad...
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jul 2013 22:35:34 +0000 (22:35 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jul 2013 22:35:34 +0000 (22:35 +0000)
Added missing ANGLE files except unused tests, extensions, samples, build, and .git directories.
Ran Bison after making some changes to fix compile errors (see below).

https://bugs.webkit.org/show_bug.cgi?id=118550

Reviewed by Dean Jackson.

* ANGLE.plist: Updated from svn to git.
* ANGLE.xcodeproj/project.pbxproj: Renamed DetectRecursion to DetectCallDepth.
* AUTHORS: Added.
* CONTRIBUTORS: Added.
* DEPS: Added.
* GNUmakefile.am: Renamed DetectRecursion to DetectCallDepth and added Uniform.cpp.
* LICENSE: Added.
* README.chromium: Added.
* Target.pri: Renamed DetectRecursion to DetectCallDepth.
* codereview.settings: Added.
* include/EGL/eglext.h:
* include/GLES2/gl2ext.h:
* include/GLSLANG/ShaderLang.h:
* src/ANGLE.sln: Added.
* src/build_angle.gyp: Added.
* src/build_angle.gypi: Added.
* src/common/RefCountObject.cpp:
* src/common/angleutils.h:
(ArraySize):
(SafeRelease):
* src/common/debug.cpp:
* src/common/debug.h:
* src/common/system.h:
* src/common/version.h:
* src/compiler/64bit-lexer-safety.patch: Added.
* src/compiler/BaseTypes.h:
(getQualifierString):
* src/compiler/CodeGenHLSL.cpp:
(ConstructCompiler):
* src/compiler/Common.h:
* src/compiler/Compiler.cpp:
(TCompiler::TCompiler):
(TCompiler::Init):
(TCompiler::compile):
(TCompiler::InitBuiltInSymbolTable):
(TCompiler::detectCallDepth):
(TCompiler::limitExpressionComplexity):
(TCompiler::getResources):
* src/compiler/ConstantUnion.h:
(ConstantUnion::ConstantUnion):
* src/compiler/DetectCallDepth.cpp: Added.
(DetectCallDepth::FunctionNode::FunctionNode):
(DetectCallDepth::FunctionNode::getName):
(DetectCallDepth::FunctionNode::addCallee):
(DetectCallDepth::FunctionNode::detectCallDepth):
(DetectCallDepth::FunctionNode::reset):
(DetectCallDepth::DetectCallDepth):
(DetectCallDepth::~DetectCallDepth):
(DetectCallDepth::visitAggregate):
(DetectCallDepth::checkExceedsMaxDepth):
(DetectCallDepth::resetFunctionNodes):
(DetectCallDepth::detectCallDepthForFunction):
(DetectCallDepth::detectCallDepth):
(DetectCallDepth::findFunctionByName):
* src/compiler/DetectCallDepth.h: Added.
(DetectCallDepth::getInfoSink):
* src/compiler/DetectRecursion.cpp: Removed.
* src/compiler/DetectRecursion.h: Removed.
* src/compiler/Diagnostics.cpp:
(TDiagnostics::writeInfo):
* src/compiler/ForLoopUnroll.cpp:
(ForLoopUnroll::evaluateIntConstant):
* src/compiler/InfoSink.cpp:
(TInfoSinkBase::prefix):
(TInfoSinkBase::location):
(TInfoSinkBase::message):
* src/compiler/InfoSink.h:
* src/compiler/Initialize.cpp:
(InsertBuiltInFunctions):
(IdentifyBuiltIns):
(InitExtensionBehavior):
* src/compiler/Initialize.h:
* src/compiler/Intermediate.cpp:
(TIntermediate::addSymbol):
(TIntermediate::addBinaryMath):
(TIntermediate::addAssign):
(TIntermediate::addIndex):
(TIntermediate::addUnaryMath):
(TIntermediate::setAggregateOperator):
(TIntermediate::addConversion):
(TIntermediate::growAggregate):
(TIntermediate::makeAggregate):
(TIntermediate::addSelection):
(TIntermediate::addComma):
(TIntermediate::addConstantUnion):
(TIntermediate::addSwizzle):
(TIntermediate::addLoop):
(TIntermediate::addBranch):
(TIntermUnary::promote):
(TIntermBinary::promote):
(CompareStruct):
(CompareStructure):
(TIntermConstantUnion::fold): Added implied static_casts to fix compiling errors on Mac.
(TIntermediate::promoteConstantUnion):
* src/compiler/OutputGLSL.cpp:
(TOutputGLSL::visitSymbol):
* src/compiler/OutputGLSL.h:
* src/compiler/OutputGLSLBase.cpp:
(TOutputGLSLBase::writeVariableType):
(TOutputGLSLBase::writeConstantUnion):
(TOutputGLSLBase::visitBinary):
(TOutputGLSLBase::visitAggregate):
(TOutputGLSLBase::getTypeName):
(TOutputGLSLBase::structDeclared):
(TOutputGLSLBase::declareStruct):
* src/compiler/OutputGLSLBase.h:
* src/compiler/OutputHLSL.cpp:
(sh::OutputHLSL::OutputHLSL):
(sh::OutputHLSL::getUniforms):
(sh::OutputHLSL::header):
(sh::OutputHLSL::visitSymbol):
(sh::OutputHLSL::visitBinary):
(sh::OutputHLSL::visitAggregate):
(sh::OutputHLSL::visitSelection):
(sh::OutputHLSL::visitLoop):
(sh::OutputHLSL::handleExcessiveLoop):
(sh::OutputHLSL::argumentString):
(sh::OutputHLSL::typeString):
(sh::OutputHLSL::textureString):
(sh::OutputHLSL::initializer):
(sh::OutputHLSL::addConstructor):
(sh::OutputHLSL::writeConstantUnion):
(sh::OutputHLSL::decorateUniform):
(sh::OutputHLSL::decorateField):
(sh::OutputHLSL::registerString):
(sh::OutputHLSL::samplerRegister):
(sh::OutputHLSL::uniformRegister):
(sh::OutputHLSL::declareUniform):
(sh::OutputHLSL::glVariableType):
(sh::OutputHLSL::glVariablePrecision):
* src/compiler/OutputHLSL.h:
* src/compiler/ParseHelper.cpp:
(TParseContext::parseVectorFields):
(TParseContext::parseMatrixFields):
(TParseContext::error):
(TParseContext::warning):
(TParseContext::assignError):
(TParseContext::unaryOpError):
(TParseContext::binaryOpError):
(TParseContext::precisionErrorCheck):
(TParseContext::lValueErrorCheck):
(TParseContext::globalErrorCheck):
(TParseContext::reservedErrorCheck):
(TParseContext::constructorErrorCheck):
(TParseContext::voidErrorCheck):
(TParseContext::boolErrorCheck):
(TParseContext::samplerErrorCheck):
(TParseContext::structQualifierErrorCheck):
(TParseContext::parameterSamplerErrorCheck):
(TParseContext::containsSampler):
(TParseContext::arraySizeErrorCheck):
(TParseContext::arrayQualifierErrorCheck):
(TParseContext::arrayTypeErrorCheck):
(TParseContext::arrayErrorCheck):
(TParseContext::nonInitConstErrorCheck):
(TParseContext::nonInitErrorCheck):
(TParseContext::paramErrorCheck):
(TParseContext::extensionErrorCheck):
(TParseContext::isExtensionEnabled):
Replaced auto with std::map<std::string, TBehavior>::const_iterator to fix Qt and EFL compiling errors.
(TParseContext::findFunction):
(TParseContext::executeInitializer):
(TParseContext::addConstructor):
(TParseContext::constructBuiltIn):
(TParseContext::constructStruct):
(TParseContext::addConstVectorNode):
(TParseContext::addConstMatrixNode):
(TParseContext::addConstArrayNode):
(TParseContext::addConstStruct):
(TParseContext::enterStructDeclaration):
(TParseContext::structNestingErrorCheck):
(TParseContext::addIndexExpression):
* src/compiler/ParseHelper.h:
(TParseContext::TParseContext):
(TParseContext::pragma):
* src/compiler/PoolAlloc.cpp:
(TPoolAllocator::allocate):
* src/compiler/ShHandle.h:
(TShHandleBase::getAsTranslatorHLSL):
* src/compiler/ShaderLang.cpp:
(ShInitBuiltInResources):
(ShGetInfoPointer):
* src/compiler/SymbolTable.cpp:
(TType::TType):
(TType::buildMangledName):
(TType::getObjectSize):
(TStructure::containsArrays):
(TStructure::buildMangledName):
(TStructure::calculateObjectSize):
(TStructure::calculateDeepestNesting):
(TSymbolTableLevel::relateToExtension):
* src/compiler/SymbolTable.h:
(TSymbol::relateToExtension):
(TSymbol::getExtension):
(TVariable::TVariable):
(TVariable::setQualifier):
(TVariable::shareConstPointer):
(TSymbolTableLevel::insert):
(TSymbolTable::insertConstInt):
(TSymbolTable::insertBuiltIn):
* src/compiler/TranslatorHLSL.cpp:
(TranslatorHLSL::TranslatorHLSL):
(TranslatorHLSL::translate):
* src/compiler/TranslatorHLSL.h:
(TranslatorHLSL::getAsTranslatorHLSL):
(TranslatorHLSL::getUniforms):
* src/compiler/Types.h: Removed enum bit fields to fix gcc compiler errors.
(TField::TField):
(TField::type):
(TField::name):
(NewPoolTFieldList):
(TStructure::TStructure):
(TStructure::name):
(TStructure::fields):
(TStructure::mangledName):
(TStructure::objectSize):
(TStructure::deepestNesting):
(TType::TType):
(TType::elementRegisterCount):
(TType::totalRegisterCount):
(TType::clearArrayness):
(TType::getStruct):
(TType::setStruct):
(TType::getMangledName):
(TType::getDeepestStructNesting):
(TType::isStructureContainingArrays):
(TPublicType::setBasic):
* src/compiler/Uniform.cpp: Added.
(sh::Uniform::Uniform):
* src/compiler/Uniform.h: Added.
* src/compiler/VariableInfo.cpp:
(getUserDefinedVariableInfo):
* src/compiler/glslang.l:
* src/compiler/glslang.y: Moved YYLTYPE definition into %union to work with Bison 2.3.
* src/compiler/glslang_lex.cpp:
(yy_get_previous_state):
(yy_try_NUL_trans):
(yyget_lloc):
(yyset_lloc):
(string_input):
(check_type):
(reserved_word):
(glslang_scan):
* src/compiler/glslang_tab.cpp:
(yyerror):
* src/compiler/glslang_tab.h:
* src/compiler/intermOut.cpp:
(TOutputTraverser::visitUnary):
(TOutputTraverser::visitAggregate):
(TOutputTraverser::visitConstantUnion):
* src/compiler/intermediate.h:
(TIntermNode::TIntermNode):
(TIntermNode::~TIntermNode):
(TIntermNode::getLine):
(TIntermNode::setLine):
(TIntermNode::getAsLoopNode):
(TIntermTyped::totalRegisterCount):
(TIntermTyped::elementRegisterCount):
(TIntermTyped::getArraySize):
(TIntermConstantUnion::getIConst):
(TIntermConstantUnion::getFConst):
(TIntermConstantUnion::getBConst):
(TIntermAggregate::TIntermAggregate):
(TIntermTraverser::TIntermTraverser):
(TIntermTraverser::getMaxDepth):
(TIntermTraverser::incrementDepth):
* src/compiler/localintermediate.h:
* src/compiler/parseConst.cpp:
(TConstTraverser::visitSymbol):
(TConstTraverser::visitBinary):
(TConstTraverser::visitUnary):
(TConstTraverser::visitAggregate):
(TConstTraverser::visitSelection):
(TConstTraverser::visitConstantUnion):
(TConstTraverser::visitLoop):
(TConstTraverser::visitBranch):
(TIntermediate::parseConstTree):
* src/compiler/preprocessor/64bit-tokenizer-safety.patch: Added.
* src/compiler/preprocessor/Tokenizer.cpp:
(yy_get_previous_state):
(yy_try_NUL_trans):
* src/compiler/preprocessor/Tokenizer.l:
* src/compiler/preprocessor/preprocessor.vcxproj: Added.
* src/compiler/preprocessor/preprocessor.vcxproj.filters: Added.
* src/compiler/timing/RestrictVertexShaderTiming.cpp:
(RestrictVertexShaderTiming::visitSymbol):
* src/compiler/translator_common.vcxproj: Added.
* src/compiler/translator_common.vcxproj.filters: Added.
* src/compiler/translator_hlsl.vcxproj: Added.
* src/compiler/translator_hlsl.vcxproj.filters: Added.
* src/libEGL/Config.cpp: Added.
(egl::Config::Config):
(egl::Config::getHandle):
(egl::SortConfig::SortConfig):
(egl::SortConfig::scanForWantedComponents):
(egl::SortConfig::wantedComponentsSize):
(egl::SortConfig::operator()):
(egl::ConfigSet::ConfigSet):
(egl::ConfigSet::add):
(egl::ConfigSet::size):
(egl::ConfigSet::getConfigs):
(egl::ConfigSet::get):
* src/libEGL/Config.h: Added.
* src/libEGL/Display.cpp: Added.
(egl::Display::getDisplay):
(egl::Display::Display):
(egl::Display::~Display):
(egl::Display::initialize):
(egl::Display::terminate):
(egl::Display::getConfigs):
(egl::Display::getConfigAttrib):
(egl::Display::createWindowSurface):
(egl::Display::createOffscreenSurface):
(egl::Display::createContext):
(egl::Display::restoreLostDevice):
(egl::Display::destroySurface):
(egl::Display::destroyContext):
(egl::Display::notifyDeviceLost):
(egl::Display::recreateSwapChains):
(egl::Display::isInitialized):
(egl::Display::isValidConfig):
(egl::Display::isValidContext):
(egl::Display::isValidSurface):
(egl::Display::hasExistingWindowSurface):
(egl::Display::initExtensionString):
(egl::Display::getExtensionString):
(egl::Display::initVendorString):
(egl::Display::getVendorString):
* src/libEGL/Display.h: Added.
(egl::Display::getRenderer):
* src/libEGL/Surface.cpp: Added.
(egl::Surface::Surface):
(egl::Surface::~Surface):
(egl::Surface::initialize):
(egl::Surface::release):
(egl::Surface::resetSwapChain):
(egl::Surface::resizeSwapChain):
(egl::Surface::swapRect):
(egl::Surface::getWindowHandle):
(egl::SurfaceWindowProc):
(egl::Surface::subclassWindow):
(egl::Surface::unsubclassWindow):
(egl::Surface::checkForOutOfDateSwapChain):
(egl::Surface::swap):
(egl::Surface::postSubBuffer):
(egl::Surface::getWidth):
(egl::Surface::getHeight):
(egl::Surface::isPostSubBufferSupported):
(egl::Surface::getSwapChain):
(egl::Surface::setSwapInterval):
(egl::Surface::getTextureFormat):
(egl::Surface::getTextureTarget):
(egl::Surface::setBoundTexture):
(egl::Surface::getBoundTexture):
(egl::Surface::getFormat):
* src/libEGL/Surface.h: Added.
* src/libEGL/libEGL.cpp: Added.
(validateDisplay):
(validateConfig):
(validateContext):
(validateSurface):
* src/libEGL/libEGL.def: Added.
* src/libEGL/libEGL.rc: Added.
* src/libEGL/libEGL.vcxproj: Added.
* src/libEGL/libEGL.vcxproj.filters: Added.
* src/libEGL/main.cpp: Added.
(DllMain):
(egl::setCurrentError):
(egl::getCurrentError):
(egl::setCurrentAPI):
(egl::getCurrentAPI):
(egl::setCurrentDisplay):
(egl::getCurrentDisplay):
(egl::setCurrentDrawSurface):
(egl::getCurrentDrawSurface):
(egl::setCurrentReadSurface):
(egl::getCurrentReadSurface):
(egl::error):
* src/libEGL/main.h: Added.
(egl::error):
(egl::success):
* src/libEGL/resource.h: Added.
* src/libGLESv2/BinaryStream.h: Added.
(gl::BinaryInputStream::BinaryInputStream):
(gl::BinaryInputStream::read):
(gl::BinaryInputStream::skip):
(gl::BinaryInputStream::offset):
(gl::BinaryInputStream::error):
(gl::BinaryInputStream::endOfStream):
(gl::BinaryOutputStream::BinaryOutputStream):
(gl::BinaryOutputStream::write):
(gl::BinaryOutputStream::length):
(gl::BinaryOutputStream::data):
* src/libGLESv2/Buffer.cpp: Added.
(gl::Buffer::Buffer):
(gl::Buffer::~Buffer):
(gl::Buffer::bufferData):
(gl::Buffer::bufferSubData):
(gl::Buffer::getStorage):
(gl::Buffer::size):
(gl::Buffer::usage):
(gl::Buffer::getStaticVertexBuffer):
(gl::Buffer::getStaticIndexBuffer):
(gl::Buffer::invalidateStaticData):
(gl::Buffer::promoteStaticUsage):
* src/libGLESv2/Buffer.h: Added.
* src/libGLESv2/Context.cpp: Added.
(gl::makeStaticString):
(gl::Context::Context):
(gl::Context::~Context):
(gl::Context::makeCurrent):
(gl::Context::markContextLost):
(gl::Context::isContextLost):
(gl::Context::setClearColor):
(gl::Context::setClearDepth):
(gl::Context::setClearStencil):
(gl::Context::setCullFace):
(gl::Context::isCullFaceEnabled):
(gl::Context::setCullMode):
(gl::Context::setFrontFace):
(gl::Context::setDepthTest):
(gl::Context::isDepthTestEnabled):
(gl::Context::setDepthFunc):
(gl::Context::setDepthRange):
(gl::Context::setBlend):
(gl::Context::isBlendEnabled):
(gl::Context::setBlendFactors):
(gl::Context::setBlendColor):
(gl::Context::setBlendEquation):
(gl::Context::setStencilTest):
(gl::Context::isStencilTestEnabled):
(gl::Context::setStencilParams):
(gl::Context::setStencilBackParams):
(gl::Context::setStencilWritemask):
(gl::Context::setStencilBackWritemask):
(gl::Context::setStencilOperations):
(gl::Context::setStencilBackOperations):
(gl::Context::setPolygonOffsetFill):
(gl::Context::isPolygonOffsetFillEnabled):
(gl::Context::setPolygonOffsetParams):
(gl::Context::setSampleAlphaToCoverage):
(gl::Context::isSampleAlphaToCoverageEnabled):
(gl::Context::setSampleCoverage):
(gl::Context::isSampleCoverageEnabled):
(gl::Context::setSampleCoverageParams):
(gl::Context::setScissorTest):
(gl::Context::isScissorTestEnabled):
(gl::Context::setDither):
(gl::Context::isDitherEnabled):
(gl::Context::setLineWidth):
(gl::Context::setGenerateMipmapHint):
(gl::Context::setFragmentShaderDerivativeHint):
(gl::Context::setViewportParams):
(gl::Context::setScissorParams):
(gl::Context::setColorMask):
(gl::Context::setDepthMask):
(gl::Context::setActiveSampler):
(gl::Context::getReadFramebufferHandle):
(gl::Context::getDrawFramebufferHandle):
(gl::Context::getRenderbufferHandle):
(gl::Context::getArrayBufferHandle):
(gl::Context::getActiveQuery):
(gl::Context::setEnableVertexAttribArray):
(gl::Context::getVertexAttribState):
(gl::Context::setVertexAttribState):
(gl::Context::getVertexAttribPointer):
(gl::Context::setPackAlignment):
(gl::Context::getPackAlignment):
(gl::Context::setUnpackAlignment):
(gl::Context::getUnpackAlignment):
(gl::Context::setPackReverseRowOrder):
(gl::Context::getPackReverseRowOrder):
(gl::Context::createBuffer):
(gl::Context::createProgram):
(gl::Context::createShader):
(gl::Context::createTexture):
(gl::Context::createRenderbuffer):
(gl::Context::createFramebuffer):
(gl::Context::createFence):
(gl::Context::createQuery):
(gl::Context::deleteBuffer):
(gl::Context::deleteShader):
(gl::Context::deleteProgram):
(gl::Context::deleteTexture):
(gl::Context::deleteRenderbuffer):
(gl::Context::deleteFramebuffer):
(gl::Context::deleteFence):
(gl::Context::deleteQuery):
(gl::Context::getBuffer):
(gl::Context::getShader):
(gl::Context::getProgram):
(gl::Context::getTexture):
(gl::Context::getRenderbuffer):
(gl::Context::getReadFramebuffer):
(gl::Context::getDrawFramebuffer):
(gl::Context::bindArrayBuffer):
(gl::Context::bindElementArrayBuffer):
(gl::Context::bindTexture2D):
(gl::Context::bindTextureCubeMap):
(gl::Context::bindReadFramebuffer):
(gl::Context::bindDrawFramebuffer):
(gl::Context::bindRenderbuffer):
(gl::Context::useProgram):
(gl::Context::linkProgram):
(gl::Context::setProgramBinary):
(gl::Context::beginQuery):
(gl::Context::endQuery):
(gl::Context::setFramebufferZero):
(gl::Context::setRenderbufferStorage):
(gl::Context::getFramebuffer):
(gl::Context::getFence):
(gl::Context::getQuery):
(gl::Context::getArrayBuffer):
(gl::Context::getElementArrayBuffer):
(gl::Context::getCurrentProgramBinary):
(gl::Context::getTexture2D):
(gl::Context::getTextureCubeMap):
(gl::Context::getSamplerTexture):
(gl::Context::getBooleanv):
(gl::Context::getFloatv):
(gl::Context::getIntegerv):
(gl::Context::getQueryParameterInfo):
(gl::Context::applyRenderTarget):
(gl::Context::applyState):
(gl::Context::applyShaders):
(gl::Context::applyTextures):
(gl::Context::readPixels):
(gl::Context::clear):
(gl::Context::drawArrays):
(gl::Context::drawElements):
(gl::Context::sync):
(gl::Context::recordInvalidEnum):
(gl::Context::recordInvalidValue):
(gl::Context::recordInvalidOperation):
(gl::Context::recordOutOfMemory):
(gl::Context::recordInvalidFramebufferOperation):
(gl::Context::getError):
(gl::Context::getResetStatus):
(gl::Context::isResetNotificationEnabled):
(gl::Context::getMajorShaderModel):
(gl::Context::getMaximumPointSize):
(gl::Context::getMaximumCombinedTextureImageUnits):
(gl::Context::getMaxSupportedSamples):
(gl::Context::getMaximumRenderTargets):
(gl::Context::supportsEventQueries):
(gl::Context::supportsOcclusionQueries):
(gl::Context::supportsBGRATextures):
(gl::Context::supportsDXT1Textures):
(gl::Context::supportsDXT3Textures):
(gl::Context::supportsDXT5Textures):
(gl::Context::supportsFloat32Textures):
(gl::Context::supportsFloat32LinearFilter):
(gl::Context::supportsFloat32RenderableTextures):
(gl::Context::supportsFloat16Textures):
(gl::Context::supportsFloat16LinearFilter):
(gl::Context::supportsFloat16RenderableTextures):
(gl::Context::getMaximumRenderbufferDimension):
(gl::Context::getMaximumTextureDimension):
(gl::Context::getMaximumCubeTextureDimension):
(gl::Context::getMaximumTextureLevel):
(gl::Context::supportsLuminanceTextures):
(gl::Context::supportsLuminanceAlphaTextures):
(gl::Context::supportsDepthTextures):
(gl::Context::supports32bitIndices):
(gl::Context::supportsNonPower2Texture):
(gl::Context::supportsInstancing):
(gl::Context::supportsTextureFilterAnisotropy):
(gl::Context::getTextureMaxAnisotropy):
(gl::Context::getCurrentReadFormatType):
(gl::Context::detachBuffer):
(gl::Context::detachTexture):
(gl::Context::detachFramebuffer):
(gl::Context::detachRenderbuffer):
(gl::Context::getIncompleteTexture):
(gl::Context::skipDraw):
(gl::Context::setVertexAttrib):
(gl::Context::setVertexAttribDivisor):
(gl::Context::initExtensionString):
(gl::Context::getExtensionString):
(gl::Context::initRendererString):
(gl::Context::getRendererString):
(gl::Context::blitFramebuffer):
* src/libGLESv2/Context.h: Added.
(gl::VertexAttribute::VertexAttribute):
(gl::VertexAttribute::typeSize):
(gl::VertexAttribute::stride):
* src/libGLESv2/Fence.cpp: Added.
(gl::Fence::Fence):
(gl::Fence::~Fence):
(gl::Fence::isFence):
(gl::Fence::setFence):
(gl::Fence::testFence):
(gl::Fence::finishFence):
(gl::Fence::getFenceiv):
* src/libGLESv2/Fence.h: Added.
* src/libGLESv2/Float16ToFloat32.cpp: Added.
(gl::float16ToFloat32):
* src/libGLESv2/Float16ToFloat32.py: Added.
(convertMantissa):
(convertExponent):
(convertOffset):
* src/libGLESv2/Framebuffer.cpp: Added.
(gl::Framebuffer::Framebuffer):
(gl::Framebuffer::~Framebuffer):
(gl::Framebuffer::lookupRenderbuffer):
(gl::Framebuffer::setColorbuffer):
(gl::Framebuffer::setDepthbuffer):
(gl::Framebuffer::setStencilbuffer):
(gl::Framebuffer::detachTexture):
(gl::Framebuffer::detachRenderbuffer):
(gl::Framebuffer::getRenderTargetSerial):
(gl::Framebuffer::getDepthbufferSerial):
(gl::Framebuffer::getStencilbufferSerial):
(gl::Framebuffer::getColorbuffer):
(gl::Framebuffer::getDepthbuffer):
(gl::Framebuffer::getStencilbuffer):
(gl::Framebuffer::getDepthOrStencilbuffer):
(gl::Framebuffer::getReadColorbuffer):
(gl::Framebuffer::getReadColorbufferType):
(gl::Framebuffer::getFirstColorbuffer):
(gl::Framebuffer::getColorbufferType):
(gl::Framebuffer::getDepthbufferType):
(gl::Framebuffer::getStencilbufferType):
(gl::Framebuffer::getColorbufferHandle):
(gl::Framebuffer::getDepthbufferHandle):
(gl::Framebuffer::getStencilbufferHandle):
(gl::Framebuffer::getDrawBufferState):
(gl::Framebuffer::setDrawBufferState):
(gl::Framebuffer::isEnabledColorAttachment):
(gl::Framebuffer::hasEnabledColorAttachment):
(gl::Framebuffer::hasStencil):
(gl::Framebuffer::usingExtendedDrawBuffers):
(gl::Framebuffer::completeness):
(gl::DefaultFramebuffer::DefaultFramebuffer):
(gl::Framebuffer::getSamples):
(gl::DefaultFramebuffer::completeness):
* src/libGLESv2/Framebuffer.h: Added.
* src/libGLESv2/HandleAllocator.cpp: Added.
(gl::HandleAllocator::HandleAllocator):
(gl::HandleAllocator::~HandleAllocator):
(gl::HandleAllocator::setBaseHandle):
(gl::HandleAllocator::allocate):
(gl::HandleAllocator::release):
* src/libGLESv2/HandleAllocator.h: Added.
* src/libGLESv2/Program.cpp: Added.
(gl::AttributeBindings::AttributeBindings):
(gl::AttributeBindings::~AttributeBindings):
(gl::InfoLog::InfoLog):
(gl::InfoLog::~InfoLog):
(gl::InfoLog::getLength):
(gl::InfoLog::getLog):
(gl::InfoLog::appendSanitized):
(gl::InfoLog::append):
(gl::InfoLog::reset):
(gl::Program::Program):
(gl::Program::~Program):
(gl::Program::attachShader):
(gl::Program::detachShader):
(gl::Program::getAttachedShadersCount):
(gl::AttributeBindings::bindAttributeLocation):
(gl::Program::bindAttributeLocation):
(gl::Program::link):
(gl::AttributeBindings::getAttributeBinding):
(gl::Program::unlink):
(gl::Program::isLinked):
(gl::Program::getProgramBinary):
(gl::Program::setProgramBinary):
(gl::Program::release):
(gl::Program::addRef):
(gl::Program::getRefCount):
(gl::Program::getProgramBinaryLength):
(gl::Program::getInfoLogLength):
(gl::Program::getInfoLog):
(gl::Program::getAttachedShaders):
(gl::Program::getActiveAttribute):
(gl::Program::getActiveAttributeCount):
(gl::Program::getActiveAttributeMaxLength):
(gl::Program::getActiveUniform):
(gl::Program::getActiveUniformCount):
(gl::Program::getActiveUniformMaxLength):
(gl::Program::flagForDeletion):
(gl::Program::isFlaggedForDeletion):
(gl::Program::validate):
(gl::Program::isValidated):
* src/libGLESv2/Program.h: Added.
* src/libGLESv2/ProgramBinary.cpp: Added.
(gl::str):
(gl::UniformLocation::UniformLocation):
(gl::ProgramBinary::ProgramBinary):
(gl::ProgramBinary::~ProgramBinary):
(gl::ProgramBinary::getSerial):
(gl::ProgramBinary::issueSerial):
(gl::ProgramBinary::getPixelExecutable):
(gl::ProgramBinary::getVertexExecutable):
(gl::ProgramBinary::getGeometryExecutable):
(gl::ProgramBinary::getAttributeLocation):
(gl::ProgramBinary::getSemanticIndex):
(gl::ProgramBinary::getUsedSamplerRange):
(gl::ProgramBinary::usesPointSize):
(gl::ProgramBinary::usesPointSpriteEmulation):
(gl::ProgramBinary::usesGeometryShader):
(gl::ProgramBinary::getSamplerMapping):
(gl::ProgramBinary::getSamplerTextureType):
(gl::ProgramBinary::getUniformLocation):
(gl::ProgramBinary::setUniform1fv):
(gl::ProgramBinary::setUniform2fv):
(gl::ProgramBinary::setUniform3fv):
(gl::ProgramBinary::setUniform4fv):
(gl::transposeMatrix):
(gl::ProgramBinary::setUniformMatrix2fv):
(gl::ProgramBinary::setUniformMatrix3fv):
(gl::ProgramBinary::setUniformMatrix4fv):
(gl::ProgramBinary::setUniform1iv):
(gl::ProgramBinary::setUniform2iv):
(gl::ProgramBinary::setUniform3iv):
(gl::ProgramBinary::setUniform4iv):
(gl::ProgramBinary::getUniformfv):
(gl::ProgramBinary::getUniformiv):
(gl::ProgramBinary::dirtyAllUniforms):
(gl::ProgramBinary::applyUniforms):
(gl::ProgramBinary::packVaryings):
(gl::ProgramBinary::linkVaryings):
(gl::ProgramBinary::load):
(gl::ProgramBinary::save):
(gl::ProgramBinary::getLength):
(gl::ProgramBinary::link):
(gl::ProgramBinary::linkAttributes):
(gl::ProgramBinary::linkUniforms):
(gl::ProgramBinary::defineUniform):
(gl::ProgramBinary::generateGeometryShaderHLSL):
(gl::ProgramBinary::generatePointSpriteHLSL):
(gl::ProgramBinary::decorateAttribute):
(gl::ProgramBinary::isValidated):
(gl::ProgramBinary::getActiveAttribute):
(gl::ProgramBinary::getActiveAttributeCount):
(gl::ProgramBinary::getActiveAttributeMaxLength):
(gl::ProgramBinary::getActiveUniform):
(gl::ProgramBinary::getActiveUniformCount):
(gl::ProgramBinary::getActiveUniformMaxLength):
(gl::ProgramBinary::validate):
(gl::ProgramBinary::validateSamplers):
(gl::ProgramBinary::Sampler::Sampler):
(gl::AttributeSorter::AttributeSorter):
(gl::AttributeSorter::operator()):
(gl::ProgramBinary::sortAttributesByLayout):
* src/libGLESv2/ProgramBinary.h: Added.
(gl::UniformLocation::UniformLocation):
* src/libGLESv2/Query.cpp: Added.
(gl::Query::Query):
(gl::Query::~Query):
(gl::Query::begin):
(gl::Query::end):
(gl::Query::getResult):
(gl::Query::isResultAvailable):
(gl::Query::getType):
* src/libGLESv2/Query.h: Added.
* src/libGLESv2/Renderbuffer.cpp: Added.
(gl::RenderbufferInterface::RenderbufferInterface):
(gl::RenderbufferInterface::addProxyRef):
(gl::RenderbufferInterface::releaseProxy):
(gl::RenderbufferInterface::getRedSize):
(gl::RenderbufferInterface::getGreenSize):
(gl::RenderbufferInterface::getBlueSize):
(gl::RenderbufferInterface::getAlphaSize):
(gl::RenderbufferInterface::getDepthSize):
(gl::RenderbufferInterface::getStencilSize):
(gl::RenderbufferTexture2D::RenderbufferTexture2D):
(gl::RenderbufferTexture2D::~RenderbufferTexture2D):
(gl::RenderbufferTexture2D::addProxyRef):
(gl::RenderbufferTexture2D::releaseProxy):
(gl::RenderbufferTexture2D::getRenderTarget):
(gl::RenderbufferTexture2D::getDepthStencil):
(gl::RenderbufferTexture2D::getWidth):
(gl::RenderbufferTexture2D::getHeight):
(gl::RenderbufferTexture2D::getInternalFormat):
(gl::RenderbufferTexture2D::getActualFormat):
(gl::RenderbufferTexture2D::getSamples):
(gl::RenderbufferTexture2D::getSerial):
(gl::RenderbufferTextureCubeMap::RenderbufferTextureCubeMap):
(gl::RenderbufferTextureCubeMap::~RenderbufferTextureCubeMap):
(gl::RenderbufferTextureCubeMap::addProxyRef):
(gl::RenderbufferTextureCubeMap::releaseProxy):
(gl::RenderbufferTextureCubeMap::getRenderTarget):
(gl::RenderbufferTextureCubeMap::getDepthStencil):
(gl::RenderbufferTextureCubeMap::getWidth):
(gl::RenderbufferTextureCubeMap::getHeight):
(gl::RenderbufferTextureCubeMap::getInternalFormat):
(gl::RenderbufferTextureCubeMap::getActualFormat):
(gl::RenderbufferTextureCubeMap::getSamples):
(gl::RenderbufferTextureCubeMap::getSerial):
(gl::Renderbuffer::Renderbuffer):
(gl::Renderbuffer::~Renderbuffer):
(gl::Renderbuffer::addRef):
(gl::Renderbuffer::release):
(gl::Renderbuffer::getRenderTarget):
(gl::Renderbuffer::getDepthStencil):
(gl::Renderbuffer::getWidth):
(gl::Renderbuffer::getHeight):
(gl::Renderbuffer::getInternalFormat):
(gl::Renderbuffer::getActualFormat):
(gl::Renderbuffer::getRedSize):
(gl::Renderbuffer::getGreenSize):
(gl::Renderbuffer::getBlueSize):
(gl::Renderbuffer::getAlphaSize):
(gl::Renderbuffer::getDepthSize):
(gl::Renderbuffer::getStencilSize):
(gl::Renderbuffer::getSamples):
(gl::Renderbuffer::getSerial):
(gl::Renderbuffer::setStorage):
(gl::RenderbufferStorage::RenderbufferStorage):
(gl::RenderbufferStorage::~RenderbufferStorage):
(gl::RenderbufferStorage::getRenderTarget):
(gl::RenderbufferStorage::getDepthStencil):
(gl::RenderbufferStorage::getWidth):
(gl::RenderbufferStorage::getHeight):
(gl::RenderbufferStorage::getInternalFormat):
(gl::RenderbufferStorage::getActualFormat):
(gl::RenderbufferStorage::getSamples):
(gl::RenderbufferStorage::getSerial):
(gl::RenderbufferStorage::issueSerial):
(gl::RenderbufferStorage::issueCubeSerials):
(gl::Colorbuffer::Colorbuffer):
(gl::Colorbuffer::~Colorbuffer):
(gl::Colorbuffer::getRenderTarget):
(gl::DepthStencilbuffer::DepthStencilbuffer):
(gl::DepthStencilbuffer::~DepthStencilbuffer):
(gl::DepthStencilbuffer::getDepthStencil):
(gl::Depthbuffer::Depthbuffer):
(gl::Depthbuffer::~Depthbuffer):
(gl::Stencilbuffer::Stencilbuffer):
(gl::Stencilbuffer::~Stencilbuffer):
* src/libGLESv2/Renderbuffer.h: Added.
(gl::RenderbufferInterface::~RenderbufferInterface):
* src/libGLESv2/ResourceManager.cpp: Added.
(gl::ResourceManager::ResourceManager):
(gl::ResourceManager::~ResourceManager):
(gl::ResourceManager::addRef):
(gl::ResourceManager::release):
(gl::ResourceManager::createBuffer):
(gl::ResourceManager::createShader):
(gl::ResourceManager::createProgram):
(gl::ResourceManager::createTexture):
(gl::ResourceManager::createRenderbuffer):
(gl::ResourceManager::deleteBuffer):
(gl::ResourceManager::deleteShader):
(gl::ResourceManager::deleteProgram):
(gl::ResourceManager::deleteTexture):
(gl::ResourceManager::deleteRenderbuffer):
(gl::ResourceManager::getBuffer):
(gl::ResourceManager::getShader):
(gl::ResourceManager::getTexture):
(gl::ResourceManager::getProgram):
(gl::ResourceManager::getRenderbuffer):
(gl::ResourceManager::setRenderbuffer):
(gl::ResourceManager::checkBufferAllocation):
(gl::ResourceManager::checkTextureAllocation):
(gl::ResourceManager::checkRenderbufferAllocation):
* src/libGLESv2/ResourceManager.h: Added.
* src/libGLESv2/Shader.cpp: Added.
(gl::Shader::Shader):
(gl::Shader::~Shader):
(gl::Shader::getHandle):
(gl::Shader::setSource):
(gl::Shader::getInfoLogLength):
(gl::Shader::getInfoLog):
(gl::Shader::getSourceLength):
(gl::Shader::getTranslatedSourceLength):
(gl::Shader::getSourceImpl):
(gl::Shader::getSource):
(gl::Shader::getTranslatedSource):
(gl::Shader::getUniforms):
(gl::Shader::isCompiled):
(gl::Shader::getHLSL):
(gl::Shader::addRef):
(gl::Shader::release):
(gl::Shader::getRefCount):
(gl::Shader::isFlaggedForDeletion):
(gl::Shader::flagForDeletion):
(gl::Shader::initializeCompiler):
(gl::Shader::releaseCompiler):
(gl::Shader::parseVaryings):
(gl::Shader::resetVaryingsRegisterAssignment):
(gl::Shader::uncompile):
(gl::Shader::compileToHLSL):
(gl::Shader::parseType):
(gl::Shader::compareVarying):
(gl::VertexShader::VertexShader):
(gl::VertexShader::~VertexShader):
(gl::VertexShader::getType):
(gl::VertexShader::uncompile):
(gl::VertexShader::compile):
(gl::VertexShader::getSemanticIndex):
(gl::VertexShader::parseAttributes):
(gl::FragmentShader::FragmentShader):
(gl::FragmentShader::~FragmentShader):
(gl::FragmentShader::getType):
(gl::FragmentShader::compile):
* src/libGLESv2/Shader.h: Added.
(gl::Varying::Varying):
(gl::Attribute::Attribute):
* src/libGLESv2/Texture.cpp: Added.
(gl::Texture::Texture):
(gl::Texture::~Texture):
(gl::Texture::setMinFilter):
(gl::Texture::setMagFilter):
(gl::Texture::setWrapS):
(gl::Texture::setWrapT):
(gl::Texture::setMaxAnisotropy):
(gl::Texture::setUsage):
(gl::Texture::getMinFilter):
(gl::Texture::getMagFilter):
(gl::Texture::getWrapS):
(gl::Texture::getWrapT):
(gl::Texture::getMaxAnisotropy):
(gl::Texture::getLodOffset):
(gl::Texture::getSamplerState):
(gl::Texture::getUsage):
(gl::Texture::isMipmapFiltered):
(gl::Texture::setImage):
(gl::Texture::setCompressedImage):
(gl::Texture::subImage):
(gl::Texture::subImageCompressed):
(gl::Texture::getNativeTexture):
(gl::Texture::hasDirtyImages):
(gl::Texture::resetDirty):
(gl::Texture::getTextureSerial):
(gl::Texture::getRenderTargetSerial):
(gl::Texture::isImmutable):
(gl::Texture::creationLevels):
(gl::Texture2D::Texture2D):
(gl::Texture2D::~Texture2D):
(gl::Texture2D::addProxyRef):
(gl::Texture2D::releaseProxy):
(gl::Texture2D::getTarget):
(gl::Texture2D::getWidth):
(gl::Texture2D::getHeight):
(gl::Texture2D::getInternalFormat):
(gl::Texture2D::getActualFormat):
(gl::Texture2D::redefineImage):
(gl::Texture2D::setImage):
(gl::Texture2D::bindTexImage):
(gl::Texture2D::releaseTexImage):
(gl::Texture2D::setCompressedImage):
(gl::Texture2D::commitRect):
(gl::Texture2D::subImage):
(gl::Texture2D::subImageCompressed):
(gl::Texture2D::copyImage):
(gl::Texture2D::copySubImage):
(gl::Texture2D::storage):
(gl::Texture2D::isSamplerComplete):
(gl::Texture2D::isMipmapComplete):
(gl::Texture2D::isCompressed):
(gl::Texture2D::isDepth):
(gl::Texture2D::createTexture):
(gl::Texture2D::updateTexture):
(gl::Texture2D::convertToRenderTarget):
(gl::Texture2D::generateMipmaps):
(gl::Texture2D::getRenderbuffer):
(gl::Texture2D::getRenderTarget):
(gl::Texture2D::getDepthStencil):
(gl::Texture2D::levelCount):
(gl::Texture2D::getStorage):
(gl::TextureCubeMap::TextureCubeMap):
(gl::TextureCubeMap::~TextureCubeMap):
(gl::TextureCubeMap::addProxyRef):
(gl::TextureCubeMap::releaseProxy):
(gl::TextureCubeMap::getTarget):
(gl::TextureCubeMap::getWidth):
(gl::TextureCubeMap::getHeight):
(gl::TextureCubeMap::getInternalFormat):
(gl::TextureCubeMap::getActualFormat):
(gl::TextureCubeMap::setImagePosX):
(gl::TextureCubeMap::setImageNegX):
(gl::TextureCubeMap::setImagePosY):
(gl::TextureCubeMap::setImageNegY):
(gl::TextureCubeMap::setImagePosZ):
(gl::TextureCubeMap::setImageNegZ):
(gl::TextureCubeMap::setCompressedImage):
(gl::TextureCubeMap::commitRect):
(gl::TextureCubeMap::subImage):
(gl::TextureCubeMap::subImageCompressed):
(gl::TextureCubeMap::isSamplerComplete):
(gl::TextureCubeMap::isCubeComplete):
(gl::TextureCubeMap::isMipmapCubeComplete):
(gl::TextureCubeMap::isCompressed):
(gl::TextureCubeMap::createTexture):
(gl::TextureCubeMap::updateTexture):
(gl::TextureCubeMap::convertToRenderTarget):
(gl::TextureCubeMap::setImage):
(gl::TextureCubeMap::faceIndex):
(gl::TextureCubeMap::redefineImage):
(gl::TextureCubeMap::copyImage):
(gl::TextureCubeMap::copySubImage):
(gl::TextureCubeMap::storage):
(gl::TextureCubeMap::generateMipmaps):
(gl::TextureCubeMap::getRenderbuffer):
(gl::TextureCubeMap::getRenderTarget):
(gl::TextureCubeMap::levelCount):
(gl::TextureCubeMap::getStorage):
* src/libGLESv2/Texture.h: Added.
* src/libGLESv2/Uniform.cpp: Added.
(gl::Uniform::Uniform):
(gl::Uniform::~Uniform):
(gl::Uniform::isArray):
(gl::Uniform::elementCount):
* src/libGLESv2/Uniform.h: Added.
* src/libGLESv2/angletypes.h: Added.
* src/libGLESv2/constants.h: Added.
* src/libGLESv2/libGLESv2.cpp: Added.
(validImageSize):
(checkTextureFormatType):
(validateSubImageParams2D):
(validateSubImageParamsCube):
(validReadFormatType):
* src/libGLESv2/libGLESv2.def: Added.
* src/libGLESv2/libGLESv2.rc: Added.
* src/libGLESv2/libGLESv2.vcxproj: Added.
* src/libGLESv2/libGLESv2.vcxproj.filters: Added.
* src/libGLESv2/main.cpp: Added.
(DllMain):
(gl::makeCurrent):
(gl::getContext):
(gl::getNonLostContext):
(gl::getDisplay):
(gl::error):
* src/libGLESv2/main.h: Added.
(gl::error):
* src/libGLESv2/mathutil.h: Added.
(gl::Vector4::Vector4):
(gl::isPow2):
(gl::log2):
(gl::ceilPow2):
(gl::clamp):
(gl::clamp01):
(gl::unorm):
(gl::supportsSSE2):
(gl::float32ToFloat16):
(rx::Range::Range):
* src/libGLESv2/precompiled.cpp: Added.
* src/libGLESv2/precompiled.h: Added.
* src/libGLESv2/renderer: Added.
* src/libGLESv2/renderer/Blit.cpp: Added.
(rx::Blit::Blit):
(rx::Blit::~Blit):
(rx::Blit::initGeometry):
(rx::Blit::setShader):
(rx::Blit::setVertexShader):
(rx::Blit::setPixelShader):
(rx::Blit::getSurfaceRect):
(rx::Blit::boxFilter):
(rx::Blit::copy):
(rx::Blit::formatConvert):
(rx::Blit::setFormatConvertShaders):
(rx::Blit::copySurfaceToTexture):
(rx::Blit::setViewport):
(rx::Blit::setCommonBlitState):
(rx::Blit::render):
(rx::Blit::saveState):
(rx::Blit::restoreState):
* src/libGLESv2/renderer/Blit.h: Added.
* src/libGLESv2/renderer/BufferStorage.cpp: Added.
(rx::BufferStorage::BufferStorage):
(rx::BufferStorage::~BufferStorage):
(rx::BufferStorage::getSerial):
(rx::BufferStorage::updateSerial):
(rx::BufferStorage::markBufferUsage):
* src/libGLESv2/renderer/BufferStorage.h: Added.
* src/libGLESv2/renderer/BufferStorage11.cpp: Added.
(rx::BufferStorage11::BufferStorage11):
(rx::BufferStorage11::~BufferStorage11):
(rx::BufferStorage11::makeBufferStorage11):
(rx::BufferStorage11::getData):
(rx::BufferStorage11::setData):
(rx::BufferStorage11::clear):
(rx::BufferStorage11::getSize):
(rx::BufferStorage11::supportsDirectBinding):
(rx::BufferStorage11::markBufferUsage):
(rx::BufferStorage11::getBuffer):
* src/libGLESv2/renderer/BufferStorage11.h: Added.
* src/libGLESv2/renderer/BufferStorage9.cpp: Added.
(rx::BufferStorage9::BufferStorage9):
(rx::BufferStorage9::~BufferStorage9):
(rx::BufferStorage9::makeBufferStorage9):
(rx::BufferStorage9::getData):
(rx::BufferStorage9::setData):
(rx::BufferStorage9::clear):
(rx::BufferStorage9::getSize):
(rx::BufferStorage9::supportsDirectBinding):
* src/libGLESv2/renderer/BufferStorage9.h: Added.
* src/libGLESv2/renderer/Fence11.cpp: Added.
(rx::Fence11::Fence11):
(rx::Fence11::~Fence11):
(rx::Fence11::isFence):
(rx::Fence11::setFence):
(rx::Fence11::testFence):
(rx::Fence11::finishFence):
(rx::Fence11::getFenceiv):
* src/libGLESv2/renderer/Fence11.h: Added.
* src/libGLESv2/renderer/Fence9.cpp: Added.
(rx::Fence9::Fence9):
(rx::Fence9::~Fence9):
(rx::Fence9::isFence):
(rx::Fence9::setFence):
(rx::Fence9::testFence):
(rx::Fence9::finishFence):
(rx::Fence9::getFenceiv):
* src/libGLESv2/renderer/Fence9.h: Added.
* src/libGLESv2/renderer/FenceImpl.h: Added.
(rx::FenceImpl::FenceImpl):
(rx::FenceImpl::~FenceImpl):
(rx::FenceImpl::setStatus):
(rx::FenceImpl::getStatus):
(rx::FenceImpl::setCondition):
(rx::FenceImpl::getCondition):
* src/libGLESv2/renderer/Image.cpp: Added.
(rx::Image::Image):
(rx::Image::loadAlphaDataToBGRA):
(rx::Image::loadAlphaDataToNative):
(rx::Image::loadAlphaFloatDataToRGBA):
(rx::Image::loadAlphaHalfFloatDataToRGBA):
(rx::Image::loadLuminanceDataToNativeOrBGRA):
(rx::Image::loadLuminanceFloatDataToRGBA):
(rx::Image::loadLuminanceFloatDataToRGB):
(rx::Image::loadLuminanceHalfFloatDataToRGBA):
(rx::Image::loadLuminanceAlphaDataToNativeOrBGRA):
(rx::Image::loadLuminanceAlphaFloatDataToRGBA):
(rx::Image::loadLuminanceAlphaHalfFloatDataToRGBA):
(rx::Image::loadRGBUByteDataToBGRX):
(rx::Image::loadRGBUByteDataToRGBA):
(rx::Image::loadRGB565DataToBGRA):
(rx::Image::loadRGB565DataToRGBA):
(rx::Image::loadRGBFloatDataToRGBA):
(rx::Image::loadRGBFloatDataToNative):
(rx::Image::loadRGBHalfFloatDataToRGBA):
(rx::Image::loadRGBAUByteDataToBGRA):
(rx::Image::loadRGBAUByteDataToNative):
(rx::Image::loadRGBA4444DataToBGRA):
(rx::Image::loadRGBA4444DataToRGBA):
(rx::Image::loadRGBA5551DataToBGRA):
(rx::Image::loadRGBA5551DataToRGBA):
(rx::Image::loadRGBAFloatDataToRGBA):
(rx::Image::loadRGBAHalfFloatDataToRGBA):
(rx::Image::loadBGRADataToBGRA):
* src/libGLESv2/renderer/Image.h: Added.
(rx::Image::~Image):
(rx::Image::getWidth):
(rx::Image::getHeight):
(rx::Image::getInternalFormat):
(rx::Image::getActualFormat):
(rx::Image::markDirty):
(rx::Image::markClean):
(rx::Image::setManagedSurface):
* src/libGLESv2/renderer/Image11.cpp: Added.
(rx::Image11::Image11):
(rx::Image11::~Image11):
(rx::Image11::makeImage11):
(rx::Image11::generateMipmap):
(rx::Image11::isDirty):
(rx::Image11::updateSurface):
(rx::Image11::redefine):
(rx::Image11::isRenderableFormat):
(rx::Image11::getDXGIFormat):
(rx::Image11::loadData):
(rx::Image11::loadCompressedData):
(rx::Image11::copy):
(rx::Image11::getStagingTexture):
(rx::Image11::getStagingSubresource):
(rx::Image11::createStagingTexture):
(rx::Image11::map):
(rx::Image11::unmap):
* src/libGLESv2/renderer/Image11.h: Added.
* src/libGLESv2/renderer/Image9.cpp: Added.
(rx::Image9::Image9):
(rx::Image9::~Image9):
(rx::Image9::generateMip):
(rx::Image9::makeImage9):
(rx::Image9::generateMipmap):
(rx::Image9::copyLockableSurfaces):
(rx::Image9::redefine):
(rx::Image9::createSurface):
(rx::Image9::lock):
(rx::Image9::unlock):
(rx::Image9::isRenderableFormat):
(rx::Image9::getD3DFormat):
(rx::Image9::getSurface):
(rx::Image9::setManagedSurface):
(rx::Image9::updateSurface):
(rx::Image9::loadData):
(rx::Image9::loadCompressedData):
(rx::Image9::copy):
* src/libGLESv2/renderer/Image9.h: Added.
(rx::Image9::isDirty):
* src/libGLESv2/renderer/ImageSSE2.cpp: Added.
(rx::Image::loadRGBAUByteDataToBGRASSE2):
(rx::Image::loadAlphaDataToBGRASSE2):
* src/libGLESv2/renderer/IndexBuffer.cpp: Added.
(rx::IndexBuffer::IndexBuffer):
(rx::IndexBuffer::~IndexBuffer):
(rx::IndexBuffer::getSerial):
(rx::IndexBuffer::updateSerial):
(rx::IndexBufferInterface::IndexBufferInterface):
(rx::IndexBufferInterface::~IndexBufferInterface):
(rx::IndexBufferInterface::getIndexType):
(rx::IndexBufferInterface::getBufferSize):
(rx::IndexBufferInterface::getSerial):
(rx::IndexBufferInterface::mapBuffer):
(rx::IndexBufferInterface::unmapBuffer):
(rx::IndexBufferInterface::getIndexBuffer):
(rx::IndexBufferInterface::getWritePosition):
(rx::IndexBufferInterface::setWritePosition):
(rx::IndexBufferInterface::discard):
(rx::IndexBufferInterface::setBufferSize):
(rx::StreamingIndexBufferInterface::StreamingIndexBufferInterface):
(rx::StreamingIndexBufferInterface::~StreamingIndexBufferInterface):
(rx::StreamingIndexBufferInterface::reserveBufferSpace):
(rx::StaticIndexBufferInterface::StaticIndexBufferInterface):
(rx::StaticIndexBufferInterface::~StaticIndexBufferInterface):
(rx::StaticIndexBufferInterface::reserveBufferSpace):
(rx::StaticIndexBufferInterface::lookupRange):
(rx::StaticIndexBufferInterface::addRange):
* src/libGLESv2/renderer/IndexBuffer.h: Added.
(rx::StaticIndexBufferInterface::IndexRange::operator<):
* src/libGLESv2/renderer/IndexBuffer11.cpp: Added.
(rx::IndexBuffer11::IndexBuffer11):
(rx::IndexBuffer11::~IndexBuffer11):
(rx::IndexBuffer11::initialize):
(rx::IndexBuffer11::makeIndexBuffer11):
(rx::IndexBuffer11::mapBuffer):
(rx::IndexBuffer11::unmapBuffer):
(rx::IndexBuffer11::getIndexType):
(rx::IndexBuffer11::getBufferSize):
(rx::IndexBuffer11::setSize):
(rx::IndexBuffer11::discard):
(rx::IndexBuffer11::getIndexFormat):
(rx::IndexBuffer11::getBuffer):
* src/libGLESv2/renderer/IndexBuffer11.h: Added.
* src/libGLESv2/renderer/IndexBuffer9.cpp: Added.
(rx::IndexBuffer9::IndexBuffer9):
(rx::IndexBuffer9::~IndexBuffer9):
(rx::IndexBuffer9::initialize):
(rx::IndexBuffer9::makeIndexBuffer9):
(rx::IndexBuffer9::mapBuffer):
(rx::IndexBuffer9::unmapBuffer):
(rx::IndexBuffer9::getIndexType):
(rx::IndexBuffer9::getBufferSize):
(rx::IndexBuffer9::setSize):
(rx::IndexBuffer9::discard):
(rx::IndexBuffer9::getIndexFormat):
(rx::IndexBuffer9::getBuffer):
* src/libGLESv2/renderer/IndexBuffer9.h: Added.
* src/libGLESv2/renderer/IndexDataManager.cpp: Added.
(rx::IndexDataManager::IndexDataManager):
(rx::IndexDataManager::~IndexDataManager):
(rx::indexTypeSize):
(rx::convertIndices):
(rx::computeRange):
(rx::IndexDataManager::prepareIndexData):
(rx::IndexDataManager::getCountingIndices):
* src/libGLESv2/renderer/IndexDataManager.h: Added.
* src/libGLESv2/renderer/InputLayoutCache.cpp: Added.
(rx::InputLayoutCache::InputLayoutCache):
(rx::InputLayoutCache::~InputLayoutCache):
(rx::InputLayoutCache::initialize):
(rx::InputLayoutCache::clear):
(rx::InputLayoutCache::applyVertexBuffers):
(rx::InputLayoutCache::hashInputLayout):
(rx::InputLayoutCache::compareInputLayouts):
* src/libGLESv2/renderer/InputLayoutCache.h: Added.
* src/libGLESv2/renderer/Query11.cpp: Added.
(rx::Query11::Query11):
(rx::Query11::~Query11):
(rx::Query11::begin):
(rx::Query11::end):
(rx::Query11::getResult):
(rx::Query11::isResultAvailable):
(rx::Query11::testQuery):
* src/libGLESv2/renderer/Query11.h: Added.
* src/libGLESv2/renderer/Query9.cpp: Added.
(rx::Query9::Query9):
(rx::Query9::~Query9):
(rx::Query9::begin):
(rx::Query9::end):
(rx::Query9::getResult):
(rx::Query9::isResultAvailable):
(rx::Query9::testQuery):
* src/libGLESv2/renderer/Query9.h: Added.
* src/libGLESv2/renderer/QueryImpl.h: Added.
(rx::QueryImpl::QueryImpl):
(rx::QueryImpl::~QueryImpl):
(rx::QueryImpl::getType):
* src/libGLESv2/renderer/RenderStateCache.cpp: Added.
(rx::RenderStateCache::RenderStateCache):
(rx::RenderStateCache::~RenderStateCache):
(rx::RenderStateCache::initialize):
(rx::RenderStateCache::clear):
(rx::RenderStateCache::hashBlendState):
(rx::RenderStateCache::compareBlendStates):
(rx::RenderStateCache::getBlendState):
(rx::RenderStateCache::hashRasterizerState):
(rx::RenderStateCache::compareRasterizerStates):
(rx::RenderStateCache::getRasterizerState):
(rx::RenderStateCache::hashDepthStencilState):
(rx::RenderStateCache::compareDepthStencilStates):
(rx::RenderStateCache::getDepthStencilState):
(rx::RenderStateCache::hashSamplerState):
(rx::RenderStateCache::compareSamplerStates):
(rx::RenderStateCache::getSamplerState):
* src/libGLESv2/renderer/RenderStateCache.h: Added.
* src/libGLESv2/renderer/RenderTarget.h: Added.
(rx::RenderTarget::RenderTarget):
(rx::RenderTarget::~RenderTarget):
(rx::RenderTarget::getWidth):
(rx::RenderTarget::getHeight):
(rx::RenderTarget::getInternalFormat):
(rx::RenderTarget::getActualFormat):
(rx::RenderTarget::getSamples):
* src/libGLESv2/renderer/RenderTarget11.cpp: Added.
(rx::getRTVSubresourceIndex):
(rx::getDSVSubresourceIndex):
(rx::RenderTarget11::RenderTarget11):
(rx::RenderTarget11::~RenderTarget11):
(rx::RenderTarget11::makeRenderTarget11):
(rx::RenderTarget11::getTexture):
(rx::RenderTarget11::getRenderTargetView):
(rx::RenderTarget11::getDepthStencilView):
(rx::RenderTarget11::getShaderResourceView):
(rx::RenderTarget11::getSubresourceIndex):
* src/libGLESv2/renderer/RenderTarget11.h: Added.
* src/libGLESv2/renderer/RenderTarget9.cpp: Added.
(rx::RenderTarget9::RenderTarget9):
(rx::RenderTarget9::~RenderTarget9):
(rx::RenderTarget9::makeRenderTarget9):
(rx::RenderTarget9::getSurface):
* src/libGLESv2/renderer/RenderTarget9.h: Added.
* src/libGLESv2/renderer/Renderer.cpp: Added.
(rx::Renderer::Renderer):
(rx::Renderer::~Renderer):
(rx::Renderer::initializeCompiler):
(rx::Renderer::compileToBinary):
* src/libGLESv2/renderer/Renderer.h: Added.
(getComparableOSVersion):
(rx::Renderer::getVertexTextureSupport):
* src/libGLESv2/renderer/Renderer11.cpp: Added.
(rx::Renderer11::Renderer11):
(rx::Renderer11::~Renderer11):
(rx::Renderer11::makeRenderer11):
(rx::Renderer11::initialize):
(rx::Renderer11::initializeDevice):
(rx::Renderer11::generateConfigs):
(rx::Renderer11::deleteConfigs):
(rx::Renderer11::sync):
(rx::Renderer11::createSwapChain):
(rx::Renderer11::setSamplerState):
(rx::Renderer11::setTexture):
(rx::Renderer11::setRasterizerState):
(rx::Renderer11::setBlendState):
(rx::Renderer11::setDepthStencilState):
(rx::Renderer11::setScissorRectangle):
(rx::Renderer11::setViewport):
(rx::Renderer11::applyPrimitiveType):
(rx::Renderer11::applyRenderTarget):
(rx::Renderer11::applyVertexBuffer):
(rx::Renderer11::applyIndexBuffer):
(rx::Renderer11::drawArrays):
(rx::Renderer11::drawElements):
(rx::Renderer11::drawLineLoop):
(rx::Renderer11::drawTriangleFan):
(rx::Renderer11::applyShaders):
(rx::Renderer11::applyUniforms):
(rx::Renderer11::clear):
(rx::Renderer11::maskedClear):
(rx::Renderer11::markAllStateDirty):
(rx::Renderer11::releaseDeviceResources):
(rx::Renderer11::notifyDeviceLost):
(rx::Renderer11::isDeviceLost):
(rx::Renderer11::testDeviceLost):
(rx::Renderer11::testDeviceResettable):
(rx::Renderer11::release):
(rx::Renderer11::resetDevice):
(rx::Renderer11::getAdapterVendor):
(rx::Renderer11::getRendererDescription):
(rx::Renderer11::getAdapterIdentifier):
(rx::Renderer11::getBGRATextureSupport):
(rx::Renderer11::getDXT1TextureSupport):
(rx::Renderer11::getDXT3TextureSupport):
(rx::Renderer11::getDXT5TextureSupport):
(rx::Renderer11::getDepthTextureSupport):
(rx::Renderer11::getFloat32TextureSupport):
(rx::Renderer11::getFloat16TextureSupport):
(rx::Renderer11::getLuminanceTextureSupport):
(rx::Renderer11::getLuminanceAlphaTextureSupport):
(rx::Renderer11::getTextureFilterAnisotropySupport):
(rx::Renderer11::getTextureMaxAnisotropy):
(rx::Renderer11::getEventQuerySupport):
(rx::Renderer11::getViewportBounds):
(rx::Renderer11::getMaxVertexTextureImageUnits):
(rx::Renderer11::getMaxCombinedTextureImageUnits):
(rx::Renderer11::getReservedVertexUniformVectors):
(rx::Renderer11::getReservedFragmentUniformVectors):
(rx::Renderer11::getMaxVertexUniformVectors):
(rx::Renderer11::getMaxFragmentUniformVectors):
(rx::Renderer11::getMaxVaryingVectors):
(rx::Renderer11::getNonPower2TextureSupport):
(rx::Renderer11::getOcclusionQuerySupport):
(rx::Renderer11::getInstancingSupport):
(rx::Renderer11::getShareHandleSupport):
(rx::Renderer11::getDerivativeInstructionSupport):
(rx::Renderer11::getPostSubBufferSupport):
(rx::Renderer11::getMajorShaderModel):
(rx::Renderer11::getMinorShaderModel):
(rx::Renderer11::getMaxPointSize):
(rx::Renderer11::getMaxViewportDimension):
(rx::Renderer11::getMaxTextureWidth):
(rx::Renderer11::getMaxTextureHeight):
(rx::Renderer11::get32BitIndexSupport):
(rx::Renderer11::getMinSwapInterval):
(rx::Renderer11::getMaxSwapInterval):
(rx::Renderer11::getMaxSupportedSamples):
(rx::Renderer11::getNearestSupportedSamples):
(rx::Renderer11::getMaxRenderTargets):
(rx::Renderer11::copyToRenderTarget):
(rx::Renderer11::copyImage):
(rx::Renderer11::copyTexture):
(rx::Renderer11::unapplyRenderTargets):
(rx::Renderer11::setOneTimeRenderTarget):
(rx::Renderer11::createRenderTarget):
(rx::Renderer11::loadExecutable):
(rx::Renderer11::compileToExecutable):
(rx::Renderer11::createVertexBuffer):
(rx::Renderer11::createIndexBuffer):
(rx::Renderer11::createBufferStorage):
(rx::Renderer11::createQuery):
(rx::Renderer11::createFence):
(rx::Renderer11::getRenderTargetResource):
(rx::Renderer11::blitRect):
(rx::Renderer11::readPixels):
(rx::Renderer11::createImage):
(rx::Renderer11::generateMipmap):
(rx::Renderer11::createTextureStorage2D):
(rx::Renderer11::createTextureStorageCube):
(rx::getFastPixelCopySize):
(rx::readPixelColor):
(rx::writePixelColor):
(rx::Renderer11::readTextureData):
(rx::Renderer11::blitRenderbufferRect):
(rx::Renderer11::resolveMultisampledTexture):
(rx::Renderer11::getLUID):
* src/libGLESv2/renderer/Renderer11.h: Added.
(rx::Renderer11::getDevice):
(rx::Renderer11::getDeviceContext):
(rx::Renderer11::getDxgiFactory):
* src/libGLESv2/renderer/Renderer9.cpp: Added.
(rx::Renderer9::Renderer9):
(rx::Renderer9::~Renderer9):
(rx::Renderer9::makeRenderer9):
(rx::Renderer9::initialize):
(rx::Renderer9::initializeDevice):
(rx::Renderer9::getDefaultPresentParameters):
(rx::Renderer9::generateConfigs):
(rx::Renderer9::deleteConfigs):
(rx::Renderer9::startScene):
(rx::Renderer9::endScene):
(rx::Renderer9::sync):
(rx::Renderer9::createSwapChain):
(rx::Renderer9::allocateEventQuery):
(rx::Renderer9::freeEventQuery):
(rx::Renderer9::createVertexShader):
(rx::Renderer9::createPixelShader):
(rx::Renderer9::createVertexBuffer):
(rx::Renderer9::createIndexBuffer):
(rx::Renderer9::createBufferStorage):
(rx::Renderer9::createQuery):
(rx::Renderer9::createFence):
(rx::Renderer9::setSamplerState):
(rx::Renderer9::setTexture):
(rx::Renderer9::setRasterizerState):
(rx::Renderer9::setBlendState):
(rx::Renderer9::setDepthStencilState):
(rx::Renderer9::setScissorRectangle):
(rx::Renderer9::setViewport):
(rx::Renderer9::applyPrimitiveType):
(rx::Renderer9::getNullColorbuffer):
(rx::Renderer9::applyRenderTarget):
(rx::Renderer9::applyVertexBuffer):
(rx::Renderer9::applyIndexBuffer):
(rx::Renderer9::drawArrays):
(rx::Renderer9::drawElements):
(rx::Renderer9::drawLineLoop):
(rx::drawPoints):
(rx::Renderer9::drawIndexedPoints):
(rx::Renderer9::applyShaders):
(rx::Renderer9::applyUniforms):
(rx::Renderer9::applyUniformnfv):
(rx::Renderer9::applyUniformniv):
(rx::Renderer9::applyUniformnbv):
(rx::Renderer9::clear):
(rx::Renderer9::markAllStateDirty):
(rx::Renderer9::releaseDeviceResources):
(rx::Renderer9::notifyDeviceLost):
(rx::Renderer9::isDeviceLost):
(rx::Renderer9::testDeviceLost):
(rx::Renderer9::testDeviceResettable):
(rx::Renderer9::resetDevice):
(rx::Renderer9::getAdapterVendor):
(rx::Renderer9::getRendererDescription):
(rx::Renderer9::getAdapterIdentifier):
(rx::Renderer9::getMultiSampleSupport):
(rx::Renderer9::getBGRATextureSupport):
(rx::Renderer9::getDXT1TextureSupport):
(rx::Renderer9::getDXT3TextureSupport):
(rx::Renderer9::getDXT5TextureSupport):
(rx::Renderer9::getDepthTextureSupport):
(rx::Renderer9::getFloat32TextureSupport):
(rx::Renderer9::getFloat16TextureSupport):
(rx::Renderer9::getLuminanceTextureSupport):
(rx::Renderer9::getLuminanceAlphaTextureSupport):
(rx::Renderer9::getTextureFilterAnisotropySupport):
(rx::Renderer9::getTextureMaxAnisotropy):
(rx::Renderer9::getEventQuerySupport):
(rx::Renderer9::getMaxVertexTextureImageUnits):
(rx::Renderer9::getMaxCombinedTextureImageUnits):
(rx::Renderer9::getReservedVertexUniformVectors):
(rx::Renderer9::getReservedFragmentUniformVectors):
(rx::Renderer9::getMaxVertexUniformVectors):
(rx::Renderer9::getMaxFragmentUniformVectors):
(rx::Renderer9::getMaxVaryingVectors):
(rx::Renderer9::getNonPower2TextureSupport):
(rx::Renderer9::getOcclusionQuerySupport):
(rx::Renderer9::getInstancingSupport):
(rx::Renderer9::getShareHandleSupport):
(rx::Renderer9::getDerivativeInstructionSupport):
(rx::Renderer9::getPostSubBufferSupport):
(rx::Renderer9::getMajorShaderModel):
(rx::Renderer9::getMaxPointSize):
(rx::Renderer9::getMaxViewportDimension):
(rx::Renderer9::getMaxTextureWidth):
(rx::Renderer9::getMaxTextureHeight):
(rx::Renderer9::get32BitIndexSupport):
(rx::Renderer9::getCapsDeclTypes):
(rx::Renderer9::getMinSwapInterval):
(rx::Renderer9::getMaxSwapInterval):
(rx::Renderer9::getMaxSupportedSamples):
(rx::Renderer9::getNearestSupportedSamples):
(rx::Renderer9::getMaxRenderTargets):
(rx::Renderer9::ConvertTextureInternalFormat):
(rx::Renderer9::copyToRenderTarget):
(rx::Renderer9::getBufferPool):
(rx::Renderer9::copyImage):
(rx::Renderer9::blitRect):
(rx::Renderer9::readPixels):
(rx::Renderer9::createRenderTarget):
(rx::Renderer9::loadExecutable):
(rx::Renderer9::compileToExecutable):
(rx::Renderer9::boxFilter):
(rx::Renderer9::getTexturePool):
(rx::Renderer9::createImage):
(rx::Renderer9::generateMipmap):
(rx::Renderer9::createTextureStorage2D):
(rx::Renderer9::createTextureStorageCube):
(rx::Renderer9::getLUID):
* src/libGLESv2/renderer/Renderer9.h: Added.
(rx::Renderer9::getDevice):
* src/libGLESv2/renderer/ShaderCache.h: Added.
(rx::ShaderCache::ShaderCache):
(rx::ShaderCache::~ShaderCache):
(rx::ShaderCache::initialize):
(rx::ShaderCache::create):
(rx::ShaderCache::clear):
(rx::ShaderCache::createShader):
* src/libGLESv2/renderer/ShaderExecutable.h: Added.
(rx::ShaderExecutable::ShaderExecutable):
(rx::ShaderExecutable::~ShaderExecutable):
(rx::ShaderExecutable::getFunction):
(rx::ShaderExecutable::getLength):
* src/libGLESv2/renderer/ShaderExecutable11.cpp: Added.
(rx::ShaderExecutable11::ShaderExecutable11):
(rx::ShaderExecutable11::~ShaderExecutable11):
(rx::ShaderExecutable11::makeShaderExecutable11):
(rx::ShaderExecutable11::getVertexShader):
(rx::ShaderExecutable11::getPixelShader):
(rx::ShaderExecutable11::getGeometryShader):
(rx::ShaderExecutable11::getConstantBuffer):
* src/libGLESv2/renderer/ShaderExecutable11.h: Added.
* src/libGLESv2/renderer/ShaderExecutable9.cpp: Added.
(rx::ShaderExecutable9::ShaderExecutable9):
(rx::ShaderExecutable9::~ShaderExecutable9):
(rx::ShaderExecutable9::makeShaderExecutable9):
(rx::ShaderExecutable9::getVertexShader):
(rx::ShaderExecutable9::getPixelShader):
* src/libGLESv2/renderer/ShaderExecutable9.h: Added.
* src/libGLESv2/renderer/SwapChain.h: Added.
(rx::SwapChain::SwapChain):
(rx::SwapChain::~SwapChain):
(rx::SwapChain::getShareHandle):
* src/libGLESv2/renderer/SwapChain11.cpp: Added.
(rx::SwapChain11::SwapChain11):
(rx::SwapChain11::~SwapChain11):
(rx::SwapChain11::release):
(rx::SwapChain11::releaseOffscreenTexture):
(rx::SwapChain11::resetOffscreenTexture):
(rx::SwapChain11::resize):
(rx::SwapChain11::reset):
(rx::SwapChain11::initPassThroughResources):
(rx::SwapChain11::swapRect):
(rx::SwapChain11::getOffscreenTexture):
(rx::SwapChain11::getRenderTarget):
(rx::SwapChain11::getRenderTargetShaderResource):
(rx::SwapChain11::getDepthStencil):
(rx::SwapChain11::getDepthStencilTexture):
(rx::SwapChain11::makeSwapChain11):
(rx::SwapChain11::recreate):
* src/libGLESv2/renderer/SwapChain11.h: Added.
(rx::SwapChain11::getWidth):
(rx::SwapChain11::getHeight):
* src/libGLESv2/renderer/SwapChain9.cpp: Added.
(rx::SwapChain9::SwapChain9):
(rx::SwapChain9::~SwapChain9):
(rx::SwapChain9::release):
(rx::convertInterval):
(rx::SwapChain9::resize):
(rx::SwapChain9::reset):
(rx::SwapChain9::swapRect):
(rx::SwapChain9::getRenderTarget):
(rx::SwapChain9::getDepthStencil):
(rx::SwapChain9::getOffscreenTexture):
(rx::SwapChain9::makeSwapChain9):
(rx::SwapChain9::recreate):
* src/libGLESv2/renderer/SwapChain9.h: Added.
* src/libGLESv2/renderer/TextureStorage.cpp: Added.
(rx::TextureStorageInterface::TextureStorageInterface):
(rx::TextureStorageInterface::~TextureStorageInterface):
(rx::TextureStorageInterface::isRenderTarget):
(rx::TextureStorageInterface::isManaged):
(rx::TextureStorageInterface::getTextureSerial):
(rx::TextureStorageInterface::issueTextureSerial):
(rx::TextureStorageInterface::getLodOffset):
(rx::TextureStorageInterface::levelCount):
(rx::TextureStorageInterface2D::TextureStorageInterface2D):
(rx::TextureStorageInterface2D::~TextureStorageInterface2D):
(rx::TextureStorageInterface2D::getRenderTarget):
(rx::TextureStorageInterface2D::generateMipmap):
(rx::TextureStorageInterface2D::getRenderTargetSerial):
(rx::TextureStorageInterfaceCube::TextureStorageInterfaceCube):
(rx::TextureStorageInterfaceCube::~TextureStorageInterfaceCube):
(rx::TextureStorageInterfaceCube::getRenderTarget):
(rx::TextureStorageInterfaceCube::generateMipmap):
(rx::TextureStorageInterfaceCube::getRenderTargetSerial):
* src/libGLESv2/renderer/TextureStorage.h: Added.
(rx::TextureStorage::TextureStorage):
(rx::TextureStorage::~TextureStorage):
(rx::TextureStorageInterface::getStorageInstance):
* src/libGLESv2/renderer/TextureStorage11.cpp: Added.
(rx::TextureStorage11::TextureStorage11):
(rx::TextureStorage11::~TextureStorage11):
(rx::TextureStorage11::makeTextureStorage11):
(rx::TextureStorage11::GetTextureBindFlags):
(rx::TextureStorage11::IsTextureFormatRenderable):
(rx::TextureStorage11::getBindFlags):
(rx::TextureStorage11::getBaseTexture):
(rx::TextureStorage11::getLodOffset):
(rx::TextureStorage11::isRenderTarget):
(rx::TextureStorage11::isManaged):
(rx::TextureStorage11::levelCount):
(rx::TextureStorage11::getSubresourceIndex):
(rx::TextureStorage11::updateSubresourceLevel):
(rx::TextureStorage11::generateMipmapLayer):
(rx::TextureStorage11_2D::TextureStorage11_2D):
(rx::TextureStorage11_2D::~TextureStorage11_2D):
(rx::TextureStorage11_2D::makeTextureStorage11_2D):
(rx::TextureStorage11_2D::getRenderTarget):
(rx::TextureStorage11_2D::getSRV):
(rx::TextureStorage11_2D::generateMipmap):
(rx::TextureStorage11_Cube::TextureStorage11_Cube):
(rx::TextureStorage11_Cube::~TextureStorage11_Cube):
(rx::TextureStorage11_Cube::makeTextureStorage11_Cube):
(rx::TextureStorage11_Cube::getRenderTarget):
(rx::TextureStorage11_Cube::getSRV):
(rx::TextureStorage11_Cube::generateMipmap):
* src/libGLESv2/renderer/TextureStorage11.h: Added.
(rx::TextureStorage11::getRenderTarget):
(rx::TextureStorage11::generateMipmap):
* src/libGLESv2/renderer/TextureStorage9.cpp: Added.
(rx::TextureStorage9::TextureStorage9):
(rx::TextureStorage9::~TextureStorage9):
(rx::TextureStorage9::makeTextureStorage9):
(rx::TextureStorage9::GetTextureUsage):
(rx::TextureStorage9::IsTextureFormatRenderable):
(rx::TextureStorage9::isRenderTarget):
(rx::TextureStorage9::isManaged):
(rx::TextureStorage9::getPool):
(rx::TextureStorage9::getUsage):
(rx::TextureStorage9::getLodOffset):
(rx::TextureStorage9::levelCount):
(rx::TextureStorage9_2D::TextureStorage9_2D):
(rx::TextureStorage9_2D::~TextureStorage9_2D):
(rx::TextureStorage9_2D::makeTextureStorage9_2D):
(rx::TextureStorage9_2D::getSurfaceLevel):
(rx::TextureStorage9_2D::getRenderTarget):
(rx::TextureStorage9_2D::generateMipmap):
(rx::TextureStorage9_2D::getBaseTexture):
(rx::TextureStorage9_2D::initializeRenderTarget):
(rx::TextureStorage9_Cube::TextureStorage9_Cube):
(rx::TextureStorage9_Cube::~TextureStorage9_Cube):
(rx::TextureStorage9_Cube::makeTextureStorage9_Cube):
(rx::TextureStorage9_Cube::getCubeMapSurface):
(rx::TextureStorage9_Cube::getRenderTarget):
(rx::TextureStorage9_Cube::generateMipmap):
(rx::TextureStorage9_Cube::getBaseTexture):
(rx::TextureStorage9_Cube::initializeRenderTarget):
* src/libGLESv2/renderer/TextureStorage9.h: Added.
(rx::TextureStorage9::getRenderTarget):
(rx::TextureStorage9::generateMipmap):
* src/libGLESv2/renderer/VertexBuffer.cpp: Added.
(rx::VertexBuffer::VertexBuffer):
(rx::VertexBuffer::~VertexBuffer):
(rx::VertexBuffer::updateSerial):
(rx::VertexBuffer::getSerial):
(rx::VertexBufferInterface::VertexBufferInterface):
(rx::VertexBufferInterface::~VertexBufferInterface):
(rx::VertexBufferInterface::getSerial):
(rx::VertexBufferInterface::getBufferSize):
(rx::VertexBufferInterface::setBufferSize):
(rx::VertexBufferInterface::getWritePosition):
(rx::VertexBufferInterface::setWritePosition):
(rx::VertexBufferInterface::discard):
(rx::VertexBufferInterface::storeVertexAttributes):
(rx::VertexBufferInterface::storeRawData):
(rx::VertexBufferInterface::reserveVertexSpace):
(rx::VertexBufferInterface::reserveRawDataSpace):
(rx::VertexBufferInterface::getVertexBuffer):
(rx::StreamingVertexBufferInterface::StreamingVertexBufferInterface):
(rx::StreamingVertexBufferInterface::~StreamingVertexBufferInterface):
(rx::StreamingVertexBufferInterface::reserveSpace):
(rx::StaticVertexBufferInterface::StaticVertexBufferInterface):
(rx::StaticVertexBufferInterface::~StaticVertexBufferInterface):
(rx::StaticVertexBufferInterface::lookupAttribute):
(rx::StaticVertexBufferInterface::reserveSpace):
(rx::StaticVertexBufferInterface::storeVertexAttributes):
* src/libGLESv2/renderer/VertexBuffer.h: Added.
* src/libGLESv2/renderer/VertexBuffer11.cpp: Added.
(rx::VertexBuffer11::VertexBuffer11):
(rx::VertexBuffer11::~VertexBuffer11):
(rx::VertexBuffer11::initialize):
(rx::VertexBuffer11::makeVertexBuffer11):
(rx::VertexBuffer11::storeVertexAttributes):
(rx::VertexBuffer11::storeRawData):
(rx::VertexBuffer11::getSpaceRequired):
(rx::VertexBuffer11::requiresConversion):
(rx::VertexBuffer11::getBufferSize):
(rx::VertexBuffer11::setBufferSize):
(rx::VertexBuffer11::discard):
(rx::VertexBuffer11::getVertexSize):
(rx::VertexBuffer11::getDXGIFormat):
(rx::VertexBuffer11::getBuffer):
(rx::copyVertexData):
(rx::copyFixedVertexData):
(rx::copyToFloatVertexData):
(rx::VertexBuffer11::getVertexConversion):
* src/libGLESv2/renderer/VertexBuffer11.h: Added.
* src/libGLESv2/renderer/VertexBuffer9.cpp: Added.
(rx::VertexBuffer9::VertexBuffer9):
(rx::VertexBuffer9::~VertexBuffer9):
(rx::VertexBuffer9::initialize):
(rx::VertexBuffer9::makeVertexBuffer9):
(rx::VertexBuffer9::storeVertexAttributes):
(rx::VertexBuffer9::storeRawData):
(rx::VertexBuffer9::getSpaceRequired):
(rx::VertexBuffer9::requiresConversion):
(rx::VertexBuffer9::getVertexSize):
(rx::VertexBuffer9::getDeclType):
(rx::VertexBuffer9::getBufferSize):
(rx::VertexBuffer9::setBufferSize):
(rx::VertexBuffer9::discard):
(rx::VertexBuffer9::getBuffer):
(rx::VertexBuffer9::initializeTranslations):
(rx::VertexBuffer9::typeIndex):
(rx::VertexBuffer9::formatConverter):
(rx::VertexBuffer9::spaceRequired):
* src/libGLESv2/renderer/VertexBuffer9.h: Added.
* src/libGLESv2/renderer/VertexDataManager.cpp: Added.
(rx::elementsInBuffer):
(rx::VertexDataManager::VertexDataManager):
(rx::VertexDataManager::~VertexDataManager):
(rx::directStoragePossible):
(rx::VertexDataManager::prepareVertexData):
* src/libGLESv2/renderer/VertexDataManager.h: Added.
* src/libGLESv2/renderer/VertexDeclarationCache.cpp: Added.
(rx::VertexDeclarationCache::VertexDeclarationCache):
(rx::VertexDeclarationCache::~VertexDeclarationCache):
(rx::VertexDeclarationCache::applyDeclaration):
(rx::VertexDeclarationCache::markStateDirty):
* src/libGLESv2/renderer/VertexDeclarationCache.h: Added.
* src/libGLESv2/renderer/generatemip.h: Added.
(rx::L8::average):
(rx::A8L8::average):
(rx::A8R8G8B8::average):
(rx::A16B16G16R16F::average):
(rx::R16F::average):
(rx::R16G16F::average):
(rx::A32B32G32R32F::average):
(rx::R32F::average):
(rx::R32G32F::average):
(rx::R32G32B32F::average):
(rx::GenerateMip):
* src/libGLESv2/renderer/renderer11_utils.cpp: Added.
(gl_d3d11::ConvertBlendFunc):
(gl_d3d11::ConvertBlendOp):
(gl_d3d11::ConvertColorMask):
(gl_d3d11::ConvertCullMode):
(gl_d3d11::ConvertComparison):
(gl_d3d11::ConvertDepthMask):
(gl_d3d11::ConvertStencilMask):
(gl_d3d11::ConvertStencilOp):
(gl_d3d11::ConvertFilter):
(gl_d3d11::ConvertTextureWrap):
(gl_d3d11::ConvertMinLOD):
(gl_d3d11::ConvertMaxLOD):
(d3d11_gl::ConvertBackBufferFormat):
(d3d11_gl::ConvertDepthStencilFormat):
(d3d11_gl::ConvertRenderbufferFormat):
(d3d11_gl::ConvertTextureInternalFormat):
(gl_d3d11::ConvertRenderbufferFormat):
(gl_d3d11::ConvertTextureFormat):
(d3d11::SetPositionTexCoordVertex):
(d3d11::SetPositionDepthColorVertex):
(d3d11::ComputePixelSizeBits):
(d3d11::ComputeBlockSizeBits):
(d3d11::IsCompressed):
(d3d11::GetTextureFormatDimensionAlignment):
(d3d11::IsDepthStencilFormat):
(d3d11::GetDepthTextureFormat):
(d3d11::GetDepthShaderResourceFormat):
(d3d11::SetDebugName):
* src/libGLESv2/renderer/renderer11_utils.h: Added.
(d3d11::isDeviceLostError):
* src/libGLESv2/renderer/renderer9_utils.cpp: Added.
(gl_d3d9::ConvertComparison):
(gl_d3d9::ConvertColor):
(gl_d3d9::ConvertBlendFunc):
(gl_d3d9::ConvertBlendOp):
(gl_d3d9::ConvertStencilOp):
(gl_d3d9::ConvertTextureWrap):
(gl_d3d9::ConvertCullMode):
(gl_d3d9::ConvertCubeFace):
(gl_d3d9::ConvertColorMask):
(gl_d3d9::ConvertMagFilter):
(gl_d3d9::ConvertMinFilter):
(gl_d3d9::ConvertRenderbufferFormat):
(gl_d3d9::GetMultisampleTypeFromSamples):
(d3d9_gl::GetStencilSize):
(d3d9_gl::GetAlphaSize):
(d3d9_gl::GetSamplesFromMultisampleType):
(d3d9_gl::IsFormatChannelEquivalent):
(d3d9_gl::ConvertBackBufferFormat):
(d3d9_gl::ConvertDepthStencilFormat):
(d3d9_gl::ConvertRenderTargetFormat):
(d3d9_gl::GetEquivalentFormat):
(d3d9::IsCompressedFormat):
(d3d9::ComputeRowSize):
* src/libGLESv2/renderer/renderer9_utils.h: Added.
(d3d9::isDeviceLostError):
* src/libGLESv2/renderer/shaders: Added.
* src/libGLESv2/renderer/shaders/Blit.ps: Added.
* src/libGLESv2/renderer/shaders/Blit.vs: Added.
* src/libGLESv2/renderer/shaders/Clear11.hlsl: Added.
* src/libGLESv2/renderer/shaders/Passthrough11.hlsl: Added.
* src/libGLESv2/renderer/shaders/compiled: Added.
* src/libGLESv2/renderer/shaders/compiled/clear11vs.h: Added.
* src/libGLESv2/renderer/shaders/compiled/clearmultiple11ps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/clearsingle11ps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/componentmaskps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/flipyvs.h: Added.
* src/libGLESv2/renderer/shaders/compiled/luminanceps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/passthrough11vs.h: Added.
* src/libGLESv2/renderer/shaders/compiled/passthroughlum11ps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/passthroughlumalpha11ps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/passthroughps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/passthroughrgb11ps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/passthroughrgba11ps.h: Added.
* src/libGLESv2/renderer/shaders/compiled/standardvs.h: Added.
* src/libGLESv2/renderer/shaders/generate_shaders.bat: Added.
* src/libGLESv2/renderer/vertexconversion.h: Added.
(rx::Identity::convert):
(rx::Cast::convert):
(rx::Normalize::convert):
(rx::FixedToFloat::convert):
(rx::SimpleDefaultValues::zero):
(rx::SimpleDefaultValues::one):
(rx::NormalizedDefaultValues::zero):
(rx::NormalizedDefaultValues::one):
(rx::VertexDataConverter::convertArray):
(rx::VertexDataConverter::pointerAddBytes):
(rx::VertexDataConverter::copyComponent):
* src/libGLESv2/resource.h: Added.
* src/libGLESv2/utilities.cpp: Added.
(gl::UniformComponentCount):
(gl::UniformComponentType):
(gl::UniformComponentSize):
(gl::UniformInternalSize):
(gl::UniformExternalSize):
(gl::VariableRowCount):
(gl::VariableColumnCount):
(gl::AllocateFirstFreeBits):
(gl::ComputePitch):
(gl::ComputeCompressedPitch):
(gl::ComputeCompressedSize):
(gl::IsCompressed):
(gl::IsDepthTexture):
(gl::IsStencilTexture):
(gl::MakeValidSize):
(gl::ComputePixelSize):
(gl::IsCubemapTextureTarget):
(gl::IsInternalTextureTarget):
(gl::ConvertSizedInternalFormat):
(gl::ExtractFormat):
(gl::ExtractType):
(gl::IsColorRenderable):
(gl::IsDepthRenderable):
(gl::IsStencilRenderable):
(gl::IsFloat32Format):
(gl::IsFloat16Format):
(gl::GetAlphaSize):
(gl::GetRedSize):
(gl::GetGreenSize):
(gl::GetBlueSize):
(gl::GetDepthSize):
(gl::GetStencilSize):
(gl::IsTriangleMode):
(getTempPath):
(writeFile):
* src/libGLESv2/utilities.h: Added.
* src/third_party/murmurhash: Added.
* src/third_party/murmurhash/LICENSE: Added.
* src/third_party/murmurhash/MurmurHash3.cpp: Added, replaced tabs with spaces.
(rotl32):
(rotl64):
(getblock):
(fmix):
(MurmurHash3_x86_32):
(MurmurHash3_x86_128):
(MurmurHash3_x64_128):
* src/third_party/murmurhash/MurmurHash3.h: Added, replaced tabs with spaces.

Source/WebCore: Updated ANGLE to latest git commit (047373aa3eb408be62be52ade840fa5f11e72337).
https://bugs.webkit.org/show_bug.cgi?id=118550

Reviewed by Dean Jackson.

* CMakeLists.txt: Renamed DetectRecursion to DetectCallDepth and added Uniform.cpp.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153064 268f45cc-cd09-0410-ab3c-d52691b4dbfc

239 files changed:
Source/ThirdParty/ANGLE/ANGLE.plist
Source/ThirdParty/ANGLE/ANGLE.xcodeproj/project.pbxproj
Source/ThirdParty/ANGLE/AUTHORS [new file with mode: 0644]
Source/ThirdParty/ANGLE/CONTRIBUTORS [new file with mode: 0644]
Source/ThirdParty/ANGLE/ChangeLog
Source/ThirdParty/ANGLE/DEPS [new file with mode: 0644]
Source/ThirdParty/ANGLE/GNUmakefile.am
Source/ThirdParty/ANGLE/LICENSE [new file with mode: 0644]
Source/ThirdParty/ANGLE/README.chromium [new file with mode: 0644]
Source/ThirdParty/ANGLE/Target.pri
Source/ThirdParty/ANGLE/codereview.settings [new file with mode: 0644]
Source/ThirdParty/ANGLE/include/EGL/eglext.h
Source/ThirdParty/ANGLE/include/GLES2/gl2ext.h
Source/ThirdParty/ANGLE/include/GLSLANG/ShaderLang.h
Source/ThirdParty/ANGLE/src/ANGLE.sln [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/build_angle.gyp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/build_angle.gypi [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/common/RefCountObject.cpp
Source/ThirdParty/ANGLE/src/common/angleutils.h
Source/ThirdParty/ANGLE/src/common/debug.cpp
Source/ThirdParty/ANGLE/src/common/debug.h
Source/ThirdParty/ANGLE/src/common/system.h
Source/ThirdParty/ANGLE/src/common/version.h
Source/ThirdParty/ANGLE/src/compiler/64bit-lexer-safety.patch [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/compiler/BaseTypes.h
Source/ThirdParty/ANGLE/src/compiler/CodeGenHLSL.cpp
Source/ThirdParty/ANGLE/src/compiler/Common.h
Source/ThirdParty/ANGLE/src/compiler/Compiler.cpp
Source/ThirdParty/ANGLE/src/compiler/ConstantUnion.h
Source/ThirdParty/ANGLE/src/compiler/DetectCallDepth.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/compiler/DetectCallDepth.h [moved from Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.h with 59% similarity]
Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.cpp [deleted file]
Source/ThirdParty/ANGLE/src/compiler/Diagnostics.cpp
Source/ThirdParty/ANGLE/src/compiler/ForLoopUnroll.cpp
Source/ThirdParty/ANGLE/src/compiler/InfoSink.cpp
Source/ThirdParty/ANGLE/src/compiler/InfoSink.h
Source/ThirdParty/ANGLE/src/compiler/Initialize.cpp
Source/ThirdParty/ANGLE/src/compiler/Initialize.h
Source/ThirdParty/ANGLE/src/compiler/Intermediate.cpp
Source/ThirdParty/ANGLE/src/compiler/OutputGLSL.cpp
Source/ThirdParty/ANGLE/src/compiler/OutputGLSL.h
Source/ThirdParty/ANGLE/src/compiler/OutputGLSLBase.cpp
Source/ThirdParty/ANGLE/src/compiler/OutputGLSLBase.h
Source/ThirdParty/ANGLE/src/compiler/OutputHLSL.cpp
Source/ThirdParty/ANGLE/src/compiler/OutputHLSL.h
Source/ThirdParty/ANGLE/src/compiler/ParseHelper.cpp
Source/ThirdParty/ANGLE/src/compiler/ParseHelper.h
Source/ThirdParty/ANGLE/src/compiler/PoolAlloc.cpp
Source/ThirdParty/ANGLE/src/compiler/ShHandle.h
Source/ThirdParty/ANGLE/src/compiler/ShaderLang.cpp
Source/ThirdParty/ANGLE/src/compiler/SymbolTable.cpp
Source/ThirdParty/ANGLE/src/compiler/SymbolTable.h
Source/ThirdParty/ANGLE/src/compiler/TranslatorHLSL.cpp
Source/ThirdParty/ANGLE/src/compiler/TranslatorHLSL.h
Source/ThirdParty/ANGLE/src/compiler/Types.h
Source/ThirdParty/ANGLE/src/compiler/Uniform.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/compiler/Uniform.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/compiler/VariableInfo.cpp
Source/ThirdParty/ANGLE/src/compiler/glslang.l
Source/ThirdParty/ANGLE/src/compiler/glslang.y
Source/ThirdParty/ANGLE/src/compiler/glslang_lex.cpp
Source/ThirdParty/ANGLE/src/compiler/glslang_tab.cpp
Source/ThirdParty/ANGLE/src/compiler/glslang_tab.h
Source/ThirdParty/ANGLE/src/compiler/intermOut.cpp
Source/ThirdParty/ANGLE/src/compiler/intermediate.h
Source/ThirdParty/ANGLE/src/compiler/localintermediate.h
Source/ThirdParty/ANGLE/src/compiler/parseConst.cpp
Source/ThirdParty/ANGLE/src/compiler/preprocessor/64bit-tokenizer-safety.patch [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/compiler/preprocessor/Tokenizer.cpp
Source/ThirdParty/ANGLE/src/compiler/preprocessor/Tokenizer.l
Source/ThirdParty/ANGLE/src/compiler/preprocessor/preprocessor.vcxproj [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/compiler/preprocessor/preprocessor.vcxproj.filters [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/compiler/timing/RestrictVertexShaderTiming.cpp
Source/ThirdParty/ANGLE/src/compiler/translator_common.vcxproj [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/compiler/translator_common.vcxproj.filters [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/compiler/translator_hlsl.vcxproj [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/compiler/translator_hlsl.vcxproj.filters [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libEGL/Config.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libEGL/Config.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libEGL/Display.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libEGL/Display.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libEGL/Surface.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libEGL/Surface.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libEGL/libEGL.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libEGL/libEGL.def [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libEGL/libEGL.rc [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libEGL/libEGL.vcxproj [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libEGL/libEGL.vcxproj.filters [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libEGL/main.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libEGL/main.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libEGL/resource.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/BinaryStream.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Buffer.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Buffer.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Context.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Context.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Fence.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Fence.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Float16ToFloat32.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Float16ToFloat32.py [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Framebuffer.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Framebuffer.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/HandleAllocator.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/HandleAllocator.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Program.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Program.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/ProgramBinary.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/ProgramBinary.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Query.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Query.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Renderbuffer.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Renderbuffer.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/ResourceManager.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/ResourceManager.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Shader.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Shader.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Texture.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Texture.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Uniform.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/Uniform.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/angletypes.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/constants.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/libGLESv2.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/libGLESv2.def [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/libGLESv2.rc [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/libGLESv2.vcxproj [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/libGLESv2.vcxproj.filters [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/main.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/main.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/mathutil.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/precompiled.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/precompiled.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Blit.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Blit.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/BufferStorage.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/BufferStorage.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/BufferStorage11.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/BufferStorage11.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/BufferStorage9.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/BufferStorage9.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Fence11.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Fence11.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Fence9.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Fence9.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/FenceImpl.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Image.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Image.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Image11.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Image11.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Image9.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Image9.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/ImageSSE2.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/IndexBuffer.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/IndexBuffer.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/IndexBuffer11.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/IndexBuffer11.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/IndexBuffer9.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/IndexBuffer9.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/IndexDataManager.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/IndexDataManager.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/InputLayoutCache.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/InputLayoutCache.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Query11.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Query11.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Query9.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Query9.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/QueryImpl.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/RenderStateCache.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/RenderStateCache.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/RenderTarget.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/RenderTarget11.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/RenderTarget11.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/RenderTarget9.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/RenderTarget9.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Renderer.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Renderer.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Renderer11.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Renderer11.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Renderer9.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/Renderer9.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/ShaderCache.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/ShaderExecutable.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/ShaderExecutable11.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/ShaderExecutable11.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/ShaderExecutable9.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/ShaderExecutable9.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/SwapChain.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/SwapChain11.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/SwapChain11.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/SwapChain9.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/SwapChain9.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/TextureStorage.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/TextureStorage.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/TextureStorage11.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/TextureStorage11.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/TextureStorage9.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/TextureStorage9.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/VertexBuffer.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/VertexBuffer.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/VertexBuffer11.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/VertexBuffer11.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/VertexBuffer9.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/VertexBuffer9.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/VertexDataManager.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/VertexDataManager.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/VertexDeclarationCache.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/VertexDeclarationCache.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/generatemip.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/renderer11_utils.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/renderer11_utils.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/renderer9_utils.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/renderer9_utils.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/Blit.ps [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/Blit.vs [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/Clear11.hlsl [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/Passthrough11.hlsl [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/compiled/clear11vs.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/compiled/clearmultiple11ps.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/compiled/clearsingle11ps.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/compiled/componentmaskps.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/compiled/flipyvs.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/compiled/luminanceps.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/compiled/passthrough11vs.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/compiled/passthroughlum11ps.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/compiled/passthroughlumalpha11ps.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/compiled/passthroughps.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/compiled/passthroughrgb11ps.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/compiled/passthroughrgba11ps.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/compiled/standardvs.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/shaders/generate_shaders.bat [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/renderer/vertexconversion.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/resource.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/utilities.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/libGLESv2/utilities.h [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/third_party/murmurhash/LICENSE [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/third_party/murmurhash/MurmurHash3.cpp [new file with mode: 0644]
Source/ThirdParty/ANGLE/src/third_party/murmurhash/MurmurHash3.h [new file with mode: 0644]
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog

index 809891c28a19ba0f17d20ef0768f6d58f2284147..304aea0bf36537fdad2758dfc5108647d34e81fa 100644 (file)
@@ -10,9 +10,9 @@
                <key>OpenSourceWebsiteURL</key>
                <string>http://code.google.com/p/angleproject/</string>
                <key>OpenSourceSCM</key>
-               <string>svn co -r1641 http://angleproject.googlecode.com/svn/trunk/</string>
+               <string>git clone https://code.google.com/p/angleproject/ && cd angleproject && git checkout 047373aa3eb408be62be52ade840fa5f11e72337</string>
                <key>OpenSourceImportDate</key>
-               <string>2013-01-04</string>
+               <string>2013-07-22</string>
                <key>OpenSourceLicense</key>
                <string>BSD</string>
                <key>OpenSourceLicenseFile</key>
index ef0e76f50464e9b42efde090dd3f06078dbdb3a2..6d3d56a5def9db19ac640a25e973877d77e74038 100644 (file)
@@ -12,8 +12,8 @@
                49951C0314B7AAB30060E96E /* length_limits.h in Headers */ = {isa = PBXBuildFile; fileRef = 49951C0214B7AAB30060E96E /* length_limits.h */; };
                49951C0914B7AAD80060E96E /* BuiltInFunctionEmulator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49951C0514B7AAD70060E96E /* BuiltInFunctionEmulator.cpp */; };
                49951C0A14B7AAD80060E96E /* BuiltInFunctionEmulator.h in Headers */ = {isa = PBXBuildFile; fileRef = 49951C0614B7AAD80060E96E /* BuiltInFunctionEmulator.h */; };
-               49951C0B14B7AAD80060E96E /* DetectRecursion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49951C0714B7AAD80060E96E /* DetectRecursion.cpp */; };
-               49951C0C14B7AAD80060E96E /* DetectRecursion.h in Headers */ = {isa = PBXBuildFile; fileRef = 49951C0814B7AAD80060E96E /* DetectRecursion.h */; };
+               5CB13FD4179DB3FD001F851D /* DetectCallDepth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5CB13FD2179DB3FD001F851D /* DetectCallDepth.cpp */; };
+               5CB13FD5179DB3FD001F851D /* DetectCallDepth.h in Headers */ = {isa = PBXBuildFile; fileRef = 5CB13FD3179DB3FD001F851D /* DetectCallDepth.h */; };
                90D9B10212E11DCB002D4255 /* Compiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90D9B0F912E11DCB002D4255 /* Compiler.cpp */; };
                90D9B10312E11DCB002D4255 /* ExtensionBehavior.h in Headers */ = {isa = PBXBuildFile; fileRef = 90D9B0FA12E11DCB002D4255 /* ExtensionBehavior.h */; };
                90D9B10412E11DCB002D4255 /* glslang_lex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 90D9B0FB12E11DCB002D4255 /* glslang_lex.cpp */; };
                49951C0214B7AAB30060E96E /* length_limits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = length_limits.h; sourceTree = "<group>"; };
                49951C0514B7AAD70060E96E /* BuiltInFunctionEmulator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BuiltInFunctionEmulator.cpp; sourceTree = "<group>"; };
                49951C0614B7AAD80060E96E /* BuiltInFunctionEmulator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BuiltInFunctionEmulator.h; sourceTree = "<group>"; };
-               49951C0714B7AAD80060E96E /* DetectRecursion.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetectRecursion.cpp; sourceTree = "<group>"; };
-               49951C0814B7AAD80060E96E /* DetectRecursion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetectRecursion.h; sourceTree = "<group>"; };
+               5CB13FD2179DB3FD001F851D /* DetectCallDepth.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DetectCallDepth.cpp; sourceTree = "<group>"; };
+               5CB13FD3179DB3FD001F851D /* DetectCallDepth.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetectCallDepth.h; sourceTree = "<group>"; };
                5D7C59C51208C68B001C873E /* ANGLE.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = ANGLE.xcconfig; sourceTree = "<group>"; };
                5D7C59C61208C68B001C873E /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
                5D7C59C71208C68B001C873E /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
                                FB39D2251200F35A00088E69 /* ConstantUnion.h */,
                                FB39D2261200F35A00088E69 /* debug.cpp */,
                                FB39D2271200F35A00088E69 /* debug.h */,
-                               49951C0714B7AAD80060E96E /* DetectRecursion.cpp */,
-                               49951C0814B7AAD80060E96E /* DetectRecursion.h */,
+                               5CB13FD3179DB3FD001F851D /* DetectCallDepth.h */,
+                               5CB13FD2179DB3FD001F851D /* DetectCallDepth.cpp */,
                                A26567B0159C21B100398539 /* Diagnostics.cpp */,
                                A26567B1159C21B100398539 /* Diagnostics.h */,
                                A26567B2159C21B100398539 /* DirectiveHandler.cpp */,
                                A265683A159C23E100398539 /* DependencyGraph.h in Headers */,
                                A265683C159C23E100398539 /* DependencyGraphBuilder.h in Headers */,
                                A265683E159C23E100398539 /* DependencyGraphOutput.h in Headers */,
-                               49951C0C14B7AAD80060E96E /* DetectRecursion.h in Headers */,
                                A26567BC159C21B100398539 /* Diagnostics.h in Headers */,
                                A264F8AD16974DED006FAA5A /* DiagnosticsBase.h in Headers */,
                                A26567BE159C21B100398539 /* DirectiveHandler.h in Headers */,
                                90D9B11812E11DD6002D4255 /* VariableInfo.h in Headers */,
                                A264F8CA16974E2A006FAA5A /* VariablePacker.h in Headers */,
                                90D9B11A12E11DD6002D4255 /* VersionGLSL.h in Headers */,
+                               5CB13FD5179DB3FD001F851D /* DetectCallDepth.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                A265683B159C23E100398539 /* DependencyGraphBuilder.cpp in Sources */,
                                A265683D159C23E100398539 /* DependencyGraphOutput.cpp in Sources */,
                                A265683F159C23E100398539 /* DependencyGraphTraverse.cpp in Sources */,
-                               49951C0B14B7AAD80060E96E /* DetectRecursion.cpp in Sources */,
                                A26567BB159C21B100398539 /* Diagnostics.cpp in Sources */,
                                A264F8AC16974DED006FAA5A /* DiagnosticsBase.cpp in Sources */,
                                A26567BD159C21B100398539 /* DirectiveHandler.cpp in Sources */,
                                90D9B11712E11DD6002D4255 /* VariableInfo.cpp in Sources */,
                                A264F8C916974E2A006FAA5A /* VariablePacker.cpp in Sources */,
                                90D9B11912E11DD6002D4255 /* VersionGLSL.cpp in Sources */,
+                               5CB13FD4179DB3FD001F851D /* DetectCallDepth.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
diff --git a/Source/ThirdParty/ANGLE/AUTHORS b/Source/ThirdParty/ANGLE/AUTHORS
new file mode 100644 (file)
index 0000000..a2ce915
--- /dev/null
@@ -0,0 +1,32 @@
+# This is the official list of The ANGLE Project Authors
+# for copyright purposes.
+# This file is distinct from the CONTRIBUTORS files.
+# See the latter for an explanation.
+
+# Names should be added to this file as
+#      Name or Organization
+# Email addresses for individuals are tracked elsewhere to avoid spam.
+
+Google Inc.
+TransGaming Inc.
+3DLabs Inc. Ltd.
+
+Adobe Systems Inc.
+Autodesk, Inc.
+Cloud Party, Inc.
+Intel Corporation
+Mozilla Corporation
+Turbulenz
+Klarälvdalens Datakonsult AB
+
+Jacek Caban
+Mark Callow
+Ginn Chen
+James Hauxwell
+Sam Hocevar
+Pierre Leveille
+Jonathan Liu
+Boying Lu
+Aitor Moreno
+Yuri O'Donnell
+Josh Soref
diff --git a/Source/ThirdParty/ANGLE/CONTRIBUTORS b/Source/ThirdParty/ANGLE/CONTRIBUTORS
new file mode 100644 (file)
index 0000000..00ebe7c
--- /dev/null
@@ -0,0 +1,76 @@
+# This is the official list of people who can contribute\r
+# (and who have contributed) code to the ANGLE project\r
+# repository.\r
+# The AUTHORS file lists the copyright holders; this file\r
+# lists people.  For example, Google employees are listed here\r
+# but not in AUTHORS, because Google holds the copyright.\r
+#\r
+\r
+TransGaming Inc.\r
+ Nicolas Capens\r
+ Daniel Koch\r
+ Geoff Lang\r
+ Andrew Lewycky\r
+ Jamie Madill\r
+ Gavriel State\r
+ Shannon Woods\r
+\r
+Google Inc.\r
+ Brent Austin\r
+ Michael Bai\r
+ John Bauman\r
+ Peter Beverloo\r
+ Steve Block\r
+ Rachel Blum\r
+ Eric Boren\r
+ Henry Bridge\r
+ Nat Duca\r
+ Peter Kasting\r
+ Vangelis Kokkevis\r
+ Zhenyao Mo\r
+ Daniel Nicoara\r
+ Alastair Patrick\r
+ Alok Priyadarshi\r
+ Kenneth Russell\r
+ Brian Salomon\r
+ Gregg Tavares\r
+ Jeff Timanus\r
+ Ben Vanik\r
+ Adrienne Walker\r
+ thestig@chromium.org\r
+ Justin Schuh\r
+\r
+Adobe Systems Inc.\r
+ Alexandru Chiculita\r
+ Steve Minns\r
+ Max Vujovic\r
+\r
+Autodesk, Inc.\r
+ Ranger Harke\r
+\r
+Cloud Party, Inc.\r
+ Conor Dickinson\r
+\r
+Intel Corporation\r
+ Jin Yang\r
+ Andy Chen\r
+ Josh Triplett\r
+\r
+Klarälvdalens Datakonsult AB\r
+ Milian Wolff\r
+\r
+Mozilla Corp.\r
+ Ehsan Akhgari\r
+ Jeff Gilbert\r
+ Mike Hommey\r
+ Benoit Jacob\r
+ Makoto Kato\r
+ Vladimir Vukicevic\r
+\r
+Turbulenz\r
+ Michael Braithwaite\r
+\r
+Ulrik Persson (ddefrostt)\r
+Mark Banner (standard8mbp)\r
+David Kilzer\r
+\r
index 8596fac3394641580be054c93310c8dfecccca2e..ee73649661f9e5714586b327792c95472d72144d 100644 (file)
+2013-07-23  Alex Christensen  <achristensen@apple.com>
+
+        Updated ANGLE to latest git commit (047373aa3eb408be62be52ade840fa5f11e72337).
+        Added missing ANGLE files except unused tests, extensions, samples, build, and .git directories.
+        Ran Bison after making some changes to fix compile errors (see below).
+
+        https://bugs.webkit.org/show_bug.cgi?id=118550
+
+        Reviewed by Dean Jackson.
+
+        * ANGLE.plist: Updated from svn to git.
+        * ANGLE.xcodeproj/project.pbxproj: Renamed DetectRecursion to DetectCallDepth.
+        * AUTHORS: Added.
+        * CONTRIBUTORS: Added.
+        * DEPS: Added.
+        * GNUmakefile.am: Renamed DetectRecursion to DetectCallDepth and added Uniform.cpp.
+        * LICENSE: Added.
+        * README.chromium: Added.
+        * Target.pri: Renamed DetectRecursion to DetectCallDepth.
+        * codereview.settings: Added.
+        * include/EGL/eglext.h:
+        * include/GLES2/gl2ext.h:
+        * include/GLSLANG/ShaderLang.h:
+        * src/ANGLE.sln: Added.
+        * src/build_angle.gyp: Added.
+        * src/build_angle.gypi: Added.
+        * src/common/RefCountObject.cpp:
+        * src/common/angleutils.h:
+        (ArraySize):
+        (SafeRelease):
+        * src/common/debug.cpp:
+        * src/common/debug.h:
+        * src/common/system.h:
+        * src/common/version.h:
+        * src/compiler/64bit-lexer-safety.patch: Added.
+        * src/compiler/BaseTypes.h:
+        (getQualifierString):
+        * src/compiler/CodeGenHLSL.cpp:
+        (ConstructCompiler):
+        * src/compiler/Common.h:
+        * src/compiler/Compiler.cpp:
+        (TCompiler::TCompiler):
+        (TCompiler::Init):
+        (TCompiler::compile):
+        (TCompiler::InitBuiltInSymbolTable):
+        (TCompiler::detectCallDepth):
+        (TCompiler::limitExpressionComplexity):
+        (TCompiler::getResources):
+        * src/compiler/ConstantUnion.h:
+        (ConstantUnion::ConstantUnion):
+        * src/compiler/DetectCallDepth.cpp: Added.
+        (DetectCallDepth::FunctionNode::FunctionNode):
+        (DetectCallDepth::FunctionNode::getName):
+        (DetectCallDepth::FunctionNode::addCallee):
+        (DetectCallDepth::FunctionNode::detectCallDepth):
+        (DetectCallDepth::FunctionNode::reset):
+        (DetectCallDepth::DetectCallDepth):
+        (DetectCallDepth::~DetectCallDepth):
+        (DetectCallDepth::visitAggregate):
+        (DetectCallDepth::checkExceedsMaxDepth):
+        (DetectCallDepth::resetFunctionNodes):
+        (DetectCallDepth::detectCallDepthForFunction):
+        (DetectCallDepth::detectCallDepth):
+        (DetectCallDepth::findFunctionByName):
+        * src/compiler/DetectCallDepth.h: Added.
+        (DetectCallDepth::getInfoSink):
+        * src/compiler/DetectRecursion.cpp: Removed.
+        * src/compiler/DetectRecursion.h: Removed.
+        * src/compiler/Diagnostics.cpp:
+        (TDiagnostics::writeInfo):
+        * src/compiler/ForLoopUnroll.cpp:
+        (ForLoopUnroll::evaluateIntConstant):
+        * src/compiler/InfoSink.cpp:
+        (TInfoSinkBase::prefix):
+        (TInfoSinkBase::location):
+        (TInfoSinkBase::message):
+        * src/compiler/InfoSink.h:
+        * src/compiler/Initialize.cpp:
+        (InsertBuiltInFunctions):
+        (IdentifyBuiltIns):
+        (InitExtensionBehavior):
+        * src/compiler/Initialize.h:
+        * src/compiler/Intermediate.cpp:
+        (TIntermediate::addSymbol):
+        (TIntermediate::addBinaryMath):
+        (TIntermediate::addAssign):
+        (TIntermediate::addIndex):
+        (TIntermediate::addUnaryMath):
+        (TIntermediate::setAggregateOperator):
+        (TIntermediate::addConversion):
+        (TIntermediate::growAggregate):
+        (TIntermediate::makeAggregate):
+        (TIntermediate::addSelection):
+        (TIntermediate::addComma):
+        (TIntermediate::addConstantUnion):
+        (TIntermediate::addSwizzle):
+        (TIntermediate::addLoop):
+        (TIntermediate::addBranch):
+        (TIntermUnary::promote):
+        (TIntermBinary::promote):
+        (CompareStruct):
+        (CompareStructure):
+        (TIntermConstantUnion::fold): Added implied static_casts to fix compiling errors on Mac.
+        (TIntermediate::promoteConstantUnion):
+        * src/compiler/OutputGLSL.cpp:
+        (TOutputGLSL::visitSymbol):
+        * src/compiler/OutputGLSL.h:
+        * src/compiler/OutputGLSLBase.cpp:
+        (TOutputGLSLBase::writeVariableType):
+        (TOutputGLSLBase::writeConstantUnion):
+        (TOutputGLSLBase::visitBinary):
+        (TOutputGLSLBase::visitAggregate):
+        (TOutputGLSLBase::getTypeName):
+        (TOutputGLSLBase::structDeclared):
+        (TOutputGLSLBase::declareStruct):
+        * src/compiler/OutputGLSLBase.h:
+        * src/compiler/OutputHLSL.cpp:
+        (sh::OutputHLSL::OutputHLSL):
+        (sh::OutputHLSL::getUniforms):
+        (sh::OutputHLSL::header):
+        (sh::OutputHLSL::visitSymbol):
+        (sh::OutputHLSL::visitBinary):
+        (sh::OutputHLSL::visitAggregate):
+        (sh::OutputHLSL::visitSelection):
+        (sh::OutputHLSL::visitLoop):
+        (sh::OutputHLSL::handleExcessiveLoop):
+        (sh::OutputHLSL::argumentString):
+        (sh::OutputHLSL::typeString):
+        (sh::OutputHLSL::textureString):
+        (sh::OutputHLSL::initializer):
+        (sh::OutputHLSL::addConstructor):
+        (sh::OutputHLSL::writeConstantUnion):
+        (sh::OutputHLSL::decorateUniform):
+        (sh::OutputHLSL::decorateField):
+        (sh::OutputHLSL::registerString):
+        (sh::OutputHLSL::samplerRegister):
+        (sh::OutputHLSL::uniformRegister):
+        (sh::OutputHLSL::declareUniform):
+        (sh::OutputHLSL::glVariableType):
+        (sh::OutputHLSL::glVariablePrecision):
+        * src/compiler/OutputHLSL.h:
+        * src/compiler/ParseHelper.cpp:
+        (TParseContext::parseVectorFields):
+        (TParseContext::parseMatrixFields):
+        (TParseContext::error):
+        (TParseContext::warning):
+        (TParseContext::assignError):
+        (TParseContext::unaryOpError):
+        (TParseContext::binaryOpError):
+        (TParseContext::precisionErrorCheck):
+        (TParseContext::lValueErrorCheck):
+        (TParseContext::globalErrorCheck):
+        (TParseContext::reservedErrorCheck):
+        (TParseContext::constructorErrorCheck):
+        (TParseContext::voidErrorCheck):
+        (TParseContext::boolErrorCheck):
+        (TParseContext::samplerErrorCheck):
+        (TParseContext::structQualifierErrorCheck):
+        (TParseContext::parameterSamplerErrorCheck):
+        (TParseContext::containsSampler):
+        (TParseContext::arraySizeErrorCheck):
+        (TParseContext::arrayQualifierErrorCheck):
+        (TParseContext::arrayTypeErrorCheck):
+        (TParseContext::arrayErrorCheck):
+        (TParseContext::nonInitConstErrorCheck):
+        (TParseContext::nonInitErrorCheck):
+        (TParseContext::paramErrorCheck):
+        (TParseContext::extensionErrorCheck):
+        (TParseContext::isExtensionEnabled):
+        Replaced auto with std::map<std::string, TBehavior>::const_iterator to fix Qt and EFL compiling errors.
+        (TParseContext::findFunction):
+        (TParseContext::executeInitializer):
+        (TParseContext::addConstructor):
+        (TParseContext::constructBuiltIn):
+        (TParseContext::constructStruct):
+        (TParseContext::addConstVectorNode):
+        (TParseContext::addConstMatrixNode):
+        (TParseContext::addConstArrayNode):
+        (TParseContext::addConstStruct):
+        (TParseContext::enterStructDeclaration):
+        (TParseContext::structNestingErrorCheck):
+        (TParseContext::addIndexExpression):
+        * src/compiler/ParseHelper.h:
+        (TParseContext::TParseContext):
+        (TParseContext::pragma):
+        * src/compiler/PoolAlloc.cpp:
+        (TPoolAllocator::allocate):
+        * src/compiler/ShHandle.h:
+        (TShHandleBase::getAsTranslatorHLSL):
+        * src/compiler/ShaderLang.cpp:
+        (ShInitBuiltInResources):
+        (ShGetInfoPointer):
+        * src/compiler/SymbolTable.cpp:
+        (TType::TType):
+        (TType::buildMangledName):
+        (TType::getObjectSize):
+        (TStructure::containsArrays):
+        (TStructure::buildMangledName):
+        (TStructure::calculateObjectSize):
+        (TStructure::calculateDeepestNesting):
+        (TSymbolTableLevel::relateToExtension):
+        * src/compiler/SymbolTable.h:
+        (TSymbol::relateToExtension):
+        (TSymbol::getExtension):
+        (TVariable::TVariable):
+        (TVariable::setQualifier):
+        (TVariable::shareConstPointer):
+        (TSymbolTableLevel::insert):
+        (TSymbolTable::insertConstInt):
+        (TSymbolTable::insertBuiltIn):
+        * src/compiler/TranslatorHLSL.cpp:
+        (TranslatorHLSL::TranslatorHLSL):
+        (TranslatorHLSL::translate):
+        * src/compiler/TranslatorHLSL.h:
+        (TranslatorHLSL::getAsTranslatorHLSL):
+        (TranslatorHLSL::getUniforms):
+        * src/compiler/Types.h: Removed enum bit fields to fix gcc compiler errors.
+        (TField::TField):
+        (TField::type):
+        (TField::name):
+        (NewPoolTFieldList):
+        (TStructure::TStructure):
+        (TStructure::name):
+        (TStructure::fields):
+        (TStructure::mangledName):
+        (TStructure::objectSize):
+        (TStructure::deepestNesting):
+        (TType::TType):
+        (TType::elementRegisterCount):
+        (TType::totalRegisterCount):
+        (TType::clearArrayness):
+        (TType::getStruct):
+        (TType::setStruct):
+        (TType::getMangledName):
+        (TType::getDeepestStructNesting):
+        (TType::isStructureContainingArrays):
+        (TPublicType::setBasic):
+        * src/compiler/Uniform.cpp: Added.
+        (sh::Uniform::Uniform):
+        * src/compiler/Uniform.h: Added.
+        * src/compiler/VariableInfo.cpp:
+        (getUserDefinedVariableInfo):
+        * src/compiler/glslang.l:
+        * src/compiler/glslang.y: Moved YYLTYPE definition into %union to work with Bison 2.3.
+        * src/compiler/glslang_lex.cpp:
+        (yy_get_previous_state):
+        (yy_try_NUL_trans):
+        (yyget_lloc):
+        (yyset_lloc):
+        (string_input):
+        (check_type):
+        (reserved_word):
+        (glslang_scan):
+        * src/compiler/glslang_tab.cpp:
+        (yyerror):
+        * src/compiler/glslang_tab.h:
+        * src/compiler/intermOut.cpp:
+        (TOutputTraverser::visitUnary):
+        (TOutputTraverser::visitAggregate):
+        (TOutputTraverser::visitConstantUnion):
+        * src/compiler/intermediate.h:
+        (TIntermNode::TIntermNode):
+        (TIntermNode::~TIntermNode):
+        (TIntermNode::getLine):
+        (TIntermNode::setLine):
+        (TIntermNode::getAsLoopNode):
+        (TIntermTyped::totalRegisterCount):
+        (TIntermTyped::elementRegisterCount):
+        (TIntermTyped::getArraySize):
+        (TIntermConstantUnion::getIConst):
+        (TIntermConstantUnion::getFConst):
+        (TIntermConstantUnion::getBConst):
+        (TIntermAggregate::TIntermAggregate):
+        (TIntermTraverser::TIntermTraverser):
+        (TIntermTraverser::getMaxDepth):
+        (TIntermTraverser::incrementDepth):
+        * src/compiler/localintermediate.h:
+        * src/compiler/parseConst.cpp:
+        (TConstTraverser::visitSymbol):
+        (TConstTraverser::visitBinary):
+        (TConstTraverser::visitUnary):
+        (TConstTraverser::visitAggregate):
+        (TConstTraverser::visitSelection):
+        (TConstTraverser::visitConstantUnion):
+        (TConstTraverser::visitLoop):
+        (TConstTraverser::visitBranch):
+        (TIntermediate::parseConstTree):
+        * src/compiler/preprocessor/64bit-tokenizer-safety.patch: Added.
+        * src/compiler/preprocessor/Tokenizer.cpp:
+        (yy_get_previous_state):
+        (yy_try_NUL_trans):
+        * src/compiler/preprocessor/Tokenizer.l:
+        * src/compiler/preprocessor/preprocessor.vcxproj: Added.
+        * src/compiler/preprocessor/preprocessor.vcxproj.filters: Added.
+        * src/compiler/timing/RestrictVertexShaderTiming.cpp:
+        (RestrictVertexShaderTiming::visitSymbol):
+        * src/compiler/translator_common.vcxproj: Added.
+        * src/compiler/translator_common.vcxproj.filters: Added.
+        * src/compiler/translator_hlsl.vcxproj: Added.
+        * src/compiler/translator_hlsl.vcxproj.filters: Added.
+        * src/libEGL/Config.cpp: Added.
+        (egl::Config::Config):
+        (egl::Config::getHandle):
+        (egl::SortConfig::SortConfig):
+        (egl::SortConfig::scanForWantedComponents):
+        (egl::SortConfig::wantedComponentsSize):
+        (egl::SortConfig::operator()):
+        (egl::ConfigSet::ConfigSet):
+        (egl::ConfigSet::add):
+        (egl::ConfigSet::size):
+        (egl::ConfigSet::getConfigs):
+        (egl::ConfigSet::get):
+        * src/libEGL/Config.h: Added.
+        * src/libEGL/Display.cpp: Added.
+        (egl::Display::getDisplay):
+        (egl::Display::Display):
+        (egl::Display::~Display):
+        (egl::Display::initialize):
+        (egl::Display::terminate):
+        (egl::Display::getConfigs):
+        (egl::Display::getConfigAttrib):
+        (egl::Display::createWindowSurface):
+        (egl::Display::createOffscreenSurface):
+        (egl::Display::createContext):
+        (egl::Display::restoreLostDevice):
+        (egl::Display::destroySurface):
+        (egl::Display::destroyContext):
+        (egl::Display::notifyDeviceLost):
+        (egl::Display::recreateSwapChains):
+        (egl::Display::isInitialized):
+        (egl::Display::isValidConfig):
+        (egl::Display::isValidContext):
+        (egl::Display::isValidSurface):
+        (egl::Display::hasExistingWindowSurface):
+        (egl::Display::initExtensionString):
+        (egl::Display::getExtensionString):
+        (egl::Display::initVendorString):
+        (egl::Display::getVendorString):
+        * src/libEGL/Display.h: Added.
+        (egl::Display::getRenderer):
+        * src/libEGL/Surface.cpp: Added.
+        (egl::Surface::Surface):
+        (egl::Surface::~Surface):
+        (egl::Surface::initialize):
+        (egl::Surface::release):
+        (egl::Surface::resetSwapChain):
+        (egl::Surface::resizeSwapChain):
+        (egl::Surface::swapRect):
+        (egl::Surface::getWindowHandle):
+        (egl::SurfaceWindowProc):
+        (egl::Surface::subclassWindow):
+        (egl::Surface::unsubclassWindow):
+        (egl::Surface::checkForOutOfDateSwapChain):
+        (egl::Surface::swap):
+        (egl::Surface::postSubBuffer):
+        (egl::Surface::getWidth):
+        (egl::Surface::getHeight):
+        (egl::Surface::isPostSubBufferSupported):
+        (egl::Surface::getSwapChain):
+        (egl::Surface::setSwapInterval):
+        (egl::Surface::getTextureFormat):
+        (egl::Surface::getTextureTarget):
+        (egl::Surface::setBoundTexture):
+        (egl::Surface::getBoundTexture):
+        (egl::Surface::getFormat):
+        * src/libEGL/Surface.h: Added.
+        * src/libEGL/libEGL.cpp: Added.
+        (validateDisplay):
+        (validateConfig):
+        (validateContext):
+        (validateSurface):
+        * src/libEGL/libEGL.def: Added.
+        * src/libEGL/libEGL.rc: Added.
+        * src/libEGL/libEGL.vcxproj: Added.
+        * src/libEGL/libEGL.vcxproj.filters: Added.
+        * src/libEGL/main.cpp: Added.
+        (DllMain):
+        (egl::setCurrentError):
+        (egl::getCurrentError):
+        (egl::setCurrentAPI):
+        (egl::getCurrentAPI):
+        (egl::setCurrentDisplay):
+        (egl::getCurrentDisplay):
+        (egl::setCurrentDrawSurface):
+        (egl::getCurrentDrawSurface):
+        (egl::setCurrentReadSurface):
+        (egl::getCurrentReadSurface):
+        (egl::error):
+        * src/libEGL/main.h: Added.
+        (egl::error):
+        (egl::success):
+        * src/libEGL/resource.h: Added.
+        * src/libGLESv2/BinaryStream.h: Added.
+        (gl::BinaryInputStream::BinaryInputStream):
+        (gl::BinaryInputStream::read):
+        (gl::BinaryInputStream::skip):
+        (gl::BinaryInputStream::offset):
+        (gl::BinaryInputStream::error):
+        (gl::BinaryInputStream::endOfStream):
+        (gl::BinaryOutputStream::BinaryOutputStream):
+        (gl::BinaryOutputStream::write):
+        (gl::BinaryOutputStream::length):
+        (gl::BinaryOutputStream::data):
+        * src/libGLESv2/Buffer.cpp: Added.
+        (gl::Buffer::Buffer):
+        (gl::Buffer::~Buffer):
+        (gl::Buffer::bufferData):
+        (gl::Buffer::bufferSubData):
+        (gl::Buffer::getStorage):
+        (gl::Buffer::size):
+        (gl::Buffer::usage):
+        (gl::Buffer::getStaticVertexBuffer):
+        (gl::Buffer::getStaticIndexBuffer):
+        (gl::Buffer::invalidateStaticData):
+        (gl::Buffer::promoteStaticUsage):
+        * src/libGLESv2/Buffer.h: Added.
+        * src/libGLESv2/Context.cpp: Added.
+        (gl::makeStaticString):
+        (gl::Context::Context):
+        (gl::Context::~Context):
+        (gl::Context::makeCurrent):
+        (gl::Context::markContextLost):
+        (gl::Context::isContextLost):
+        (gl::Context::setClearColor):
+        (gl::Context::setClearDepth):
+        (gl::Context::setClearStencil):
+        (gl::Context::setCullFace):
+        (gl::Context::isCullFaceEnabled):
+        (gl::Context::setCullMode):
+        (gl::Context::setFrontFace):
+        (gl::Context::setDepthTest):
+        (gl::Context::isDepthTestEnabled):
+        (gl::Context::setDepthFunc):
+        (gl::Context::setDepthRange):
+        (gl::Context::setBlend):
+        (gl::Context::isBlendEnabled):
+        (gl::Context::setBlendFactors):
+        (gl::Context::setBlendColor):
+        (gl::Context::setBlendEquation):
+        (gl::Context::setStencilTest):
+        (gl::Context::isStencilTestEnabled):
+        (gl::Context::setStencilParams):
+        (gl::Context::setStencilBackParams):
+        (gl::Context::setStencilWritemask):
+        (gl::Context::setStencilBackWritemask):
+        (gl::Context::setStencilOperations):
+        (gl::Context::setStencilBackOperations):
+        (gl::Context::setPolygonOffsetFill):
+        (gl::Context::isPolygonOffsetFillEnabled):
+        (gl::Context::setPolygonOffsetParams):
+        (gl::Context::setSampleAlphaToCoverage):
+        (gl::Context::isSampleAlphaToCoverageEnabled):
+        (gl::Context::setSampleCoverage):
+        (gl::Context::isSampleCoverageEnabled):
+        (gl::Context::setSampleCoverageParams):
+        (gl::Context::setScissorTest):
+        (gl::Context::isScissorTestEnabled):
+        (gl::Context::setDither):
+        (gl::Context::isDitherEnabled):
+        (gl::Context::setLineWidth):
+        (gl::Context::setGenerateMipmapHint):
+        (gl::Context::setFragmentShaderDerivativeHint):
+        (gl::Context::setViewportParams):
+        (gl::Context::setScissorParams):
+        (gl::Context::setColorMask):
+        (gl::Context::setDepthMask):
+        (gl::Context::setActiveSampler):
+        (gl::Context::getReadFramebufferHandle):
+        (gl::Context::getDrawFramebufferHandle):
+        (gl::Context::getRenderbufferHandle):
+        (gl::Context::getArrayBufferHandle):
+        (gl::Context::getActiveQuery):
+        (gl::Context::setEnableVertexAttribArray):
+        (gl::Context::getVertexAttribState):
+        (gl::Context::setVertexAttribState):
+        (gl::Context::getVertexAttribPointer):
+        (gl::Context::setPackAlignment):
+        (gl::Context::getPackAlignment):
+        (gl::Context::setUnpackAlignment):
+        (gl::Context::getUnpackAlignment):
+        (gl::Context::setPackReverseRowOrder):
+        (gl::Context::getPackReverseRowOrder):
+        (gl::Context::createBuffer):
+        (gl::Context::createProgram):
+        (gl::Context::createShader):
+        (gl::Context::createTexture):
+        (gl::Context::createRenderbuffer):
+        (gl::Context::createFramebuffer):
+        (gl::Context::createFence):
+        (gl::Context::createQuery):
+        (gl::Context::deleteBuffer):
+        (gl::Context::deleteShader):
+        (gl::Context::deleteProgram):
+        (gl::Context::deleteTexture):
+        (gl::Context::deleteRenderbuffer):
+        (gl::Context::deleteFramebuffer):
+        (gl::Context::deleteFence):
+        (gl::Context::deleteQuery):
+        (gl::Context::getBuffer):
+        (gl::Context::getShader):
+        (gl::Context::getProgram):
+        (gl::Context::getTexture):
+        (gl::Context::getRenderbuffer):
+        (gl::Context::getReadFramebuffer):
+        (gl::Context::getDrawFramebuffer):
+        (gl::Context::bindArrayBuffer):
+        (gl::Context::bindElementArrayBuffer):
+        (gl::Context::bindTexture2D):
+        (gl::Context::bindTextureCubeMap):
+        (gl::Context::bindReadFramebuffer):
+        (gl::Context::bindDrawFramebuffer):
+        (gl::Context::bindRenderbuffer):
+        (gl::Context::useProgram):
+        (gl::Context::linkProgram):
+        (gl::Context::setProgramBinary):
+        (gl::Context::beginQuery):
+        (gl::Context::endQuery):
+        (gl::Context::setFramebufferZero):
+        (gl::Context::setRenderbufferStorage):
+        (gl::Context::getFramebuffer):
+        (gl::Context::getFence):
+        (gl::Context::getQuery):
+        (gl::Context::getArrayBuffer):
+        (gl::Context::getElementArrayBuffer):
+        (gl::Context::getCurrentProgramBinary):
+        (gl::Context::getTexture2D):
+        (gl::Context::getTextureCubeMap):
+        (gl::Context::getSamplerTexture):
+        (gl::Context::getBooleanv):
+        (gl::Context::getFloatv):
+        (gl::Context::getIntegerv):
+        (gl::Context::getQueryParameterInfo):
+        (gl::Context::applyRenderTarget):
+        (gl::Context::applyState):
+        (gl::Context::applyShaders):
+        (gl::Context::applyTextures):
+        (gl::Context::readPixels):
+        (gl::Context::clear):
+        (gl::Context::drawArrays):
+        (gl::Context::drawElements):
+        (gl::Context::sync):
+        (gl::Context::recordInvalidEnum):
+        (gl::Context::recordInvalidValue):
+        (gl::Context::recordInvalidOperation):
+        (gl::Context::recordOutOfMemory):
+        (gl::Context::recordInvalidFramebufferOperation):
+        (gl::Context::getError):
+        (gl::Context::getResetStatus):
+        (gl::Context::isResetNotificationEnabled):
+        (gl::Context::getMajorShaderModel):
+        (gl::Context::getMaximumPointSize):
+        (gl::Context::getMaximumCombinedTextureImageUnits):
+        (gl::Context::getMaxSupportedSamples):
+        (gl::Context::getMaximumRenderTargets):
+        (gl::Context::supportsEventQueries):
+        (gl::Context::supportsOcclusionQueries):
+        (gl::Context::supportsBGRATextures):
+        (gl::Context::supportsDXT1Textures):
+        (gl::Context::supportsDXT3Textures):
+        (gl::Context::supportsDXT5Textures):
+        (gl::Context::supportsFloat32Textures):
+        (gl::Context::supportsFloat32LinearFilter):
+        (gl::Context::supportsFloat32RenderableTextures):
+        (gl::Context::supportsFloat16Textures):
+        (gl::Context::supportsFloat16LinearFilter):
+        (gl::Context::supportsFloat16RenderableTextures):
+        (gl::Context::getMaximumRenderbufferDimension):
+        (gl::Context::getMaximumTextureDimension):
+        (gl::Context::getMaximumCubeTextureDimension):
+        (gl::Context::getMaximumTextureLevel):
+        (gl::Context::supportsLuminanceTextures):
+        (gl::Context::supportsLuminanceAlphaTextures):
+        (gl::Context::supportsDepthTextures):
+        (gl::Context::supports32bitIndices):
+        (gl::Context::supportsNonPower2Texture):
+        (gl::Context::supportsInstancing):
+        (gl::Context::supportsTextureFilterAnisotropy):
+        (gl::Context::getTextureMaxAnisotropy):
+        (gl::Context::getCurrentReadFormatType):
+        (gl::Context::detachBuffer):
+        (gl::Context::detachTexture):
+        (gl::Context::detachFramebuffer):
+        (gl::Context::detachRenderbuffer):
+        (gl::Context::getIncompleteTexture):
+        (gl::Context::skipDraw):
+        (gl::Context::setVertexAttrib):
+        (gl::Context::setVertexAttribDivisor):
+        (gl::Context::initExtensionString):
+        (gl::Context::getExtensionString):
+        (gl::Context::initRendererString):
+        (gl::Context::getRendererString):
+        (gl::Context::blitFramebuffer):
+        * src/libGLESv2/Context.h: Added.
+        (gl::VertexAttribute::VertexAttribute):
+        (gl::VertexAttribute::typeSize):
+        (gl::VertexAttribute::stride):
+        * src/libGLESv2/Fence.cpp: Added.
+        (gl::Fence::Fence):
+        (gl::Fence::~Fence):
+        (gl::Fence::isFence):
+        (gl::Fence::setFence):
+        (gl::Fence::testFence):
+        (gl::Fence::finishFence):
+        (gl::Fence::getFenceiv):
+        * src/libGLESv2/Fence.h: Added.
+        * src/libGLESv2/Float16ToFloat32.cpp: Added.
+        (gl::float16ToFloat32):
+        * src/libGLESv2/Float16ToFloat32.py: Added.
+        (convertMantissa):
+        (convertExponent):
+        (convertOffset):
+        * src/libGLESv2/Framebuffer.cpp: Added.
+        (gl::Framebuffer::Framebuffer):
+        (gl::Framebuffer::~Framebuffer):
+        (gl::Framebuffer::lookupRenderbuffer):
+        (gl::Framebuffer::setColorbuffer):
+        (gl::Framebuffer::setDepthbuffer):
+        (gl::Framebuffer::setStencilbuffer):
+        (gl::Framebuffer::detachTexture):
+        (gl::Framebuffer::detachRenderbuffer):
+        (gl::Framebuffer::getRenderTargetSerial):
+        (gl::Framebuffer::getDepthbufferSerial):
+        (gl::Framebuffer::getStencilbufferSerial):
+        (gl::Framebuffer::getColorbuffer):
+        (gl::Framebuffer::getDepthbuffer):
+        (gl::Framebuffer::getStencilbuffer):
+        (gl::Framebuffer::getDepthOrStencilbuffer):
+        (gl::Framebuffer::getReadColorbuffer):
+        (gl::Framebuffer::getReadColorbufferType):
+        (gl::Framebuffer::getFirstColorbuffer):
+        (gl::Framebuffer::getColorbufferType):
+        (gl::Framebuffer::getDepthbufferType):
+        (gl::Framebuffer::getStencilbufferType):
+        (gl::Framebuffer::getColorbufferHandle):
+        (gl::Framebuffer::getDepthbufferHandle):
+        (gl::Framebuffer::getStencilbufferHandle):
+        (gl::Framebuffer::getDrawBufferState):
+        (gl::Framebuffer::setDrawBufferState):
+        (gl::Framebuffer::isEnabledColorAttachment):
+        (gl::Framebuffer::hasEnabledColorAttachment):
+        (gl::Framebuffer::hasStencil):
+        (gl::Framebuffer::usingExtendedDrawBuffers):
+        (gl::Framebuffer::completeness):
+        (gl::DefaultFramebuffer::DefaultFramebuffer):
+        (gl::Framebuffer::getSamples):
+        (gl::DefaultFramebuffer::completeness):
+        * src/libGLESv2/Framebuffer.h: Added.
+        * src/libGLESv2/HandleAllocator.cpp: Added.
+        (gl::HandleAllocator::HandleAllocator):
+        (gl::HandleAllocator::~HandleAllocator):
+        (gl::HandleAllocator::setBaseHandle):
+        (gl::HandleAllocator::allocate):
+        (gl::HandleAllocator::release):
+        * src/libGLESv2/HandleAllocator.h: Added.
+        * src/libGLESv2/Program.cpp: Added.
+        (gl::AttributeBindings::AttributeBindings):
+        (gl::AttributeBindings::~AttributeBindings):
+        (gl::InfoLog::InfoLog):
+        (gl::InfoLog::~InfoLog):
+        (gl::InfoLog::getLength):
+        (gl::InfoLog::getLog):
+        (gl::InfoLog::appendSanitized):
+        (gl::InfoLog::append):
+        (gl::InfoLog::reset):
+        (gl::Program::Program):
+        (gl::Program::~Program):
+        (gl::Program::attachShader):
+        (gl::Program::detachShader):
+        (gl::Program::getAttachedShadersCount):
+        (gl::AttributeBindings::bindAttributeLocation):
+        (gl::Program::bindAttributeLocation):
+        (gl::Program::link):
+        (gl::AttributeBindings::getAttributeBinding):
+        (gl::Program::unlink):
+        (gl::Program::isLinked):
+        (gl::Program::getProgramBinary):
+        (gl::Program::setProgramBinary):
+        (gl::Program::release):
+        (gl::Program::addRef):
+        (gl::Program::getRefCount):
+        (gl::Program::getProgramBinaryLength):
+        (gl::Program::getInfoLogLength):
+        (gl::Program::getInfoLog):
+        (gl::Program::getAttachedShaders):
+        (gl::Program::getActiveAttribute):
+        (gl::Program::getActiveAttributeCount):
+        (gl::Program::getActiveAttributeMaxLength):
+        (gl::Program::getActiveUniform):
+        (gl::Program::getActiveUniformCount):
+        (gl::Program::getActiveUniformMaxLength):
+        (gl::Program::flagForDeletion):
+        (gl::Program::isFlaggedForDeletion):
+        (gl::Program::validate):
+        (gl::Program::isValidated):
+        * src/libGLESv2/Program.h: Added.
+        * src/libGLESv2/ProgramBinary.cpp: Added.
+        (gl::str):
+        (gl::UniformLocation::UniformLocation):
+        (gl::ProgramBinary::ProgramBinary):
+        (gl::ProgramBinary::~ProgramBinary):
+        (gl::ProgramBinary::getSerial):
+        (gl::ProgramBinary::issueSerial):
+        (gl::ProgramBinary::getPixelExecutable):
+        (gl::ProgramBinary::getVertexExecutable):
+        (gl::ProgramBinary::getGeometryExecutable):
+        (gl::ProgramBinary::getAttributeLocation):
+        (gl::ProgramBinary::getSemanticIndex):
+        (gl::ProgramBinary::getUsedSamplerRange):
+        (gl::ProgramBinary::usesPointSize):
+        (gl::ProgramBinary::usesPointSpriteEmulation):
+        (gl::ProgramBinary::usesGeometryShader):
+        (gl::ProgramBinary::getSamplerMapping):
+        (gl::ProgramBinary::getSamplerTextureType):
+        (gl::ProgramBinary::getUniformLocation):
+        (gl::ProgramBinary::setUniform1fv):
+        (gl::ProgramBinary::setUniform2fv):
+        (gl::ProgramBinary::setUniform3fv):
+        (gl::ProgramBinary::setUniform4fv):
+        (gl::transposeMatrix):
+        (gl::ProgramBinary::setUniformMatrix2fv):
+        (gl::ProgramBinary::setUniformMatrix3fv):
+        (gl::ProgramBinary::setUniformMatrix4fv):
+        (gl::ProgramBinary::setUniform1iv):
+        (gl::ProgramBinary::setUniform2iv):
+        (gl::ProgramBinary::setUniform3iv):
+        (gl::ProgramBinary::setUniform4iv):
+        (gl::ProgramBinary::getUniformfv):
+        (gl::ProgramBinary::getUniformiv):
+        (gl::ProgramBinary::dirtyAllUniforms):
+        (gl::ProgramBinary::applyUniforms):
+        (gl::ProgramBinary::packVaryings):
+        (gl::ProgramBinary::linkVaryings):
+        (gl::ProgramBinary::load):
+        (gl::ProgramBinary::save):
+        (gl::ProgramBinary::getLength):
+        (gl::ProgramBinary::link):
+        (gl::ProgramBinary::linkAttributes):
+        (gl::ProgramBinary::linkUniforms):
+        (gl::ProgramBinary::defineUniform):
+        (gl::ProgramBinary::generateGeometryShaderHLSL):
+        (gl::ProgramBinary::generatePointSpriteHLSL):
+        (gl::ProgramBinary::decorateAttribute):
+        (gl::ProgramBinary::isValidated):
+        (gl::ProgramBinary::getActiveAttribute):
+        (gl::ProgramBinary::getActiveAttributeCount):
+        (gl::ProgramBinary::getActiveAttributeMaxLength):
+        (gl::ProgramBinary::getActiveUniform):
+        (gl::ProgramBinary::getActiveUniformCount):
+        (gl::ProgramBinary::getActiveUniformMaxLength):
+        (gl::ProgramBinary::validate):
+        (gl::ProgramBinary::validateSamplers):
+        (gl::ProgramBinary::Sampler::Sampler):
+        (gl::AttributeSorter::AttributeSorter):
+        (gl::AttributeSorter::operator()):
+        (gl::ProgramBinary::sortAttributesByLayout):
+        * src/libGLESv2/ProgramBinary.h: Added.
+        (gl::UniformLocation::UniformLocation):
+        * src/libGLESv2/Query.cpp: Added.
+        (gl::Query::Query):
+        (gl::Query::~Query):
+        (gl::Query::begin):
+        (gl::Query::end):
+        (gl::Query::getResult):
+        (gl::Query::isResultAvailable):
+        (gl::Query::getType):
+        * src/libGLESv2/Query.h: Added.
+        * src/libGLESv2/Renderbuffer.cpp: Added.
+        (gl::RenderbufferInterface::RenderbufferInterface):
+        (gl::RenderbufferInterface::addProxyRef):
+        (gl::RenderbufferInterface::releaseProxy):
+        (gl::RenderbufferInterface::getRedSize):
+        (gl::RenderbufferInterface::getGreenSize):
+        (gl::RenderbufferInterface::getBlueSize):
+        (gl::RenderbufferInterface::getAlphaSize):
+        (gl::RenderbufferInterface::getDepthSize):
+        (gl::RenderbufferInterface::getStencilSize):
+        (gl::RenderbufferTexture2D::RenderbufferTexture2D):
+        (gl::RenderbufferTexture2D::~RenderbufferTexture2D):
+        (gl::RenderbufferTexture2D::addProxyRef):
+        (gl::RenderbufferTexture2D::releaseProxy):
+        (gl::RenderbufferTexture2D::getRenderTarget):
+        (gl::RenderbufferTexture2D::getDepthStencil):
+        (gl::RenderbufferTexture2D::getWidth):
+        (gl::RenderbufferTexture2D::getHeight):
+        (gl::RenderbufferTexture2D::getInternalFormat):
+        (gl::RenderbufferTexture2D::getActualFormat):
+        (gl::RenderbufferTexture2D::getSamples):
+        (gl::RenderbufferTexture2D::getSerial):
+        (gl::RenderbufferTextureCubeMap::RenderbufferTextureCubeMap):
+        (gl::RenderbufferTextureCubeMap::~RenderbufferTextureCubeMap):
+        (gl::RenderbufferTextureCubeMap::addProxyRef):
+        (gl::RenderbufferTextureCubeMap::releaseProxy):
+        (gl::RenderbufferTextureCubeMap::getRenderTarget):
+        (gl::RenderbufferTextureCubeMap::getDepthStencil):
+        (gl::RenderbufferTextureCubeMap::getWidth):
+        (gl::RenderbufferTextureCubeMap::getHeight):
+        (gl::RenderbufferTextureCubeMap::getInternalFormat):
+        (gl::RenderbufferTextureCubeMap::getActualFormat):
+        (gl::RenderbufferTextureCubeMap::getSamples):
+        (gl::RenderbufferTextureCubeMap::getSerial):
+        (gl::Renderbuffer::Renderbuffer):
+        (gl::Renderbuffer::~Renderbuffer):
+        (gl::Renderbuffer::addRef):
+        (gl::Renderbuffer::release):
+        (gl::Renderbuffer::getRenderTarget):
+        (gl::Renderbuffer::getDepthStencil):
+        (gl::Renderbuffer::getWidth):
+        (gl::Renderbuffer::getHeight):
+        (gl::Renderbuffer::getInternalFormat):
+        (gl::Renderbuffer::getActualFormat):
+        (gl::Renderbuffer::getRedSize):
+        (gl::Renderbuffer::getGreenSize):
+        (gl::Renderbuffer::getBlueSize):
+        (gl::Renderbuffer::getAlphaSize):
+        (gl::Renderbuffer::getDepthSize):
+        (gl::Renderbuffer::getStencilSize):
+        (gl::Renderbuffer::getSamples):
+        (gl::Renderbuffer::getSerial):
+        (gl::Renderbuffer::setStorage):
+        (gl::RenderbufferStorage::RenderbufferStorage):
+        (gl::RenderbufferStorage::~RenderbufferStorage):
+        (gl::RenderbufferStorage::getRenderTarget):
+        (gl::RenderbufferStorage::getDepthStencil):
+        (gl::RenderbufferStorage::getWidth):
+        (gl::RenderbufferStorage::getHeight):
+        (gl::RenderbufferStorage::getInternalFormat):
+        (gl::RenderbufferStorage::getActualFormat):
+        (gl::RenderbufferStorage::getSamples):
+        (gl::RenderbufferStorage::getSerial):
+        (gl::RenderbufferStorage::issueSerial):
+        (gl::RenderbufferStorage::issueCubeSerials):
+        (gl::Colorbuffer::Colorbuffer):
+        (gl::Colorbuffer::~Colorbuffer):
+        (gl::Colorbuffer::getRenderTarget):
+        (gl::DepthStencilbuffer::DepthStencilbuffer):
+        (gl::DepthStencilbuffer::~DepthStencilbuffer):
+        (gl::DepthStencilbuffer::getDepthStencil):
+        (gl::Depthbuffer::Depthbuffer):
+        (gl::Depthbuffer::~Depthbuffer):
+        (gl::Stencilbuffer::Stencilbuffer):
+        (gl::Stencilbuffer::~Stencilbuffer):
+        * src/libGLESv2/Renderbuffer.h: Added.
+        (gl::RenderbufferInterface::~RenderbufferInterface):
+        * src/libGLESv2/ResourceManager.cpp: Added.
+        (gl::ResourceManager::ResourceManager):
+        (gl::ResourceManager::~ResourceManager):
+        (gl::ResourceManager::addRef):
+        (gl::ResourceManager::release):
+        (gl::ResourceManager::createBuffer):
+        (gl::ResourceManager::createShader):
+        (gl::ResourceManager::createProgram):
+        (gl::ResourceManager::createTexture):
+        (gl::ResourceManager::createRenderbuffer):
+        (gl::ResourceManager::deleteBuffer):
+        (gl::ResourceManager::deleteShader):
+        (gl::ResourceManager::deleteProgram):
+        (gl::ResourceManager::deleteTexture):
+        (gl::ResourceManager::deleteRenderbuffer):
+        (gl::ResourceManager::getBuffer):
+        (gl::ResourceManager::getShader):
+        (gl::ResourceManager::getTexture):
+        (gl::ResourceManager::getProgram):
+        (gl::ResourceManager::getRenderbuffer):
+        (gl::ResourceManager::setRenderbuffer):
+        (gl::ResourceManager::checkBufferAllocation):
+        (gl::ResourceManager::checkTextureAllocation):
+        (gl::ResourceManager::checkRenderbufferAllocation):
+        * src/libGLESv2/ResourceManager.h: Added.
+        * src/libGLESv2/Shader.cpp: Added.
+        (gl::Shader::Shader):
+        (gl::Shader::~Shader):
+        (gl::Shader::getHandle):
+        (gl::Shader::setSource):
+        (gl::Shader::getInfoLogLength):
+        (gl::Shader::getInfoLog):
+        (gl::Shader::getSourceLength):
+        (gl::Shader::getTranslatedSourceLength):
+        (gl::Shader::getSourceImpl):
+        (gl::Shader::getSource):
+        (gl::Shader::getTranslatedSource):
+        (gl::Shader::getUniforms):
+        (gl::Shader::isCompiled):
+        (gl::Shader::getHLSL):
+        (gl::Shader::addRef):
+        (gl::Shader::release):
+        (gl::Shader::getRefCount):
+        (gl::Shader::isFlaggedForDeletion):
+        (gl::Shader::flagForDeletion):
+        (gl::Shader::initializeCompiler):
+        (gl::Shader::releaseCompiler):
+        (gl::Shader::parseVaryings):
+        (gl::Shader::resetVaryingsRegisterAssignment):
+        (gl::Shader::uncompile):
+        (gl::Shader::compileToHLSL):
+        (gl::Shader::parseType):
+        (gl::Shader::compareVarying):
+        (gl::VertexShader::VertexShader):
+        (gl::VertexShader::~VertexShader):
+        (gl::VertexShader::getType):
+        (gl::VertexShader::uncompile):
+        (gl::VertexShader::compile):
+        (gl::VertexShader::getSemanticIndex):
+        (gl::VertexShader::parseAttributes):
+        (gl::FragmentShader::FragmentShader):
+        (gl::FragmentShader::~FragmentShader):
+        (gl::FragmentShader::getType):
+        (gl::FragmentShader::compile):
+        * src/libGLESv2/Shader.h: Added.
+        (gl::Varying::Varying):
+        (gl::Attribute::Attribute):
+        * src/libGLESv2/Texture.cpp: Added.
+        (gl::Texture::Texture):
+        (gl::Texture::~Texture):
+        (gl::Texture::setMinFilter):
+        (gl::Texture::setMagFilter):
+        (gl::Texture::setWrapS):
+        (gl::Texture::setWrapT):
+        (gl::Texture::setMaxAnisotropy):
+        (gl::Texture::setUsage):
+        (gl::Texture::getMinFilter):
+        (gl::Texture::getMagFilter):
+        (gl::Texture::getWrapS):
+        (gl::Texture::getWrapT):
+        (gl::Texture::getMaxAnisotropy):
+        (gl::Texture::getLodOffset):
+        (gl::Texture::getSamplerState):
+        (gl::Texture::getUsage):
+        (gl::Texture::isMipmapFiltered):
+        (gl::Texture::setImage):
+        (gl::Texture::setCompressedImage):
+        (gl::Texture::subImage):
+        (gl::Texture::subImageCompressed):
+        (gl::Texture::getNativeTexture):
+        (gl::Texture::hasDirtyImages):
+        (gl::Texture::resetDirty):
+        (gl::Texture::getTextureSerial):
+        (gl::Texture::getRenderTargetSerial):
+        (gl::Texture::isImmutable):
+        (gl::Texture::creationLevels):
+        (gl::Texture2D::Texture2D):
+        (gl::Texture2D::~Texture2D):
+        (gl::Texture2D::addProxyRef):
+        (gl::Texture2D::releaseProxy):
+        (gl::Texture2D::getTarget):
+        (gl::Texture2D::getWidth):
+        (gl::Texture2D::getHeight):
+        (gl::Texture2D::getInternalFormat):
+        (gl::Texture2D::getActualFormat):
+        (gl::Texture2D::redefineImage):
+        (gl::Texture2D::setImage):
+        (gl::Texture2D::bindTexImage):
+        (gl::Texture2D::releaseTexImage):
+        (gl::Texture2D::setCompressedImage):
+        (gl::Texture2D::commitRect):
+        (gl::Texture2D::subImage):
+        (gl::Texture2D::subImageCompressed):
+        (gl::Texture2D::copyImage):
+        (gl::Texture2D::copySubImage):
+        (gl::Texture2D::storage):
+        (gl::Texture2D::isSamplerComplete):
+        (gl::Texture2D::isMipmapComplete):
+        (gl::Texture2D::isCompressed):
+        (gl::Texture2D::isDepth):
+        (gl::Texture2D::createTexture):
+        (gl::Texture2D::updateTexture):
+        (gl::Texture2D::convertToRenderTarget):
+        (gl::Texture2D::generateMipmaps):
+        (gl::Texture2D::getRenderbuffer):
+        (gl::Texture2D::getRenderTarget):
+        (gl::Texture2D::getDepthStencil):
+        (gl::Texture2D::levelCount):
+        (gl::Texture2D::getStorage):
+        (gl::TextureCubeMap::TextureCubeMap):
+        (gl::TextureCubeMap::~TextureCubeMap):
+        (gl::TextureCubeMap::addProxyRef):
+        (gl::TextureCubeMap::releaseProxy):
+        (gl::TextureCubeMap::getTarget):
+        (gl::TextureCubeMap::getWidth):
+        (gl::TextureCubeMap::getHeight):
+        (gl::TextureCubeMap::getInternalFormat):
+        (gl::TextureCubeMap::getActualFormat):
+        (gl::TextureCubeMap::setImagePosX):
+        (gl::TextureCubeMap::setImageNegX):
+        (gl::TextureCubeMap::setImagePosY):
+        (gl::TextureCubeMap::setImageNegY):
+        (gl::TextureCubeMap::setImagePosZ):
+        (gl::TextureCubeMap::setImageNegZ):
+        (gl::TextureCubeMap::setCompressedImage):
+        (gl::TextureCubeMap::commitRect):
+        (gl::TextureCubeMap::subImage):
+        (gl::TextureCubeMap::subImageCompressed):
+        (gl::TextureCubeMap::isSamplerComplete):
+        (gl::TextureCubeMap::isCubeComplete):
+        (gl::TextureCubeMap::isMipmapCubeComplete):
+        (gl::TextureCubeMap::isCompressed):
+        (gl::TextureCubeMap::createTexture):
+        (gl::TextureCubeMap::updateTexture):
+        (gl::TextureCubeMap::convertToRenderTarget):
+        (gl::TextureCubeMap::setImage):
+        (gl::TextureCubeMap::faceIndex):
+        (gl::TextureCubeMap::redefineImage):
+        (gl::TextureCubeMap::copyImage):
+        (gl::TextureCubeMap::copySubImage):
+        (gl::TextureCubeMap::storage):
+        (gl::TextureCubeMap::generateMipmaps):
+        (gl::TextureCubeMap::getRenderbuffer):
+        (gl::TextureCubeMap::getRenderTarget):
+        (gl::TextureCubeMap::levelCount):
+        (gl::TextureCubeMap::getStorage):
+        * src/libGLESv2/Texture.h: Added.
+        * src/libGLESv2/Uniform.cpp: Added.
+        (gl::Uniform::Uniform):
+        (gl::Uniform::~Uniform):
+        (gl::Uniform::isArray):
+        (gl::Uniform::elementCount):
+        * src/libGLESv2/Uniform.h: Added.
+        * src/libGLESv2/angletypes.h: Added.
+        * src/libGLESv2/constants.h: Added.
+        * src/libGLESv2/libGLESv2.cpp: Added.
+        (validImageSize):
+        (checkTextureFormatType):
+        (validateSubImageParams2D):
+        (validateSubImageParamsCube):
+        (validReadFormatType):
+        * src/libGLESv2/libGLESv2.def: Added.
+        * src/libGLESv2/libGLESv2.rc: Added.
+        * src/libGLESv2/libGLESv2.vcxproj: Added.
+        * src/libGLESv2/libGLESv2.vcxproj.filters: Added.
+        * src/libGLESv2/main.cpp: Added.
+        (DllMain):
+        (gl::makeCurrent):
+        (gl::getContext):
+        (gl::getNonLostContext):
+        (gl::getDisplay):
+        (gl::error):
+        * src/libGLESv2/main.h: Added.
+        (gl::error):
+        * src/libGLESv2/mathutil.h: Added.
+        (gl::Vector4::Vector4):
+        (gl::isPow2):
+        (gl::log2):
+        (gl::ceilPow2):
+        (gl::clamp):
+        (gl::clamp01):
+        (gl::unorm):
+        (gl::supportsSSE2):
+        (gl::float32ToFloat16):
+        (rx::Range::Range):
+        * src/libGLESv2/precompiled.cpp: Added.
+        * src/libGLESv2/precompiled.h: Added.
+        * src/libGLESv2/renderer: Added.
+        * src/libGLESv2/renderer/Blit.cpp: Added.
+        (rx::Blit::Blit):
+        (rx::Blit::~Blit):
+        (rx::Blit::initGeometry):
+        (rx::Blit::setShader):
+        (rx::Blit::setVertexShader):
+        (rx::Blit::setPixelShader):
+        (rx::Blit::getSurfaceRect):
+        (rx::Blit::boxFilter):
+        (rx::Blit::copy):
+        (rx::Blit::formatConvert):
+        (rx::Blit::setFormatConvertShaders):
+        (rx::Blit::copySurfaceToTexture):
+        (rx::Blit::setViewport):
+        (rx::Blit::setCommonBlitState):
+        (rx::Blit::render):
+        (rx::Blit::saveState):
+        (rx::Blit::restoreState):
+        * src/libGLESv2/renderer/Blit.h: Added.
+        * src/libGLESv2/renderer/BufferStorage.cpp: Added.
+        (rx::BufferStorage::BufferStorage):
+        (rx::BufferStorage::~BufferStorage):
+        (rx::BufferStorage::getSerial):
+        (rx::BufferStorage::updateSerial):
+        (rx::BufferStorage::markBufferUsage):
+        * src/libGLESv2/renderer/BufferStorage.h: Added.
+        * src/libGLESv2/renderer/BufferStorage11.cpp: Added.
+        (rx::BufferStorage11::BufferStorage11):
+        (rx::BufferStorage11::~BufferStorage11):
+        (rx::BufferStorage11::makeBufferStorage11):
+        (rx::BufferStorage11::getData):
+        (rx::BufferStorage11::setData):
+        (rx::BufferStorage11::clear):
+        (rx::BufferStorage11::getSize):
+        (rx::BufferStorage11::supportsDirectBinding):
+        (rx::BufferStorage11::markBufferUsage):
+        (rx::BufferStorage11::getBuffer):
+        * src/libGLESv2/renderer/BufferStorage11.h: Added.
+        * src/libGLESv2/renderer/BufferStorage9.cpp: Added.
+        (rx::BufferStorage9::BufferStorage9):
+        (rx::BufferStorage9::~BufferStorage9):
+        (rx::BufferStorage9::makeBufferStorage9):
+        (rx::BufferStorage9::getData):
+        (rx::BufferStorage9::setData):
+        (rx::BufferStorage9::clear):
+        (rx::BufferStorage9::getSize):
+        (rx::BufferStorage9::supportsDirectBinding):
+        * src/libGLESv2/renderer/BufferStorage9.h: Added.
+        * src/libGLESv2/renderer/Fence11.cpp: Added.
+        (rx::Fence11::Fence11):
+        (rx::Fence11::~Fence11):
+        (rx::Fence11::isFence):
+        (rx::Fence11::setFence):
+        (rx::Fence11::testFence):
+        (rx::Fence11::finishFence):
+        (rx::Fence11::getFenceiv):
+        * src/libGLESv2/renderer/Fence11.h: Added.
+        * src/libGLESv2/renderer/Fence9.cpp: Added.
+        (rx::Fence9::Fence9):
+        (rx::Fence9::~Fence9):
+        (rx::Fence9::isFence):
+        (rx::Fence9::setFence):
+        (rx::Fence9::testFence):
+        (rx::Fence9::finishFence):
+        (rx::Fence9::getFenceiv):
+        * src/libGLESv2/renderer/Fence9.h: Added.
+        * src/libGLESv2/renderer/FenceImpl.h: Added.
+        (rx::FenceImpl::FenceImpl):
+        (rx::FenceImpl::~FenceImpl):
+        (rx::FenceImpl::setStatus):
+        (rx::FenceImpl::getStatus):
+        (rx::FenceImpl::setCondition):
+        (rx::FenceImpl::getCondition):
+        * src/libGLESv2/renderer/Image.cpp: Added.
+        (rx::Image::Image):
+        (rx::Image::loadAlphaDataToBGRA):
+        (rx::Image::loadAlphaDataToNative):
+        (rx::Image::loadAlphaFloatDataToRGBA):
+        (rx::Image::loadAlphaHalfFloatDataToRGBA):
+        (rx::Image::loadLuminanceDataToNativeOrBGRA):
+        (rx::Image::loadLuminanceFloatDataToRGBA):
+        (rx::Image::loadLuminanceFloatDataToRGB):
+        (rx::Image::loadLuminanceHalfFloatDataToRGBA):
+        (rx::Image::loadLuminanceAlphaDataToNativeOrBGRA):
+        (rx::Image::loadLuminanceAlphaFloatDataToRGBA):
+        (rx::Image::loadLuminanceAlphaHalfFloatDataToRGBA):
+        (rx::Image::loadRGBUByteDataToBGRX):
+        (rx::Image::loadRGBUByteDataToRGBA):
+        (rx::Image::loadRGB565DataToBGRA):
+        (rx::Image::loadRGB565DataToRGBA):
+        (rx::Image::loadRGBFloatDataToRGBA):
+        (rx::Image::loadRGBFloatDataToNative):
+        (rx::Image::loadRGBHalfFloatDataToRGBA):
+        (rx::Image::loadRGBAUByteDataToBGRA):
+        (rx::Image::loadRGBAUByteDataToNative):
+        (rx::Image::loadRGBA4444DataToBGRA):
+        (rx::Image::loadRGBA4444DataToRGBA):
+        (rx::Image::loadRGBA5551DataToBGRA):
+        (rx::Image::loadRGBA5551DataToRGBA):
+        (rx::Image::loadRGBAFloatDataToRGBA):
+        (rx::Image::loadRGBAHalfFloatDataToRGBA):
+        (rx::Image::loadBGRADataToBGRA):
+        * src/libGLESv2/renderer/Image.h: Added.
+        (rx::Image::~Image):
+        (rx::Image::getWidth):
+        (rx::Image::getHeight):
+        (rx::Image::getInternalFormat):
+        (rx::Image::getActualFormat):
+        (rx::Image::markDirty):
+        (rx::Image::markClean):
+        (rx::Image::setManagedSurface):
+        * src/libGLESv2/renderer/Image11.cpp: Added.
+        (rx::Image11::Image11):
+        (rx::Image11::~Image11):
+        (rx::Image11::makeImage11):
+        (rx::Image11::generateMipmap):
+        (rx::Image11::isDirty):
+        (rx::Image11::updateSurface):
+        (rx::Image11::redefine):
+        (rx::Image11::isRenderableFormat):
+        (rx::Image11::getDXGIFormat):
+        (rx::Image11::loadData):
+        (rx::Image11::loadCompressedData):
+        (rx::Image11::copy):
+        (rx::Image11::getStagingTexture):
+        (rx::Image11::getStagingSubresource):
+        (rx::Image11::createStagingTexture):
+        (rx::Image11::map):
+        (rx::Image11::unmap):
+        * src/libGLESv2/renderer/Image11.h: Added.
+        * src/libGLESv2/renderer/Image9.cpp: Added.
+        (rx::Image9::Image9):
+        (rx::Image9::~Image9):
+        (rx::Image9::generateMip):
+        (rx::Image9::makeImage9):
+        (rx::Image9::generateMipmap):
+        (rx::Image9::copyLockableSurfaces):
+        (rx::Image9::redefine):
+        (rx::Image9::createSurface):
+        (rx::Image9::lock):
+        (rx::Image9::unlock):
+        (rx::Image9::isRenderableFormat):
+        (rx::Image9::getD3DFormat):
+        (rx::Image9::getSurface):
+        (rx::Image9::setManagedSurface):
+        (rx::Image9::updateSurface):
+        (rx::Image9::loadData):
+        (rx::Image9::loadCompressedData):
+        (rx::Image9::copy):
+        * src/libGLESv2/renderer/Image9.h: Added.
+        (rx::Image9::isDirty):
+        * src/libGLESv2/renderer/ImageSSE2.cpp: Added.
+        (rx::Image::loadRGBAUByteDataToBGRASSE2):
+        (rx::Image::loadAlphaDataToBGRASSE2):
+        * src/libGLESv2/renderer/IndexBuffer.cpp: Added.
+        (rx::IndexBuffer::IndexBuffer):
+        (rx::IndexBuffer::~IndexBuffer):
+        (rx::IndexBuffer::getSerial):
+        (rx::IndexBuffer::updateSerial):
+        (rx::IndexBufferInterface::IndexBufferInterface):
+        (rx::IndexBufferInterface::~IndexBufferInterface):
+        (rx::IndexBufferInterface::getIndexType):
+        (rx::IndexBufferInterface::getBufferSize):
+        (rx::IndexBufferInterface::getSerial):
+        (rx::IndexBufferInterface::mapBuffer):
+        (rx::IndexBufferInterface::unmapBuffer):
+        (rx::IndexBufferInterface::getIndexBuffer):
+        (rx::IndexBufferInterface::getWritePosition):
+        (rx::IndexBufferInterface::setWritePosition):
+        (rx::IndexBufferInterface::discard):
+        (rx::IndexBufferInterface::setBufferSize):
+        (rx::StreamingIndexBufferInterface::StreamingIndexBufferInterface):
+        (rx::StreamingIndexBufferInterface::~StreamingIndexBufferInterface):
+        (rx::StreamingIndexBufferInterface::reserveBufferSpace):
+        (rx::StaticIndexBufferInterface::StaticIndexBufferInterface):
+        (rx::StaticIndexBufferInterface::~StaticIndexBufferInterface):
+        (rx::StaticIndexBufferInterface::reserveBufferSpace):
+        (rx::StaticIndexBufferInterface::lookupRange):
+        (rx::StaticIndexBufferInterface::addRange):
+        * src/libGLESv2/renderer/IndexBuffer.h: Added.
+        (rx::StaticIndexBufferInterface::IndexRange::operator<):
+        * src/libGLESv2/renderer/IndexBuffer11.cpp: Added.
+        (rx::IndexBuffer11::IndexBuffer11):
+        (rx::IndexBuffer11::~IndexBuffer11):
+        (rx::IndexBuffer11::initialize):
+        (rx::IndexBuffer11::makeIndexBuffer11):
+        (rx::IndexBuffer11::mapBuffer):
+        (rx::IndexBuffer11::unmapBuffer):
+        (rx::IndexBuffer11::getIndexType):
+        (rx::IndexBuffer11::getBufferSize):
+        (rx::IndexBuffer11::setSize):
+        (rx::IndexBuffer11::discard):
+        (rx::IndexBuffer11::getIndexFormat):
+        (rx::IndexBuffer11::getBuffer):
+        * src/libGLESv2/renderer/IndexBuffer11.h: Added.
+        * src/libGLESv2/renderer/IndexBuffer9.cpp: Added.
+        (rx::IndexBuffer9::IndexBuffer9):
+        (rx::IndexBuffer9::~IndexBuffer9):
+        (rx::IndexBuffer9::initialize):
+        (rx::IndexBuffer9::makeIndexBuffer9):
+        (rx::IndexBuffer9::mapBuffer):
+        (rx::IndexBuffer9::unmapBuffer):
+        (rx::IndexBuffer9::getIndexType):
+        (rx::IndexBuffer9::getBufferSize):
+        (rx::IndexBuffer9::setSize):
+        (rx::IndexBuffer9::discard):
+        (rx::IndexBuffer9::getIndexFormat):
+        (rx::IndexBuffer9::getBuffer):
+        * src/libGLESv2/renderer/IndexBuffer9.h: Added.
+        * src/libGLESv2/renderer/IndexDataManager.cpp: Added.
+        (rx::IndexDataManager::IndexDataManager):
+        (rx::IndexDataManager::~IndexDataManager):
+        (rx::indexTypeSize):
+        (rx::convertIndices):
+        (rx::computeRange):
+        (rx::IndexDataManager::prepareIndexData):
+        (rx::IndexDataManager::getCountingIndices):
+        * src/libGLESv2/renderer/IndexDataManager.h: Added.
+        * src/libGLESv2/renderer/InputLayoutCache.cpp: Added.
+        (rx::InputLayoutCache::InputLayoutCache):
+        (rx::InputLayoutCache::~InputLayoutCache):
+        (rx::InputLayoutCache::initialize):
+        (rx::InputLayoutCache::clear):
+        (rx::InputLayoutCache::applyVertexBuffers):
+        (rx::InputLayoutCache::hashInputLayout):
+        (rx::InputLayoutCache::compareInputLayouts):
+        * src/libGLESv2/renderer/InputLayoutCache.h: Added.
+        * src/libGLESv2/renderer/Query11.cpp: Added.
+        (rx::Query11::Query11):
+        (rx::Query11::~Query11):
+        (rx::Query11::begin):
+        (rx::Query11::end):
+        (rx::Query11::getResult):
+        (rx::Query11::isResultAvailable):
+        (rx::Query11::testQuery):
+        * src/libGLESv2/renderer/Query11.h: Added.
+        * src/libGLESv2/renderer/Query9.cpp: Added.
+        (rx::Query9::Query9):
+        (rx::Query9::~Query9):
+        (rx::Query9::begin):
+        (rx::Query9::end):
+        (rx::Query9::getResult):
+        (rx::Query9::isResultAvailable):
+        (rx::Query9::testQuery):
+        * src/libGLESv2/renderer/Query9.h: Added.
+        * src/libGLESv2/renderer/QueryImpl.h: Added.
+        (rx::QueryImpl::QueryImpl):
+        (rx::QueryImpl::~QueryImpl):
+        (rx::QueryImpl::getType):
+        * src/libGLESv2/renderer/RenderStateCache.cpp: Added.
+        (rx::RenderStateCache::RenderStateCache):
+        (rx::RenderStateCache::~RenderStateCache):
+        (rx::RenderStateCache::initialize):
+        (rx::RenderStateCache::clear):
+        (rx::RenderStateCache::hashBlendState):
+        (rx::RenderStateCache::compareBlendStates):
+        (rx::RenderStateCache::getBlendState):
+        (rx::RenderStateCache::hashRasterizerState):
+        (rx::RenderStateCache::compareRasterizerStates):
+        (rx::RenderStateCache::getRasterizerState):
+        (rx::RenderStateCache::hashDepthStencilState):
+        (rx::RenderStateCache::compareDepthStencilStates):
+        (rx::RenderStateCache::getDepthStencilState):
+        (rx::RenderStateCache::hashSamplerState):
+        (rx::RenderStateCache::compareSamplerStates):
+        (rx::RenderStateCache::getSamplerState):
+        * src/libGLESv2/renderer/RenderStateCache.h: Added.
+        * src/libGLESv2/renderer/RenderTarget.h: Added.
+        (rx::RenderTarget::RenderTarget):
+        (rx::RenderTarget::~RenderTarget):
+        (rx::RenderTarget::getWidth):
+        (rx::RenderTarget::getHeight):
+        (rx::RenderTarget::getInternalFormat):
+        (rx::RenderTarget::getActualFormat):
+        (rx::RenderTarget::getSamples):
+        * src/libGLESv2/renderer/RenderTarget11.cpp: Added.
+        (rx::getRTVSubresourceIndex):
+        (rx::getDSVSubresourceIndex):
+        (rx::RenderTarget11::RenderTarget11):
+        (rx::RenderTarget11::~RenderTarget11):
+        (rx::RenderTarget11::makeRenderTarget11):
+        (rx::RenderTarget11::getTexture):
+        (rx::RenderTarget11::getRenderTargetView):
+        (rx::RenderTarget11::getDepthStencilView):
+        (rx::RenderTarget11::getShaderResourceView):
+        (rx::RenderTarget11::getSubresourceIndex):
+        * src/libGLESv2/renderer/RenderTarget11.h: Added.
+        * src/libGLESv2/renderer/RenderTarget9.cpp: Added.
+        (rx::RenderTarget9::RenderTarget9):
+        (rx::RenderTarget9::~RenderTarget9):
+        (rx::RenderTarget9::makeRenderTarget9):
+        (rx::RenderTarget9::getSurface):
+        * src/libGLESv2/renderer/RenderTarget9.h: Added.
+        * src/libGLESv2/renderer/Renderer.cpp: Added.
+        (rx::Renderer::Renderer):
+        (rx::Renderer::~Renderer):
+        (rx::Renderer::initializeCompiler):
+        (rx::Renderer::compileToBinary):
+        * src/libGLESv2/renderer/Renderer.h: Added.
+        (getComparableOSVersion):
+        (rx::Renderer::getVertexTextureSupport):
+        * src/libGLESv2/renderer/Renderer11.cpp: Added.
+        (rx::Renderer11::Renderer11):
+        (rx::Renderer11::~Renderer11):
+        (rx::Renderer11::makeRenderer11):
+        (rx::Renderer11::initialize):
+        (rx::Renderer11::initializeDevice):
+        (rx::Renderer11::generateConfigs):
+        (rx::Renderer11::deleteConfigs):
+        (rx::Renderer11::sync):
+        (rx::Renderer11::createSwapChain):
+        (rx::Renderer11::setSamplerState):
+        (rx::Renderer11::setTexture):
+        (rx::Renderer11::setRasterizerState):
+        (rx::Renderer11::setBlendState):
+        (rx::Renderer11::setDepthStencilState):
+        (rx::Renderer11::setScissorRectangle):
+        (rx::Renderer11::setViewport):
+        (rx::Renderer11::applyPrimitiveType):
+        (rx::Renderer11::applyRenderTarget):
+        (rx::Renderer11::applyVertexBuffer):
+        (rx::Renderer11::applyIndexBuffer):
+        (rx::Renderer11::drawArrays):
+        (rx::Renderer11::drawElements):
+        (rx::Renderer11::drawLineLoop):
+        (rx::Renderer11::drawTriangleFan):
+        (rx::Renderer11::applyShaders):
+        (rx::Renderer11::applyUniforms):
+        (rx::Renderer11::clear):
+        (rx::Renderer11::maskedClear):
+        (rx::Renderer11::markAllStateDirty):
+        (rx::Renderer11::releaseDeviceResources):
+        (rx::Renderer11::notifyDeviceLost):
+        (rx::Renderer11::isDeviceLost):
+        (rx::Renderer11::testDeviceLost):
+        (rx::Renderer11::testDeviceResettable):
+        (rx::Renderer11::release):
+        (rx::Renderer11::resetDevice):
+        (rx::Renderer11::getAdapterVendor):
+        (rx::Renderer11::getRendererDescription):
+        (rx::Renderer11::getAdapterIdentifier):
+        (rx::Renderer11::getBGRATextureSupport):
+        (rx::Renderer11::getDXT1TextureSupport):
+        (rx::Renderer11::getDXT3TextureSupport):
+        (rx::Renderer11::getDXT5TextureSupport):
+        (rx::Renderer11::getDepthTextureSupport):
+        (rx::Renderer11::getFloat32TextureSupport):
+        (rx::Renderer11::getFloat16TextureSupport):
+        (rx::Renderer11::getLuminanceTextureSupport):
+        (rx::Renderer11::getLuminanceAlphaTextureSupport):
+        (rx::Renderer11::getTextureFilterAnisotropySupport):
+        (rx::Renderer11::getTextureMaxAnisotropy):
+        (rx::Renderer11::getEventQuerySupport):
+        (rx::Renderer11::getViewportBounds):
+        (rx::Renderer11::getMaxVertexTextureImageUnits):
+        (rx::Renderer11::getMaxCombinedTextureImageUnits):
+        (rx::Renderer11::getReservedVertexUniformVectors):
+        (rx::Renderer11::getReservedFragmentUniformVectors):
+        (rx::Renderer11::getMaxVertexUniformVectors):
+        (rx::Renderer11::getMaxFragmentUniformVectors):
+        (rx::Renderer11::getMaxVaryingVectors):
+        (rx::Renderer11::getNonPower2TextureSupport):
+        (rx::Renderer11::getOcclusionQuerySupport):
+        (rx::Renderer11::getInstancingSupport):
+        (rx::Renderer11::getShareHandleSupport):
+        (rx::Renderer11::getDerivativeInstructionSupport):
+        (rx::Renderer11::getPostSubBufferSupport):
+        (rx::Renderer11::getMajorShaderModel):
+        (rx::Renderer11::getMinorShaderModel):
+        (rx::Renderer11::getMaxPointSize):
+        (rx::Renderer11::getMaxViewportDimension):
+        (rx::Renderer11::getMaxTextureWidth):
+        (rx::Renderer11::getMaxTextureHeight):
+        (rx::Renderer11::get32BitIndexSupport):
+        (rx::Renderer11::getMinSwapInterval):
+        (rx::Renderer11::getMaxSwapInterval):
+        (rx::Renderer11::getMaxSupportedSamples):
+        (rx::Renderer11::getNearestSupportedSamples):
+        (rx::Renderer11::getMaxRenderTargets):
+        (rx::Renderer11::copyToRenderTarget):
+        (rx::Renderer11::copyImage):
+        (rx::Renderer11::copyTexture):
+        (rx::Renderer11::unapplyRenderTargets):
+        (rx::Renderer11::setOneTimeRenderTarget):
+        (rx::Renderer11::createRenderTarget):
+        (rx::Renderer11::loadExecutable):
+        (rx::Renderer11::compileToExecutable):
+        (rx::Renderer11::createVertexBuffer):
+        (rx::Renderer11::createIndexBuffer):
+        (rx::Renderer11::createBufferStorage):
+        (rx::Renderer11::createQuery):
+        (rx::Renderer11::createFence):
+        (rx::Renderer11::getRenderTargetResource):
+        (rx::Renderer11::blitRect):
+        (rx::Renderer11::readPixels):
+        (rx::Renderer11::createImage):
+        (rx::Renderer11::generateMipmap):
+        (rx::Renderer11::createTextureStorage2D):
+        (rx::Renderer11::createTextureStorageCube):
+        (rx::getFastPixelCopySize):
+        (rx::readPixelColor):
+        (rx::writePixelColor):
+        (rx::Renderer11::readTextureData):
+        (rx::Renderer11::blitRenderbufferRect):
+        (rx::Renderer11::resolveMultisampledTexture):
+        (rx::Renderer11::getLUID):
+        * src/libGLESv2/renderer/Renderer11.h: Added.
+        (rx::Renderer11::getDevice):
+        (rx::Renderer11::getDeviceContext):
+        (rx::Renderer11::getDxgiFactory):
+        * src/libGLESv2/renderer/Renderer9.cpp: Added.
+        (rx::Renderer9::Renderer9):
+        (rx::Renderer9::~Renderer9):
+        (rx::Renderer9::makeRenderer9):
+        (rx::Renderer9::initialize):
+        (rx::Renderer9::initializeDevice):
+        (rx::Renderer9::getDefaultPresentParameters):
+        (rx::Renderer9::generateConfigs):
+        (rx::Renderer9::deleteConfigs):
+        (rx::Renderer9::startScene):
+        (rx::Renderer9::endScene):
+        (rx::Renderer9::sync):
+        (rx::Renderer9::createSwapChain):
+        (rx::Renderer9::allocateEventQuery):
+        (rx::Renderer9::freeEventQuery):
+        (rx::Renderer9::createVertexShader):
+        (rx::Renderer9::createPixelShader):
+        (rx::Renderer9::createVertexBuffer):
+        (rx::Renderer9::createIndexBuffer):
+        (rx::Renderer9::createBufferStorage):
+        (rx::Renderer9::createQuery):
+        (rx::Renderer9::createFence):
+        (rx::Renderer9::setSamplerState):
+        (rx::Renderer9::setTexture):
+        (rx::Renderer9::setRasterizerState):
+        (rx::Renderer9::setBlendState):
+        (rx::Renderer9::setDepthStencilState):
+        (rx::Renderer9::setScissorRectangle):
+        (rx::Renderer9::setViewport):
+        (rx::Renderer9::applyPrimitiveType):
+        (rx::Renderer9::getNullColorbuffer):
+        (rx::Renderer9::applyRenderTarget):
+        (rx::Renderer9::applyVertexBuffer):
+        (rx::Renderer9::applyIndexBuffer):
+        (rx::Renderer9::drawArrays):
+        (rx::Renderer9::drawElements):
+        (rx::Renderer9::drawLineLoop):
+        (rx::drawPoints):
+        (rx::Renderer9::drawIndexedPoints):
+        (rx::Renderer9::applyShaders):
+        (rx::Renderer9::applyUniforms):
+        (rx::Renderer9::applyUniformnfv):
+        (rx::Renderer9::applyUniformniv):
+        (rx::Renderer9::applyUniformnbv):
+        (rx::Renderer9::clear):
+        (rx::Renderer9::markAllStateDirty):
+        (rx::Renderer9::releaseDeviceResources):
+        (rx::Renderer9::notifyDeviceLost):
+        (rx::Renderer9::isDeviceLost):
+        (rx::Renderer9::testDeviceLost):
+        (rx::Renderer9::testDeviceResettable):
+        (rx::Renderer9::resetDevice):
+        (rx::Renderer9::getAdapterVendor):
+        (rx::Renderer9::getRendererDescription):
+        (rx::Renderer9::getAdapterIdentifier):
+        (rx::Renderer9::getMultiSampleSupport):
+        (rx::Renderer9::getBGRATextureSupport):
+        (rx::Renderer9::getDXT1TextureSupport):
+        (rx::Renderer9::getDXT3TextureSupport):
+        (rx::Renderer9::getDXT5TextureSupport):
+        (rx::Renderer9::getDepthTextureSupport):
+        (rx::Renderer9::getFloat32TextureSupport):
+        (rx::Renderer9::getFloat16TextureSupport):
+        (rx::Renderer9::getLuminanceTextureSupport):
+        (rx::Renderer9::getLuminanceAlphaTextureSupport):
+        (rx::Renderer9::getTextureFilterAnisotropySupport):
+        (rx::Renderer9::getTextureMaxAnisotropy):
+        (rx::Renderer9::getEventQuerySupport):
+        (rx::Renderer9::getMaxVertexTextureImageUnits):
+        (rx::Renderer9::getMaxCombinedTextureImageUnits):
+        (rx::Renderer9::getReservedVertexUniformVectors):
+        (rx::Renderer9::getReservedFragmentUniformVectors):
+        (rx::Renderer9::getMaxVertexUniformVectors):
+        (rx::Renderer9::getMaxFragmentUniformVectors):
+        (rx::Renderer9::getMaxVaryingVectors):
+        (rx::Renderer9::getNonPower2TextureSupport):
+        (rx::Renderer9::getOcclusionQuerySupport):
+        (rx::Renderer9::getInstancingSupport):
+        (rx::Renderer9::getShareHandleSupport):
+        (rx::Renderer9::getDerivativeInstructionSupport):
+        (rx::Renderer9::getPostSubBufferSupport):
+        (rx::Renderer9::getMajorShaderModel):
+        (rx::Renderer9::getMaxPointSize):
+        (rx::Renderer9::getMaxViewportDimension):
+        (rx::Renderer9::getMaxTextureWidth):
+        (rx::Renderer9::getMaxTextureHeight):
+        (rx::Renderer9::get32BitIndexSupport):
+        (rx::Renderer9::getCapsDeclTypes):
+        (rx::Renderer9::getMinSwapInterval):
+        (rx::Renderer9::getMaxSwapInterval):
+        (rx::Renderer9::getMaxSupportedSamples):
+        (rx::Renderer9::getNearestSupportedSamples):
+        (rx::Renderer9::getMaxRenderTargets):
+        (rx::Renderer9::ConvertTextureInternalFormat):
+        (rx::Renderer9::copyToRenderTarget):
+        (rx::Renderer9::getBufferPool):
+        (rx::Renderer9::copyImage):
+        (rx::Renderer9::blitRect):
+        (rx::Renderer9::readPixels):
+        (rx::Renderer9::createRenderTarget):
+        (rx::Renderer9::loadExecutable):
+        (rx::Renderer9::compileToExecutable):
+        (rx::Renderer9::boxFilter):
+        (rx::Renderer9::getTexturePool):
+        (rx::Renderer9::createImage):
+        (rx::Renderer9::generateMipmap):
+        (rx::Renderer9::createTextureStorage2D):
+        (rx::Renderer9::createTextureStorageCube):
+        (rx::Renderer9::getLUID):
+        * src/libGLESv2/renderer/Renderer9.h: Added.
+        (rx::Renderer9::getDevice):
+        * src/libGLESv2/renderer/ShaderCache.h: Added.
+        (rx::ShaderCache::ShaderCache):
+        (rx::ShaderCache::~ShaderCache):
+        (rx::ShaderCache::initialize):
+        (rx::ShaderCache::create):
+        (rx::ShaderCache::clear):
+        (rx::ShaderCache::createShader):
+        * src/libGLESv2/renderer/ShaderExecutable.h: Added.
+        (rx::ShaderExecutable::ShaderExecutable):
+        (rx::ShaderExecutable::~ShaderExecutable):
+        (rx::ShaderExecutable::getFunction):
+        (rx::ShaderExecutable::getLength):
+        * src/libGLESv2/renderer/ShaderExecutable11.cpp: Added.
+        (rx::ShaderExecutable11::ShaderExecutable11):
+        (rx::ShaderExecutable11::~ShaderExecutable11):
+        (rx::ShaderExecutable11::makeShaderExecutable11):
+        (rx::ShaderExecutable11::getVertexShader):
+        (rx::ShaderExecutable11::getPixelShader):
+        (rx::ShaderExecutable11::getGeometryShader):
+        (rx::ShaderExecutable11::getConstantBuffer):
+        * src/libGLESv2/renderer/ShaderExecutable11.h: Added.
+        * src/libGLESv2/renderer/ShaderExecutable9.cpp: Added.
+        (rx::ShaderExecutable9::ShaderExecutable9):
+        (rx::ShaderExecutable9::~ShaderExecutable9):
+        (rx::ShaderExecutable9::makeShaderExecutable9):
+        (rx::ShaderExecutable9::getVertexShader):
+        (rx::ShaderExecutable9::getPixelShader):
+        * src/libGLESv2/renderer/ShaderExecutable9.h: Added.
+        * src/libGLESv2/renderer/SwapChain.h: Added.
+        (rx::SwapChain::SwapChain):
+        (rx::SwapChain::~SwapChain):
+        (rx::SwapChain::getShareHandle):
+        * src/libGLESv2/renderer/SwapChain11.cpp: Added.
+        (rx::SwapChain11::SwapChain11):
+        (rx::SwapChain11::~SwapChain11):
+        (rx::SwapChain11::release):
+        (rx::SwapChain11::releaseOffscreenTexture):
+        (rx::SwapChain11::resetOffscreenTexture):
+        (rx::SwapChain11::resize):
+        (rx::SwapChain11::reset):
+        (rx::SwapChain11::initPassThroughResources):
+        (rx::SwapChain11::swapRect):
+        (rx::SwapChain11::getOffscreenTexture):
+        (rx::SwapChain11::getRenderTarget):
+        (rx::SwapChain11::getRenderTargetShaderResource):
+        (rx::SwapChain11::getDepthStencil):
+        (rx::SwapChain11::getDepthStencilTexture):
+        (rx::SwapChain11::makeSwapChain11):
+        (rx::SwapChain11::recreate):
+        * src/libGLESv2/renderer/SwapChain11.h: Added.
+        (rx::SwapChain11::getWidth):
+        (rx::SwapChain11::getHeight):
+        * src/libGLESv2/renderer/SwapChain9.cpp: Added.
+        (rx::SwapChain9::SwapChain9):
+        (rx::SwapChain9::~SwapChain9):
+        (rx::SwapChain9::release):
+        (rx::convertInterval):
+        (rx::SwapChain9::resize):
+        (rx::SwapChain9::reset):
+        (rx::SwapChain9::swapRect):
+        (rx::SwapChain9::getRenderTarget):
+        (rx::SwapChain9::getDepthStencil):
+        (rx::SwapChain9::getOffscreenTexture):
+        (rx::SwapChain9::makeSwapChain9):
+        (rx::SwapChain9::recreate):
+        * src/libGLESv2/renderer/SwapChain9.h: Added.
+        * src/libGLESv2/renderer/TextureStorage.cpp: Added.
+        (rx::TextureStorageInterface::TextureStorageInterface):
+        (rx::TextureStorageInterface::~TextureStorageInterface):
+        (rx::TextureStorageInterface::isRenderTarget):
+        (rx::TextureStorageInterface::isManaged):
+        (rx::TextureStorageInterface::getTextureSerial):
+        (rx::TextureStorageInterface::issueTextureSerial):
+        (rx::TextureStorageInterface::getLodOffset):
+        (rx::TextureStorageInterface::levelCount):
+        (rx::TextureStorageInterface2D::TextureStorageInterface2D):
+        (rx::TextureStorageInterface2D::~TextureStorageInterface2D):
+        (rx::TextureStorageInterface2D::getRenderTarget):
+        (rx::TextureStorageInterface2D::generateMipmap):
+        (rx::TextureStorageInterface2D::getRenderTargetSerial):
+        (rx::TextureStorageInterfaceCube::TextureStorageInterfaceCube):
+        (rx::TextureStorageInterfaceCube::~TextureStorageInterfaceCube):
+        (rx::TextureStorageInterfaceCube::getRenderTarget):
+        (rx::TextureStorageInterfaceCube::generateMipmap):
+        (rx::TextureStorageInterfaceCube::getRenderTargetSerial):
+        * src/libGLESv2/renderer/TextureStorage.h: Added.
+        (rx::TextureStorage::TextureStorage):
+        (rx::TextureStorage::~TextureStorage):
+        (rx::TextureStorageInterface::getStorageInstance):
+        * src/libGLESv2/renderer/TextureStorage11.cpp: Added.
+        (rx::TextureStorage11::TextureStorage11):
+        (rx::TextureStorage11::~TextureStorage11):
+        (rx::TextureStorage11::makeTextureStorage11):
+        (rx::TextureStorage11::GetTextureBindFlags):
+        (rx::TextureStorage11::IsTextureFormatRenderable):
+        (rx::TextureStorage11::getBindFlags):
+        (rx::TextureStorage11::getBaseTexture):
+        (rx::TextureStorage11::getLodOffset):
+        (rx::TextureStorage11::isRenderTarget):
+        (rx::TextureStorage11::isManaged):
+        (rx::TextureStorage11::levelCount):
+        (rx::TextureStorage11::getSubresourceIndex):
+        (rx::TextureStorage11::updateSubresourceLevel):
+        (rx::TextureStorage11::generateMipmapLayer):
+        (rx::TextureStorage11_2D::TextureStorage11_2D):
+        (rx::TextureStorage11_2D::~TextureStorage11_2D):
+        (rx::TextureStorage11_2D::makeTextureStorage11_2D):
+        (rx::TextureStorage11_2D::getRenderTarget):
+        (rx::TextureStorage11_2D::getSRV):
+        (rx::TextureStorage11_2D::generateMipmap):
+        (rx::TextureStorage11_Cube::TextureStorage11_Cube):
+        (rx::TextureStorage11_Cube::~TextureStorage11_Cube):
+        (rx::TextureStorage11_Cube::makeTextureStorage11_Cube):
+        (rx::TextureStorage11_Cube::getRenderTarget):
+        (rx::TextureStorage11_Cube::getSRV):
+        (rx::TextureStorage11_Cube::generateMipmap):
+        * src/libGLESv2/renderer/TextureStorage11.h: Added.
+        (rx::TextureStorage11::getRenderTarget):
+        (rx::TextureStorage11::generateMipmap):
+        * src/libGLESv2/renderer/TextureStorage9.cpp: Added.
+        (rx::TextureStorage9::TextureStorage9):
+        (rx::TextureStorage9::~TextureStorage9):
+        (rx::TextureStorage9::makeTextureStorage9):
+        (rx::TextureStorage9::GetTextureUsage):
+        (rx::TextureStorage9::IsTextureFormatRenderable):
+        (rx::TextureStorage9::isRenderTarget):
+        (rx::TextureStorage9::isManaged):
+        (rx::TextureStorage9::getPool):
+        (rx::TextureStorage9::getUsage):
+        (rx::TextureStorage9::getLodOffset):
+        (rx::TextureStorage9::levelCount):
+        (rx::TextureStorage9_2D::TextureStorage9_2D):
+        (rx::TextureStorage9_2D::~TextureStorage9_2D):
+        (rx::TextureStorage9_2D::makeTextureStorage9_2D):
+        (rx::TextureStorage9_2D::getSurfaceLevel):
+        (rx::TextureStorage9_2D::getRenderTarget):
+        (rx::TextureStorage9_2D::generateMipmap):
+        (rx::TextureStorage9_2D::getBaseTexture):
+        (rx::TextureStorage9_2D::initializeRenderTarget):
+        (rx::TextureStorage9_Cube::TextureStorage9_Cube):
+        (rx::TextureStorage9_Cube::~TextureStorage9_Cube):
+        (rx::TextureStorage9_Cube::makeTextureStorage9_Cube):
+        (rx::TextureStorage9_Cube::getCubeMapSurface):
+        (rx::TextureStorage9_Cube::getRenderTarget):
+        (rx::TextureStorage9_Cube::generateMipmap):
+        (rx::TextureStorage9_Cube::getBaseTexture):
+        (rx::TextureStorage9_Cube::initializeRenderTarget):
+        * src/libGLESv2/renderer/TextureStorage9.h: Added.
+        (rx::TextureStorage9::getRenderTarget):
+        (rx::TextureStorage9::generateMipmap):
+        * src/libGLESv2/renderer/VertexBuffer.cpp: Added.
+        (rx::VertexBuffer::VertexBuffer):
+        (rx::VertexBuffer::~VertexBuffer):
+        (rx::VertexBuffer::updateSerial):
+        (rx::VertexBuffer::getSerial):
+        (rx::VertexBufferInterface::VertexBufferInterface):
+        (rx::VertexBufferInterface::~VertexBufferInterface):
+        (rx::VertexBufferInterface::getSerial):
+        (rx::VertexBufferInterface::getBufferSize):
+        (rx::VertexBufferInterface::setBufferSize):
+        (rx::VertexBufferInterface::getWritePosition):
+        (rx::VertexBufferInterface::setWritePosition):
+        (rx::VertexBufferInterface::discard):
+        (rx::VertexBufferInterface::storeVertexAttributes):
+        (rx::VertexBufferInterface::storeRawData):
+        (rx::VertexBufferInterface::reserveVertexSpace):
+        (rx::VertexBufferInterface::reserveRawDataSpace):
+        (rx::VertexBufferInterface::getVertexBuffer):
+        (rx::StreamingVertexBufferInterface::StreamingVertexBufferInterface):
+        (rx::StreamingVertexBufferInterface::~StreamingVertexBufferInterface):
+        (rx::StreamingVertexBufferInterface::reserveSpace):
+        (rx::StaticVertexBufferInterface::StaticVertexBufferInterface):
+        (rx::StaticVertexBufferInterface::~StaticVertexBufferInterface):
+        (rx::StaticVertexBufferInterface::lookupAttribute):
+        (rx::StaticVertexBufferInterface::reserveSpace):
+        (rx::StaticVertexBufferInterface::storeVertexAttributes):
+        * src/libGLESv2/renderer/VertexBuffer.h: Added.
+        * src/libGLESv2/renderer/VertexBuffer11.cpp: Added.
+        (rx::VertexBuffer11::VertexBuffer11):
+        (rx::VertexBuffer11::~VertexBuffer11):
+        (rx::VertexBuffer11::initialize):
+        (rx::VertexBuffer11::makeVertexBuffer11):
+        (rx::VertexBuffer11::storeVertexAttributes):
+        (rx::VertexBuffer11::storeRawData):
+        (rx::VertexBuffer11::getSpaceRequired):
+        (rx::VertexBuffer11::requiresConversion):
+        (rx::VertexBuffer11::getBufferSize):
+        (rx::VertexBuffer11::setBufferSize):
+        (rx::VertexBuffer11::discard):
+        (rx::VertexBuffer11::getVertexSize):
+        (rx::VertexBuffer11::getDXGIFormat):
+        (rx::VertexBuffer11::getBuffer):
+        (rx::copyVertexData):
+        (rx::copyFixedVertexData):
+        (rx::copyToFloatVertexData):
+        (rx::VertexBuffer11::getVertexConversion):
+        * src/libGLESv2/renderer/VertexBuffer11.h: Added.
+        * src/libGLESv2/renderer/VertexBuffer9.cpp: Added.
+        (rx::VertexBuffer9::VertexBuffer9):
+        (rx::VertexBuffer9::~VertexBuffer9):
+        (rx::VertexBuffer9::initialize):
+        (rx::VertexBuffer9::makeVertexBuffer9):
+        (rx::VertexBuffer9::storeVertexAttributes):
+        (rx::VertexBuffer9::storeRawData):
+        (rx::VertexBuffer9::getSpaceRequired):
+        (rx::VertexBuffer9::requiresConversion):
+        (rx::VertexBuffer9::getVertexSize):
+        (rx::VertexBuffer9::getDeclType):
+        (rx::VertexBuffer9::getBufferSize):
+        (rx::VertexBuffer9::setBufferSize):
+        (rx::VertexBuffer9::discard):
+        (rx::VertexBuffer9::getBuffer):
+        (rx::VertexBuffer9::initializeTranslations):
+        (rx::VertexBuffer9::typeIndex):
+        (rx::VertexBuffer9::formatConverter):
+        (rx::VertexBuffer9::spaceRequired):
+        * src/libGLESv2/renderer/VertexBuffer9.h: Added.
+        * src/libGLESv2/renderer/VertexDataManager.cpp: Added.
+        (rx::elementsInBuffer):
+        (rx::VertexDataManager::VertexDataManager):
+        (rx::VertexDataManager::~VertexDataManager):
+        (rx::directStoragePossible):
+        (rx::VertexDataManager::prepareVertexData):
+        * src/libGLESv2/renderer/VertexDataManager.h: Added.
+        * src/libGLESv2/renderer/VertexDeclarationCache.cpp: Added.
+        (rx::VertexDeclarationCache::VertexDeclarationCache):
+        (rx::VertexDeclarationCache::~VertexDeclarationCache):
+        (rx::VertexDeclarationCache::applyDeclaration):
+        (rx::VertexDeclarationCache::markStateDirty):
+        * src/libGLESv2/renderer/VertexDeclarationCache.h: Added.
+        * src/libGLESv2/renderer/generatemip.h: Added.
+        (rx::L8::average):
+        (rx::A8L8::average):
+        (rx::A8R8G8B8::average):
+        (rx::A16B16G16R16F::average):
+        (rx::R16F::average):
+        (rx::R16G16F::average):
+        (rx::A32B32G32R32F::average):
+        (rx::R32F::average):
+        (rx::R32G32F::average):
+        (rx::R32G32B32F::average):
+        (rx::GenerateMip):
+        * src/libGLESv2/renderer/renderer11_utils.cpp: Added.
+        (gl_d3d11::ConvertBlendFunc):
+        (gl_d3d11::ConvertBlendOp):
+        (gl_d3d11::ConvertColorMask):
+        (gl_d3d11::ConvertCullMode):
+        (gl_d3d11::ConvertComparison):
+        (gl_d3d11::ConvertDepthMask):
+        (gl_d3d11::ConvertStencilMask):
+        (gl_d3d11::ConvertStencilOp):
+        (gl_d3d11::ConvertFilter):
+        (gl_d3d11::ConvertTextureWrap):
+        (gl_d3d11::ConvertMinLOD):
+        (gl_d3d11::ConvertMaxLOD):
+        (d3d11_gl::ConvertBackBufferFormat):
+        (d3d11_gl::ConvertDepthStencilFormat):
+        (d3d11_gl::ConvertRenderbufferFormat):
+        (d3d11_gl::ConvertTextureInternalFormat):
+        (gl_d3d11::ConvertRenderbufferFormat):
+        (gl_d3d11::ConvertTextureFormat):
+        (d3d11::SetPositionTexCoordVertex):
+        (d3d11::SetPositionDepthColorVertex):
+        (d3d11::ComputePixelSizeBits):
+        (d3d11::ComputeBlockSizeBits):
+        (d3d11::IsCompressed):
+        (d3d11::GetTextureFormatDimensionAlignment):
+        (d3d11::IsDepthStencilFormat):
+        (d3d11::GetDepthTextureFormat):
+        (d3d11::GetDepthShaderResourceFormat):
+        (d3d11::SetDebugName):
+        * src/libGLESv2/renderer/renderer11_utils.h: Added.
+        (d3d11::isDeviceLostError):
+        * src/libGLESv2/renderer/renderer9_utils.cpp: Added.
+        (gl_d3d9::ConvertComparison):
+        (gl_d3d9::ConvertColor):
+        (gl_d3d9::ConvertBlendFunc):
+        (gl_d3d9::ConvertBlendOp):
+        (gl_d3d9::ConvertStencilOp):
+        (gl_d3d9::ConvertTextureWrap):
+        (gl_d3d9::ConvertCullMode):
+        (gl_d3d9::ConvertCubeFace):
+        (gl_d3d9::ConvertColorMask):
+        (gl_d3d9::ConvertMagFilter):
+        (gl_d3d9::ConvertMinFilter):
+        (gl_d3d9::ConvertRenderbufferFormat):
+        (gl_d3d9::GetMultisampleTypeFromSamples):
+        (d3d9_gl::GetStencilSize):
+        (d3d9_gl::GetAlphaSize):
+        (d3d9_gl::GetSamplesFromMultisampleType):
+        (d3d9_gl::IsFormatChannelEquivalent):
+        (d3d9_gl::ConvertBackBufferFormat):
+        (d3d9_gl::ConvertDepthStencilFormat):
+        (d3d9_gl::ConvertRenderTargetFormat):
+        (d3d9_gl::GetEquivalentFormat):
+        (d3d9::IsCompressedFormat):
+        (d3d9::ComputeRowSize):
+        * src/libGLESv2/renderer/renderer9_utils.h: Added.
+        (d3d9::isDeviceLostError):
+        * src/libGLESv2/renderer/shaders: Added.
+        * src/libGLESv2/renderer/shaders/Blit.ps: Added.
+        * src/libGLESv2/renderer/shaders/Blit.vs: Added.
+        * src/libGLESv2/renderer/shaders/Clear11.hlsl: Added.
+        * src/libGLESv2/renderer/shaders/Passthrough11.hlsl: Added.
+        * src/libGLESv2/renderer/shaders/compiled: Added.
+        * src/libGLESv2/renderer/shaders/compiled/clear11vs.h: Added.
+        * src/libGLESv2/renderer/shaders/compiled/clearmultiple11ps.h: Added.
+        * src/libGLESv2/renderer/shaders/compiled/clearsingle11ps.h: Added.
+        * src/libGLESv2/renderer/shaders/compiled/componentmaskps.h: Added.
+        * src/libGLESv2/renderer/shaders/compiled/flipyvs.h: Added.
+        * src/libGLESv2/renderer/shaders/compiled/luminanceps.h: Added.
+        * src/libGLESv2/renderer/shaders/compiled/passthrough11vs.h: Added.
+        * src/libGLESv2/renderer/shaders/compiled/passthroughlum11ps.h: Added.
+        * src/libGLESv2/renderer/shaders/compiled/passthroughlumalpha11ps.h: Added.
+        * src/libGLESv2/renderer/shaders/compiled/passthroughps.h: Added.
+        * src/libGLESv2/renderer/shaders/compiled/passthroughrgb11ps.h: Added.
+        * src/libGLESv2/renderer/shaders/compiled/passthroughrgba11ps.h: Added.
+        * src/libGLESv2/renderer/shaders/compiled/standardvs.h: Added.
+        * src/libGLESv2/renderer/shaders/generate_shaders.bat: Added.
+        * src/libGLESv2/renderer/vertexconversion.h: Added.
+        (rx::Identity::convert):
+        (rx::Cast::convert):
+        (rx::Normalize::convert):
+        (rx::FixedToFloat::convert):
+        (rx::SimpleDefaultValues::zero):
+        (rx::SimpleDefaultValues::one):
+        (rx::NormalizedDefaultValues::zero):
+        (rx::NormalizedDefaultValues::one):
+        (rx::VertexDataConverter::convertArray):
+        (rx::VertexDataConverter::pointerAddBytes):
+        (rx::VertexDataConverter::copyComponent):
+        * src/libGLESv2/resource.h: Added.
+        * src/libGLESv2/utilities.cpp: Added.
+        (gl::UniformComponentCount):
+        (gl::UniformComponentType):
+        (gl::UniformComponentSize):
+        (gl::UniformInternalSize):
+        (gl::UniformExternalSize):
+        (gl::VariableRowCount):
+        (gl::VariableColumnCount):
+        (gl::AllocateFirstFreeBits):
+        (gl::ComputePitch):
+        (gl::ComputeCompressedPitch):
+        (gl::ComputeCompressedSize):
+        (gl::IsCompressed):
+        (gl::IsDepthTexture):
+        (gl::IsStencilTexture):
+        (gl::MakeValidSize):
+        (gl::ComputePixelSize):
+        (gl::IsCubemapTextureTarget):
+        (gl::IsInternalTextureTarget):
+        (gl::ConvertSizedInternalFormat):
+        (gl::ExtractFormat):
+        (gl::ExtractType):
+        (gl::IsColorRenderable):
+        (gl::IsDepthRenderable):
+        (gl::IsStencilRenderable):
+        (gl::IsFloat32Format):
+        (gl::IsFloat16Format):
+        (gl::GetAlphaSize):
+        (gl::GetRedSize):
+        (gl::GetGreenSize):
+        (gl::GetBlueSize):
+        (gl::GetDepthSize):
+        (gl::GetStencilSize):
+        (gl::IsTriangleMode):
+        (getTempPath):
+        (writeFile):
+        * src/libGLESv2/utilities.h: Added.
+        * src/third_party/murmurhash: Added.
+        * src/third_party/murmurhash/LICENSE: Added.
+        * src/third_party/murmurhash/MurmurHash3.cpp: Added, replaced tabs with spaces.
+        (rotl32):
+        (rotl64):
+        (getblock):
+        (fmix):
+        (MurmurHash3_x86_32):
+        (MurmurHash3_x86_128):
+        (MurmurHash3_x64_128):
+        * src/third_party/murmurhash/MurmurHash3.h: Added, replaced tabs with spaces.
+
 2013-07-20  Dean Jackson  <dino@apple.com>
 
         Updated ANGLE is leaking like a sieve
diff --git a/Source/ThirdParty/ANGLE/DEPS b/Source/ThirdParty/ANGLE/DEPS
new file mode 100644 (file)
index 0000000..1e5112c
--- /dev/null
@@ -0,0 +1,18 @@
+deps = {
+  "trunk/third_party/gyp":
+      "http://gyp.googlecode.com/svn/trunk@1564",
+
+  "trunk/third_party/googletest":
+      "http://googletest.googlecode.com/svn/trunk@573", #release 1.6.0
+
+  "trunk/third_party/googlemock":
+      "http://googlemock.googlecode.com/svn/trunk@387", #release 1.6.0
+}
+
+hooks = [
+  {
+    # A change to a .gyp, .gypi, or to GYP itself should run the generator.
+    "pattern": ".",
+    "action": ["python", "trunk/build/gyp_angle"],
+  },
+]
index 978f3314d291a0c1bc6e866098cce4ce8df4afa5..600d5d7f5892552bca40ac0cb134167cc487f7ee 100644 (file)
@@ -39,10 +39,10 @@ libANGLE_la_SOURCES = \
        Source/ThirdParty/ANGLE/src/compiler/depgraph/DependencyGraphOutput.h \
        Source/ThirdParty/ANGLE/src/compiler/depgraph/DependencyGraphOutput.cpp \
        Source/ThirdParty/ANGLE/src/compiler/depgraph/DependencyGraphTraverse.cpp \
+       Source/ThirdParty/ANGLE/src/compiler/DetectCallDepth.cpp \
+       Source/ThirdParty/ANGLE/src/compiler/DetectCallDepth.h \
        Source/ThirdParty/ANGLE/src/compiler/DetectDiscontinuity.cpp \
        Source/ThirdParty/ANGLE/src/compiler/DetectDiscontinuity.h \
-       Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.cpp \
-       Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.h \
        Source/ThirdParty/ANGLE/src/compiler/Diagnostics.cpp \
        Source/ThirdParty/ANGLE/src/compiler/Diagnostics.h \
        Source/ThirdParty/ANGLE/src/compiler/DirectiveHandler.cpp \
@@ -137,6 +137,7 @@ libANGLE_la_SOURCES = \
        Source/ThirdParty/ANGLE/src/compiler/TranslatorHLSL.cpp \
        Source/ThirdParty/ANGLE/src/compiler/TranslatorHLSL.h \
        Source/ThirdParty/ANGLE/src/compiler/Types.h \
+       Source/ThirdParty/ANGLE/src/compiler/Uniform.cpp \
        Source/ThirdParty/ANGLE/src/compiler/UnfoldShortCircuit.cpp \
        Source/ThirdParty/ANGLE/src/compiler/UnfoldShortCircuit.h \
        Source/ThirdParty/ANGLE/src/compiler/util.cpp \
diff --git a/Source/ThirdParty/ANGLE/LICENSE b/Source/ThirdParty/ANGLE/LICENSE
new file mode 100644 (file)
index 0000000..bdacb32
--- /dev/null
@@ -0,0 +1,32 @@
+// Copyright (C) 2002-2013 The ANGLE Project Authors. 
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+//     Redistributions of source code must retain the above copyright
+//     notice, this list of conditions and the following disclaimer.
+//
+//     Redistributions in binary form must reproduce the above 
+//     copyright notice, this list of conditions and the following
+//     disclaimer in the documentation and/or other materials provided
+//     with the distribution.
+//
+//     Neither the name of TransGaming Inc., Google Inc., 3DLabs Inc.
+//     Ltd., nor the names of their contributors may be used to endorse
+//     or promote products derived from this software without specific
+//     prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+// LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
diff --git a/Source/ThirdParty/ANGLE/README.chromium b/Source/ThirdParty/ANGLE/README.chromium
new file mode 100644 (file)
index 0000000..b141fb5
--- /dev/null
@@ -0,0 +1,10 @@
+Name: ANGLE
+URL: https://code.google.com/p/angleproject/
+Version: 2422
+License: BSD
+License File: LICENSE
+
+Description:
+ANGLE is a conformant implementation of the OpenGL ES 2.0
+specification that is hardware‐accelerated via Direct3D.
+
index 00570877db531c9f71fc80653d9685319f3f27ce..100aa38a5049187f2a6769d76ba102fb57f16830 100644 (file)
@@ -25,8 +25,8 @@ HEADERS += \
     src/compiler/depgraph/DependencyGraph.h \
     src/compiler/depgraph/DependencyGraphBuilder.h \
     src/compiler/depgraph/DependencyGraphOutput.h \
+    src/compiler/DetectCallDepth.h \
     src/compiler/DetectDiscontinuity.h \
-    src/compiler/DetectRecursion.h \
     src/compiler/Diagnostics.h \
     src/compiler/DirectiveHandler.h \
     src/compiler/ExtensionBehavior.h \
@@ -92,8 +92,8 @@ SOURCES += \
     src/compiler/depgraph/DependencyGraphBuilder.cpp \
     src/compiler/depgraph/DependencyGraphOutput.cpp \
     src/compiler/depgraph/DependencyGraphTraverse.cpp \
+    src/compiler/DetectCallDepth.cpp \
     src/compiler/DetectDiscontinuity.cpp \
-    src/compiler/DetectRecursion.cpp \
     src/compiler/Diagnostics.cpp \
     src/compiler/DirectiveHandler.cpp \
     src/compiler/ForLoopUnroll.cpp \
diff --git a/Source/ThirdParty/ANGLE/codereview.settings b/Source/ThirdParty/ANGLE/codereview.settings
new file mode 100644 (file)
index 0000000..de224f3
--- /dev/null
@@ -0,0 +1,4 @@
+# This file is used by gcl to get repository specific information.\r
+CODE_REVIEW_SERVER: codereview.appspot.com\r
+CC_LIST: angleproject-review@googlegroups.com\r
+VIEW_VC: http://code.google.com/p/angleproject/source/detail?r=\r
index b670840d12e4ab1d7134e490cb7fbc223afe2345..c06d4c085050e6e1f388962c31507ad836e57948 100644 (file)
@@ -306,6 +306,12 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay
 #define EGL_SOFTWARE_DISPLAY_ANGLE ((EGLNativeDisplayType)-1)
 #endif
 
+#ifndef EGL_ANGLE_direct3d_display
+#define EGL_ANGLE_direct3d_display 1
+#define EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE ((EGLNativeDisplayType)-2)
+#define EGL_D3D11_ONLY_DISPLAY_ANGLE ((EGLNativeDisplayType)-3)
+#endif
+
 #ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle
 #define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
 #define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE  0x3200
index e297fbfe87ae74f24c320f6f6e479f491428cad5..bad50f9ccbb33c99fe5892c6d24a8594a90fad68 100644 (file)
@@ -556,6 +556,44 @@ typedef void* GLeglImageOES;
 #define GL_COLOR_ATTACHMENT15_NV                                0x8CEF
 #endif
 
+/* GL_EXT_draw_buffers */
+#ifndef GL_EXT_draw_buffers
+#define GL_MAX_DRAW_BUFFERS_EXT                                  0x8824
+#define GL_DRAW_BUFFER0_EXT                                      0x8825
+#define GL_DRAW_BUFFER1_EXT                                      0x8826
+#define GL_DRAW_BUFFER2_EXT                                      0x8827
+#define GL_DRAW_BUFFER3_EXT                                      0x8828
+#define GL_DRAW_BUFFER4_EXT                                      0x8829
+#define GL_DRAW_BUFFER5_EXT                                      0x882A
+#define GL_DRAW_BUFFER6_EXT                                      0x882B
+#define GL_DRAW_BUFFER7_EXT                                      0x882C
+#define GL_DRAW_BUFFER8_EXT                                      0x882D
+#define GL_DRAW_BUFFER9_EXT                                      0x882E
+#define GL_DRAW_BUFFER10_EXT                                     0x882F
+#define GL_DRAW_BUFFER11_EXT                                     0x8830
+#define GL_DRAW_BUFFER12_EXT                                     0x8831
+#define GL_DRAW_BUFFER13_EXT                                     0x8832
+#define GL_DRAW_BUFFER14_EXT                                     0x8833
+#define GL_DRAW_BUFFER15_EXT                                     0x8834
+#define GL_COLOR_ATTACHMENT0_EXT                                 0x8CE0
+#define GL_COLOR_ATTACHMENT1_EXT                                 0x8CE1
+#define GL_COLOR_ATTACHMENT2_EXT                                 0x8CE2
+#define GL_COLOR_ATTACHMENT3_EXT                                 0x8CE3
+#define GL_COLOR_ATTACHMENT4_EXT                                 0x8CE4
+#define GL_COLOR_ATTACHMENT5_EXT                                 0x8CE5
+#define GL_COLOR_ATTACHMENT6_EXT                                 0x8CE6
+#define GL_COLOR_ATTACHMENT7_EXT                                 0x8CE7
+#define GL_COLOR_ATTACHMENT8_EXT                                 0x8CE8
+#define GL_COLOR_ATTACHMENT9_EXT                                 0x8CE9
+#define GL_COLOR_ATTACHMENT10_EXT                                0x8CEA
+#define GL_COLOR_ATTACHMENT11_EXT                                0x8CEB
+#define GL_COLOR_ATTACHMENT12_EXT                                0x8CEC
+#define GL_COLOR_ATTACHMENT13_EXT                                0x8CED
+#define GL_COLOR_ATTACHMENT14_EXT                                0x8CEE
+#define GL_COLOR_ATTACHMENT15_EXT                                0x8CEF
+#define GL_MAX_COLOR_ATTACHMENTS_EXT                             0x8CDF
+#endif
+
 /* GL_NV_fbo_color_attachments */
 #ifndef GL_NV_fbo_color_attachments
 #define GL_MAX_COLOR_ATTACHMENTS_NV                             0x8CDF
@@ -1331,6 +1369,14 @@ GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
 typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
 #endif
 
+#ifndef GL_EXT_draw_buffers
+#define GL_EXT_draw_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDrawBuffersEXT (GLsizei n, const GLenum *bufs);
+#endif
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSEXTPROC) (GLsizei n, const GLenum *bufs);
+#endif
+
 /* GL_NV_fbo_color_attachments */
 #ifndef GL_NV_fbo_color_attachments
 #define GL_NV_fbo_color_attachments 1
index 103db293a68b64e18289ce565b6046f1feec2944..21e4e9dc7bcf8d31aa7c80102b6598991b8e2c2a 100644 (file)
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
@@ -78,9 +78,11 @@ typedef enum {
 } ShShaderSpec;
 
 typedef enum {
-  SH_ESSL_OUTPUT = 0x8B45,
-  SH_GLSL_OUTPUT = 0x8B46,
-  SH_HLSL_OUTPUT = 0x8B47
+  SH_ESSL_OUTPUT   = 0x8B45,
+  SH_GLSL_OUTPUT   = 0x8B46,
+  SH_HLSL_OUTPUT   = 0x8B47,
+  SH_HLSL9_OUTPUT  = 0x8B47,
+  SH_HLSL11_OUTPUT = 0x8B48
 } ShShaderOutput;
 
 typedef enum {
@@ -116,7 +118,8 @@ typedef enum {
   SH_MAPPED_NAME_MAX_LENGTH      =  0x6000,
   SH_NAME_MAX_LENGTH             =  0x6001,
   SH_HASHED_NAME_MAX_LENGTH      =  0x6002,
-  SH_HASHED_NAMES_COUNT          =  0x6003
+  SH_HASHED_NAMES_COUNT          =  0x6003,
+  SH_ACTIVE_UNIFORMS_ARRAY       =  0x6004
 } ShShaderInfo;
 
 // Compile options.
@@ -159,7 +162,13 @@ typedef enum {
   // vec234, or mat234 type. The ShArrayIndexClampingStrategy enum,
   // specified in the ShBuiltInResources when constructing the
   // compiler, selects the strategy for the clamping implementation.
-  SH_CLAMP_INDIRECT_ARRAY_BOUNDS = 0x1000
+  SH_CLAMP_INDIRECT_ARRAY_BOUNDS = 0x1000,
+
+  // This flag limits the complexity of an expression.
+  SH_LIMIT_EXPRESSION_COMPLEXITY = 0x2000,
+
+  // This flag limits the depth of the call stack.
+  SH_LIMIT_CALL_STACK_DEPTH = 0x4000,
 } ShCompileOptions;
 
 // Defines alternate strategies for implementing array index clamping.
@@ -209,6 +218,7 @@ typedef struct
     int OES_EGL_image_external;
     int ARB_texture_rectangle;
     int EXT_draw_buffers;
+    int EXT_frag_depth;
 
     // Set to 1 if highp precision is supported in the fragment language.
     // Default is 0.
@@ -222,6 +232,12 @@ typedef struct
     // Selects a strategy to use when implementing array index clamping.
     // Default is SH_CLAMP_WITH_CLAMP_INTRINSIC.
     ShArrayIndexClampingStrategy ArrayIndexClampingStrategy;
+
+    // The maximum complexity an expression can be.
+    int MaxExpressionComplexity;
+
+    // The maximum depth a call stack can be.
+    int MaxCallStackDepth;
 } ShBuiltInResources;
 
 //
@@ -248,7 +264,7 @@ typedef void* ShHandle;
 // spec: Specifies the language spec the compiler must conform to -
 //       SH_GLES2_SPEC or SH_WEBGL_SPEC.
 // output: Specifies the output code type - SH_ESSL_OUTPUT, SH_GLSL_OUTPUT,
-//         or SH_HLSL_OUTPUT.
+//         SH_HLSL9_OUTPUT or SH_HLSL11_OUTPUT.
 // resources: Specifies the built-in resources.
 COMPILER_EXPORT ShHandle ShConstructCompiler(
     ShShaderType type,
@@ -411,6 +427,18 @@ COMPILER_EXPORT void ShGetNameHashingEntry(const ShHandle handle,
                                            char* name,
                                            char* hashedName);
 
+// Returns a parameter from a compiled shader.
+// Parameters:
+// handle: Specifies the compiler
+// pname: Specifies the parameter to query.
+// The following parameters are defined:
+// SH_ACTIVE_UNIFORMS_ARRAY: an STL vector of active uniforms. Valid only for
+//                           HLSL output.
+// params: Requested parameter
+COMPILER_EXPORT void ShGetInfoPointer(const ShHandle handle,
+                                      ShShaderInfo pname,
+                                      void** params);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/Source/ThirdParty/ANGLE/src/ANGLE.sln b/Source/ThirdParty/ANGLE/src/ANGLE.sln
new file mode 100644 (file)
index 0000000..81c1382
--- /dev/null
@@ -0,0 +1,66 @@
+\r
+Microsoft Visual Studio Solution File, Format Version 11.00\r
+# Visual C++ Express 2010\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libEGL", "libEGL\libEGL.vcxproj", "{E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGLESv2", "libGLESv2\libGLESv2.vcxproj", "{B5871A7A-968C-42E3-A33B-981E6F448E78}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "translator_hlsl", "compiler\translator_hlsl.vcxproj", "{5620F0E4-6C43-49BC-A178-B804E1A0C3A7}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "translator_common", "compiler\translator_common.vcxproj", "{5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}"\r
+EndProject\r
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "preprocessor", "compiler\preprocessor\preprocessor.vcxproj", "{FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}"\r
+EndProject\r
+Global\r
+       GlobalSection(SolutionConfigurationPlatforms) = preSolution\r
+               Debug|Win32 = Debug|Win32\r
+               Debug|x64 = Debug|x64\r
+               Release|Win32 = Release|Win32\r
+               Release|x64 = Release|x64\r
+       EndGlobalSection\r
+       GlobalSection(ProjectConfigurationPlatforms) = postSolution\r
+               {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|Win32.Build.0 = Debug|Win32\r
+               {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.ActiveCfg = Debug|x64\r
+               {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Debug|x64.Build.0 = Debug|x64\r
+               {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.ActiveCfg = Release|Win32\r
+               {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|Win32.Build.0 = Release|Win32\r
+               {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.ActiveCfg = Release|x64\r
+               {E746FCA9-64C3-433E-85E8-9A5A67AB7ED6}.Release|x64.Build.0 = Release|x64\r
+               {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|Win32.Build.0 = Debug|Win32\r
+               {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.ActiveCfg = Debug|x64\r
+               {B5871A7A-968C-42E3-A33B-981E6F448E78}.Debug|x64.Build.0 = Debug|x64\r
+               {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.ActiveCfg = Release|Win32\r
+               {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|Win32.Build.0 = Release|Win32\r
+               {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.ActiveCfg = Release|x64\r
+               {B5871A7A-968C-42E3-A33B-981E6F448E78}.Release|x64.Build.0 = Release|x64\r
+               {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Debug|Win32.Build.0 = Debug|Win32\r
+               {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Debug|x64.ActiveCfg = Debug|x64\r
+               {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Debug|x64.Build.0 = Debug|x64\r
+               {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Release|Win32.ActiveCfg = Release|Win32\r
+               {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Release|Win32.Build.0 = Release|Win32\r
+               {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Release|x64.ActiveCfg = Release|x64\r
+               {5620F0E4-6C43-49BC-A178-B804E1A0C3A7}.Release|x64.Build.0 = Release|x64\r
+               {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|Win32.Build.0 = Debug|Win32\r
+               {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.ActiveCfg = Debug|x64\r
+               {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Debug|x64.Build.0 = Debug|x64\r
+               {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.ActiveCfg = Release|Win32\r
+               {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|Win32.Build.0 = Release|Win32\r
+               {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.ActiveCfg = Release|x64\r
+               {5B3A6DB8-1E7E-40D7-92B9-DA8AAE619FAD}.Release|x64.Build.0 = Release|x64\r
+               {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.ActiveCfg = Debug|Win32\r
+               {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|Win32.Build.0 = Debug|Win32\r
+               {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.ActiveCfg = Debug|x64\r
+               {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Debug|x64.Build.0 = Debug|x64\r
+               {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.ActiveCfg = Release|Win32\r
+               {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|Win32.Build.0 = Release|Win32\r
+               {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.ActiveCfg = Release|x64\r
+               {FBE32DF3-0FB0-4F2F-A424-2C21BD7BC325}.Release|x64.Build.0 = Release|x64\r
+       EndGlobalSection\r
+       GlobalSection(SolutionProperties) = preSolution\r
+               HideSolutionNode = FALSE\r
+       EndGlobalSection\r
+EndGlobal\r
diff --git a/Source/ThirdParty/ANGLE/src/build_angle.gyp b/Source/ThirdParty/ANGLE/src/build_angle.gyp
new file mode 100644 (file)
index 0000000..6adf142
--- /dev/null
@@ -0,0 +1,15 @@
+# Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+  'includes': [
+    'build_angle.gypi',
+  ],
+}
+
+# Local Variables:
+# tab-width:2
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=2 shiftwidth=2:
diff --git a/Source/ThirdParty/ANGLE/src/build_angle.gypi b/Source/ThirdParty/ANGLE/src/build_angle.gypi
new file mode 100644 (file)
index 0000000..405c671
--- /dev/null
@@ -0,0 +1,420 @@
+# Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+{
+  'variables': {
+    'angle_code': 1,
+  },
+  'target_defaults': {
+    'defines': [
+      'ANGLE_DISABLE_TRACE',
+      'ANGLE_COMPILE_OPTIMIZATION_LEVEL=D3DCOMPILE_OPTIMIZATION_LEVEL1',
+      'ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }',
+    ],
+  },
+  'targets': [
+    {
+      'target_name': 'preprocessor',
+      'type': 'static_library',
+      'include_dirs': [
+      ],
+      'sources': [
+        'compiler/preprocessor/DiagnosticsBase.cpp',
+        'compiler/preprocessor/DiagnosticsBase.h',
+        'compiler/preprocessor/DirectiveHandlerBase.cpp',
+        'compiler/preprocessor/DirectiveHandlerBase.h',
+        'compiler/preprocessor/DirectiveParser.cpp',
+        'compiler/preprocessor/DirectiveParser.h',
+        'compiler/preprocessor/ExpressionParser.cpp',
+        'compiler/preprocessor/ExpressionParser.h',
+        'compiler/preprocessor/Input.cpp',
+        'compiler/preprocessor/Input.h',
+        'compiler/preprocessor/length_limits.h',
+        'compiler/preprocessor/Lexer.cpp',
+        'compiler/preprocessor/Lexer.h',
+        'compiler/preprocessor/Macro.cpp',
+        'compiler/preprocessor/Macro.h',
+        'compiler/preprocessor/MacroExpander.cpp',
+        'compiler/preprocessor/MacroExpander.h',
+        'compiler/preprocessor/numeric_lex.h',
+        'compiler/preprocessor/pp_utils.h',
+        'compiler/preprocessor/Preprocessor.cpp',
+        'compiler/preprocessor/Preprocessor.h',
+        'compiler/preprocessor/SourceLocation.h',
+        'compiler/preprocessor/Token.cpp',
+        'compiler/preprocessor/Token.h',
+        'compiler/preprocessor/Tokenizer.cpp',
+        'compiler/preprocessor/Tokenizer.h',
+      ],
+      # TODO(jschuh): http://crbug.com/167187
+      'msvs_disabled_warnings': [
+        4267,
+      ],      
+    },
+    {
+      'target_name': 'translator_common',
+      'type': 'static_library',
+      'dependencies': ['preprocessor'],
+      'include_dirs': [
+        '.',
+        '../include',
+      ],
+      'defines': [
+        'COMPILER_IMPLEMENTATION',
+      ],
+      'sources': [
+        'compiler/BaseTypes.h',
+        'compiler/BuiltInFunctionEmulator.cpp',
+        'compiler/BuiltInFunctionEmulator.h',
+        'compiler/Common.h',
+        'compiler/Compiler.cpp',
+        'compiler/ConstantUnion.h',
+        'compiler/debug.cpp',
+        'compiler/debug.h',
+        'compiler/DetectCallDepth.cpp',
+        'compiler/DetectCallDepth.h',
+        'compiler/Diagnostics.h',
+        'compiler/Diagnostics.cpp',
+        'compiler/DirectiveHandler.h',
+        'compiler/DirectiveHandler.cpp',
+        'compiler/ExtensionBehavior.h',
+        'compiler/ForLoopUnroll.cpp',
+        'compiler/ForLoopUnroll.h',
+        'compiler/glslang.h',
+        'compiler/glslang_lex.cpp',
+        'compiler/glslang_tab.cpp',
+        'compiler/glslang_tab.h',
+        'compiler/HashNames.h',
+        'compiler/InfoSink.cpp',
+        'compiler/InfoSink.h',
+        'compiler/Initialize.cpp',
+        'compiler/Initialize.h',
+        'compiler/InitializeDll.cpp',
+        'compiler/InitializeDll.h',
+        'compiler/InitializeGlobals.h',
+        'compiler/InitializeParseContext.cpp',
+        'compiler/InitializeParseContext.h',
+        'compiler/Intermediate.cpp',
+        'compiler/intermediate.h',
+        'compiler/intermOut.cpp',
+        'compiler/IntermTraverse.cpp',
+        'compiler/localintermediate.h',
+        'compiler/MapLongVariableNames.cpp',
+        'compiler/MapLongVariableNames.h',
+        'compiler/MMap.h',
+        'compiler/osinclude.h',
+        'compiler/parseConst.cpp',
+        'compiler/ParseHelper.cpp',
+        'compiler/ParseHelper.h',
+        'compiler/PoolAlloc.cpp',
+        'compiler/PoolAlloc.h',
+        'compiler/QualifierAlive.cpp',
+        'compiler/QualifierAlive.h',
+        'compiler/RemoveTree.cpp',
+        'compiler/RemoveTree.h',
+        'compiler/RenameFunction.h',
+        'compiler/ShHandle.h',
+        'compiler/SymbolTable.cpp',
+        'compiler/SymbolTable.h',
+        'compiler/Types.h',
+        'compiler/Uniform.cpp',
+        'compiler/Uniform.h',
+        'compiler/util.cpp',
+        'compiler/util.h',
+        'compiler/ValidateLimitations.cpp',
+        'compiler/ValidateLimitations.h',
+        'compiler/VariableInfo.cpp',
+        'compiler/VariableInfo.h',
+        'compiler/VariablePacker.cpp',
+        'compiler/VariablePacker.h',
+        # Dependency graph
+        'compiler/depgraph/DependencyGraph.cpp',
+        'compiler/depgraph/DependencyGraph.h',
+        'compiler/depgraph/DependencyGraphBuilder.cpp',
+        'compiler/depgraph/DependencyGraphBuilder.h',
+        'compiler/depgraph/DependencyGraphOutput.cpp',
+        'compiler/depgraph/DependencyGraphOutput.h',
+        'compiler/depgraph/DependencyGraphTraverse.cpp',
+        # Timing restrictions
+        'compiler/timing/RestrictFragmentShaderTiming.cpp',
+        'compiler/timing/RestrictFragmentShaderTiming.h',
+        'compiler/timing/RestrictVertexShaderTiming.cpp',
+        'compiler/timing/RestrictVertexShaderTiming.h',
+        'third_party/compiler/ArrayBoundsClamper.cpp',
+        'third_party/compiler/ArrayBoundsClamper.h',
+      ],
+      'conditions': [
+        ['OS=="win"', {
+          # TODO(jschuh): http://crbug.com/167187 size_t -> int
+          'msvs_disabled_warnings': [ 4267 ],
+          'sources': ['compiler/ossource_win.cpp'],
+        }, { # else: posix
+          'sources': ['compiler/ossource_posix.cpp'],
+        }],
+      ],
+    },
+    {
+      'target_name': 'translator_glsl',
+      'type': '<(component)',
+      'dependencies': ['translator_common'],
+      'include_dirs': [
+        '.',
+        '../include',
+      ],
+      'defines': [
+        'COMPILER_IMPLEMENTATION',
+      ],
+      'sources': [
+        'compiler/CodeGenGLSL.cpp',
+        'compiler/OutputESSL.cpp',
+        'compiler/OutputESSL.h',        
+        'compiler/OutputGLSLBase.cpp',
+        'compiler/OutputGLSLBase.h',
+        'compiler/OutputGLSL.cpp',
+        'compiler/OutputGLSL.h',
+        'compiler/ShaderLang.cpp',
+        'compiler/TranslatorESSL.cpp',
+        'compiler/TranslatorESSL.h',
+        'compiler/TranslatorGLSL.cpp',
+        'compiler/TranslatorGLSL.h',
+        'compiler/VersionGLSL.cpp',
+        'compiler/VersionGLSL.h',
+      ],
+      # TODO(jschuh): http://crbug.com/167187 size_t -> int
+      'msvs_disabled_warnings': [ 4267 ],
+    },
+  ],
+  'conditions': [
+    ['OS=="win"', {
+      'targets': [
+        {
+          'target_name': 'translator_hlsl',
+          'type': '<(component)',
+          'dependencies': ['translator_common'],
+          'include_dirs': [
+            '.',
+            '../include',
+          ],
+          'defines': [
+            'COMPILER_IMPLEMENTATION',
+          ],
+          'sources': [
+            'compiler/ShaderLang.cpp',
+            'compiler/DetectDiscontinuity.cpp',
+            'compiler/DetectDiscontinuity.h',
+            'compiler/CodeGenHLSL.cpp',
+            'compiler/OutputHLSL.cpp',
+            'compiler/OutputHLSL.h',
+            'compiler/TranslatorHLSL.cpp',
+            'compiler/TranslatorHLSL.h',
+            'compiler/UnfoldShortCircuit.cpp',
+            'compiler/UnfoldShortCircuit.h',
+            'compiler/SearchSymbol.cpp',
+            'compiler/SearchSymbol.h',
+          ],
+          # TODO(jschuh): http://crbug.com/167187 size_t -> int
+          'msvs_disabled_warnings': [ 4267 ],
+        },
+        {
+          'target_name': 'libGLESv2',
+          'type': 'shared_library',
+          'dependencies': ['translator_hlsl'],
+          'include_dirs': [
+            '.',
+            '../include',
+            'libGLESv2',
+          ],
+          'sources': [
+            'third_party/murmurhash/MurmurHash3.h',
+            'third_party/murmurhash/MurmurHash3.cpp',
+            'common/angleutils.h',
+            'common/debug.cpp',
+            'common/debug.h',
+            'common/RefCountObject.cpp',
+            'common/RefCountObject.h',
+            'common/version.h',
+            'libGLESv2/precompiled.h',
+            'libGLESv2/precompiled.cpp',
+            'libGLESv2/BinaryStream.h',
+            'libGLESv2/Buffer.cpp',
+            'libGLESv2/Buffer.h',
+            'libGLESv2/constants.h',
+            'libGLESv2/Context.cpp',
+            'libGLESv2/Context.h',
+            'libGLESv2/angletypes.h',
+            'libGLESv2/Fence.cpp',
+            'libGLESv2/Fence.h',
+            'libGLESv2/Float16ToFloat32.cpp',
+            'libGLESv2/Framebuffer.cpp',
+            'libGLESv2/Framebuffer.h',
+            'libGLESv2/HandleAllocator.cpp',
+            'libGLESv2/HandleAllocator.h',
+            'libGLESv2/libGLESv2.cpp',
+            'libGLESv2/libGLESv2.def',
+            'libGLESv2/libGLESv2.rc',
+            'libGLESv2/main.cpp',
+            'libGLESv2/main.h',
+            'libGLESv2/mathutil.h',
+            'libGLESv2/Program.cpp',
+            'libGLESv2/Program.h',
+            'libGLESv2/ProgramBinary.cpp',
+            'libGLESv2/ProgramBinary.h',
+            'libGLESv2/Query.h',
+            'libGLESv2/Query.cpp',
+            'libGLESv2/Renderbuffer.cpp',
+            'libGLESv2/Renderbuffer.h',
+            'libGLESv2/renderer/Blit.cpp',
+            'libGLESv2/renderer/Blit.h',
+            'libGLESv2/renderer/BufferStorage.h',
+            'libGLESv2/renderer/BufferStorage.cpp',
+            'libGLESv2/renderer/BufferStorage9.cpp',
+            'libGLESv2/renderer/BufferStorage9.h',
+            'libGLESv2/renderer/BufferStorage11.cpp',
+            'libGLESv2/renderer/BufferStorage11.h',
+            'libGLESv2/renderer/FenceImpl.h',
+            'libGLESv2/renderer/Fence9.cpp',
+            'libGLESv2/renderer/Fence9.h',
+            'libGLESv2/renderer/Fence11.cpp',
+            'libGLESv2/renderer/Fence11.h',
+            'libGLESv2/renderer/generatemip.h',
+            'libGLESv2/renderer/Image.cpp',
+            'libGLESv2/renderer/Image.h',
+            'libGLESv2/renderer/Image11.cpp',
+            'libGLESv2/renderer/Image11.h',
+            'libGLESv2/renderer/Image9.cpp',
+            'libGLESv2/renderer/Image9.h',
+            'libGLESv2/renderer/ImageSSE2.cpp',
+            'libGLESv2/renderer/IndexBuffer.cpp',
+            'libGLESv2/renderer/IndexBuffer.h',
+            'libGLESv2/renderer/IndexBuffer9.cpp',
+            'libGLESv2/renderer/IndexBuffer9.h',
+            'libGLESv2/renderer/IndexBuffer11.cpp',
+            'libGLESv2/renderer/IndexBuffer11.h',
+            'libGLESv2/renderer/IndexDataManager.cpp',
+            'libGLESv2/renderer/IndexDataManager.h',
+            'libGLESv2/renderer/InputLayoutCache.cpp',
+            'libGLESv2/renderer/InputLayoutCache.h',
+            'libGLESv2/renderer/QueryImpl.h',
+            'libGLESv2/renderer/Query9.cpp',
+            'libGLESv2/renderer/Query9.h',
+            'libGLESv2/renderer/Query11.cpp',
+            'libGLESv2/renderer/Query11.h',
+            'libGLESv2/renderer/Renderer.cpp',
+            'libGLESv2/renderer/Renderer.h',
+            'libGLESv2/renderer/Renderer11.cpp',
+            'libGLESv2/renderer/Renderer11.h',
+            'libGLESv2/renderer/renderer11_utils.cpp',
+            'libGLESv2/renderer/renderer11_utils.h',
+            'libGLESv2/renderer/Renderer9.cpp',
+            'libGLESv2/renderer/Renderer9.h',
+            'libGLESv2/renderer/renderer9_utils.cpp',
+            'libGLESv2/renderer/renderer9_utils.h',
+            'libGLESv2/renderer/RenderStateCache.cpp',
+            'libGLESv2/renderer/RenderStateCache.h',
+            'libGLESv2/renderer/RenderTarget.h',
+            'libGLESv2/renderer/RenderTarget11.h',
+            'libGLESv2/renderer/RenderTarget11.cpp',
+            'libGLESv2/renderer/RenderTarget9.h',
+            'libGLESv2/renderer/RenderTarget9.cpp',
+            'libGLESv2/renderer/ShaderCache.h',
+            'libGLESv2/renderer/ShaderExecutable.h',
+            'libGLESv2/renderer/ShaderExecutable9.cpp',
+            'libGLESv2/renderer/ShaderExecutable9.h',
+            'libGLESv2/renderer/ShaderExecutable11.cpp',
+            'libGLESv2/renderer/ShaderExecutable11.h',
+            'libGLESv2/renderer/SwapChain.h',
+            'libGLESv2/renderer/SwapChain9.cpp',
+            'libGLESv2/renderer/SwapChain9.h',
+            'libGLESv2/renderer/SwapChain11.cpp',
+            'libGLESv2/renderer/SwapChain11.h',
+            'libGLESv2/renderer/TextureStorage.cpp',
+            'libGLESv2/renderer/TextureStorage.h',
+            'libGLESv2/renderer/TextureStorage11.cpp',
+            'libGLESv2/renderer/TextureStorage11.h',
+            'libGLESv2/renderer/TextureStorage9.cpp',
+            'libGLESv2/renderer/TextureStorage9.h',
+            'libGLESv2/renderer/VertexBuffer.cpp',
+            'libGLESv2/renderer/VertexBuffer.h',
+            'libGLESv2/renderer/VertexBuffer9.cpp',
+            'libGLESv2/renderer/VertexBuffer9.h',
+            'libGLESv2/renderer/VertexBuffer11.cpp',
+            'libGLESv2/renderer/VertexBuffer11.h',
+            'libGLESv2/renderer/vertexconversion.h',
+            'libGLESv2/renderer/VertexDataManager.cpp',
+            'libGLESv2/renderer/VertexDataManager.h',
+            'libGLESv2/renderer/VertexDeclarationCache.cpp',
+            'libGLESv2/renderer/VertexDeclarationCache.h',
+            'libGLESv2/ResourceManager.cpp',
+            'libGLESv2/ResourceManager.h',
+            'libGLESv2/Shader.cpp',
+            'libGLESv2/Shader.h',
+            'libGLESv2/Texture.cpp',
+            'libGLESv2/Texture.h',
+            'libGLESv2/Uniform.cpp',
+            'libGLESv2/Uniform.h',
+            'libGLESv2/utilities.cpp',
+            'libGLESv2/utilities.h',
+          ],
+          # TODO(jschuh): http://crbug.com/167187 size_t -> int
+          'msvs_disabled_warnings': [ 4267 ],
+          'msvs_settings': {
+            'VCLinkerTool': {
+              'AdditionalDependencies': [
+                'd3d9.lib',
+                'dxguid.lib',
+              ],
+            }
+          },
+        },
+        {
+          'target_name': 'libEGL',
+          'type': 'shared_library',
+          'dependencies': ['libGLESv2'],
+          'include_dirs': [
+            '.',
+            '../include',
+            'libGLESv2',
+          ],
+          'sources': [
+            'common/angleutils.h',
+            'common/debug.cpp',
+            'common/debug.h',
+            'common/RefCountObject.cpp',
+            'common/RefCountObject.h',
+            'common/version.h',
+            'libEGL/Config.cpp',
+            'libEGL/Config.h',
+            'libEGL/Display.cpp',
+            'libEGL/Display.h',
+            'libEGL/libEGL.cpp',
+            'libEGL/libEGL.def',
+            'libEGL/libEGL.rc',
+            'libEGL/main.cpp',
+            'libEGL/main.h',
+            'libEGL/Surface.cpp',
+            'libEGL/Surface.h',
+          ],
+          # TODO(jschuh): http://crbug.com/167187 size_t -> int
+          'msvs_disabled_warnings': [ 4267 ],
+          'msvs_settings': {
+            'VCLinkerTool': {
+              'AdditionalDependencies': [
+                'd3d9.lib',
+              ],
+            }
+          },
+        },
+      ],
+    }],
+  ],
+}
+
+# Local Variables:
+# tab-width:2
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=2 shiftwidth=2:
+# Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
index c1ef90cdccc26095ffe51830316a182df126fe76..0364adf2cd5515870425b00dacdd9878fd9af845 100644 (file)
@@ -1,3 +1,4 @@
+#include "precompiled.h"
 //
 // Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
index ff9730c4da7a5c2cf7e36fa70ac41a600e7587f4..9761567fb274975f44c54190b11749ec37116dc6 100644 (file)
@@ -9,12 +9,39 @@
 #ifndef COMMON_ANGLEUTILS_H_
 #define COMMON_ANGLEUTILS_H_
 
+#include <stddef.h>
+
 // A macro to disallow the copy constructor and operator= functions
 // This must be used in the private: declarations for a class
 #define DISALLOW_COPY_AND_ASSIGN(TypeName) \
   TypeName(const TypeName&);               \
   void operator=(const TypeName&)
 
+template <typename T, unsigned int N>
+inline unsigned int ArraySize(T(&)[N])
+{
+    return N;
+}
+
+template <typename T, unsigned int N>
+void SafeRelease(T (&resourceBlock)[N])
+{
+    for (unsigned int i = 0; i < N; i++)
+    {
+        SafeRelease(resourceBlock[i]);
+    }
+}
+
+template <typename T>
+void SafeRelease(T& resource)
+{
+    if (resource)
+    {
+        resource->Release();
+        resource = NULL;
+    }
+}
+
 #if defined(_MSC_VER)
 #define snprintf _snprintf
 #endif
@@ -23,4 +50,7 @@
 #define VENDOR_ID_INTEL 0x8086
 #define VENDOR_ID_NVIDIA 0x10DE
 
+#define GL_BGRA4_ANGLEX 0x6ABC
+#define GL_BGR5_A1_ANGLEX 0x6ABD
+
 #endif // COMMON_ANGLEUTILS_H_
index 59399607d5604078c733e66646a4e1263a649933..23337405ed16ca9fd05dd7822942df5f30655085 100644 (file)
@@ -7,10 +7,6 @@
 // debug.cpp: Debugging utilities.
 
 #include "common/debug.h"
-
-#include <stdio.h>
-#include <stdarg.h>
-
 #include "common/system.h"
 #include <d3d9.h>
 
index 5f8f60fe6111a39fccb262b4ea8f270c0c6ad60a..23ee26d23baa750f3b7ef63346bbdc1836824f6e 100644 (file)
@@ -99,6 +99,13 @@ namespace gl
     #define UNREACHABLE() ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__)
 #endif
 
+// A macro that determines whether an object has a given runtime type.
+#if !defined(NDEBUG) && (!defined(_MSC_VER) || defined(_CPPRTTI))
+#define HAS_DYNAMIC_TYPE(type, obj) (dynamic_cast<type >(obj) != NULL)
+#else
+#define HAS_DYNAMIC_TYPE(type, obj) true
+#endif
+
 // A macro functioning as a compile-time assert to validate constant conditions
 #define META_ASSERT(condition) typedef int COMPILE_TIME_ASSERT_##__LINE__[static_cast<bool>(condition)?1:-1]
 
index f071a05856d3be0441ec7e0e1816402632edc41a..5eb140bccd2e9988ac3e69865261adc267061076 100644 (file)
 #endif
 
 #include <windows.h>
-#include <d3d9.h>
-#include <D3Dcompiler.h>
-#include <d3d9types.h>
-#include <mmsystem.h>
 
 #if defined(min)
 #undef min
index 5a6dcdb1a7039ca00eba869973f6f42de38b81af..c8ff63642b99dd3ec5fae24b4d8404d67407ff90 100644 (file)
@@ -1,7 +1,7 @@
 #define MAJOR_VERSION 1
-#define MINOR_VERSION 0
+#define MINOR_VERSION 2
 #define BUILD_VERSION 0
-#define BUILD_REVISION 1987
+#define BUILD_REVISION 2426
 
 #define STRINGIFY(x) #x
 #define MACRO_STRINGIFY(x) STRINGIFY(x)
diff --git a/Source/ThirdParty/ANGLE/src/compiler/64bit-lexer-safety.patch b/Source/ThirdParty/ANGLE/src/compiler/64bit-lexer-safety.patch
new file mode 100644 (file)
index 0000000..7af91f5
--- /dev/null
@@ -0,0 +1,177 @@
+--- a/src/compiler/glslang_lex.cpp
++++ b/src/compiler/glslang_lex.cpp
+@@ -68,6 +68,7 @@ typedef int16_t flex_int16_t;
+ typedef uint16_t flex_uint16_t;
+ typedef int32_t flex_int32_t;
+ typedef uint32_t flex_uint32_t;
++typedef uint64_t flex_uint64_t;
+ #else
+ typedef signed char flex_int8_t;
+ typedef short int flex_int16_t;
+@@ -191,6 +192,11 @@ typedef void* yyscan_t;
+ typedef struct yy_buffer_state *YY_BUFFER_STATE;
+ #endif
++#ifndef YY_TYPEDEF_YY_SIZE_T
++#define YY_TYPEDEF_YY_SIZE_T
++typedef size_t yy_size_t;
++#endif
++
+ #define EOB_ACT_CONTINUE_SCAN 0
+ #define EOB_ACT_END_OF_FILE 1
+ #define EOB_ACT_LAST_MATCH 2
+@@ -204,7 +210,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
+      */
+     #define  YY_LESS_LINENO(n) \
+             do { \
+-                int yyl;\
++                yy_size_t yyl;\
+                 for ( yyl = n; yyl < yyleng; ++yyl )\
+                     if ( yytext[yyl] == '\n' )\
+                         --yylineno;\
+@@ -226,11 +232,6 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
+ #define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner )
+-#ifndef YY_TYPEDEF_YY_SIZE_T
+-#define YY_TYPEDEF_YY_SIZE_T
+-typedef size_t yy_size_t;
+-#endif
+-
+ #ifndef YY_STRUCT_YY_BUFFER_STATE
+ #define YY_STRUCT_YY_BUFFER_STATE
+ struct yy_buffer_state
+@@ -248,7 +249,7 @@ struct yy_buffer_state
+       /* Number of characters read into yy_ch_buf, not including EOB
+        * characters.
+        */
+-      int yy_n_chars;
++      yy_size_t yy_n_chars;
+       /* Whether we "own" the buffer - i.e., we know we created it,
+        * and can realloc() it to grow it, and should free() it to
+@@ -327,7 +328,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner );
+ YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner );
+ YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ,yyscan_t yyscanner );
+-YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner );
++YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ,yyscan_t yyscanner );
+ void *yyalloc (yy_size_t ,yyscan_t yyscanner );
+ void *yyrealloc (void *,yy_size_t ,yyscan_t yyscanner );
+@@ -378,7 +379,7 @@ static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner );
+  */
+ #define YY_DO_BEFORE_ACTION \
+       yyg->yytext_ptr = yy_bp; \
+-      yyleng = (size_t) (yy_cp - yy_bp); \
++      yyleng = (yy_size_t) (yy_cp - yy_bp); \
+       yyg->yy_hold_char = *yy_cp; \
+       *yy_cp = '\0'; \
+       yyg->yy_c_buf_p = yy_cp;
+@@ -1035,8 +1036,8 @@ struct yyguts_t
+     size_t yy_buffer_stack_max; /**< capacity of stack. */
+     YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
+     char yy_hold_char;
+-    int yy_n_chars;
+-    int yyleng_r;
++    yy_size_t yy_n_chars;
++    yy_size_t yyleng_r;
+     char *yy_c_buf_p;
+     int yy_init;
+     int yy_start;
+@@ -1089,7 +1090,7 @@ FILE *yyget_out (yyscan_t yyscanner );
+ void yyset_out  (FILE * out_str ,yyscan_t yyscanner );
+-int yyget_leng (yyscan_t yyscanner );
++yy_size_t yyget_leng (yyscan_t yyscanner );
+ char *yyget_text (yyscan_t yyscanner );
+@@ -1158,7 +1159,7 @@ static int input (yyscan_t yyscanner );
+       if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
+               { \
+               int c = '*'; \
+-              int n; \
++              yy_size_t n; \
+               for ( n = 0; n < max_size && \
+                            (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
+                       buf[n] = (char) c; \
+@@ -1317,7 +1318,7 @@ yy_find_action:
+               if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )
+                       {
+-                      int yyl;
++                      yy_size_t yyl;
+                       for ( yyl = 0; yyl < yyleng; ++yyl )
+                               if ( yytext[yyl] == '\n' )
+                                          
+@@ -2203,7 +2204,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
+       else
+               {
+-                      int num_to_read =
++                      yy_size_t num_to_read =
+                       YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
+               while ( num_to_read <= 0 )
+@@ -2217,7 +2218,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
+                       if ( b->yy_is_our_buffer )
+                               {
+-                              int new_size = b->yy_buf_size * 2;
++                              yy_size_t new_size = b->yy_buf_size * 2;
+                               if ( new_size <= 0 )
+                                       b->yy_buf_size += b->yy_buf_size / 8;
+@@ -2248,7 +2249,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
+               /* Read in more data. */
+               YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]),
+-                      yyg->yy_n_chars, (size_t) num_to_read );
++                      yyg->yy_n_chars, num_to_read );
+               YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
+               }
+@@ -2373,7 +2374,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
+               else
+                       { /* need more input */
+-                      int offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
++                      yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr;
+                       ++yyg->yy_c_buf_p;
+                       switch ( yy_get_next_buffer( yyscanner ) )
+@@ -2660,7 +2661,7 @@ void yypop_buffer_state (yyscan_t yyscanner)
+  */
+ static void yyensure_buffer_stack (yyscan_t yyscanner)
+ {
+-      int num_to_alloc;
++      yy_size_t num_to_alloc;
+     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+       if (!yyg->yy_buffer_stack) {
+@@ -2758,12 +2759,11 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr , yyscan_t yyscanner)
+  * @param yyscanner The scanner object.
+  * @return the newly allocated buffer state object.
+  */
+-YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, int  _yybytes_len , yyscan_t yyscanner)
++YY_BUFFER_STATE yy_scan_bytes  (yyconst char * yybytes, yy_size_t  _yybytes_len , yyscan_t yyscanner)
+ {
+       YY_BUFFER_STATE b;
+       char *buf;
+-      yy_size_t n;
+-      int i;
++      yy_size_t n, i;
+     
+       /* Get memory for full buffer, including space for trailing EOB's. */
+       n = _yybytes_len + 2;
+@@ -2913,7 +2913,7 @@ FILE *yyget_out  (yyscan_t yyscanner)
+ /** Get the length of the current token.
+  * @param yyscanner The scanner object.
+  */
+-int yyget_leng  (yyscan_t yyscanner)
++yy_size_t yyget_leng  (yyscan_t yyscanner)
+ {
+     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
+     return yyleng;
index af4c7e3ed9d3bc8f7bfe03bbe93049d7a51d8589..1631f4f779fa7efa793bd63aaa21cc5fc918dff0 100644 (file)
@@ -90,10 +90,6 @@ enum TQualifier
     EvqInvariantVaryingOut,    // vertex shaders only  read/write
     EvqUniform,       // Readonly, vertex and fragment
 
-    // pack/unpack input and output
-    EvqInput,
-    EvqOutput,
-
     // parameters
     EvqIn,
     EvqOut,
@@ -112,6 +108,7 @@ enum TQualifier
     // built-ins written by fragment shader
     EvqFragColor,
     EvqFragData,
+    EvqFragDepth,
 
     // end of list
     EvqLast
@@ -137,14 +134,13 @@ inline const char* getQualifierString(TQualifier q)
     case EvqIn:             return "in";             break;
     case EvqOut:            return "out";            break;
     case EvqInOut:          return "inout";          break;
-    case EvqInput:          return "input";          break;
-    case EvqOutput:         return "output";         break;
     case EvqPosition:       return "Position";       break;
     case EvqPointSize:      return "PointSize";      break;
     case EvqFragCoord:      return "FragCoord";      break;
     case EvqFrontFacing:    return "FrontFacing";    break;
     case EvqFragColor:      return "FragColor";      break;
     case EvqFragData:       return "FragData";      break;
+    case EvqFragDepth:      return "FragDepth";     break;
     default:                return "unknown qualifier";
     }
 }
index f46ff66d40fbbbebd21d4cf38bca16f9c932269f..637ccc5e37be38022ed6e96905ecab50432976b4 100644 (file)
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 TCompiler* ConstructCompiler(
     ShShaderType type, ShShaderSpec spec, ShShaderOutput output)
 {
-  switch (output) {
-    case SH_HLSL_OUTPUT:
-      return new TranslatorHLSL(type, spec);
+  switch (output)
+  {
+    case SH_HLSL9_OUTPUT:
+    case SH_HLSL11_OUTPUT:
+      return new TranslatorHLSL(type, spec, output);
     default:
       return NULL;
   }
index 27a5598290898561d5a4e0c4243b56f846472ddc..532486a95c4fbee809eed472f66db30105924403 100644 (file)
 
 #include "compiler/PoolAlloc.h"
 
-// We need two pieces of information to report errors/warnings - string and
-// line number. We encode these into a single int so that it can be easily
-// incremented/decremented by lexer. The right SOURCE_LOC_LINE_SIZE bits store
-// line number while the rest store the string number. Since the shaders are
-// usually small, we should not run out of memory. SOURCE_LOC_LINE_SIZE
-// can be increased to alleviate this issue.
-typedef int TSourceLoc;
-const unsigned int SOURCE_LOC_LINE_SIZE = 16;  // in bits.
-const unsigned int SOURCE_LOC_LINE_MASK = (1 << SOURCE_LOC_LINE_SIZE) - 1;
-
-inline TSourceLoc EncodeSourceLoc(int string, int line) {
-    return (string << SOURCE_LOC_LINE_SIZE) | (line & SOURCE_LOC_LINE_MASK);
-}
-
-inline void DecodeSourceLoc(TSourceLoc loc, int* string, int* line) {
-    if (string) *string = loc >> SOURCE_LOC_LINE_SIZE;
-    if (line) *line = loc & SOURCE_LOC_LINE_MASK;
-}
+struct TSourceLoc {
+    int first_file;
+    int first_line;
+    int last_file;
+    int last_line;
+};
 
 //
 // Put POOL_ALLOCATOR_NEW_DELETE in base classes to make them use this scheme.
index 9c9f9e70ab05edfeaa64a6a95a9ae2867e6a2aad..263ec77022257dcd68d930f2a3e1cbc0a62e0518 100644 (file)
@@ -1,11 +1,11 @@
 //
-// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #include "compiler/BuiltInFunctionEmulator.h"
-#include "compiler/DetectRecursion.h"
+#include "compiler/DetectCallDepth.h"
 #include "compiler/ForLoopUnroll.h"
 #include "compiler/Initialize.h"
 #include "compiler/InitializeParseContext.h"
@@ -27,51 +27,6 @@ bool isWebGLBasedSpec(ShShaderSpec spec)
 }
 
 namespace {
-bool InitializeSymbolTable(
-    const TBuiltInStrings& builtInStrings,
-    ShShaderType type, ShShaderSpec spec, const ShBuiltInResources& resources,
-    TInfoSink& infoSink, TSymbolTable& symbolTable)
-{
-    TIntermediate intermediate(infoSink);
-    TExtensionBehavior extBehavior;
-    InitExtensionBehavior(resources, extBehavior);
-    // The builtins deliberately don't specify precisions for the function
-    // arguments and return types. For that reason we don't try to check them.
-    TParseContext parseContext(symbolTable, extBehavior, intermediate, type, spec, 0, false, NULL, infoSink);
-    parseContext.fragmentPrecisionHigh = resources.FragmentPrecisionHigh == 1;
-
-    GlobalParseContext = &parseContext;
-
-    assert(symbolTable.isEmpty());       
-    //
-    // Parse the built-ins.  This should only happen once per
-    // language symbol table.
-    //
-    // Push the symbol table to give it an initial scope.  This
-    // push should not have a corresponding pop, so that built-ins
-    // are preserved, and the test for an empty table fails.
-    //
-    symbolTable.push();
-
-    for (TBuiltInStrings::const_iterator i = builtInStrings.begin(); i != builtInStrings.end(); ++i)
-    {
-        const char* builtInShaders = i->c_str();
-        int builtInLengths = static_cast<int>(i->size());
-        if (builtInLengths <= 0)
-          continue;
-
-        if (PaParseStrings(1, &builtInShaders, &builtInLengths, &parseContext) != 0)
-        {
-            infoSink.info.message(EPrefixInternalError, "Unable to parse built-ins");
-            return false;
-        }
-    }
-
-    IdentifyBuiltIns(type, spec, resources, symbolTable);
-
-    return true;
-}
-
 class TScopedPoolAllocator {
 public:
     TScopedPoolAllocator(TPoolAllocator* allocator, bool pushPop)
@@ -103,6 +58,9 @@ TShHandleBase::~TShHandleBase() {
 TCompiler::TCompiler(ShShaderType type, ShShaderSpec spec)
     : shaderType(type),
       shaderSpec(spec),
+      maxUniformVectors(0),
+      maxExpressionComplexity(0),
+      maxCallStackDepth(0),
       fragmentPrecisionHigh(false),
       clampingStrategy(SH_CLAMP_WITH_CLAMP_INTRINSIC),
       builtInFunctionEmulator(type)
@@ -121,6 +79,8 @@ bool TCompiler::Init(const ShBuiltInResources& resources)
     maxUniformVectors = (shaderType == SH_VERTEX_SHADER) ?
         resources.MaxVertexUniformVectors :
         resources.MaxFragmentUniformVectors;
+    maxExpressionComplexity = resources.MaxExpressionComplexity;
+    maxCallStackDepth = resources.MaxCallStackDepth;
     TScopedPoolAllocator scopedAlloc(&allocator, false);
 
     // Generate built-in symbol table.
@@ -170,8 +130,10 @@ bool TCompiler::compile(const char* const shaderStrings[],
     // We preserve symbols at the built-in level from compile-to-compile.
     // Start pushing the user-defined symbols at global level.
     symbolTable.push();
-    if (!symbolTable.atGlobalLevel())
-        infoSink.info.message(EPrefixInternalError, "Wrong symbol table level");
+    if (!symbolTable.atGlobalLevel()) {
+        infoSink.info.prefix(EPrefixInternalError);
+        infoSink.info << "Wrong symbol table level";
+    }
 
     // Parse shader.
     bool success =
@@ -182,7 +144,7 @@ bool TCompiler::compile(const char* const shaderStrings[],
         success = intermediate.postProcess(root);
 
         if (success)
-            success = detectRecursion(root);
+            success = detectCallDepth(root, infoSink, (compileOptions & SH_LIMIT_CALL_STACK_DEPTH) != 0);
 
         if (success && (compileOptions & SH_VALIDATE_LOOP_INDEXING))
             success = validateLimitations(root);
@@ -205,6 +167,10 @@ bool TCompiler::compile(const char* const shaderStrings[],
         if (success && (compileOptions & SH_CLAMP_INDIRECT_ARRAY_BOUNDS))
             arrayBoundsClamper.MarkIndirectArrayBoundsForClamping(root);
 
+        // Disallow expressions deemed too complex.
+        if (success && (compileOptions & SH_LIMIT_EXPRESSION_COMPLEXITY))
+            success = limitExpressionComplexity(root);
+
         // Call mapLongVariableNames() before collectAttribsUniforms() so in
         // collectAttribsUniforms() we already have the mapped symbol names and
         // we could composite mapped and original variable names.
@@ -217,7 +183,8 @@ bool TCompiler::compile(const char* const shaderStrings[],
             if (compileOptions & SH_ENFORCE_PACKING_RESTRICTIONS) {
                 success = enforcePackingRestrictions();
                 if (!success) {
-                    infoSink.info.message(EPrefixError, "too many uniforms");
+                    infoSink.info.prefix(EPrefixError);
+                    infoSink.info << "too many uniforms";
                 }
             }
         }
@@ -239,13 +206,42 @@ bool TCompiler::compile(const char* const shaderStrings[],
     return success;
 }
 
-bool TCompiler::InitBuiltInSymbolTable(const ShBuiltInResourcesresources)
+bool TCompiler::InitBuiltInSymbolTable(const ShBuiltInResources &resources)
 {
-    TBuiltIns builtIns;
+    compileResources = resources;
+
+    assert(symbolTable.isEmpty());
+    symbolTable.push();
+
+    TPublicType integer;
+    integer.type = EbtInt;
+    integer.size = 1;
+    integer.matrix = false;
+    integer.array = false;
 
-    builtIns.initialize(shaderType, shaderSpec, resources);
-    return InitializeSymbolTable(builtIns.getBuiltInStrings(),
-        shaderType, shaderSpec, resources, infoSink, symbolTable);
+    TPublicType floatingPoint;
+    floatingPoint.type = EbtFloat;
+    floatingPoint.size = 1;
+    floatingPoint.matrix = false;
+    floatingPoint.array = false;
+
+    switch(shaderType)
+    {
+      case SH_FRAGMENT_SHADER:
+        symbolTable.setDefaultPrecision(integer, EbpMedium);
+        break;
+      case SH_VERTEX_SHADER:
+        symbolTable.setDefaultPrecision(integer, EbpHigh);
+        symbolTable.setDefaultPrecision(floatingPoint, EbpHigh);
+        break;
+      default: assert(false && "Language not supported");
+    }
+
+    InsertBuiltInFunctions(shaderType, shaderSpec, resources, symbolTable);
+
+    IdentifyBuiltIns(shaderType, shaderSpec, resources, symbolTable);
+
+    return true;
 }
 
 void TCompiler::clearResults()
@@ -263,18 +259,24 @@ void TCompiler::clearResults()
     nameMap.clear();
 }
 
-bool TCompiler::detectRecursion(TIntermNode* root)
+bool TCompiler::detectCallDepth(TIntermNode* root, TInfoSink& infoSink, bool limitCallStackDepth)
 {
-    DetectRecursion detect;
+    DetectCallDepth detect(infoSink, limitCallStackDepth, maxCallStackDepth);
     root->traverse(&detect);
-    switch (detect.detectRecursion()) {
-        case DetectRecursion::kErrorNone:
+    switch (detect.detectCallDepth()) {
+        case DetectCallDepth::kErrorNone:
             return true;
-        case DetectRecursion::kErrorMissingMain:
-            infoSink.info.message(EPrefixError, "Missing main()");
+        case DetectCallDepth::kErrorMissingMain:
+            infoSink.info.prefix(EPrefixError);
+            infoSink.info << "Missing main()";
+            return false;
+        case DetectCallDepth::kErrorRecursion:
+            infoSink.info.prefix(EPrefixError);
+            infoSink.info << "Function recursion detected";
             return false;
-        case DetectRecursion::kErrorRecursion:
-            infoSink.info.message(EPrefixError, "Function recursion detected");
+        case DetectCallDepth::kErrorMaxDepthExceeded:
+            infoSink.info.prefix(EPrefixError);
+            infoSink.info << "Function call stack too deep";
             return false;
         default:
             UNREACHABLE();
@@ -320,6 +322,28 @@ bool TCompiler::enforceTimingRestrictions(TIntermNode* root, bool outputGraph)
     }
 }
 
+bool TCompiler::limitExpressionComplexity(TIntermNode* root)
+{
+    TIntermTraverser traverser;
+    root->traverse(&traverser);
+    TDependencyGraph graph(root);
+
+    for (TFunctionCallVector::const_iterator iter = graph.beginUserDefinedFunctionCalls();
+         iter != graph.endUserDefinedFunctionCalls();
+         ++iter)
+    {
+        TGraphFunctionCall* samplerSymbol = *iter;
+        TDependencyGraphTraverser graphTraverser;
+        samplerSymbol->traverse(&graphTraverser);
+    }
+
+    if (traverser.getMaxDepth() > maxExpressionComplexity) {
+        infoSink.info << "Expression too complex.";
+        return false;
+    }
+    return true;
+}
+
 bool TCompiler::enforceFragmentShaderTimingRestrictions(const TDependencyGraph& graph)
 {
     RestrictFragmentShaderTiming restrictor(infoSink.info);
@@ -363,6 +387,11 @@ const TExtensionBehavior& TCompiler::getExtensionBehavior() const
     return extensionBehavior;
 }
 
+const ShBuiltInResources& TCompiler::getResources() const
+{
+    return compileResources;
+}
+
 const ArrayBoundsClamper& TCompiler::getArrayBoundsClamper() const
 {
     return arrayBoundsClamper;
index fd9d94dc5a8bea5ed5d05be5f6bb66938e715dfc..32af4d38b0b57a4910d322855ec38523df80bcd7 100644 (file)
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
@@ -14,6 +14,7 @@ public:
     ConstantUnion()
     {
         iConst = 0;
+        type = EbtVoid;
     }
 
     POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)        
diff --git a/Source/ThirdParty/ANGLE/src/compiler/DetectCallDepth.cpp b/Source/ThirdParty/ANGLE/src/compiler/DetectCallDepth.cpp
new file mode 100644 (file)
index 0000000..60df52c
--- /dev/null
@@ -0,0 +1,185 @@
+//
+// Copyright (c) 2002-2011 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+#include "compiler/DetectCallDepth.h"
+#include "compiler/InfoSink.h"
+
+DetectCallDepth::FunctionNode::FunctionNode(const TString& fname)
+    : name(fname),
+      visit(PreVisit)
+{
+}
+
+const TString& DetectCallDepth::FunctionNode::getName() const
+{
+    return name;
+}
+
+void DetectCallDepth::FunctionNode::addCallee(
+    DetectCallDepth::FunctionNode* callee)
+{
+    for (size_t i = 0; i < callees.size(); ++i) {
+        if (callees[i] == callee)
+            return;
+    }
+    callees.push_back(callee);
+}
+
+int DetectCallDepth::FunctionNode::detectCallDepth(DetectCallDepth* detectCallDepth, int depth)
+{
+    ASSERT(visit == PreVisit);
+    ASSERT(detectCallDepth);
+
+    int maxDepth = depth;
+    visit = InVisit;
+    for (size_t i = 0; i < callees.size(); ++i) {
+        switch (callees[i]->visit) {
+            case InVisit:
+                // cycle detected, i.e., recursion detected.
+                return kInfiniteCallDepth;
+            case PostVisit:
+                break;
+            case PreVisit: {
+                // Check before we recurse so we don't go too depth
+                if (detectCallDepth->checkExceedsMaxDepth(depth))
+                    return depth;
+                int callDepth = callees[i]->detectCallDepth(detectCallDepth, depth + 1);
+                // Check after we recurse so we can exit immediately and provide info.
+                if (detectCallDepth->checkExceedsMaxDepth(callDepth)) {
+                    detectCallDepth->getInfoSink().info << "<-" << callees[i]->getName();
+                    return callDepth;
+                }
+                maxDepth = std::max(callDepth, maxDepth);
+                break;
+            }
+            default:
+                UNREACHABLE();
+                break;
+        }
+    }
+    visit = PostVisit;
+    return maxDepth;
+}
+
+void DetectCallDepth::FunctionNode::reset()
+{
+    visit = PreVisit;
+}
+
+DetectCallDepth::DetectCallDepth(TInfoSink& infoSink, bool limitCallStackDepth, int maxCallStackDepth)
+    : TIntermTraverser(true, false, true, false),
+      currentFunction(NULL),
+      infoSink(infoSink),
+      maxDepth(limitCallStackDepth ? maxCallStackDepth : FunctionNode::kInfiniteCallDepth)
+{
+}
+
+DetectCallDepth::~DetectCallDepth()
+{
+    for (size_t i = 0; i < functions.size(); ++i)
+        delete functions[i];
+}
+
+bool DetectCallDepth::visitAggregate(Visit visit, TIntermAggregate* node)
+{
+    switch (node->getOp())
+    {
+        case EOpPrototype:
+            // Function declaration.
+            // Don't add FunctionNode here because node->getName() is the
+            // unmangled function name.
+            break;
+        case EOpFunction: {
+            // Function definition.
+            if (visit == PreVisit) {
+                currentFunction = findFunctionByName(node->getName());
+                if (currentFunction == NULL) {
+                    currentFunction = new FunctionNode(node->getName());
+                    functions.push_back(currentFunction);
+                }
+            } else if (visit == PostVisit) {
+                currentFunction = NULL;
+            }
+            break;
+        }
+        case EOpFunctionCall: {
+            // Function call.
+            if (visit == PreVisit) {
+                FunctionNode* func = findFunctionByName(node->getName());
+                if (func == NULL) {
+                    func = new FunctionNode(node->getName());
+                    functions.push_back(func);
+                }
+                if (currentFunction)
+                    currentFunction->addCallee(func);
+            }
+            break;
+        }
+        default:
+            break;
+    }
+    return true;
+}
+
+bool DetectCallDepth::checkExceedsMaxDepth(int depth)
+{
+    return depth >= maxDepth;
+}
+
+void DetectCallDepth::resetFunctionNodes()
+{
+    for (size_t i = 0; i < functions.size(); ++i) {
+        functions[i]->reset();
+    }
+}
+
+DetectCallDepth::ErrorCode DetectCallDepth::detectCallDepthForFunction(FunctionNode* func)
+{
+    currentFunction = NULL;
+    resetFunctionNodes();
+
+    int maxCallDepth = func->detectCallDepth(this, 1);
+
+    if (maxCallDepth == FunctionNode::kInfiniteCallDepth)
+        return kErrorRecursion;
+
+    if (maxCallDepth >= maxDepth)
+        return kErrorMaxDepthExceeded;
+
+    return kErrorNone;
+}
+
+DetectCallDepth::ErrorCode DetectCallDepth::detectCallDepth()
+{
+    if (maxDepth != FunctionNode::kInfiniteCallDepth) {
+        // Check all functions because the driver may fail on them
+        // TODO: Before detectingRecursion, strip unused functions.
+        for (size_t i = 0; i < functions.size(); ++i) {
+            ErrorCode error = detectCallDepthForFunction(functions[i]);
+            if (error != kErrorNone)
+                return error;
+        }
+    } else {
+        FunctionNode* main = findFunctionByName("main(");
+        if (main == NULL)
+            return kErrorMissingMain;
+
+        return detectCallDepthForFunction(main);
+    }
+
+    return kErrorNone;
+}
+
+DetectCallDepth::FunctionNode* DetectCallDepth::findFunctionByName(
+    const TString& name)
+{
+    for (size_t i = 0; i < functions.size(); ++i) {
+        if (functions[i]->getName() == name)
+            return functions[i];
+    }
+    return NULL;
+}
+
similarity index 59%
rename from Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.h
rename to Source/ThirdParty/ANGLE/src/compiler/DetectCallDepth.h
index bbac79dc9ce6e233b4c01ceed6944888b9b2eb48..89e85f88f6ea268dd4e5054f65bcfa9b1175fa7c 100644 (file)
@@ -9,28 +9,36 @@
 
 #include "GLSLANG/ShaderLang.h"
 
+#include <limits.h>
 #include "compiler/intermediate.h"
 #include "compiler/VariableInfo.h"
 
+class TInfoSink;
+
 // Traverses intermediate tree to detect function recursion.
-class DetectRecursion : public TIntermTraverser {
+class DetectCallDepth : public TIntermTraverser {
 public:
     enum ErrorCode {
         kErrorMissingMain,
         kErrorRecursion,
+        kErrorMaxDepthExceeded,
         kErrorNone
     };
 
-    DetectRecursion();
-    ~DetectRecursion();
+    DetectCallDepth(TInfoSink& infoSync, bool limitCallStackDepth, int maxCallStackDepth);
+    ~DetectCallDepth();
 
     virtual bool visitAggregate(Visit, TIntermAggregate*);
 
-    ErrorCode detectRecursion();
+    bool checkExceedsMaxDepth(int depth);
+
+    ErrorCode detectCallDepth();
 
 private:
     class FunctionNode {
     public:
+        static const int kInfiniteCallDepth = INT_MAX;
+
         FunctionNode(const TString& fname);
 
         const TString& getName() const;
@@ -38,8 +46,11 @@ private:
         // If a function is already in the callee list, this becomes a no-op.
         void addCallee(FunctionNode* callee);
 
-        // Return true if recursive function calls are detected.
-        bool detectRecursion();
+        // Returns kInifinityCallDepth if recursive function calls are detected.
+        int detectCallDepth(DetectCallDepth* detectCallDepth, int depth);
+
+        // Reset state.
+        void reset();
 
     private:
         // mangled function name is unique.
@@ -51,10 +62,19 @@ private:
         Visit visit;
     };
 
+    ErrorCode detectCallDepthForFunction(FunctionNode* func);
     FunctionNode* findFunctionByName(const TString& name);
+    void resetFunctionNodes();
+
+    TInfoSink& getInfoSink() { return infoSink; }
 
     TVector<FunctionNode*> functions;
     FunctionNode* currentFunction;
+    TInfoSink& infoSink;
+    int maxDepth;
+
+    DetectCallDepth(const DetectCallDepth&);
+    void operator=(const DetectCallDepth&);
 };
 
 #endif  // COMPILER_DETECT_RECURSION_H_
diff --git a/Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.cpp b/Source/ThirdParty/ANGLE/src/compiler/DetectRecursion.cpp
deleted file mode 100644 (file)
index c09780d..0000000
+++ /dev/null
@@ -1,125 +0,0 @@
-//
-// Copyright (c) 2002-2011 The ANGLE Project Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-
-#include "compiler/DetectRecursion.h"
-
-DetectRecursion::FunctionNode::FunctionNode(const TString& fname)
-    : name(fname),
-      visit(PreVisit)
-{
-}
-
-const TString& DetectRecursion::FunctionNode::getName() const
-{
-    return name;
-}
-
-void DetectRecursion::FunctionNode::addCallee(
-    DetectRecursion::FunctionNode* callee)
-{
-    for (size_t i = 0; i < callees.size(); ++i) {
-        if (callees[i] == callee)
-            return;
-    }
-    callees.push_back(callee);
-}
-
-bool DetectRecursion::FunctionNode::detectRecursion()
-{
-    ASSERT(visit == PreVisit);
-    visit = InVisit;
-    for (size_t i = 0; i < callees.size(); ++i) {
-        switch (callees[i]->visit) {
-            case InVisit:
-                // cycle detected, i.e., recursion detected.
-                return true;
-            case PostVisit:
-                break;
-            case PreVisit: {
-                bool recursion = callees[i]->detectRecursion();
-                if (recursion)
-                    return true;
-                break;
-            }
-            default:
-                UNREACHABLE();
-                break;
-        }
-    }
-    visit = PostVisit;
-    return false;
-}
-
-DetectRecursion::DetectRecursion()
-    : currentFunction(NULL)
-{
-}
-
-DetectRecursion::~DetectRecursion()
-{
-    for (size_t i = 0; i < functions.size(); ++i)
-        delete functions[i];
-}
-
-bool DetectRecursion::visitAggregate(Visit visit, TIntermAggregate* node)
-{
-    switch (node->getOp())
-    {
-        case EOpPrototype:
-            // Function declaration.
-            // Don't add FunctionNode here because node->getName() is the
-            // unmangled function name.
-            break;
-        case EOpFunction: {
-            // Function definition.
-            if (visit == PreVisit) {
-                currentFunction = findFunctionByName(node->getName());
-                if (currentFunction == NULL) {
-                    currentFunction = new FunctionNode(node->getName());
-                    functions.push_back(currentFunction);
-                }
-            }
-            break;
-        }
-        case EOpFunctionCall: {
-            // Function call.
-            if (visit == PreVisit) {
-                ASSERT(currentFunction != NULL);
-                FunctionNode* func = findFunctionByName(node->getName());
-                if (func == NULL) {
-                    func = new FunctionNode(node->getName());
-                    functions.push_back(func);
-                }
-                currentFunction->addCallee(func);
-            }
-            break;
-        }
-        default:
-            break;
-    }
-    return true;
-}
-
-DetectRecursion::ErrorCode DetectRecursion::detectRecursion()
-{
-    FunctionNode* main = findFunctionByName("main(");
-    if (main == NULL)
-        return kErrorMissingMain;
-    if (main->detectRecursion())
-        return kErrorRecursion;
-    return kErrorNone;
-}
-
-DetectRecursion::FunctionNode* DetectRecursion::findFunctionByName(
-    const TString& name)
-{
-    for (size_t i = 0; i < functions.size(); ++i) {
-        if (functions[i]->getName() == name)
-            return functions[i];
-    }
-    return NULL;
-}
-
index 06f370dbe5b4695361ab99d3602e3f6655c3b21f..8a38c41a6542321e856426bb93d2714293609224 100644 (file)
@@ -46,7 +46,7 @@ void TDiagnostics::writeInfo(Severity severity,
     TInfoSinkBase& sink = mInfoSink.info;
     /* VC++ format: file(linenum) : error #: 'token' : extrainfo */
     sink.prefix(prefix);
-    sink.location(EncodeSourceLoc(loc.file, loc.line));
+    sink.location(loc.file, loc.line);
     sink << "'" << token <<  "' : " << reason << " " << extra << "\n";
 }
 
index fdc3f44431e014dd6be835ce3056265e31225906..27a13eababb122204000fc519d669dff84c2c3d7 100644 (file)
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2002-2011 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
@@ -210,6 +210,6 @@ int ForLoopUnroll::getLoopIncrement(TIntermLoop* node)
 int ForLoopUnroll::evaluateIntConstant(TIntermConstantUnion* node)
 {
     ASSERT((node != NULL) && (node->getUnionArrayPointer() != NULL));
-    return node->getUnionArrayPointer()->getIConst();
+    return node->getIConst(0);
 }
 
index ba32f781f548747f7cd72dbb228632c37e8e2db7..d20a6c0175acc4bff48d72a4d12b721a66ba3203 100644 (file)
@@ -6,8 +6,8 @@
 
 #include "compiler/InfoSink.h"
 
-void TInfoSinkBase::prefix(TPrefixType message) {
-    switch(message) {
+void TInfoSinkBase::prefix(TPrefixType p) {
+    switch(p) {
         case EPrefixNone:
             break;
         case EPrefixWarning:
@@ -31,29 +31,24 @@ void TInfoSinkBase::prefix(TPrefixType message) {
     }
 }
 
-void TInfoSinkBase::location(TSourceLoc loc) {
-    int string = 0, line = 0;
-    DecodeSourceLoc(loc, &string, &line);
-
+void TInfoSinkBase::location(int file, int line) {
     TPersistStringStream stream;
     if (line)
-        stream << string << ":" << line;
+        stream << file << ":" << line;
     else
-        stream << string << ":? ";
+        stream << file << ":? ";
     stream << ": ";
 
     sink.append(stream.str());
 }
 
-void TInfoSinkBase::message(TPrefixType message, const char* s) {
-    prefix(message);
-    sink.append(s);
-    sink.append("\n");
+void TInfoSinkBase::location(const TSourceLoc& loc) {
+    location(loc.first_file, loc.first_line);
 }
 
-void TInfoSinkBase::message(TPrefixType message, const char* s, TSourceLoc loc) {
-    prefix(message);
+void TInfoSinkBase::message(TPrefixType p, const TSourceLoc& loc, const char* m) {
+    prefix(p);
     location(loc);
-    sink.append(s);
+    sink.append(m);
     sink.append("\n");
 }
index e2224e918d04d3189e81f4af808cf37968baa8d0..688883814225a89611a0ea87a518267859a2c400 100644 (file)
@@ -96,10 +96,10 @@ public:
     const TPersistString& str() const { return sink; }
     const char* c_str() const { return sink.c_str(); }
 
-    void prefix(TPrefixType message);
-    void location(TSourceLoc loc);
-    void message(TPrefixType message, const char* s);
-    void message(TPrefixType message, const char* s, TSourceLoc loc);
+    void prefix(TPrefixType p);
+    void location(int file, int line);
+    void location(const TSourceLoc& loc);
+    void message(TPrefixType p, const TSourceLoc& loc, const char* m);
 
 private:
     TPersistString sink;
index 97b46f898e8f5490979923c29e9675f62f35a159..2cdbe17aa6d5db0360deb6c910d1df0676083d58 100644 (file)
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 
 #include "compiler/intermediate.h"
 
-//============================================================================
-//
-// Prototypes for built-in functions seen by both vertex and fragment shaders.
-//
-//============================================================================
-static TString BuiltInFunctionsCommon(const ShBuiltInResources& resources)
+void InsertBuiltInFunctions(ShShaderType type, ShShaderSpec spec, const ShBuiltInResources &resources, TSymbolTable &symbolTable)
 {
-    TString s;
+    TType *float1 = new TType(EbtFloat, EbpUndefined, EvqGlobal, 1);
+    TType *float2 = new TType(EbtFloat, EbpUndefined, EvqGlobal, 2);
+    TType *float3 = new TType(EbtFloat, EbpUndefined, EvqGlobal, 3);
+    TType *float4 = new TType(EbtFloat, EbpUndefined, EvqGlobal, 4);
+
+    TType *int2 = new TType(EbtInt, EbpUndefined, EvqGlobal, 2);
+    TType *int3 = new TType(EbtInt, EbpUndefined, EvqGlobal, 3);
+    TType *int4 = new TType(EbtInt, EbpUndefined, EvqGlobal, 4);
 
     //
     // Angle and Trigonometric Functions.
     //
-    s.append(TString("float radians(float degrees);"));
-    s.append(TString("vec2  radians(vec2  degrees);"));
-    s.append(TString("vec3  radians(vec3  degrees);"));
-    s.append(TString("vec4  radians(vec4  degrees);"));
-
-    s.append(TString("float degrees(float radians);"));
-    s.append(TString("vec2  degrees(vec2  radians);"));
-    s.append(TString("vec3  degrees(vec3  radians);"));
-    s.append(TString("vec4  degrees(vec4  radians);"));
-
-    s.append(TString("float sin(float angle);"));
-    s.append(TString("vec2  sin(vec2  angle);"));
-    s.append(TString("vec3  sin(vec3  angle);"));
-    s.append(TString("vec4  sin(vec4  angle);"));
-
-    s.append(TString("float cos(float angle);"));
-    s.append(TString("vec2  cos(vec2  angle);"));
-    s.append(TString("vec3  cos(vec3  angle);"));
-    s.append(TString("vec4  cos(vec4  angle);"));
-
-    s.append(TString("float tan(float angle);"));
-    s.append(TString("vec2  tan(vec2  angle);"));
-    s.append(TString("vec3  tan(vec3  angle);"));
-    s.append(TString("vec4  tan(vec4  angle);"));
-
-    s.append(TString("float asin(float x);"));
-    s.append(TString("vec2  asin(vec2  x);"));
-    s.append(TString("vec3  asin(vec3  x);"));
-    s.append(TString("vec4  asin(vec4  x);"));
-
-    s.append(TString("float acos(float x);"));
-    s.append(TString("vec2  acos(vec2  x);"));
-    s.append(TString("vec3  acos(vec3  x);"));
-    s.append(TString("vec4  acos(vec4  x);"));
-
-    s.append(TString("float atan(float y, float x);"));
-    s.append(TString("vec2  atan(vec2  y, vec2  x);"));
-    s.append(TString("vec3  atan(vec3  y, vec3  x);"));
-    s.append(TString("vec4  atan(vec4  y, vec4  x);"));
-
-    s.append(TString("float atan(float y_over_x);"));
-    s.append(TString("vec2  atan(vec2  y_over_x);"));
-    s.append(TString("vec3  atan(vec3  y_over_x);"));
-    s.append(TString("vec4  atan(vec4  y_over_x);"));
+    symbolTable.insertBuiltIn(float1, "radians", float1);
+    symbolTable.insertBuiltIn(float2, "radians", float2);
+    symbolTable.insertBuiltIn(float3, "radians", float3);
+    symbolTable.insertBuiltIn(float4, "radians", float4);
+
+    symbolTable.insertBuiltIn(float1, "degrees", float1);
+    symbolTable.insertBuiltIn(float2, "degrees", float2);
+    symbolTable.insertBuiltIn(float3, "degrees", float3);
+    symbolTable.insertBuiltIn(float4, "degrees", float4);
+
+    symbolTable.insertBuiltIn(float1, "sin", float1);
+    symbolTable.insertBuiltIn(float2, "sin", float2);
+    symbolTable.insertBuiltIn(float3, "sin", float3);
+    symbolTable.insertBuiltIn(float4, "sin", float4);
+
+    symbolTable.insertBuiltIn(float1, "cos", float1);
+    symbolTable.insertBuiltIn(float2, "cos", float2);
+    symbolTable.insertBuiltIn(float3, "cos", float3);
+    symbolTable.insertBuiltIn(float4, "cos", float4);
+
+    symbolTable.insertBuiltIn(float1, "tan", float1);
+    symbolTable.insertBuiltIn(float2, "tan", float2);
+    symbolTable.insertBuiltIn(float3, "tan", float3);
+    symbolTable.insertBuiltIn(float4, "tan", float4);
+
+    symbolTable.insertBuiltIn(float1, "asin", float1);
+    symbolTable.insertBuiltIn(float2, "asin", float2);
+    symbolTable.insertBuiltIn(float3, "asin", float3);
+    symbolTable.insertBuiltIn(float4, "asin", float4);
+
+    symbolTable.insertBuiltIn(float1, "acos", float1);
+    symbolTable.insertBuiltIn(float2, "acos", float2);
+    symbolTable.insertBuiltIn(float3, "acos", float3);
+    symbolTable.insertBuiltIn(float4, "acos", float4);
+
+    symbolTable.insertBuiltIn(float1, "atan", float1, float1);
+    symbolTable.insertBuiltIn(float2, "atan", float2, float2);
+    symbolTable.insertBuiltIn(float3, "atan", float3, float3);
+    symbolTable.insertBuiltIn(float4, "atan", float4, float4);
+
+    symbolTable.insertBuiltIn(float1, "atan", float1);
+    symbolTable.insertBuiltIn(float2, "atan", float2);
+    symbolTable.insertBuiltIn(float3, "atan", float3);
+    symbolTable.insertBuiltIn(float4, "atan", float4);
 
     //
     // Exponential Functions.
     //
-    s.append(TString("float pow(float x, float y);"));
-    s.append(TString("vec2  pow(vec2  x, vec2  y);"));
-    s.append(TString("vec3  pow(vec3  x, vec3  y);"));
-    s.append(TString("vec4  pow(vec4  x, vec4  y);"));
-
-    s.append(TString("float exp(float x);"));
-    s.append(TString("vec2  exp(vec2  x);"));
-    s.append(TString("vec3  exp(vec3  x);"));
-    s.append(TString("vec4  exp(vec4  x);"));
-
-    s.append(TString("float log(float x);"));
-    s.append(TString("vec2  log(vec2  x);"));
-    s.append(TString("vec3  log(vec3  x);"));
-    s.append(TString("vec4  log(vec4  x);"));
-
-    s.append(TString("float exp2(float x);"));
-    s.append(TString("vec2  exp2(vec2  x);"));
-    s.append(TString("vec3  exp2(vec3  x);"));
-    s.append(TString("vec4  exp2(vec4  x);"));
-
-    s.append(TString("float log2(float x);"));
-    s.append(TString("vec2  log2(vec2  x);"));
-    s.append(TString("vec3  log2(vec3  x);"));
-    s.append(TString("vec4  log2(vec4  x);"));
-
-    s.append(TString("float sqrt(float x);"));
-    s.append(TString("vec2  sqrt(vec2  x);"));
-    s.append(TString("vec3  sqrt(vec3  x);"));
-    s.append(TString("vec4  sqrt(vec4  x);"));
-
-    s.append(TString("float inversesqrt(float x);"));
-    s.append(TString("vec2  inversesqrt(vec2  x);"));
-    s.append(TString("vec3  inversesqrt(vec3  x);"));
-    s.append(TString("vec4  inversesqrt(vec4  x);"));
+    symbolTable.insertBuiltIn(float1, "pow", float1, float1);
+    symbolTable.insertBuiltIn(float2, "pow", float2, float2);
+    symbolTable.insertBuiltIn(float3, "pow", float3, float3);
+    symbolTable.insertBuiltIn(float4, "pow", float4, float4);
+
+    symbolTable.insertBuiltIn(float1, "exp", float1);
+    symbolTable.insertBuiltIn(float2, "exp", float2);
+    symbolTable.insertBuiltIn(float3, "exp", float3);
+    symbolTable.insertBuiltIn(float4, "exp", float4);
+
+    symbolTable.insertBuiltIn(float1, "log", float1);
+    symbolTable.insertBuiltIn(float2, "log", float2);
+    symbolTable.insertBuiltIn(float3, "log", float3);
+    symbolTable.insertBuiltIn(float4, "log", float4);
+
+    symbolTable.insertBuiltIn(float1, "exp2", float1);
+    symbolTable.insertBuiltIn(float2, "exp2", float2);
+    symbolTable.insertBuiltIn(float3, "exp2", float3);
+    symbolTable.insertBuiltIn(float4, "exp2", float4);
+
+    symbolTable.insertBuiltIn(float1, "log2", float1);
+    symbolTable.insertBuiltIn(float2, "log2", float2);
+    symbolTable.insertBuiltIn(float3, "log2", float3);
+    symbolTable.insertBuiltIn(float4, "log2", float4);
+
+    symbolTable.insertBuiltIn(float1, "sqrt", float1);
+    symbolTable.insertBuiltIn(float2, "sqrt", float2);
+    symbolTable.insertBuiltIn(float3, "sqrt", float3);
+    symbolTable.insertBuiltIn(float4, "sqrt", float4);
+
+    symbolTable.insertBuiltIn(float1, "inversesqrt", float1);
+    symbolTable.insertBuiltIn(float2, "inversesqrt", float2);
+    symbolTable.insertBuiltIn(float3, "inversesqrt", float3);
+    symbolTable.insertBuiltIn(float4, "inversesqrt", float4);
 
     //
     // Common Functions.
     //
-    s.append(TString("float abs(float x);"));
-    s.append(TString("vec2  abs(vec2  x);"));
-    s.append(TString("vec3  abs(vec3  x);"));
-    s.append(TString("vec4  abs(vec4  x);"));
-
-    s.append(TString("float sign(float x);"));
-    s.append(TString("vec2  sign(vec2  x);"));
-    s.append(TString("vec3  sign(vec3  x);"));
-    s.append(TString("vec4  sign(vec4  x);"));
-
-    s.append(TString("float floor(float x);"));
-    s.append(TString("vec2  floor(vec2  x);"));
-    s.append(TString("vec3  floor(vec3  x);"));
-    s.append(TString("vec4  floor(vec4  x);"));
-
-    s.append(TString("float ceil(float x);"));
-    s.append(TString("vec2  ceil(vec2  x);"));
-    s.append(TString("vec3  ceil(vec3  x);"));
-    s.append(TString("vec4  ceil(vec4  x);"));
-
-    s.append(TString("float fract(float x);"));
-    s.append(TString("vec2  fract(vec2  x);"));
-    s.append(TString("vec3  fract(vec3  x);"));
-    s.append(TString("vec4  fract(vec4  x);"));
-
-    s.append(TString("float mod(float x, float y);"));
-    s.append(TString("vec2  mod(vec2  x, float y);"));
-    s.append(TString("vec3  mod(vec3  x, float y);"));
-    s.append(TString("vec4  mod(vec4  x, float y);"));
-    s.append(TString("vec2  mod(vec2  x, vec2  y);"));
-    s.append(TString("vec3  mod(vec3  x, vec3  y);"));
-    s.append(TString("vec4  mod(vec4  x, vec4  y);"));
-
-    s.append(TString("float min(float x, float y);"));
-    s.append(TString("vec2  min(vec2  x, float y);"));
-    s.append(TString("vec3  min(vec3  x, float y);"));
-    s.append(TString("vec4  min(vec4  x, float y);"));
-    s.append(TString("vec2  min(vec2  x, vec2  y);"));
-    s.append(TString("vec3  min(vec3  x, vec3  y);"));
-    s.append(TString("vec4  min(vec4  x, vec4  y);"));
-
-    s.append(TString("float max(float x, float y);"));
-    s.append(TString("vec2  max(vec2  x, float y);"));
-    s.append(TString("vec3  max(vec3  x, float y);"));
-    s.append(TString("vec4  max(vec4  x, float y);"));
-    s.append(TString("vec2  max(vec2  x, vec2  y);"));
-    s.append(TString("vec3  max(vec3  x, vec3  y);"));
-    s.append(TString("vec4  max(vec4  x, vec4  y);"));
-
-    s.append(TString("float clamp(float x, float minVal, float maxVal);"));
-    s.append(TString("vec2  clamp(vec2  x, float minVal, float maxVal);"));
-    s.append(TString("vec3  clamp(vec3  x, float minVal, float maxVal);"));
-    s.append(TString("vec4  clamp(vec4  x, float minVal, float maxVal);"));
-    s.append(TString("vec2  clamp(vec2  x, vec2  minVal, vec2  maxVal);"));
-    s.append(TString("vec3  clamp(vec3  x, vec3  minVal, vec3  maxVal);"));
-    s.append(TString("vec4  clamp(vec4  x, vec4  minVal, vec4  maxVal);"));
-
-    s.append(TString("float mix(float x, float y, float a);"));
-    s.append(TString("vec2  mix(vec2  x, vec2  y, float a);"));
-    s.append(TString("vec3  mix(vec3  x, vec3  y, float a);"));
-    s.append(TString("vec4  mix(vec4  x, vec4  y, float a);"));
-    s.append(TString("vec2  mix(vec2  x, vec2  y, vec2  a);"));
-    s.append(TString("vec3  mix(vec3  x, vec3  y, vec3  a);"));
-    s.append(TString("vec4  mix(vec4  x, vec4  y, vec4  a);"));
-
-    s.append(TString("float step(float edge, float x);"));
-    s.append(TString("vec2  step(vec2  edge, vec2  x);"));
-    s.append(TString("vec3  step(vec3  edge, vec3  x);"));
-    s.append(TString("vec4  step(vec4  edge, vec4  x);"));
-    s.append(TString("vec2  step(float edge, vec2  x);"));
-    s.append(TString("vec3  step(float edge, vec3  x);"));
-    s.append(TString("vec4  step(float edge, vec4  x);"));
-
-    s.append(TString("float smoothstep(float edge0, float edge1, float x);"));
-    s.append(TString("vec2  smoothstep(vec2  edge0, vec2  edge1, vec2  x);"));
-    s.append(TString("vec3  smoothstep(vec3  edge0, vec3  edge1, vec3  x);"));
-    s.append(TString("vec4  smoothstep(vec4  edge0, vec4  edge1, vec4  x);"));
-    s.append(TString("vec2  smoothstep(float edge0, float edge1, vec2  x);"));
-    s.append(TString("vec3  smoothstep(float edge0, float edge1, vec3  x);"));
-    s.append(TString("vec4  smoothstep(float edge0, float edge1, vec4  x);"));
+    symbolTable.insertBuiltIn(float1, "abs", float1);
+    symbolTable.insertBuiltIn(float2, "abs", float2);
+    symbolTable.insertBuiltIn(float3, "abs", float3);
+    symbolTable.insertBuiltIn(float4, "abs", float4);
+
+    symbolTable.insertBuiltIn(float1, "sign", float1);
+    symbolTable.insertBuiltIn(float2, "sign", float2);
+    symbolTable.insertBuiltIn(float3, "sign", float3);
+    symbolTable.insertBuiltIn(float4, "sign", float4);
+
+    symbolTable.insertBuiltIn(float1, "floor", float1);
+    symbolTable.insertBuiltIn(float2, "floor", float2);
+    symbolTable.insertBuiltIn(float3, "floor", float3);
+    symbolTable.insertBuiltIn(float4, "floor", float4);
+
+    symbolTable.insertBuiltIn(float1, "ceil", float1);
+    symbolTable.insertBuiltIn(float2, "ceil", float2);
+    symbolTable.insertBuiltIn(float3, "ceil", float3);
+    symbolTable.insertBuiltIn(float4, "ceil", float4);
+
+    symbolTable.insertBuiltIn(float1, "fract", float1);
+    symbolTable.insertBuiltIn(float2, "fract", float2);
+    symbolTable.insertBuiltIn(float3, "fract", float3);
+    symbolTable.insertBuiltIn(float4, "fract", float4);
+
+    symbolTable.insertBuiltIn(float1, "mod", float1, float1);
+    symbolTable.insertBuiltIn(float2, "mod", float2, float1);
+    symbolTable.insertBuiltIn(float3, "mod", float3, float1);
+    symbolTable.insertBuiltIn(float4, "mod", float4, float1);
+    symbolTable.insertBuiltIn(float2, "mod", float2, float2);
+    symbolTable.insertBuiltIn(float3, "mod", float3, float3);
+    symbolTable.insertBuiltIn(float4, "mod", float4, float4);
+
+    symbolTable.insertBuiltIn(float1, "min", float1, float1);
+    symbolTable.insertBuiltIn(float2, "min", float2, float1);
+    symbolTable.insertBuiltIn(float3, "min", float3, float1);
+    symbolTable.insertBuiltIn(float4, "min", float4, float1);
+    symbolTable.insertBuiltIn(float2, "min", float2, float2);
+    symbolTable.insertBuiltIn(float3, "min", float3, float3);
+    symbolTable.insertBuiltIn(float4, "min", float4, float4);
+
+    symbolTable.insertBuiltIn(float1, "max", float1, float1);
+    symbolTable.insertBuiltIn(float2, "max", float2, float1);
+    symbolTable.insertBuiltIn(float3, "max", float3, float1);
+    symbolTable.insertBuiltIn(float4, "max", float4, float1);
+    symbolTable.insertBuiltIn(float2, "max", float2, float2);
+    symbolTable.insertBuiltIn(float3, "max", float3, float3);
+    symbolTable.insertBuiltIn(float4, "max", float4, float4);
+
+    symbolTable.insertBuiltIn(float1, "clamp", float1, float1, float1);
+    symbolTable.insertBuiltIn(float2, "clamp", float2, float1, float1);
+    symbolTable.insertBuiltIn(float3, "clamp", float3, float1, float1);
+    symbolTable.insertBuiltIn(float4, "clamp", float4, float1, float1);
+    symbolTable.insertBuiltIn(float2, "clamp", float2, float2, float2);
+    symbolTable.insertBuiltIn(float3, "clamp", float3, float3, float3);
+    symbolTable.insertBuiltIn(float4, "clamp", float4, float4, float4);
+
+    symbolTable.insertBuiltIn(float1, "mix", float1, float1, float1);
+    symbolTable.insertBuiltIn(float2, "mix", float2, float2, float1);
+    symbolTable.insertBuiltIn(float3, "mix", float3, float3, float1);
+    symbolTable.insertBuiltIn(float4, "mix", float4, float4, float1);
+    symbolTable.insertBuiltIn(float2, "mix", float2, float2, float2);
+    symbolTable.insertBuiltIn(float3, "mix", float3, float3, float3);
+    symbolTable.insertBuiltIn(float4, "mix", float4, float4, float4);
+
+    symbolTable.insertBuiltIn(float1, "step", float1, float1);
+    symbolTable.insertBuiltIn(float2, "step", float2, float2);
+    symbolTable.insertBuiltIn(float3, "step", float3, float3);
+    symbolTable.insertBuiltIn(float4, "step", float4, float4);
+    symbolTable.insertBuiltIn(float2, "step", float1, float2);
+    symbolTable.insertBuiltIn(float3, "step", float1, float3);
+    symbolTable.insertBuiltIn(float4, "step", float1, float4);
+
+    symbolTable.insertBuiltIn(float1, "smoothstep", float1, float1, float1);
+    symbolTable.insertBuiltIn(float2, "smoothstep", float2, float2, float2);
+    symbolTable.insertBuiltIn(float3, "smoothstep", float3, float3, float3);
+    symbolTable.insertBuiltIn(float4, "smoothstep", float4, float4, float4);
+    symbolTable.insertBuiltIn(float2, "smoothstep", float1, float1, float2);
+    symbolTable.insertBuiltIn(float3, "smoothstep", float1, float1, float3);
+    symbolTable.insertBuiltIn(float4, "smoothstep", float1, float1, float4);
 
     //
     // Geometric Functions.
     //
-    s.append(TString("float length(float x);"));
-    s.append(TString("float length(vec2  x);"));
-    s.append(TString("float length(vec3  x);"));
-    s.append(TString("float length(vec4  x);"));
-
-    s.append(TString("float distance(float p0, float p1);"));
-    s.append(TString("float distance(vec2  p0, vec2  p1);"));
-    s.append(TString("float distance(vec3  p0, vec3  p1);"));
-    s.append(TString("float distance(vec4  p0, vec4  p1);"));
-
-    s.append(TString("float dot(float x, float y);"));
-    s.append(TString("float dot(vec2  x, vec2  y);"));
-    s.append(TString("float dot(vec3  x, vec3  y);"));
-    s.append(TString("float dot(vec4  x, vec4  y);"));
-
-    s.append(TString("vec3 cross(vec3 x, vec3 y);"));
-    s.append(TString("float normalize(float x);"));
-    s.append(TString("vec2  normalize(vec2  x);"));
-    s.append(TString("vec3  normalize(vec3  x);"));
-    s.append(TString("vec4  normalize(vec4  x);"));
-
-    s.append(TString("float faceforward(float N, float I, float Nref);"));
-    s.append(TString("vec2  faceforward(vec2  N, vec2  I, vec2  Nref);"));
-    s.append(TString("vec3  faceforward(vec3  N, vec3  I, vec3  Nref);"));
-    s.append(TString("vec4  faceforward(vec4  N, vec4  I, vec4  Nref);"));
-
-    s.append(TString("float reflect(float I, float N);"));
-    s.append(TString("vec2  reflect(vec2  I, vec2  N);"));
-    s.append(TString("vec3  reflect(vec3  I, vec3  N);"));
-    s.append(TString("vec4  reflect(vec4  I, vec4  N);"));
-
-    s.append(TString("float refract(float I, float N, float eta);"));
-    s.append(TString("vec2  refract(vec2  I, vec2  N, float eta);"));
-    s.append(TString("vec3  refract(vec3  I, vec3  N, float eta);"));
-    s.append(TString("vec4  refract(vec4  I, vec4  N, float eta);"));
+    symbolTable.insertBuiltIn(float1, "length", float1);
+    symbolTable.insertBuiltIn(float1, "length", float2);
+    symbolTable.insertBuiltIn(float1, "length", float3);
+    symbolTable.insertBuiltIn(float1, "length", float4);
+
+    symbolTable.insertBuiltIn(float1, "distance", float1, float1);
+    symbolTable.insertBuiltIn(float1, "distance", float2, float2);
+    symbolTable.insertBuiltIn(float1, "distance", float3, float3);
+    symbolTable.insertBuiltIn(float1, "distance", float4, float4);
+
+    symbolTable.insertBuiltIn(float1, "dot", float1, float1);
+    symbolTable.insertBuiltIn(float1, "dot", float2, float2);
+    symbolTable.insertBuiltIn(float1, "dot", float3, float3);
+    symbolTable.insertBuiltIn(float1, "dot", float4, float4);
+
+    symbolTable.insertBuiltIn(float3, "cross", float3, float3);
+    symbolTable.insertBuiltIn(float1, "normalize", float1);
+    symbolTable.insertBuiltIn(float2, "normalize", float2);
+    symbolTable.insertBuiltIn(float3, "normalize", float3);
+    symbolTable.insertBuiltIn(float4, "normalize", float4);
+
+    symbolTable.insertBuiltIn(float1, "faceforward", float1, float1, float1);
+    symbolTable.insertBuiltIn(float2, "faceforward", float2, float2, float2);
+    symbolTable.insertBuiltIn(float3, "faceforward", float3, float3, float3);
+    symbolTable.insertBuiltIn(float4, "faceforward", float4, float4, float4);
+
+    symbolTable.insertBuiltIn(float1, "reflect", float1, float1);
+    symbolTable.insertBuiltIn(float2, "reflect", float2, float2);
+    symbolTable.insertBuiltIn(float3, "reflect", float3, float3);
+    symbolTable.insertBuiltIn(float4, "reflect", float4, float4);
+
+    symbolTable.insertBuiltIn(float1, "refract", float1, float1, float1);
+    symbolTable.insertBuiltIn(float2, "refract", float2, float2, float1);
+    symbolTable.insertBuiltIn(float3, "refract", float3, float3, float1);
+    symbolTable.insertBuiltIn(float4, "refract", float4, float4, float1);
+
+    TType *mat2 = new TType(EbtFloat, EbpUndefined, EvqGlobal, 2, true);
+    TType *mat3 = new TType(EbtFloat, EbpUndefined, EvqGlobal, 3, true);
+    TType *mat4 = new TType(EbtFloat, EbpUndefined, EvqGlobal, 4, true);
 
     //
     // Matrix Functions.
     //
-    s.append(TString("mat2 matrixCompMult(mat2 x, mat2 y);"));
-    s.append(TString("mat3 matrixCompMult(mat3 x, mat3 y);"));
-    s.append(TString("mat4 matrixCompMult(mat4 x, mat4 y);"));
+    symbolTable.insertBuiltIn(mat2, "matrixCompMult", mat2, mat2);
+    symbolTable.insertBuiltIn(mat3, "matrixCompMult", mat3, mat3);
+    symbolTable.insertBuiltIn(mat4, "matrixCompMult", mat4, mat4);
+
+    TType *bool1 = new TType(EbtBool, EbpUndefined, EvqGlobal, 1);
+    TType *bool2 = new TType(EbtBool, EbpUndefined, EvqGlobal, 2);
+    TType *bool3 = new TType(EbtBool, EbpUndefined, EvqGlobal, 3);
+    TType *bool4 = new TType(EbtBool, EbpUndefined, EvqGlobal, 4);
 
     //
     // Vector relational functions.
     //
-    s.append(TString("bvec2 lessThan(vec2 x, vec2 y);"));
-    s.append(TString("bvec3 lessThan(vec3 x, vec3 y);"));
-    s.append(TString("bvec4 lessThan(vec4 x, vec4 y);"));
-
-    s.append(TString("bvec2 lessThan(ivec2 x, ivec2 y);"));
-    s.append(TString("bvec3 lessThan(ivec3 x, ivec3 y);"));
-    s.append(TString("bvec4 lessThan(ivec4 x, ivec4 y);"));
+    symbolTable.insertBuiltIn(bool2, "lessThan", float2, float2);
+    symbolTable.insertBuiltIn(bool3, "lessThan", float3, float3);
+    symbolTable.insertBuiltIn(bool4, "lessThan", float4, float4);
 
-    s.append(TString("bvec2 lessThanEqual(vec2 x, vec2 y);"));
-    s.append(TString("bvec3 lessThanEqual(vec3 x, vec3 y);"));
-    s.append(TString("bvec4 lessThanEqual(vec4 x, vec4 y);"));
+    symbolTable.insertBuiltIn(bool2, "lessThan", int2, int2);
+    symbolTable.insertBuiltIn(bool3, "lessThan", int3, int3);
+    symbolTable.insertBuiltIn(bool4, "lessThan", int4, int4);
 
-    s.append(TString("bvec2 lessThanEqual(ivec2 x, ivec2 y);"));
-    s.append(TString("bvec3 lessThanEqual(ivec3 x, ivec3 y);"));
-    s.append(TString("bvec4 lessThanEqual(ivec4 x, ivec4 y);"));
+    symbolTable.insertBuiltIn(bool2, "lessThanEqual", float2, float2);
+    symbolTable.insertBuiltIn(bool3, "lessThanEqual", float3, float3);
+    symbolTable.insertBuiltIn(bool4, "lessThanEqual", float4, float4);
 
-    s.append(TString("bvec2 greaterThan(vec2 x, vec2 y);"));
-    s.append(TString("bvec3 greaterThan(vec3 x, vec3 y);"));
-    s.append(TString("bvec4 greaterThan(vec4 x, vec4 y);"));
+    symbolTable.insertBuiltIn(bool2, "lessThanEqual", int2, int2);
+    symbolTable.insertBuiltIn(bool3, "lessThanEqual", int3, int3);
+    symbolTable.insertBuiltIn(bool4, "lessThanEqual", int4, int4);
 
-    s.append(TString("bvec2 greaterThan(ivec2 x, ivec2 y);"));
-    s.append(TString("bvec3 greaterThan(ivec3 x, ivec3 y);"));
-    s.append(TString("bvec4 greaterThan(ivec4 x, ivec4 y);"));
+    symbolTable.insertBuiltIn(bool2, "greaterThan", float2, float2);
+    symbolTable.insertBuiltIn(bool3, "greaterThan", float3, float3);
+    symbolTable.insertBuiltIn(bool4, "greaterThan", float4, float4);
 
-    s.append(TString("bvec2 greaterThanEqual(vec2 x, vec2 y);"));
-    s.append(TString("bvec3 greaterThanEqual(vec3 x, vec3 y);"));
-    s.append(TString("bvec4 greaterThanEqual(vec4 x, vec4 y);"));
+    symbolTable.insertBuiltIn(bool2, "greaterThan", int2, int2);
+    symbolTable.insertBuiltIn(bool3, "greaterThan", int3, int3);
+    symbolTable.insertBuiltIn(bool4, "greaterThan", int4, int4);
 
-    s.append(TString("bvec2 greaterThanEqual(ivec2 x, ivec2 y);"));
-    s.append(TString("bvec3 greaterThanEqual(ivec3 x, ivec3 y);"));
-    s.append(TString("bvec4 greaterThanEqual(ivec4 x, ivec4 y);"));
+    symbolTable.insertBuiltIn(bool2, "greaterThanEqual", float2, float2);
+    symbolTable.insertBuiltIn(bool3, "greaterThanEqual", float3, float3);
+    symbolTable.insertBuiltIn(bool4, "greaterThanEqual", float4, float4);
 
-    s.append(TString("bvec2 equal(vec2 x, vec2 y);"));
-    s.append(TString("bvec3 equal(vec3 x, vec3 y);"));
-    s.append(TString("bvec4 equal(vec4 x, vec4 y);"));
+    symbolTable.insertBuiltIn(bool2, "greaterThanEqual", int2, int2);
+    symbolTable.insertBuiltIn(bool3, "greaterThanEqual", int3, int3);
+    symbolTable.insertBuiltIn(bool4, "greaterThanEqual", int4, int4);
 
-    s.append(TString("bvec2 equal(ivec2 x, ivec2 y);"));
-    s.append(TString("bvec3 equal(ivec3 x, ivec3 y);"));
-    s.append(TString("bvec4 equal(ivec4 x, ivec4 y);"));
+    symbolTable.insertBuiltIn(bool2, "equal", float2, float2);
+    symbolTable.insertBuiltIn(bool3, "equal", float3, float3);
+    symbolTable.insertBuiltIn(bool4, "equal", float4, float4);
 
-    s.append(TString("bvec2 equal(bvec2 x, bvec2 y);"));
-    s.append(TString("bvec3 equal(bvec3 x, bvec3 y);"));
-    s.append(TString("bvec4 equal(bvec4 x, bvec4 y);"));
+    symbolTable.insertBuiltIn(bool2, "equal", int2, int2);
+    symbolTable.insertBuiltIn(bool3, "equal", int3, int3);
+    symbolTable.insertBuiltIn(bool4, "equal", int4, int4);
 
-    s.append(TString("bvec2 notEqual(vec2 x, vec2 y);"));
-    s.append(TString("bvec3 notEqual(vec3 x, vec3 y);"));
-    s.append(TString("bvec4 notEqual(vec4 x, vec4 y);"));
+    symbolTable.insertBuiltIn(bool2, "equal", bool2, bool2);
+    symbolTable.insertBuiltIn(bool3, "equal", bool3, bool3);
+    symbolTable.insertBuiltIn(bool4, "equal", bool4, bool4);
 
-    s.append(TString("bvec2 notEqual(ivec2 x, ivec2 y);"));
-    s.append(TString("bvec3 notEqual(ivec3 x, ivec3 y);"));
-    s.append(TString("bvec4 notEqual(ivec4 x, ivec4 y);"));
+    symbolTable.insertBuiltIn(bool2, "notEqual", float2, float2);
+    symbolTable.insertBuiltIn(bool3, "notEqual", float3, float3);
+    symbolTable.insertBuiltIn(bool4, "notEqual", float4, float4);
 
-    s.append(TString("bvec2 notEqual(bvec2 x, bvec2 y);"));
-    s.append(TString("bvec3 notEqual(bvec3 x, bvec3 y);"));
-    s.append(TString("bvec4 notEqual(bvec4 x, bvec4 y);"));
+    symbolTable.insertBuiltIn(bool2, "notEqual", int2, int2);
+    symbolTable.insertBuiltIn(bool3, "notEqual", int3, int3);
+    symbolTable.insertBuiltIn(bool4, "notEqual", int4, int4);
 
-    s.append(TString("bool any(bvec2 x);"));
-    s.append(TString("bool any(bvec3 x);"));
-    s.append(TString("bool any(bvec4 x);"));
+    symbolTable.insertBuiltIn(bool2, "notEqual", bool2, bool2);
+    symbolTable.insertBuiltIn(bool3, "notEqual", bool3, bool3);
+    symbolTable.insertBuiltIn(bool4, "notEqual", bool4, bool4);
 
-    s.append(TString("bool all(bvec2 x);"));
-    s.append(TString("bool all(bvec3 x);"));
-    s.append(TString("bool all(bvec4 x);"));
-
-    s.append(TString("bvec2 not(bvec2 x);"));
-    s.append(TString("bvec3 not(bvec3 x);"));
-    s.append(TString("bvec4 not(bvec4 x);"));
-
-    //
-    // Texture Functions.
-    //
-    s.append(TString("vec4 texture2D(sampler2D sampler, vec2 coord);"));
-    s.append(TString("vec4 texture2DProj(sampler2D sampler, vec3 coord);"));
-    s.append(TString("vec4 texture2DProj(sampler2D sampler, vec4 coord);"));
-    s.append(TString("vec4 textureCube(samplerCube sampler, vec3 coord);"));
-
-    if (resources.OES_EGL_image_external) {
-        s.append(TString("vec4 texture2D(samplerExternalOES sampler, vec2 coord);"));
-        s.append(TString("vec4 texture2DProj(samplerExternalOES sampler, vec3 coord);"));
-        s.append(TString("vec4 texture2DProj(samplerExternalOES sampler, vec4 coord);"));
-    }
+    symbolTable.insertBuiltIn(bool1, "any", bool2);
+    symbolTable.insertBuiltIn(bool1, "any", bool3);
+    symbolTable.insertBuiltIn(bool1, "any", bool4);
 
-    if (resources.ARB_texture_rectangle) {
-        s.append(TString("vec4 texture2DRect(sampler2DRect sampler, vec2 coord);"));
-        s.append(TString("vec4 texture2DRectProj(sampler2DRect sampler, vec3 coord);"));
-        s.append(TString("vec4 texture2DRectProj(sampler2DRect sampler, vec4 coord);"));
-    }
+    symbolTable.insertBuiltIn(bool1, "all", bool2);
+    symbolTable.insertBuiltIn(bool1, "all", bool3);
+    symbolTable.insertBuiltIn(bool1, "all", bool4);
 
-    //
-    // Noise functions.
-    //
-    //s.append(TString("float noise1(float x);"));
-    //s.append(TString("float noise1(vec2  x);"));
-    //s.append(TString("float noise1(vec3  x);"));
-    //s.append(TString("float noise1(vec4  x);"));
-
-    //s.append(TString("vec2 noise2(float x);"));
-    //s.append(TString("vec2 noise2(vec2  x);"));
-    //s.append(TString("vec2 noise2(vec3  x);"));
-    //s.append(TString("vec2 noise2(vec4  x);"));
-
-    //s.append(TString("vec3 noise3(float x);"));
-    //s.append(TString("vec3 noise3(vec2  x);"));
-    //s.append(TString("vec3 noise3(vec3  x);"));
-    //s.append(TString("vec3 noise3(vec4  x);"));
-
-    //s.append(TString("vec4 noise4(float x);"));
-    //s.append(TString("vec4 noise4(vec2  x);"));
-    //s.append(TString("vec4 noise4(vec3  x);"));
-    //s.append(TString("vec4 noise4(vec4  x);"));
-
-    return s;
-}
+    symbolTable.insertBuiltIn(bool2, "not", bool2);
+    symbolTable.insertBuiltIn(bool3, "not", bool3);
+    symbolTable.insertBuiltIn(bool4, "not", bool4);
 
-//============================================================================
-//
-// Prototypes for built-in functions seen by vertex shaders only.
-//
-//============================================================================
-static TString BuiltInFunctionsVertex(const ShBuiltInResources& resources)
-{
-    TString s;
+    TType *sampler2D = new TType(EbtSampler2D, EbpUndefined, EvqGlobal, 1);
+    TType *samplerCube = new TType(EbtSamplerCube, EbpUndefined, EvqGlobal, 1);
 
     //
-    // Geometric Functions.
+    // Texture Functions for GLSL ES 1.0
     //
-    //s.append(TString("vec4 ftransform();"));
+    symbolTable.insertBuiltIn(float4, "texture2D", sampler2D, float2);
+    symbolTable.insertBuiltIn(float4, "texture2DProj", sampler2D, float3);
+    symbolTable.insertBuiltIn(float4, "texture2DProj", sampler2D, float4);
+    symbolTable.insertBuiltIn(float4, "textureCube", samplerCube, float3);
 
-    //
-    // Texture Functions.
-    //
-    s.append(TString("vec4 texture2DLod(sampler2D sampler, vec2 coord, float lod);"));
-    s.append(TString("vec4 texture2DProjLod(sampler2D sampler, vec3 coord, float lod);"));
-    s.append(TString("vec4 texture2DProjLod(sampler2D sampler, vec4 coord, float lod);"));
-    s.append(TString("vec4 textureCubeLod(samplerCube sampler, vec3 coord, float lod);"));
+    if (resources.OES_EGL_image_external)
+    {
+        TType *samplerExternalOES = new TType(EbtSamplerExternalOES, EbpUndefined, EvqGlobal, 1);
 
-    return s;
-}
+        symbolTable.insertBuiltIn(float4, "texture2D", samplerExternalOES, float2);
+        symbolTable.insertBuiltIn(float4, "texture2DProj", samplerExternalOES, float3);
+        symbolTable.insertBuiltIn(float4, "texture2DProj", samplerExternalOES, float4);
+    }
 
-//============================================================================
-//
-// Prototypes for built-in functions seen by fragment shaders only.
-//
-//============================================================================
-static TString BuiltInFunctionsFragment(const ShBuiltInResources& resources)
-{
-    TString s;
+    if (resources.ARB_texture_rectangle)
+    {
+        TType *sampler2DRect = new TType(EbtSampler2DRect, EbpUndefined, EvqGlobal, 1);
 
-    //
-    // Texture Functions.
-    //
-    s.append(TString("vec4 texture2D(sampler2D sampler, vec2 coord, float bias);"));
-    s.append(TString("vec4 texture2DProj(sampler2D sampler, vec3 coord, float bias);"));
-    s.append(TString("vec4 texture2DProj(sampler2D sampler, vec4 coord, float bias);"));
-    s.append(TString("vec4 textureCube(samplerCube sampler, vec3 coord, float bias);"));
-
-    if (resources.OES_standard_derivatives) {
-        s.append(TString("float dFdx(float p);"));
-        s.append(TString("vec2  dFdx(vec2  p);"));
-        s.append(TString("vec3  dFdx(vec3  p);"));
-        s.append(TString("vec4  dFdx(vec4  p);"));
-
-        s.append(TString("float dFdy(float p);"));
-        s.append(TString("vec2  dFdy(vec2  p);"));
-        s.append(TString("vec3  dFdy(vec3  p);"));
-        s.append(TString("vec4  dFdy(vec4  p);"));
-
-        s.append(TString("float fwidth(float p);"));
-        s.append(TString("vec2  fwidth(vec2  p);"));
-        s.append(TString("vec3  fwidth(vec3  p);"));
-        s.append(TString("vec4  fwidth(vec4  p);"));
+        symbolTable.insertBuiltIn(float4, "texture2DRect", sampler2DRect, float2);
+        symbolTable.insertBuiltIn(float4, "texture2DRectProj", sampler2DRect, float3);
+        symbolTable.insertBuiltIn(float4, "texture2DRectProj", sampler2DRect, float4);
     }
 
-    return s;
-}
+    if (type == SH_FRAGMENT_SHADER)
+    {
+        symbolTable.insertBuiltIn(float4, "texture2D", sampler2D, float2, float1);
+        symbolTable.insertBuiltIn(float4, "texture2DProj", sampler2D, float3, float1);
+        symbolTable.insertBuiltIn(float4, "texture2DProj", sampler2D, float4, float1);
+        symbolTable.insertBuiltIn(float4, "textureCube", samplerCube, float3, float1);
+
+        if (resources.OES_standard_derivatives)
+        {
+            symbolTable.insertBuiltIn(float1, "dFdx", float1);
+            symbolTable.insertBuiltIn(float2, "dFdx", float2);
+            symbolTable.insertBuiltIn(float3, "dFdx", float3);
+            symbolTable.insertBuiltIn(float4, "dFdx", float4);
+            
+            symbolTable.insertBuiltIn(float1, "dFdy", float1);
+            symbolTable.insertBuiltIn(float2, "dFdy", float2);
+            symbolTable.insertBuiltIn(float3, "dFdy", float3);
+            symbolTable.insertBuiltIn(float4, "dFdy", float4);
+
+            symbolTable.insertBuiltIn(float1, "fwidth", float1);
+            symbolTable.insertBuiltIn(float2, "fwidth", float2);
+            symbolTable.insertBuiltIn(float3, "fwidth", float3);
+            symbolTable.insertBuiltIn(float4, "fwidth", float4);
+        }
+    }
 
-//============================================================================
-//
-// Standard uniforms.
-//
-//============================================================================
-static TString StandardUniforms()
-{
-    TString s;
+    if(type == SH_VERTEX_SHADER)
+    {
+        symbolTable.insertBuiltIn(float4, "texture2DLod", sampler2D, float2, float1);
+        symbolTable.insertBuiltIn(float4, "texture2DProjLod", sampler2D, float3, float1);
+        symbolTable.insertBuiltIn(float4, "texture2DProjLod", sampler2D, float4, float1);
+        symbolTable.insertBuiltIn(float4, "textureCubeLod", samplerCube, float3, float1);
+    }
 
     //
     // Depth range in window coordinates
     //
-    s.append(TString("struct gl_DepthRangeParameters {"));
-    s.append(TString("    highp float near;"));        // n
-    s.append(TString("    highp float far;"));         // f
-    s.append(TString("    highp float diff;"));        // f - n
-    s.append(TString("};"));
-    s.append(TString("uniform gl_DepthRangeParameters gl_DepthRange;"));
-
-    return s;
-}
-
-//============================================================================
-//
-// Default precision for vertex shaders.
-//
-//============================================================================
-static TString DefaultPrecisionVertex()
-{
-    TString s;
-
-    s.append(TString("precision highp int;"));
-    s.append(TString("precision highp float;"));
-
-    return s;
-}
-
-//============================================================================
-//
-// Default precision for fragment shaders.
-//
-//============================================================================
-static TString DefaultPrecisionFragment()
-{
-    TString s;
+    TFieldList *fields = NewPoolTFieldList();
+    TField *near = new TField(new TType(EbtFloat, EbpHigh, EvqGlobal, 1), NewPoolTString("near"));
+    TField *far = new TField(new TType(EbtFloat, EbpHigh, EvqGlobal, 1), NewPoolTString("far"));
+    TField *diff = new TField(new TType(EbtFloat, EbpHigh, EvqGlobal, 1), NewPoolTString("diff"));
+    fields->push_back(near);
+    fields->push_back(far);
+    fields->push_back(diff);
+    TStructure *depthRangeStruct = new TStructure(NewPoolTString("gl_DepthRangeParameters"), fields);
+    TVariable *depthRangeParameters = new TVariable(&depthRangeStruct->name(), depthRangeStruct, true);
+    symbolTable.insert(*depthRangeParameters);
+    TVariable *depthRange = new TVariable(NewPoolTString("gl_DepthRange"), TType(depthRangeStruct));
+    depthRange->setQualifier(EvqUniform);
+    symbolTable.insert(*depthRange);
 
-    s.append(TString("precision mediump int;"));
-    // No default precision for float in fragment shaders
-
-    return s;
-}
-
-//============================================================================
-//
-// Implementation dependent built-in constants.
-//
-//============================================================================
-static TString BuiltInConstants(ShShaderSpec spec, const ShBuiltInResources &resources)
-{
-    TStringStream s;
-
-    s << "const int gl_MaxVertexAttribs = " << resources.MaxVertexAttribs << ";";
-    s << "const int gl_MaxVertexUniformVectors = " << resources.MaxVertexUniformVectors << ";";
-
-    s << "const int gl_MaxVaryingVectors = " << resources.MaxVaryingVectors << ";";
-    s << "const int gl_MaxVertexTextureImageUnits = " << resources.MaxVertexTextureImageUnits << ";";
-    s << "const int gl_MaxCombinedTextureImageUnits = " << resources.MaxCombinedTextureImageUnits << ";";
-    s << "const int gl_MaxTextureImageUnits = " << resources.MaxTextureImageUnits << ";";
-    s << "const int gl_MaxFragmentUniformVectors = " << resources.MaxFragmentUniformVectors << ";";
+    //
+    // Implementation dependent built-in constants.
+    //
+    symbolTable.insertConstInt("gl_MaxVertexAttribs", resources.MaxVertexAttribs);
+    symbolTable.insertConstInt("gl_MaxVertexUniformVectors", resources.MaxVertexUniformVectors);
+    symbolTable.insertConstInt("gl_MaxVaryingVectors", resources.MaxVaryingVectors);
+    symbolTable.insertConstInt("gl_MaxVertexTextureImageUnits", resources.MaxVertexTextureImageUnits);
+    symbolTable.insertConstInt("gl_MaxCombinedTextureImageUnits", resources.MaxCombinedTextureImageUnits);
+    symbolTable.insertConstInt("gl_MaxTextureImageUnits", resources.MaxTextureImageUnits);
+    symbolTable.insertConstInt("gl_MaxFragmentUniformVectors", resources.MaxFragmentUniformVectors);
 
     if (spec != SH_CSS_SHADERS_SPEC)
-        s << "const int gl_MaxDrawBuffers = " << resources.MaxDrawBuffers << ";";
-
-    return s.str();
-}
-
-void TBuiltIns::initialize(ShShaderType type, ShShaderSpec spec,
-                           const ShBuiltInResources& resources)
-{
-    switch (type) {
-    case SH_FRAGMENT_SHADER:
-        builtInStrings.push_back(DefaultPrecisionFragment());
-        builtInStrings.push_back(BuiltInFunctionsCommon(resources));
-        builtInStrings.push_back(BuiltInFunctionsFragment(resources));
-        builtInStrings.push_back(StandardUniforms());
-        break;
-
-    case SH_VERTEX_SHADER:
-        builtInStrings.push_back(DefaultPrecisionVertex());
-        builtInStrings.push_back(BuiltInFunctionsCommon(resources));
-        builtInStrings.push_back(BuiltInFunctionsVertex(resources));
-        builtInStrings.push_back(StandardUniforms());
-        break;
-
-    default: assert(false && "Language not supported");
+    {
+        symbolTable.insertConstInt("gl_MaxDrawBuffers", resources.MaxDrawBuffers);
     }
-
-    builtInStrings.push_back(BuiltInConstants(spec, resources));
 }
 
 void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
-                      const ShBuiltInResourcesresources,
-                      TSymbolTablesymbolTable)
+                      const ShBuiltInResources &resources,
+                      TSymbolTable &symbolTable)
 {
     //
     // First, insert some special built-in variables that are not in 
@@ -539,6 +439,10 @@ void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
         if (spec != SH_CSS_SHADERS_SPEC) {
             symbolTable.insert(*new TVariable(NewPoolTString("gl_FragColor"),                   TType(EbtFloat, EbpMedium, EvqFragColor,   4)));
             symbolTable.insert(*new TVariable(NewPoolTString("gl_FragData[gl_MaxDrawBuffers]"), TType(EbtFloat, EbpMedium, EvqFragData,    4)));
+            if (resources.EXT_frag_depth) {
+                symbolTable.insert(*new TVariable(NewPoolTString("gl_FragDepthEXT"),            TType(EbtFloat, resources.FragmentPrecisionHigh ? EbpHigh : EbpMedium, EvqFragDepth, 1)));
+                symbolTable.relateToExtension("gl_FragDepthEXT", "GL_EXT_frag_depth");
+            }
         } else {
             symbolTable.insert(*new TVariable(NewPoolTString("css_MixColor"),                   TType(EbtFloat, EbpMedium, EvqGlobal,      4)));
             symbolTable.insert(*new TVariable(NewPoolTString("css_ColorMatrix"),                TType(EbtFloat, EbpMedium, EvqGlobal,      4, true)));
@@ -560,8 +464,6 @@ void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
     // expected to be resolved through a library of functions, versus as
     // operations.
     //
-    symbolTable.relateToOperator("not",              EOpVectorLogicalNot);
-
     symbolTable.relateToOperator("matrixCompMult",   EOpMul);
 
     symbolTable.relateToOperator("equal",            EOpVectorEqual);
@@ -612,6 +514,7 @@ void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
     
     symbolTable.relateToOperator("any",          EOpAny);
     symbolTable.relateToOperator("all",          EOpAll);
+    symbolTable.relateToOperator("not",          EOpVectorLogicalNot);
 
     // Map language-specific operators.
     switch(type) {
@@ -656,4 +559,6 @@ void InitExtensionBehavior(const ShBuiltInResources& resources,
         extBehavior["GL_ARB_texture_rectangle"] = EBhUndefined;
     if (resources.EXT_draw_buffers)
         extBehavior["GL_EXT_draw_buffers"] = EBhUndefined;
+    if (resources.EXT_frag_depth)
+        extBehavior["GL_EXT_frag_depth"] = EBhUndefined;
 }
index 8b0adc6b4c23a046aa1d4015f2b01a5059f40379..4aa13466acad29e666c05fad6759a8daff9db80d 100644 (file)
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
 #include "compiler/ShHandle.h"
 #include "compiler/SymbolTable.h"
 
-typedef TVector<TString> TBuiltInStrings;
-
-class TBuiltIns {
-public:
-    POOL_ALLOCATOR_NEW_DELETE(GlobalPoolAllocator)
-
-    void initialize(ShShaderType type, ShShaderSpec spec,
-                    const ShBuiltInResources& resources);
-    const TBuiltInStrings& getBuiltInStrings() { return builtInStrings; }
-
-protected:
-    TBuiltInStrings builtInStrings;
-};
+void InsertBuiltInFunctions(ShShaderType type, ShShaderSpec spec, const ShBuiltInResources &resources, TSymbolTable &table);
 
 void IdentifyBuiltIns(ShShaderType type, ShShaderSpec spec,
                       const ShBuiltInResources& resources,
index c0b08c10b177d8451c4aa63a45f48f1065e76caa..334f0d756f9db20cd301a06f40dae5c484546835 100644 (file)
@@ -1,5 +1,5 @@
 //
-// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 //
@@ -131,7 +131,7 @@ const char* getOperatorString(TOperator op) {
 //
 // Returns the added node.
 //
-TIntermSymbol* TIntermediate::addSymbol(int id, const TString& name, const TType& type, TSourceLoc line)
+TIntermSymbol* TIntermediate::addSymbol(int id, const TString& name, const TType& type, const TSourceLoc& line)
 {
     TIntermSymbol* node = new TIntermSymbol(id, name, type);
     node->setLine(line);
@@ -144,7 +144,7 @@ TIntermSymbol* TIntermediate::addSymbol(int id, const TString& name, const TType
 //
 // Returns the added node.
 //
-TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc line, TSymbolTable& symbolTable)
+TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIntermTyped* right, const TSourceLoc& line, TSymbolTable& symbolTable)
 {
     switch (op) {
         case EOpEqual:
@@ -200,8 +200,6 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn
     // one and promote it to the right type.
     //
     TIntermBinary* node = new TIntermBinary(op);
-    if (line == 0)
-        line = right->getLine();
     node->setLine(line);
 
     node->setLeft(left);
@@ -230,15 +228,13 @@ TIntermTyped* TIntermediate::addBinaryMath(TOperator op, TIntermTyped* left, TIn
 //
 // Returns the added node.
 //
-TIntermTyped* TIntermediate::addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right, TSourceLoc line)
+TIntermTyped* TIntermediate::addAssign(TOperator op, TIntermTyped* left, TIntermTyped* right, const TSourceLoc& line)
 {
     //
     // Like adding binary math, except the conversion can only go
     // from right to left.
     //
     TIntermBinary* node = new TIntermBinary(op);
-    if (line == 0)
-        line = left->getLine();
     node->setLine(line);
 
     TIntermTyped* child = addConversion(op, left->getType(), right);
@@ -260,11 +256,9 @@ TIntermTyped* TIntermediate::addAssign(TOperator op, TIntermTyped* left, TInterm
 // Returns the added node.
 // The caller should set the type of the returned node.
 //
-TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index, TSourceLoc line)
+TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermTyped* index, const TSourceLoc& line)
 {
     TIntermBinary* node = new TIntermBinary(op);
-    if (line == 0)
-        line = index->getLine();
     node->setLine(line);
     node->setLeft(base);
     node->setRight(index);
@@ -279,13 +273,13 @@ TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermT
 //
 // Returns the added node.
 //
-TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermNode* childNode, TSourceLoc line, TSymbolTable& symbolTable)
+TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermNode* childNode, const TSourceLoc& line, TSymbolTable& symbolTable)
 {
     TIntermUnary* node;
     TIntermTyped* child = childNode->getAsTyped();
 
     if (child == 0) {
-        infoSink.info.message(EPrefixInternalError, "Bad type in AddUnaryMath", line);
+        infoSink.info.message(EPrefixInternalError, line, "Bad type in AddUnaryMath");
         return 0;
     }
 
@@ -348,8 +342,6 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermNode* childNode,
     // Make a new node for the operator.
     //
     node = new TIntermUnary(op);
-    if (line == 0)
-        line = child->getLine();
     node->setLine(line);
     node->setOperand(child);
 
@@ -376,7 +368,7 @@ TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermNode* childNode,
 // Returns an aggregate node, which could be the one passed in if
 // it was already an aggregate but no operator was set.
 //
-TIntermAggregate* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator op, TSourceLoc line)
+TIntermAggregate* TIntermediate::setAggregateOperator(TIntermNode* node, TOperator op, const TSourceLoc& line)
 {
     TIntermAggregate* aggNode;
 
@@ -391,8 +383,6 @@ TIntermAggregate* TIntermediate::setAggregateOperator(TIntermNode* node, TOperat
             //
             aggNode = new TIntermAggregate();
             aggNode->getSequence().push_back(node);
-            if (line == 0)
-                line = node->getLine();
         }
     } else
         aggNode = new TIntermAggregate();
@@ -401,8 +391,7 @@ TIntermAggregate* TIntermediate::setAggregateOperator(TIntermNode* node, TOperat
     // Set the operator.
     //
     aggNode->setOp(op);
-    if (line != 0)
-        aggNode->setLine(line);
+    aggNode->setLine(line);
 
     return aggNode;
 }
@@ -491,7 +480,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
                     case EbtInt:   newOp = EOpConvIntToFloat;  break;
                     case EbtBool:  newOp = EOpConvBoolToFloat; break;
                     default:
-                        infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine());
+                        infoSink.info.message(EPrefixInternalError, node->getLine(), "Bad promotion node");
                         return 0;
                 }
                 break;
@@ -500,7 +489,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
                     case EbtInt:   newOp = EOpConvIntToBool;   break;
                     case EbtFloat: newOp = EOpConvFloatToBool; break;
                     default:
-                        infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine());
+                        infoSink.info.message(EPrefixInternalError, node->getLine(), "Bad promotion node");
                         return 0;
                 }
                 break;
@@ -509,12 +498,12 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
                     case EbtBool:   newOp = EOpConvBoolToInt;  break;
                     case EbtFloat:  newOp = EOpConvFloatToInt; break;
                     default:
-                        infoSink.info.message(EPrefixInternalError, "Bad promotion node", node->getLine());
+                        infoSink.info.message(EPrefixInternalError, node->getLine(), "Bad promotion node");
                         return 0;
                 }
                 break;
             default:
-                infoSink.info.message(EPrefixInternalError, "Bad promotion type", node->getLine());
+                infoSink.info.message(EPrefixInternalError, node->getLine(), "Bad promotion type");
                 return 0;
         }
 
@@ -534,7 +523,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
 // Returns the resulting aggregate, unless 0 was passed in for
 // both existing nodes.
 //
-TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* right, TSourceLoc line)
+TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* right, const TSourceLoc& line)
 {
     if (left == 0 && right == 0)
         return 0;
@@ -551,8 +540,7 @@ TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* r
     if (right)
         aggNode->getSequence().push_back(right);
 
-    if (line != 0)
-        aggNode->setLine(line);
+    aggNode->setLine(line);
 
     return aggNode;
 }
@@ -562,18 +550,14 @@ TIntermAggregate* TIntermediate::growAggregate(TIntermNode* left, TIntermNode* r
 //
 // Returns an aggregate, unless 0 was passed in for the existing node.
 //
-TIntermAggregate* TIntermediate::makeAggregate(TIntermNode* node, TSourceLoc line)
+TIntermAggregate* TIntermediate::makeAggregate(TIntermNode* node, const TSourceLoc& line)
 {
     if (node == 0)
         return 0;
 
     TIntermAggregate* aggNode = new TIntermAggregate;
     aggNode->getSequence().push_back(node);
-
-    if (line != 0)
-        aggNode->setLine(line);
-    else
-        aggNode->setLine(node->getLine());
+    aggNode->setLine(line);
 
     return aggNode;
 }
@@ -585,7 +569,7 @@ TIntermAggregate* TIntermediate::makeAggregate(TIntermNode* node, TSourceLoc lin
 //
 // Returns the selection node created.
 //
-TIntermNode* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nodePair, TSourceLoc line)
+TIntermNode* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nodePair, const TSourceLoc& line)
 {
     //
     // For compile time constant selections, prune the code and
@@ -593,7 +577,7 @@ TIntermNode* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nod
     //
 
     if (cond->getAsTyped() && cond->getAsTyped()->getAsConstantUnion()) {
-        if (cond->getAsTyped()->getAsConstantUnion()->getUnionArrayPointer()->getBConst() == true)
+        if (cond->getAsConstantUnion()->getBConst(0) == true)
             return nodePair.node1 ? setAggregateOperator(nodePair.node1, EOpSequence, nodePair.node1->getLine()) : NULL;
         else
             return nodePair.node2 ? setAggregateOperator(nodePair.node2, EOpSequence, nodePair.node2->getLine()) : NULL;
@@ -606,7 +590,7 @@ TIntermNode* TIntermediate::addSelection(TIntermTyped* cond, TIntermNodePair nod
 }
 
 
-TIntermTyped* TIntermediate::addComma(TIntermTyped* left, TIntermTyped* right, TSourceLoc line)
+TIntermTyped* TIntermediate::addComma(TIntermTyped* left, TIntermTyped* right, const TSourceLoc& line)
 {
     if (left->getType().getQualifier() == EvqConst && right->getType().getQualifier() == EvqConst) {
         return right;
@@ -626,7 +610,7 @@ TIntermTyped* TIntermediate::addComma(TIntermTyped* left, TIntermTyped* right, T
 //
 // Returns the selection node created, or 0 if one could not be.
 //
-TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, TSourceLoc line)
+TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* trueBlock, TIntermTyped* falseBlock, const TSourceLoc& line)
 {
     //
     // Get compatible types.
@@ -647,7 +631,7 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true
     //
 
     if (cond->getAsConstantUnion() && trueBlock->getAsConstantUnion() && falseBlock->getAsConstantUnion()) {
-        if (cond->getAsConstantUnion()->getUnionArrayPointer()->getBConst())
+        if (cond->getAsConstantUnion()->getBConst(0))
             return trueBlock;
         else
             return falseBlock;
@@ -669,7 +653,7 @@ TIntermTyped* TIntermediate::addSelection(TIntermTyped* cond, TIntermTyped* true
 // Returns the constant union node created.
 //
 
-TIntermConstantUnion* TIntermediate::addConstantUnion(ConstantUnion* unionArrayPointer, const TType& t, TSourceLoc line)
+TIntermConstantUnion* TIntermediate::addConstantUnion(ConstantUnion* unionArrayPointer, const TType& t, const TSourceLoc& line)
 {
     TIntermConstantUnion* node = new TIntermConstantUnion(unionArrayPointer, t);
     node->setLine(line);
@@ -677,7 +661,7 @@ TIntermConstantUnion* TIntermediate::addConstantUnion(ConstantUnion* unionArrayP
     return node;
 }
 
-TIntermTyped* TIntermediate::addSwizzle(TVectorFields& fields, TSourceLoc line)
+TIntermTyped* TIntermediate::addSwizzle(TVectorFields& fields, const TSourceLoc& line)
 {
 
     TIntermAggregate* node = new TIntermAggregate(EOpSequence);
@@ -700,7 +684,7 @@ TIntermTyped* TIntermediate::addSwizzle(TVectorFields& fields, TSourceLoc line)
 //
 // Create loop nodes.
 //
-TIntermNode* TIntermediate::addLoop(TLoopType type, TIntermNode* init, TIntermTyped* cond, TIntermTyped* expr, TIntermNode* body, TSourceLoc line)
+TIntermNode* TIntermediate::addLoop(TLoopType type, TIntermNode* init, TIntermTyped* cond, TIntermTyped* expr, TIntermNode* body, const TSourceLoc& line)
 {
     TIntermNode* node = new TIntermLoop(type, init, cond, expr, body);
     node->setLine(line);
@@ -711,12 +695,12 @@ TIntermNode* TIntermediate::addLoop(TLoopType type, TIntermNode* init, TIntermTy
 //
 // Add branches.
 //
-TIntermBranch* TIntermediate::addBranch(TOperator branchOp, TSourceLoc line)
+TIntermBranch* TIntermediate::addBranch(TOperator branchOp, const TSourceLoc& line)
 {
     return addBranch(branchOp, 0, line);
 }
 
-TIntermBranch* TIntermediate::addBranch(TOperator branchOp, TIntermTyped* expression, TSourceLoc line)
+TIntermBranch* TIntermediate::addBranch(TOperator branchOp, TIntermTyped* expression, const TSourceLoc& line)
 {
     TIntermBranch* node = new TIntermBranch(branchOp, expression);
     node->setLine(line);
@@ -846,6 +830,7 @@ bool TIntermUnary::promote(TInfoSink&)
     }
 
     setType(operand->getType());
+    type.setQualifier(EvqTemporary);
 
     return true;
 }
@@ -860,7 +845,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
 {
     // This function only handles scalars, vectors, and matrices.
     if (left->isArray() || right->isArray()) {
-        infoSink.info.message(EPrefixInternalError, "Invalid operation for arrays", getLine());
+        infoSink.info.message(EPrefixInternalError, getLine(), "Invalid operation for arrays");
         return false;
     }
 
@@ -965,7 +950,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
                     setType(TType(basicType, higherPrecision, EvqTemporary, size, false));
                 }
             } else {
-                infoSink.info.message(EPrefixInternalError, "Missing elses", getLine());
+                infoSink.info.message(EPrefixInternalError, getLine(), "Missing elses");
                 return false;
             }
             break;
@@ -994,7 +979,7 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
                     setType(TType(basicType, higherPrecision, EvqTemporary, size, false));
                 }
             } else {
-                infoSink.info.message(EPrefixInternalError, "Missing elses", getLine());
+                infoSink.info.message(EPrefixInternalError, getLine(), "Missing elses");
                 return false;
             }
             break;
@@ -1034,23 +1019,22 @@ bool TIntermBinary::promote(TInfoSink& infoSink)
 
 bool CompareStruct(const TType& leftNodeType, ConstantUnion* rightUnionArray, ConstantUnion* leftUnionArray)
 {
-    const TTypeList* fields = leftNodeType.getStruct();
+    const TFieldList& fields = leftNodeType.getStruct()->fields();
 
-    size_t structSize = fields->size();
-    int index = 0;
+    size_t structSize = fields.size();
+    size_t index = 0;
 
     for (size_t j = 0; j < structSize; j++) {
-        int size = (*fields)[j].type->getObjectSize();
-        for (int i = 0; i < size; i++) {
-            if ((*fields)[j].type->getBasicType() == EbtStruct) {
-                if (!CompareStructure(*(*fields)[j].type, &rightUnionArray[index], &leftUnionArray[index]))
+        size_t size = fields[j]->type()->getObjectSize();
+        for (size_t i = 0; i < size; i++) {
+            if (fields[j]->type()->getBasicType() == EbtStruct) {
+                if (!CompareStructure(*(fields[j]->type()), &rightUnionArray[index], &leftUnionArray[index]))
                     return false;
             } else {
                 if (leftUnionArray[index] != rightUnionArray[index])
                     return false;
                 index++;
             }
-
         }
     }
     return true;
@@ -1062,10 +1046,10 @@ bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray,
         TType typeWithoutArrayness = leftNodeType;
         typeWithoutArrayness.clearArrayness();
 
-        int arraySize = leftNodeType.getArraySize();
+        size_t arraySize = leftNodeType.getArraySize();
 
-        for (int i = 0; i < arraySize; ++i) {
-            int offset = typeWithoutArrayness.getObjectSize() * i;
+        for (size_t i = 0; i < arraySize; ++i) {
+            size_t offset = typeWithoutArrayness.getObjectSize() * i;
             if (!CompareStruct(typeWithoutArrayness, &rightUnionArray[offset], &leftUnionArray[offset]))
                 return false;
         }
@@ -1085,7 +1069,7 @@ bool CompareStructure(const TType& leftNodeType, ConstantUnion* rightUnionArray,
 TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNode, TInfoSink& infoSink)
 {
     ConstantUnion *unionArray = getUnionArrayPointer();
-    int objectSize = getType().getObjectSize();
+    size_t objectSize = getType().getObjectSize();
 
     if (constantNode) {  // binary operations
         TIntermConstantUnion *node = constantNode->getAsConstantUnion();
@@ -1095,13 +1079,13 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
         // for a case like float f = 1.2 + vec4(2,3,4,5);
         if (constantNode->getType().getObjectSize() == 1 && objectSize > 1) {
             rightUnionArray = new ConstantUnion[objectSize];
-            for (int i = 0; i < objectSize; ++i)
+            for (size_t i = 0; i < objectSize; ++i)
                 rightUnionArray[i] = *node->getUnionArrayPointer();
             returnType = getType();
         } else if (constantNode->getType().getObjectSize() > 1 && objectSize == 1) {
             // for a case like float f = vec4(2,3,4,5) + 1.2;
             unionArray = new ConstantUnion[constantNode->getType().getObjectSize()];
-            for (int i = 0; i < constantNode->getType().getObjectSize(); ++i)
+            for (size_t i = 0; i < constantNode->getType().getObjectSize(); ++i)
                 unionArray[i] = *getUnionArrayPointer();
             returnType = node->getType();
             objectSize = constantNode->getType().getObjectSize();
@@ -1115,14 +1099,14 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
             case EOpAdd:
                 tempConstArray = new ConstantUnion[objectSize];
                 {// support MSVC++6.0
-                    for (int i = 0; i < objectSize; i++)
+                    for (size_t i = 0; i < objectSize; i++)
                         tempConstArray[i] = unionArray[i] + rightUnionArray[i];
                 }
                 break;
             case EOpSub:
                 tempConstArray = new ConstantUnion[objectSize];
                 {// support MSVC++6.0
-                    for (int i = 0; i < objectSize; i++)
+                    for (size_t i = 0; i < objectSize; i++)
                         tempConstArray[i] = unionArray[i] - rightUnionArray[i];
                 }
                 break;
@@ -1132,13 +1116,13 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
             case EOpMatrixTimesScalar:
                 tempConstArray = new ConstantUnion[objectSize];
                 {// support MSVC++6.0
-                    for (int i = 0; i < objectSize; i++)
+                    for (size_t i = 0; i < objectSize; i++)
                         tempConstArray[i] = unionArray[i] * rightUnionArray[i];
                 }
                 break;
             case EOpMatrixTimesMatrix:
                 if (getType().getBasicType() != EbtFloat || node->getBasicType() != EbtFloat) {
-                    infoSink.info.message(EPrefixInternalError, "Constant Folding cannot be done for matrix multiply", getLine());
+                    infoSink.info.message(EPrefixInternalError, getLine(), "Constant Folding cannot be done for matrix multiply");
                     return 0;
                 }
                 {// support MSVC++6.0
@@ -1157,11 +1141,11 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
             case EOpDiv:
                 tempConstArray = new ConstantUnion[objectSize];
                 {// support MSVC++6.0
-                    for (int i = 0; i < objectSize; i++) {
+                    for (size_t i = 0; i < objectSize; i++) {
                         switch (getType().getBasicType()) {
             case EbtFloat:
                 if (rightUnionArray[i] == 0.0f) {
-                    infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", getLine());
+                    infoSink.info.message(EPrefixWarning, getLine(), "Divide by zero error during constant folding");
                     tempConstArray[i].setFConst(unionArray[i].getFConst() < 0 ? -FLT_MAX : FLT_MAX);
                 } else
                     tempConstArray[i].setFConst(unionArray[i].getFConst() / rightUnionArray[i].getFConst());
@@ -1169,13 +1153,13 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
 
             case EbtInt:
                 if (rightUnionArray[i] == 0) {
-                    infoSink.info.message(EPrefixWarning, "Divide by zero error during constant folding", getLine());
+                    infoSink.info.message(EPrefixWarning, getLine(), "Divide by zero error during constant folding");
                     tempConstArray[i].setIConst(INT_MAX);
                 } else
                     tempConstArray[i].setIConst(unionArray[i].getIConst() / rightUnionArray[i].getIConst());
                 break;
             default:
-                infoSink.info.message(EPrefixInternalError, "Constant folding cannot be done for \"/\"", getLine());
+                infoSink.info.message(EPrefixInternalError, getLine(), "Constant folding cannot be done for \"/\"");
                 return 0;
                         }
                     }
@@ -1184,7 +1168,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
 
             case EOpMatrixTimesVector:
                 if (node->getBasicType() != EbtFloat) {
-                    infoSink.info.message(EPrefixInternalError, "Constant Folding cannot be done for matrix times vector", getLine());
+                    infoSink.info.message(EPrefixInternalError, getLine(), "Constant Folding cannot be done for matrix times vector");
                     return 0;
                 }
                 tempConstArray = new ConstantUnion[getNominalSize()];
@@ -1205,7 +1189,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
 
             case EOpVectorTimesMatrix:
                 if (getType().getBasicType() != EbtFloat) {
-                    infoSink.info.message(EPrefixInternalError, "Constant Folding cannot be done for vector times matrix", getLine());
+                    infoSink.info.message(EPrefixInternalError, getLine(), "Constant Folding cannot be done for vector times matrix");
                     return 0;
                 }
 
@@ -1223,7 +1207,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
             case EOpLogicalAnd: // this code is written for possible future use, will not get executed currently
                 tempConstArray = new ConstantUnion[objectSize];
                 {// support MSVC++6.0
-                    for (int i = 0; i < objectSize; i++)
+                    for (size_t i = 0; i < objectSize; i++)
                         tempConstArray[i] = unionArray[i] && rightUnionArray[i];
                 }
                 break;
@@ -1231,7 +1215,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
             case EOpLogicalOr: // this code is written for possible future use, will not get executed currently
                 tempConstArray = new ConstantUnion[objectSize];
                 {// support MSVC++6.0
-                    for (int i = 0; i < objectSize; i++)
+                    for (size_t i = 0; i < objectSize; i++)
                         tempConstArray[i] = unionArray[i] || rightUnionArray[i];
                 }
                 break;
@@ -1239,7 +1223,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
             case EOpLogicalXor:
                 tempConstArray = new ConstantUnion[objectSize];
                 {// support MSVC++6.0
-                    for (int i = 0; i < objectSize; i++)
+                    for (size_t i = 0; i < objectSize; i++)
                         switch (getType().getBasicType()) {
             case EbtBool: tempConstArray[i].setBConst((unionArray[i] == rightUnionArray[i]) ? false : true); break;
             default: assert(false && "Default missing");
@@ -1285,7 +1269,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
                     if (!CompareStructure(node->getType(), node->getUnionArrayPointer(), unionArray))
                         boolNodeFlag = true;
                 } else {
-                    for (int i = 0; i < objectSize; i++) {
+                    for (size_t i = 0; i < objectSize; i++) {
                         if (unionArray[i] != rightUnionArray[i]) {
                             boolNodeFlag = true;
                             break;  // break out of for loop
@@ -1311,7 +1295,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
                     if (CompareStructure(node->getType(), node->getUnionArrayPointer(), unionArray))
                         boolNodeFlag = true;
                 } else {
-                    for (int i = 0; i < objectSize; i++) {
+                    for (size_t i = 0; i < objectSize; i++) {
                         if (unionArray[i] == rightUnionArray[i]) {
                             boolNodeFlag = true;
                             break;  // break out of for loop
@@ -1333,7 +1317,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
                 return tempNode;
 
             default:
-                infoSink.info.message(EPrefixInternalError, "Invalid operator for constant folding", getLine());
+                infoSink.info.message(EPrefixInternalError, getLine(), "Invalid operator for constant folding");
                 return 0;
         }
         tempNode = new TIntermConstantUnion(tempConstArray, returnType);
@@ -1346,14 +1330,14 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
         //
         TIntermConstantUnion *newNode = 0;
         ConstantUnion* tempConstArray = new ConstantUnion[objectSize];
-        for (int i = 0; i < objectSize; i++) {
+        for (size_t i = 0; i < objectSize; i++) {
             switch(op) {
                 case EOpNegative:
                     switch (getType().getBasicType()) {
                         case EbtFloat: tempConstArray[i].setFConst(-unionArray[i].getFConst()); break;
                         case EbtInt:   tempConstArray[i].setIConst(-unionArray[i].getIConst()); break;
                         default:
-                            infoSink.info.message(EPrefixInternalError, "Unary operation not folded into constant", getLine());
+                            infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant");
                             return 0;
                     }
                     break;
@@ -1361,7 +1345,7 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
                     switch (getType().getBasicType()) {
                         case EbtBool:  tempConstArray[i].setBConst(!unionArray[i].getBConst()); break;
                         default:
-                            infoSink.info.message(EPrefixInternalError, "Unary operation not folded into constant", getLine());
+                            infoSink.info.message(EPrefixInternalError, getLine(), "Unary operation not folded into constant");
                             return 0;
                     }
                     break;
@@ -1377,65 +1361,64 @@ TIntermTyped* TIntermConstantUnion::fold(TOperator op, TIntermTyped* constantNod
 
 TIntermTyped* TIntermediate::promoteConstantUnion(TBasicType promoteTo, TIntermConstantUnion* node)
 {
-    ConstantUnion *rightUnionArray = node->getUnionArrayPointer();
-    int size = node->getType().getObjectSize();
+    size_t size = node->getType().getObjectSize();
 
     ConstantUnion *leftUnionArray = new ConstantUnion[size];
 
-    for (int i=0; i < size; i++) {
+    for (size_t i = 0; i < size; i++) {
 
         switch (promoteTo) {
             case EbtFloat:
                 switch (node->getType().getBasicType()) {
                     case EbtInt:
-                        leftUnionArray[i].setFConst(static_cast<float>(rightUnionArray[i].getIConst()));
+                        leftUnionArray[i].setFConst(static_cast<float>(node->getIConst(static_cast<int>(i))));
                         break;
                     case EbtBool:
-                        leftUnionArray[i].setFConst(static_cast<float>(rightUnionArray[i].getBConst()));
+                        leftUnionArray[i].setFConst(static_cast<float>(node->getBConst(static_cast<bool>(i))));
                         break;
                     case EbtFloat:
-                        leftUnionArray[i] = rightUnionArray[i];
+                        leftUnionArray[i].setFConst(static_cast<float>(node->getFConst(static_cast<float>(i))));
                         break;
                     default:
-                        infoSink.info.message(EPrefixInternalError, "Cannot promote", node->getLine());
+                        infoSink.info.message(EPrefixInternalError, node->getLine(), "Cannot promote");
                         return 0;
                 }
                 break;
             case EbtInt:
                 switch (node->getType().getBasicType()) {
                     case EbtInt:
-                        leftUnionArray[i] = rightUnionArray[i];
+                        leftUnionArray[i].setIConst(static_cast<int>(node->getIConst(static_cast<int>(i))));
                         break;
                     case EbtBool:
-                        leftUnionArray[i].setIConst(static_cast<int>(rightUnionArray[i].getBConst()));
+                        leftUnionArray[i].setIConst(static_cast<int>(node->getBConst(static_cast<bool>(i))));
                         break;
                     case EbtFloat:
-                        leftUnionArray[i].setIConst(static_cast<int>(rightUnionArray[i].getFConst()));
+                        leftUnionArray[i].setIConst(static_cast<int>(node->getFConst(static_cast<float>(i))));
                         break;
                     default:
-                        infoSink.info.message(EPrefixInternalError, "Cannot promote", node->getLine());
+                        infoSink.info.message(EPrefixInternalError, node->getLine(), "Cannot promote");
                         return 0;
                 }
                 break;
             case EbtBool:
                 switch (node->getType().getBasicType()) {
                     case EbtInt:
-                        leftUnionArray[i].setBConst(rightUnionArray[i].getIConst() != 0);
+                        leftUnionArray[i].setBConst(node->getIConst(static_cast<int>(i)) != 0);
                         break;
                     case EbtBool:
-                        leftUnionArray[i] = rightUnionArray[i];
+                        leftUnionArray[i].setBConst(node->getBConst(static_cast<bool>(i)));
                         break;
                     case EbtFloat:
-                        leftUnionArray[i].setBConst(rightUnionArray[i].getFConst() != 0.0f);
+                        leftUnionArray[i].setBConst(node->getFConst(static_cast<float>(i)) != 0.0f);
                         break;
                     default:
-                        infoSink.info.message(EPrefixInternalError, "Cannot promote", node->getLine());
+                        infoSink.info.message(EPrefixInternalError, node->getLine(), "Cannot promote");
                         return 0;
                 }
 
                 break;
             default:
-                infoSink.info.message(EPrefixInternalError, "Incorrect data type found", node->getLine());
+                infoSink.info.message(EPrefixInternalError, node->getLine(), "Incorrect data type found");
                 return 0;
         }
 
index 206f403408b143c4330ac824b95da66ab625b3a5..10a451c0d76ec0d50300e52bb3c505265a3f6710 100644 (file)
@@ -19,3 +19,17 @@ bool TOutputGLSL::writeVariablePrecision(TPrecision)
 {
     return false;
 }
+
+void TOutputGLSL::visitSymbol(TIntermSymbol* node)
+{
+    TInfoSinkBase& out = objSink();
+
+    if (node->getSymbol() == "gl_FragDepthEXT")
+    {
+        out << "gl_FragDepth";
+    }
+    else
+    {
+        TOutputGLSLBase::visitSymbol(node);
+    }
+}
index 199b6f3e46cf7cd37479044c49377fb8199d7b33..fa68ac81030e933b483289350efc3532794de868 100644 (file)
@@ -20,6 +20,7 @@ public:
 
 protected:
     virtual bool writeVariablePrecision(TPrecision);
+    virtual void visitSymbol(TIntermSymbol* node);
 };
 
 #endif  // CROSSCOMPILERGLSL_OUTPUTGLSL_H_
index 1b9a10deaae78d518b3f0237a39ecee0b705a281..d677c756338a51dbb803b4258d3fb78e01877ca6 100644 (file)
@@ -79,25 +79,9 @@ void TOutputGLSLBase::writeVariableType(const TType& type)
     if ((qualifier != EvqTemporary) && (qualifier != EvqGlobal))
         out << type.getQualifierString() << " ";
     // Declare the struct if we have not done so already.
-    if ((type.getBasicType() == EbtStruct) &&
-        (mDeclaredStructs.find(type.getTypeName()) == mDeclaredStructs.end()))
+    if ((type.getBasicType() == EbtStruct) && !structDeclared(type.getStruct()))
     {
-        out << "struct " << hashName(type.getTypeName()) << "{\n";
-        const TTypeList* structure = type.getStruct();
-        ASSERT(structure != NULL);
-        for (size_t i = 0; i < structure->size(); ++i)
-        {
-            const TType* fieldType = (*structure)[i].type;
-            ASSERT(fieldType != NULL);
-            if (writeVariablePrecision(fieldType->getPrecision()))
-                out << " ";
-            out << getTypeName(*fieldType) << " " << hashName(fieldType->getFieldName());
-            if (fieldType->isArray())
-                out << arrayBrackets(*fieldType);
-            out << ";\n";
-        }
-        out << "}";
-        mDeclaredStructs.insert(type.getTypeName());
+        declareStruct(type.getStruct());
     }
     else
     {
@@ -138,24 +122,25 @@ const ConstantUnion* TOutputGLSLBase::writeConstantUnion(const TType& type,
 
     if (type.getBasicType() == EbtStruct)
     {
-        out << hashName(type.getTypeName()) << "(";
-        const TTypeList* structure = type.getStruct();
-        ASSERT(structure != NULL);
-        for (size_t i = 0; i < structure->size(); ++i)
+        const TStructure* structure = type.getStruct();
+        out << hashName(structure->name()) << "(";
+
+        const TFieldList& fields = structure->fields();
+        for (size_t i = 0; i < fields.size(); ++i)
         {
-            const TType* fieldType = (*structure)[i].type;
+            const TType* fieldType = fields[i]->type();
             ASSERT(fieldType != NULL);
             pConstUnion = writeConstantUnion(*fieldType, pConstUnion);
-            if (i != structure->size() - 1) out << ", ";
+            if (i != fields.size() - 1) out << ", ";
         }
         out << ")";
     }
     else
     {
-        int size = type.getObjectSize();
+        size_t size = type.getObjectSize();
         bool writeType = size > 1;
         if (writeType) out << getTypeName(type) << "(";
-        for (int i = 0; i < size; ++i, ++pConstUnion)
+        for (size_t i = 0; i < size; ++i, ++pConstUnion)
         {
             switch (pConstUnion->getType())
             {
@@ -260,12 +245,18 @@ bool TOutputGLSLBase::visitBinary(Visit visit, TIntermBinary* node)
         case EOpIndexDirectStruct:
             if (visit == InVisit)
             {
+                // Here we are writing out "foo.bar", where "foo" is struct
+                // and "bar" is field. In AST, it is represented as a binary
+                // node, where left child represents "foo" and right child "bar".
+                // The node itself represents ".". The struct field "bar" is
+                // actually stored as an index into TStructure::fields.
                 out << ".";
-                // TODO(alokp): ASSERT
-                TString fieldName = node->getType().getFieldName();
+                const TStructure* structure = node->getLeft()->getType().getStruct();
+                const TIntermConstantUnion* index = node->getRight()->getAsConstantUnion();
+                const TField* field = structure->fields()[index->getIConst(0)];
 
-                const TType& structType = node->getLeft()->getType();
-                if (!mSymbolTable.findBuiltIn(structType.getTypeName()))
+                TString fieldName = field->name();
+                if (!mSymbolTable.findBuiltIn(structure->name()))
                     fieldName = hashName(fieldName);
 
                 out << fieldName;
@@ -596,7 +587,7 @@ bool TOutputGLSLBase::visitAggregate(Visit visit, TIntermAggregate* node)
             {
                 const TType& type = node->getType();
                 ASSERT(type.getBasicType() == EbtStruct);
-                out << hashName(type.getTypeName()) << "(";
+                out << hashName(type.getStruct()->name()) << "(";
             }
             else if (visit == InVisit)
             {