objects = {
/* Begin PBXBuildFile section */
+ 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 */; };
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 */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
+ 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>"; };
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>"; };
A0AABE2B13AFE81000F2EBD1 /* ForLoopUnroll.h */,
FB39D2441200F35A00088E69 /* preprocessor */,
FB39D2211200F35A00088E69 /* BaseTypes.h */,
+ 49951C0514B7AAD70060E96E /* BuiltInFunctionEmulator.cpp */,
+ 49951C0614B7AAD80060E96E /* BuiltInFunctionEmulator.h */,
FB39D2221200F35A00088E69 /* CodeGenGLSL.cpp */,
FB39D2241200F35A00088E69 /* Common.h */,
90D9B0F912E11DCB002D4255 /* Compiler.cpp */,
FB39D2251200F35A00088E69 /* ConstantUnion.h */,
FB39D2261200F35A00088E69 /* debug.cpp */,
FB39D2271200F35A00088E69 /* debug.h */,
+ 49951C0714B7AAD80060E96E /* DetectRecursion.cpp */,
+ 49951C0814B7AAD80060E96E /* DetectRecursion.h */,
90D9B0FA12E11DCB002D4255 /* ExtensionBehavior.h */,
90D9B0FB12E11DCB002D4255 /* glslang_lex.cpp */,
90D9B0FC12E11DCB002D4255 /* glslang_tab.cpp */,
FB39D2481200F35A00088E69 /* cpp.c */,
FB39D2491200F35A00088E69 /* cpp.h */,
FB39D24A1200F35A00088E69 /* cppstruct.c */,
+ 49951C0214B7AAB30060E96E /* length_limits.h */,
FB39D24B1200F35A00088E69 /* memory.c */,
FB39D24C1200F35A00088E69 /* memory.h */,
FB39D24D1200F35A00088E69 /* parser.h */,
A0AABE3513AFE84700F2EBD1 /* OutputGLSLBase.h in Headers */,
A0AABE4513AFE94500F2EBD1 /* OutputESSL.h in Headers */,
A0AABE4913AFE96100F2EBD1 /* TranslatorESSL.h in Headers */,
+ 49951C0314B7AAB30060E96E /* length_limits.h in Headers */,
+ 49951C0A14B7AAD80060E96E /* BuiltInFunctionEmulator.h in Headers */,
+ 49951C0C14B7AAD80060E96E /* DetectRecursion.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
A0AABE3413AFE84700F2EBD1 /* OutputGLSLBase.cpp in Sources */,
A0AABE4413AFE94500F2EBD1 /* OutputESSL.cpp in Sources */,
A0AABE4813AFE96100F2EBD1 /* TranslatorESSL.cpp in Sources */,
+ 49951C0914B7AAD80060E96E /* BuiltInFunctionEmulator.cpp in Sources */,
+ 49951C0B14B7AAD80060E96E /* DetectRecursion.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
+2012-01-06 Chris Marrin <cmarrin@apple.com>
+
+ Update ANGLE in WebKit tree
+ https://bugs.webkit.org/show_bug.cgi?id=75753
+
+ Reviewed by Simon Fraser.
+
+ Updated ANGLE to r939. Fixed a compiler error (missing case in switch statement)
+ and added 5 new files to xcodeproj. Other than that it is a straight copy of
+ the files from the ANGLE repository.
+
+ * ANGLE.xcodeproj/project.pbxproj:
+ * include/EGL/eglext.h:
+ * include/EGL/eglplatform.h:
+ * include/GLES2/gl2ext.h:
+ * include/GLSLANG/ShaderLang.h:
+ * src/common/debug.cpp:
+ (gl::output):
+ (gl::trace):
+ (gl::perfActive):
+ (gl::ScopedPerfEventHelper::ScopedPerfEventHelper):
+ (gl::ScopedPerfEventHelper::~ScopedPerfEventHelper):
+ * src/common/version.h:
+ * src/compiler/BaseTypes.h:
+ (getBasicString):
+ * src/compiler/BuiltInFunctionEmulator.cpp: Added.
+ (BuiltInFunctionEmulator::BuiltInFunctionEmulator):
+ (BuiltInFunctionEmulator::SetFunctionCalled):
+ (BuiltInFunctionEmulator::OutputEmulatedFunctionDefinition):
+ (BuiltInFunctionEmulator::IdentifyFunction):
+ (BuiltInFunctionEmulator::MarkBuiltInFunctionsForEmulation):
+ (BuiltInFunctionEmulator::Cleanup):
+ (BuiltInFunctionEmulator::GetEmulatedFunctionName):
+ * src/compiler/BuiltInFunctionEmulator.h: Added.
+ * src/compiler/Compiler.cpp:
+ (TCompiler::TCompiler):
+ (TCompiler::compile):
+ (TCompiler::clearResults):
+ (TCompiler::detectRecursion):
+ (TCompiler::getMappedNameMaxLength):
+ (TCompiler::getBuiltInFunctionEmulator):
+ * src/compiler/DetectRecursion.cpp: Added.
+ (DetectRecursion::FunctionNode::FunctionNode):
+ (DetectRecursion::FunctionNode::getName):
+ (DetectRecursion::FunctionNode::addCallee):
+ (DetectRecursion::FunctionNode::detectRecursion):
+ (DetectRecursion::DetectRecursion):
+ (DetectRecursion::~DetectRecursion):
+ (DetectRecursion::visitAggregate):
+ (DetectRecursion::detectRecursion):
+ (DetectRecursion::findFunctionByName):
+ * src/compiler/DetectRecursion.h: Added.
+ * src/compiler/ExtensionBehavior.h:
+ * src/compiler/ForLoopUnroll.cpp:
+ (ForLoopUnroll::MarkForLoopsWithIntegerIndicesForUnrolling):
+ * src/compiler/ForLoopUnroll.h:
+ * src/compiler/Initialize.cpp:
+ (BuiltInFunctionsCommon):
+ (BuiltInFunctionsVertex):
+ (BuiltInFunctionsFragment):
+ (TBuiltIns::initialize):
+ (IdentifyBuiltIns):
+ (InitExtensionBehavior):
+ * src/compiler/MapLongVariableNames.cpp:
+ (MapLongVariableNames::MapLongVariableNames):
+ (MapLongVariableNames::visitSymbol):
+ (MapLongVariableNames::mapVaryingLongName):
+ * src/compiler/MapLongVariableNames.h:
+ * src/compiler/OutputGLSLBase.cpp:
+ (TOutputGLSLBase::visitUnary):
+ (TOutputGLSLBase::visitAggregate):
+ * src/compiler/OutputHLSL.cpp:
+ (sh::OutputHLSL::OutputHLSL):
+ (sh::OutputHLSL::header):
+ (sh::OutputHLSL::visitSymbol):
+ (sh::OutputHLSL::visitAggregate):
+ (sh::OutputHLSL::visitSelection):
+ (sh::OutputHLSL::visitLoop):
+ (sh::OutputHLSL::handleExcessiveLoop):
+ (sh::OutputHLSL::addConstructor):
+ (sh::OutputHLSL::decorate):
+ (sh::OutputHLSL::decorateUniform):
+ * src/compiler/OutputHLSL.h:
+ * src/compiler/ParseHelper.cpp:
+ (TParseContext::recover):
+ (TParseContext::reservedErrorCheck):
+ (TParseContext::constructorErrorCheck):
+ (TParseContext::extensionErrorCheck):
+ (TParseContext::supportsExtension):
+ (TParseContext::enterStructDeclaration):
+ (TParseContext::exitStructDeclaration):
+ (TParseContext::structNestingErrorCheck):
+ * src/compiler/ParseHelper.h:
+ (TParseContext::TParseContext):
+ * src/compiler/PoolAlloc.h:
+ (pool_allocator::pool_allocator):
+ (pool_allocator::operator=):
+ (pool_allocator::setAllocator):
+ (pool_allocator::getAllocator):
+ * src/compiler/ShHandle.h:
+ * src/compiler/ShaderLang.cpp:
+ (checkActiveUniformAndAttribMaxLengths):
+ (checkMappedNameMaxLength):
+ (getVariableInfo):
+ (ShInitBuiltInResources):
+ (ShGetInfo):
+ * src/compiler/SymbolTable.cpp:
+ (TType::computeDeepestStructNesting):
+ * src/compiler/TranslatorESSL.cpp:
+ (TranslatorESSL::translate):
+ (TranslatorESSL::writeExtensionBehavior):
+ * src/compiler/TranslatorGLSL.cpp:
+ (TranslatorGLSL::translate):
+ * src/compiler/Types.h:
+ (TType::TType):
+ (TType::copyType):
+ (TType::setStruct):
+ (TType::getDeepestStructNesting):
+ * src/compiler/UnfoldSelect.cpp:
+ (sh::UnfoldSelect::traverse):
+ (sh::UnfoldSelect::visitSelection):
+ (sh::UnfoldSelect::visitLoop):
+ (sh::UnfoldSelect::getNextTemporaryIndex):
+ * src/compiler/UnfoldSelect.h:
+ * src/compiler/ValidateLimitations.cpp:
+ * src/compiler/ValidateLimitations.h:
+ * src/compiler/VariableInfo.cpp:
+ (getVariableDataType):
+ * src/compiler/generate_glslang_lexer.sh: Removed.
+ * src/compiler/generate_glslang_parser.sh: Removed.
+ * src/compiler/generate_parser.sh: Added.
+ * src/compiler/glslang.l:
+ * src/compiler/glslang.y:
+ * src/compiler/glslang_lex.cpp:
+ (yy_get_previous_state):
+ (yy_try_NUL_trans):
+ * src/compiler/glslang_tab.cpp:
+ * src/compiler/glslang_tab.h:
+ * src/compiler/intermOut.cpp:
+ (TOutputTraverser::visitAggregate):
+ * src/compiler/intermediate.h:
+ (TIntermUnary::TIntermUnary):
+ (TIntermUnary::setUseEmulatedFunction):
+ (TIntermUnary::getUseEmulatedFunction):
+ (TIntermAggregate::TIntermAggregate):
+ (TIntermAggregate::setUseEmulatedFunction):
+ (TIntermAggregate::getUseEmulatedFunction):
+ * src/compiler/osinclude.h:
+ * src/compiler/ossource_posix.cpp:
+ (OS_AllocTLSIndex):
+ (OS_SetTLSValue):
+ (OS_FreeTLSIndex):
+ * src/compiler/preprocessor/atom.c:
+ (GrowAtomTable):
+ * src/compiler/preprocessor/length_limits.h: Added.
+ * src/compiler/preprocessor/scanner.h:
+ * src/libEGL/Display.cpp:
+ (egl::Display::getDisplay):
+ (egl::Display::Display):
+ (egl::Display::~Display):
+ (egl::Display::initialize):
+ (egl::Display::terminate):
+ (egl::Display::startScene):
+ (egl::Display::endScene):
+ (egl::Display::createDevice):
+ (egl::Display::initializeDevice):
+ (egl::Display::resetDevice):
+ (egl::Display::createWindowSurface):
+ (egl::Display::createOffscreenSurface):
+ (egl::Display::createContext):
+ (egl::Display::restoreLostDevice):
+ (egl::Display::notifyDeviceLost):
+ (egl::Display::isDeviceLost):
+ (egl::Display::testDeviceLost):
+ (egl::Display::testDeviceResettable):
+ (egl::Display::getDXT1TextureSupport):
+ (egl::Display::getDXT3TextureSupport):
+ (egl::Display::getDXT5TextureSupport):
+ (egl::Display::getFloat32TextureSupport):
+ (egl::Display::getFloat16TextureSupport):
+ (egl::Display::getTexturePool):
+ (egl::Display::initExtensionString):
+ * src/libEGL/Display.h:
+ * src/libEGL/Surface.cpp:
+ (egl::Surface::Surface):
+ (egl::Surface::initialize):
+ (egl::Surface::resetSwapChain):
+ (egl::Surface::subclassWindow):
+ (egl::Surface::unsubclassWindow):
+ (egl::Surface::swap):
+ (egl::Surface::postSubBuffer):
+ (egl::Surface::isPostSubBufferSupported):
+ * src/libEGL/Surface.h:
+ * src/libEGL/libEGL.cpp:
+ * src/libEGL/libEGL.rc:
+ * src/libEGL/libEGL.vcproj:
+ * src/libGLESv2/Buffer.cpp:
+ (gl::Buffer::bufferSubData):
+ * src/libGLESv2/Context.cpp:
+ (gl::Context::Context):
+ (gl::Context::makeCurrent):
+ (gl::Context::markAllStateDirty):
+ (gl::Context::markContextLost):
+ (gl::Context::isContextLost):
+ (gl::Context::setPackReverseRowOrder):
+ (gl::Context::getPackReverseRowOrder):
+ (gl::Context::deleteProgram):
+ (gl::Context::getDrawFramebuffer):
+ (gl::Context::bindDrawFramebuffer):
+ (gl::Context::useProgram):
+ (gl::Context::setFramebufferZero):
+ (gl::Context::getCurrentProgram):
+ (gl::Context::getBooleanv):
+ (gl::Context::getIntegerv):
+ (gl::Context::getQueryParameterInfo):
+ (gl::Context::applyRenderTarget):
+ (gl::Context::applyState):
+ (gl::Context::applyVertexBuffer):
+ (gl::Context::applyIndexBuffer):
+ (gl::Context::applyShaders):
+ (gl::Context::applyTextures):
+ (gl::Context::readPixels):
+ (gl::Context::clear):
+ (gl::Context::drawArrays):
+ (gl::Context::drawElements):
+ (gl::Context::sync):
+ (gl::Context::drawClosingLine):
+ (gl::Context::getResetStatus):
+ (gl::Context::isResetNotificationEnabled):
+ (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::initExtensionString):
+ (gl::Context::initRendererString):
+ (gl::Context::getRendererString):
+ (gl::Context::blitFramebuffer):
+ (gl::VertexDeclarationCache::applyDeclaration):
+ (gl::VertexDeclarationCache::markStateDirty):
+ * src/libGLESv2/Context.h:
+ * src/libGLESv2/Fence.cpp:
+ (gl::Fence::testFence):
+ (gl::Fence::getFenceiv):
+ * src/libGLESv2/Framebuffer.cpp:
+ (gl::Framebuffer::setColorbuffer):
+ (gl::Framebuffer::setDepthbuffer):
+ (gl::Framebuffer::setStencilbuffer):
+ (gl::Framebuffer::getColorbuffer):
+ (gl::Framebuffer::getDepthbuffer):
+ (gl::Framebuffer::getStencilbuffer):
+ (gl::Framebuffer::hasStencil):
+ (gl::Framebuffer::completeness):
+ (gl::DefaultFramebuffer::DefaultFramebuffer):
+ * src/libGLESv2/Framebuffer.h:
+ * src/libGLESv2/IndexDataManager.cpp:
+ (gl::IndexDataManager::prepareIndexData):
+ (gl::IndexBuffer::IndexBuffer):
+ (gl::IndexBuffer::getSerial):
+ (gl::IndexBuffer::issueSerial):
+ (gl::StreamingIndexBuffer::reserveSpace):
+ (gl::StaticIndexBuffer::reserveSpace):
+ (gl::StaticIndexBuffer::lookupRange):
+ (gl::StaticIndexBuffer::addRange):
+ * src/libGLESv2/IndexDataManager.h:
+ (gl::StaticIndexBuffer::IndexRange::operator<):
+ * src/libGLESv2/Program.cpp:
+ (gl::Uniform::Uniform):
+ (gl::Uniform::isArray):
+ (gl::UniformLocation::UniformLocation):
+ (gl::Program::Program):
+ (gl::Program::detachShader):
+ (gl::Program::getUsedSamplerRange):
+ (gl::Program::getSamplerMapping):
+ (gl::Program::getUniformLocation):
+ (gl::Program::setUniform1fv):
+ (gl::Program::setUniform2fv):
+ (gl::Program::setUniform3fv):
+ (gl::transposeMatrix):
+ (gl::Program::setUniformMatrix2fv):
+ (gl::Program::setUniformMatrix3fv):
+ (gl::Program::setUniformMatrix4fv):
+ (gl::Program::getUniformfv):
+ (gl::Program::getUniformiv):
+ (gl::Program::applyUniforms):
+ (gl::Program::compileToBinary):
+ (gl::Program::linkVaryings):
+ (gl::Program::link):
+ (gl::Program::defineUniform):
+ (gl::Program::createUniform):
+ (gl::Program::decorateAttribute):
+ (gl::Program::undecorateUniform):
+ (gl::Program::applyUniformnbv):
+ (gl::Program::applyUniformnfv):
+ (gl::Program::applyUniform1iv):
+ (gl::Program::applyUniform2iv):
+ (gl::Program::applyUniform3iv):
+ (gl::Program::applyUniform4iv):
+ (gl::Program::applyUniformniv):
+ (gl::Program::appendToInfoLogSanitized):
+ (gl::Program::unlink):
+ (gl::Program::getActiveUniform):
+ (gl::Program::getActiveUniformCount):
+ (gl::Program::getActiveUniformMaxLength):
+ (gl::Program::validateSamplers):
+ (gl::Program::initializeConstantHandles):
+ (gl::Program::getDxCoordLocation):
+ * src/libGLESv2/Program.h:
+ * src/libGLESv2/Renderbuffer.cpp:
+ (gl::RenderbufferInterface::RenderbufferInterface):
+ (gl::RenderbufferInterface::getRedSize):
+ (gl::RenderbufferInterface::getGreenSize):
+ (gl::RenderbufferInterface::getBlueSize):
+ (gl::RenderbufferInterface::getAlphaSize):
+ (gl::RenderbufferInterface::getDepthSize):
+ (gl::RenderbufferInterface::getStencilSize):
+ (gl::RenderbufferTexture::RenderbufferTexture):
+ (gl::RenderbufferTexture::~RenderbufferTexture):
+ (gl::RenderbufferTexture::getRenderTarget):
+ (gl::RenderbufferTexture::getDepthStencil):
+ (gl::RenderbufferTexture::getWidth):
+ (gl::RenderbufferTexture::getHeight):
+ (gl::RenderbufferTexture::getInternalFormat):
+ (gl::RenderbufferTexture::getD3DFormat):
+ (gl::RenderbufferTexture::getSamples):
+ (gl::RenderbufferTexture::getSerial):
+ (gl::Renderbuffer::Renderbuffer):
+ (gl::Renderbuffer::~Renderbuffer):
+ (gl::Renderbuffer::getRenderTarget):
+ (gl::Renderbuffer::getDepthStencil):
+ (gl::Renderbuffer::getWidth):
+ (gl::Renderbuffer::getHeight):
+ (gl::Renderbuffer::getInternalFormat):
+ (gl::Renderbuffer::getD3DFormat):
+ (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::getD3DFormat):
+ (gl::RenderbufferStorage::issueCubeSerials):
+ (gl::Colorbuffer::Colorbuffer):
+ (gl::Colorbuffer::getRenderTarget):
+ (gl::Depthbuffer::Depthbuffer):
+ (gl::Stencilbuffer::Stencilbuffer):
+ * src/libGLESv2/Renderbuffer.h:
+ (gl::RenderbufferInterface::~RenderbufferInterface):
+ * src/libGLESv2/Shader.cpp:
+ (gl::Shader::getTranslatedSourceLength):
+ (gl::Shader::getSourceImpl):
+ (gl::Shader::getSource):
+ (gl::Shader::getTranslatedSource):
+ * src/libGLESv2/Shader.h:
+ * src/libGLESv2/Texture.cpp:
+ (gl::ConvertTextureFormatType):
+ (gl::IsTextureFormatRenderable):
+ (gl::Image::Image):
+ (gl::Image::~Image):
+ (gl::Image::redefine):
+ (gl::Image::createSurface):
+ (gl::Image::lock):
+ (gl::Image::unlock):
+ (gl::Image::isRenderableFormat):
+ (gl::Image::getD3DFormat):
+ (gl::Image::getSurface):
+ (gl::Image::setManagedSurface):
+ (gl::Image::updateSurface):
+ (gl::Image::loadData):
+ (gl::Image::loadAlphaData):
+ (gl::Image::loadAlphaFloatData):
+ (gl::Image::loadAlphaHalfFloatData):
+ (gl::Image::loadLuminanceData):
+ (gl::Image::loadLuminanceFloatData):
+ (gl::Image::loadLuminanceHalfFloatData):
+ (gl::Image::loadLuminanceAlphaData):
+ (gl::Image::loadLuminanceAlphaFloatData):
+ (gl::Image::loadLuminanceAlphaHalfFloatData):
+ (gl::Image::loadRGBUByteData):
+ (gl::Image::loadRGB565Data):
+ (gl::Image::loadRGBFloatData):
+ (gl::Image::loadRGBHalfFloatData):
+ (gl::Image::loadRGBAUByteDataSSE2):
+ (gl::Image::loadRGBAUByteData):
+ (gl::Image::loadRGBA4444Data):
+ (gl::Image::loadRGBA5551Data):
+ (gl::Image::loadRGBAFloatData):
+ (gl::Image::loadRGBAHalfFloatData):
+ (gl::Image::loadBGRAData):
+ (gl::Image::loadCompressedData):
+ (gl::FlipCopyDXT1BlockFull):
+ (gl::FlipCopyDXT1BlockHalf):
+ (gl::FlipCopyDXT3BlockFull):
+ (gl::FlipCopyDXT3BlockHalf):
+ (gl::FlipCopyDXT5BlockFull):
+ (gl::FlipCopyDXT5BlockHalf):
+ (gl::Image::loadDXT1Data):
+ (gl::Image::loadDXT3Data):
+ (gl::Image::loadDXT5Data):
+ (gl::Image::copy):
+ (gl::TextureStorage::TextureStorage):
+ (gl::TextureStorage::~TextureStorage):
+ (gl::TextureStorage::isRenderTarget):
+ (gl::TextureStorage::isManaged):
+ (gl::TextureStorage::getPool):
+ (gl::TextureStorage::getTextureSerial):
+ (gl::TextureStorage::issueTextureSerial):
+ (gl::Texture::Texture):
+ (gl::Texture::~Texture):
+ (gl::Texture::setMinFilter):
+ (gl::Texture::setMagFilter):
+ (gl::Texture::setWrapS):
+ (gl::Texture::setWrapT):
+ (gl::Texture::setUsage):
+ (gl::Texture::getMinFilter):
+ (gl::Texture::getMagFilter):
+ (gl::Texture::getWrapS):
+ (gl::Texture::getWrapT):
+ (gl::Texture::getUsage):
+ (gl::Texture::setImage):
+ (gl::Texture::setCompressedImage):
+ (gl::Texture::subImage):
+ (gl::Texture::subImageCompressed):
+ (gl::Texture::getTexture):
+ (gl::Texture::hasDirtyParameters):
+ (gl::Texture::hasDirtyImages):
+ (gl::Texture::resetDirty):
+ (gl::Texture::getTextureSerial):
+ (gl::Texture::getRenderTargetSerial):
+ (gl::Texture::isImmutable):
+ (gl::Texture::creationLevels):
+ (gl::Texture::getBlitter):
+ (gl::Texture::copyToRenderTarget):
+ (gl::TextureStorage2D::TextureStorage2D):
+ (gl::TextureStorage2D::~TextureStorage2D):
+ (gl::TextureStorage2D::getSurfaceLevel):
+ (gl::TextureStorage2D::getBaseTexture):
+ (gl::TextureStorage2D::getRenderTargetSerial):
+ (gl::Texture2D::Texture2D):
+ (gl::Texture2D::~Texture2D):
+ (gl::Texture2D::getWidth):
+ (gl::Texture2D::getHeight):
+ (gl::Texture2D::getInternalFormat):
+ (gl::Texture2D::getType):
+ (gl::Texture2D::redefineImage):
+ (gl::Texture2D::setImage):
+ (gl::Texture2D::bindTexImage):
+ (gl::Texture2D::releaseTexImage):
+ (gl::Texture2D::setCompressedImage):
+ (gl::Texture2D::commitRect):
+ (gl::Texture2D::copyImage):
+ (gl::Texture2D::copySubImage):
+ (gl::Texture2D::storage):
+ (gl::Texture2D::isSamplerComplete):
+ (gl::Texture2D::isMipmapComplete):
+ (gl::Texture2D::getBaseTexture):
+ (gl::Texture2D::createTexture):
+ (gl::Texture2D::updateTexture):
+ (gl::Texture2D::convertToRenderTarget):
+ (gl::Texture2D::generateMipmaps):
+ (gl::Texture2D::getRenderbuffer):
+ (gl::Texture2D::getRenderTarget):
+ (gl::Texture2D::getStorage):
+ (gl::TextureStorageCubeMap::TextureStorageCubeMap):
+ (gl::TextureStorageCubeMap::~TextureStorageCubeMap):
+ (gl::TextureStorageCubeMap::getCubeMapSurface):
+ (gl::TextureStorageCubeMap::getBaseTexture):
+ (gl::TextureStorageCubeMap::getRenderTargetSerial):
+ (gl::TextureCubeMap::TextureCubeMap):
+ (gl::TextureCubeMap::~TextureCubeMap):
+ (gl::TextureCubeMap::getWidth):
+ (gl::TextureCubeMap::getHeight):
+ (gl::TextureCubeMap::getInternalFormat):
+ (gl::TextureCubeMap::getType):
+ (gl::TextureCubeMap::setCompressedImage):
+ (gl::TextureCubeMap::commitRect):
+ (gl::TextureCubeMap::subImage):
+ (gl::TextureCubeMap::subImageCompressed):
+ (gl::TextureCubeMap::isSamplerComplete):
+ (gl::TextureCubeMap::isCubeComplete):
+ (gl::TextureCubeMap::isMipmapCubeComplete):
+ (gl::TextureCubeMap::getBaseTexture):
+ (gl::TextureCubeMap::createTexture):
+ (gl::TextureCubeMap::updateTexture):
+ (gl::TextureCubeMap::convertToRenderTarget):
+ (gl::TextureCubeMap::setImage):
+ (gl::TextureCubeMap::redefineImage):
+ (gl::TextureCubeMap::copyImage):
+ (gl::TextureCubeMap::copySubImage):
+ (gl::TextureCubeMap::storage):
+ (gl::TextureCubeMap::generateMipmaps):
+ (gl::TextureCubeMap::getRenderbuffer):
+ (gl::TextureCubeMap::getRenderTarget):
+ (gl::TextureCubeMap::getStorage):
+ * src/libGLESv2/Texture.h:
+ (gl::Image::markDirty):
+ (gl::Image::markClean):
+ (gl::Image::getWidth):
+ (gl::Image::getHeight):
+ (gl::Image::getFormat):
+ (gl::Image::getType):
+ (gl::Image::isDirty):
+ * src/libGLESv2/VertexDataManager.cpp:
+ (gl::elementsInBuffer):
+ (gl::VertexDataManager::VertexDataManager):
+ (gl::VertexDataManager::writeAttributeData):
+ (gl::VertexDataManager::prepareVertexData):
+ (gl::VertexBuffer::VertexBuffer):
+ (gl::VertexBuffer::getSerial):
+ (gl::VertexBuffer::issueSerial):
+ (gl::StreamingVertexBuffer::reserveRequiredSpace):
+ (gl::StaticVertexBuffer::map):
+ (gl::StaticVertexBuffer::reserveRequiredSpace):
+ (gl::StaticVertexBuffer::lookupAttribute):
+ * src/libGLESv2/VertexDataManager.h:
+ (gl::ArrayVertexBuffer::size):
+ * src/libGLESv2/geometry/IndexDataManager.cpp: Removed.
+ * src/libGLESv2/geometry/IndexDataManager.h: Removed.
+ * src/libGLESv2/geometry/VertexDataManager.cpp: Removed.
+ * src/libGLESv2/geometry/VertexDataManager.h: Removed.
+ * src/libGLESv2/geometry/vertexconversion.h: Removed.
+ * src/libGLESv2/libGLESv2.cpp:
+ (validateSubImageParams):
+ (validReadFormatType):
+ (Extension::glBindTexImage):
+ * src/libGLESv2/libGLESv2.def:
+ * src/libGLESv2/libGLESv2.rc:
+ * src/libGLESv2/libGLESv2.vcproj:
+ * src/libGLESv2/main.cpp:
+ (gl::getNonLostContext):
+ (gl::checkDeviceLost):
+ * src/libGLESv2/main.h:
+ * src/libGLESv2/utilities.cpp:
+ (gl::UniformExternalComponentCount):
+ (gl::UniformInternalComponentCount):
+ (gl::UniformComponentSize):
+ (gl::UniformInternalSize):
+ (gl::UniformExternalSize):
+ (gl::ComputeCompressedSize):
+ (gl::IsCompressed):
+ (gl::ExtractFormat):
+ (gl::ExtractType):
+ (dx2es::IsFloat32Format):
+ (dx2es::IsFloat16Format):
+ * src/libGLESv2/utilities.h:
+ (isDeviceLostError):
+
2011-11-11 Darin Adler <darin@apple.com>
* ANGLE.xcodeproj/project.pbxproj: Let a newer Xcode update this file.
#endif
/*
-** Copyright (c) 2007-2009 The Khronos Group Inc.
+** Copyright (c) 2007-2010 The Khronos Group Inc.
**
** Permission is hereby granted, free of charge, to any person obtaining a
** copy of this software and/or associated documentation files (the
/* Header file version number */
/* Current version at http://www.khronos.org/registry/egl/ */
-/* $Revision: 10795 $ on $Date: 2010-03-19 17:04:17 -0700 (Fri, 19 Mar 2010) $ */
-#define EGL_EGLEXT_VERSION 5
+/* $Revision: 15052 $ on $Date: 2011-07-06 17:43:46 -0700 (Wed, 06 Jul 2011) $ */
+#define EGL_EGLEXT_VERSION 10
#ifndef EGL_KHR_config_attribs
#define EGL_KHR_config_attribs 1
#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */
#endif
+#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */
#ifndef EGL_KHR_reusable_sync
#define EGL_KHR_reusable_sync 1
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value);
#endif
+#endif
#ifndef EGL_KHR_image_base
#define EGL_KHR_image_base 1
#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103
#endif
+#ifndef EGL_KHR_lock_surface2
+#define EGL_KHR_lock_surface2 1
+#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110
+#endif
+
#ifndef EGL_NV_coverage_sample
#define EGL_NV_coverage_sample 1
#define EGL_COVERAGE_BUFFERS_NV 0x30E0
#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3
#endif
+#if KHRONOS_SUPPORT_INT64 /* EGLTimeNV requires 64-bit uint support */
#ifndef EGL_NV_sync
#define EGL_NV_sync 1
#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6
#define EGL_SYNC_FENCE_NV 0x30EF
#define EGL_NO_SYNC_NV ((EGLSyncNV)0)
typedef void* EGLSyncNV;
-typedef unsigned long long EGLTimeNV;
+typedef khronos_utime_nanoseconds_t EGLTimeNV;
#ifdef EGL_EGLEXT_PROTOTYPES
EGLSyncNV eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list);
EGLBoolean eglDestroySyncNV (EGLSyncNV sync);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode);
typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value);
#endif
+#endif
+
+#if KHRONOS_SUPPORT_INT64 /* Dependent on EGL_KHR_reusable_sync which requires 64-bit uint support */
+#ifndef EGL_KHR_fence_sync
+#define EGL_KHR_fence_sync 1
+/* Reuses most tokens and entry points from EGL_KHR_reusable_sync */
+#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0
+#define EGL_SYNC_CONDITION_KHR 0x30F8
+#define EGL_SYNC_FENCE_KHR 0x30F9
+#endif
+#endif
+
+#ifndef EGL_HI_clientpixmap
+#define EGL_HI_clientpixmap 1
+
+/* Surface Attribute */
+#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74
+/*
+ * Structure representing a client pixmap
+ * (pixmap's data is in client-space memory).
+ */
+struct EGLClientPixmapHI
+{
+ void* pData;
+ EGLint iWidth;
+ EGLint iHeight;
+ EGLint iStride;
+};
+
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap);
+#endif /* EGL_HI_clientpixmap */
+
+#ifndef EGL_HI_colorformats
+#define EGL_HI_colorformats 1
+/* Config Attribute */
+#define EGL_COLOR_FORMAT_HI 0x8F70
+/* Color Formats */
+#define EGL_COLOR_RGB_HI 0x8F71
+#define EGL_COLOR_RGBA_HI 0x8F72
+#define EGL_COLOR_ARGB_HI 0x8F73
+#endif /* EGL_HI_colorformats */
+
+#ifndef EGL_MESA_drm_image
+#define EGL_MESA_drm_image 1
+#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 /* CreateDRMImageMESA attribute */
+#define EGL_DRM_BUFFER_USE_MESA 0x31D1 /* CreateDRMImageMESA attribute */
+#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 /* EGL_IMAGE_FORMAT_MESA attribute value */
+#define EGL_DRM_BUFFER_MESA 0x31D3 /* eglCreateImageKHR target */
+#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4
+#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 /* EGL_DRM_BUFFER_USE_MESA bits */
+#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002 /* EGL_DRM_BUFFER_USE_MESA bits */
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list);
+EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list);
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride);
+#endif
+
+#ifndef EGL_NV_post_sub_buffer
+#define EGL_NV_post_sub_buffer 1
+#define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height);
+#endif
#ifndef EGL_ANGLE_query_surface_pointer
#define EGL_ANGLE_query_surface_pointer 1
#endif
#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle
-#define EGL_ANGLE_surface_d3d_texture_2d_share_handle
-#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200
+#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1
+#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200
+#endif
+
+#ifndef EGL_ANGLE_software_display
+#define EGL_ANGLE_software_display 1
+#define EGL_SOFTWARE_DISPLAY_ANGLE ((EGLNativeDisplayType)-1)
+#endif
+
+#ifndef EGL_NV_coverage_sample_resolve
+#define EGL_NV_coverage_sample_resolve 1
+#define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131
+#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132
+#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133
+#endif
+
+#ifndef EGL_EXT_create_context_robustness
+#define EGL_EXT_create_context_robustness 1
+#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF
+#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138
+#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE
+#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF
+#endif
+
+#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */
+#ifndef EGL_NV_system_time
+#define EGL_NV_system_time 1
+
+typedef khronos_utime_nanoseconds_t EGLuint64NV;
+
+#ifdef EGL_EGLEXT_PROTOTYPES
+EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV(void);
+EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV(void);
+#endif /* EGL_EGLEXT_PROTOTYPES */
+typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void);
+typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void);
+#endif
#endif
#ifdef __cplusplus
*/
/* Platform-specific types and definitions for egl.h
- * $Revision: 9724 $ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec 2009) $
+ * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $
*
* Adopters may modify khrplatform.h and this file to suit their platform.
* You are encouraged to submit all modifications to the Khronos group so that
* Windows Device Context. They must be defined in platform-specific
* code below. The EGL-prefixed versions of Native*Type are the same
* types, renamed in EGL 1.3 so all types in the API start with "EGL".
+ *
+ * Khronos STRONGLY RECOMMENDS that you use the default definitions
+ * provided below, since these changes affect both binary and source
+ * portability of applications using EGL running on different EGL
+ * implementations.
*/
#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */
typedef void *EGLNativeWindowType;
typedef void *EGLNativePixmapType;
-#elif defined(__unix__)
+#elif defined(WL_EGL_PLATFORM)
+
+typedef struct wl_display *EGLNativeDisplayType;
+typedef struct wl_egl_pixmap *EGLNativePixmapType;
+typedef struct wl_egl_window *EGLNativeWindowType;
+
+#elif defined(__unix__) && !defined(ANDROID)
/* X11 (tentative) */
#include <X11/Xlib.h>
typedef Pixmap EGLNativePixmapType;
typedef Window EGLNativeWindowType;
+#elif defined(ANDROID)
+
+struct egl_native_pixmap_t;
+
+typedef struct ANativeWindow* EGLNativeWindowType;
+typedef struct egl_native_pixmap_t* EGLNativePixmapType;
+typedef void* EGLNativeDisplayType;
+
#else
#error "Platform not recognized"
#endif
#ifndef __gl2ext_h_
#define __gl2ext_h_
-/* $Revision: 10798 $ on $Date:: 2010-03-19 17:34:30 -0700 #$ */
+/* $Revision: 15049 $ on $Date:: 2011-07-06 17:28:16 -0700 #$ */
#ifdef __cplusplus
extern "C" {
typedef void* GLeglImageOES;
#endif
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+/* GLeglImageOES defined in GL_OES_EGL_image already. */
+#define GL_TEXTURE_EXTERNAL_OES 0x8D65
+#define GL_SAMPLER_EXTERNAL_OES 0x8D66
+#define GL_TEXTURE_BINDING_EXTERNAL_OES 0x8D67
+#define GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES 0x8D68
+#endif
+
/* GL_OES_element_index_uint */
#ifndef GL_OES_element_index_uint
#define GL_UNSIGNED_INT 0x1405
#define GL_Z400_BINARY_AMD 0x8740
#endif
+/*------------------------------------------------------------------------*
+ * ANGLE extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_ANGLE_framebuffer_blit */
+#ifndef GL_ANGLE_framebuffer_blit
+#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
+#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
+#endif
+
+/* GL_ANGLE_framebuffer_multisample */
+#ifndef GL_ANGLE_framebuffer_multisample
+#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
+#define GL_MAX_SAMPLES_ANGLE 0x8D57
+#endif
+
+/* GL_ANGLE_pack_reverse_row_order */
+#ifndef GL_ANGLE_pack_reverse_row_order
+#define GL_PACK_REVERSE_ROW_ORDER_ANGLE 0x93A4
+#endif
+
+/* GL_ANGLE_texture_compression_dxt3 */
+#ifndef GL_ANGLE_texture_compression_dxt3
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_ANGLE 0x83F2
+#endif
+
+/* GL_ANGLE_texture_compression_dxt5 */
+#ifndef GL_ANGLE_texture_compression_dxt5
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_ANGLE 0x83F3
+#endif
+
+/* GL_ANGLE_translated_shader_source */
+#ifndef GL_ANGLE_translated_shader_source
+#define GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE 0x93A0
+#endif
+
+/* GL_ANGLE_texture_usage */
+#ifndef GL_ANGLE_texture_usage
+#define GL_TEXTURE_USAGE_ANGLE 0x93A2
+#define GL_FRAMEBUFFER_ATTACHMENT_ANGLE 0x93A3
+#endif
+
+/*------------------------------------------------------------------------*
+ * APPLE extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_APPLE_rgb_422 */
+#ifndef GL_APPLE_rgb_422
+#define GL_RGB_422_APPLE 0x8A1F
+#define GL_UNSIGNED_SHORT_8_8_APPLE 0x85BA
+#define GL_UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
+#endif
+
+/* GL_APPLE_framebuffer_multisample */
+#ifndef GL_APPLE_framebuffer_multisample
+#define GL_RENDERBUFFER_SAMPLES_APPLE 0x8CAB
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE 0x8D56
+#define GL_MAX_SAMPLES_APPLE 0x8D57
+#define GL_READ_FRAMEBUFFER_APPLE 0x8CA8
+#define GL_DRAW_FRAMEBUFFER_APPLE 0x8CA9
+#define GL_DRAW_FRAMEBUFFER_BINDING_APPLE 0x8CA6
+#define GL_READ_FRAMEBUFFER_BINDING_APPLE 0x8CAA
+#endif
+
+/* GL_APPLE_texture_format_BGRA8888 */
+#ifndef GL_APPLE_texture_format_BGRA8888
+#define GL_BGRA_EXT 0x80E1
+#endif
+
+/* GL_APPLE_texture_max_level */
+#ifndef GL_APPLE_texture_max_level
+#define GL_TEXTURE_MAX_LEVEL_APPLE 0x813D
+#endif
+
+/*------------------------------------------------------------------------*
+ * ARM extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_ARM_mali_shader_binary */
+#ifndef GL_ARM_mali_shader_binary
+#define GL_MALI_SHADER_BINARY_ARM 0x8F60
+#endif
+
+/* GL_ARM_rgba8 */
+/* No new tokens introduced by this extension. */
+
/*------------------------------------------------------------------------*
* EXT extension tokens
*------------------------------------------------------------------------*/
#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366
#endif
+/* GL_EXT_shader_texture_lod */
+/* No new tokens introduced by this extension. */
+
/* GL_EXT_texture_filter_anisotropic */
#ifndef GL_EXT_texture_filter_anisotropic
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
#endif
+/* GL_EXT_unpack_subimage */
+#ifndef GL_EXT_unpack_subimage
+#define GL_UNPACK_ROW_LENGTH 0x0CF2
+#define GL_UNPACK_SKIP_ROWS 0x0CF3
+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
+#endif
+
+/* GL_EXT_robustness */
+#ifndef GL_EXT_robustness
+#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
+#define GL_INNOCENT_CONTEXT_RESET_EXT 0x8254
+#define GL_UNKNOWN_CONTEXT_RESET_EXT 0x8255
+#define GL_CONTEXT_ROBUST_ACCESS_EXT 0x90F3
+#define GL_RESET_NOTIFICATION_STRATEGY_EXT 0x8256
+#define GL_LOSE_CONTEXT_ON_RESET_EXT 0x8252
+#define GL_NO_RESET_NOTIFICATION_EXT 0x8261
+#endif
+
+/* GL_EXT_texture_storage */
+#ifndef GL_EXT_texture_storage
+#define GL_TEXTURE_IMMUTABLE_FORMAT_EXT 0x912F
+#define GL_ALPHA8_EXT 0x803C
+#define GL_LUMINANCE8_EXT 0x8040
+#define GL_LUMINANCE8_ALPHA8_EXT 0x8045
+/* OES_texture_float dependent internal formats */
+#define GL_RGBA32F_EXT 0x8814 /* reuse tokens from ARB_texture_float */
+#define GL_RGB32F_EXT 0x8815
+#define GL_ALPHA32F_EXT 0x8816
+#define GL_LUMINANCE32F_EXT 0x8818
+#define GL_LUMINANCE_ALPHA32F_EXT 0x8819
+/* OES_texture_half_float dependent internal formats */
+#define GL_RGBA16F_EXT 0x881A /* reuse tokens from ARB_texture_float */
+#define GL_RGB16F_EXT 0x881B
+#define GL_ALPHA16F_EXT 0x881C
+#define GL_LUMINANCE16F_EXT 0x881E
+#define GL_LUMINANCE_ALPHA16F_EXT 0x881F
+/* EXT_texture_type_2_10_10_10_REV dependent internal formats */
+#define GL_RGB10_A2_EXT 0x8059 /* reuse tokens from EXT_texture */
+#define GL_RGB10_EXT 0x8052
+/* EXT_texture_format_BGRA8888 dependent internal formats */
+#define GL_BGRA8_EXT 0x93A1
+#endif
+
+/*------------------------------------------------------------------------*
+ * DMP extension tokens
+ *------------------------------------------------------------------------*/
+
+/* GL_DMP_shader_binary */
+#ifndef GL_DMP_shader_binary
+#define GL_SHADER_BINARY_DMP 0x9250
+#endif
+
/*------------------------------------------------------------------------*
* IMG extension tokens
*------------------------------------------------------------------------*/
#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03
#endif
+/* GL_IMG_multisampled_render_to_texture */
+#ifndef GL_IMG_multisampled_render_to_texture
+#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134
+#define GL_MAX_SAMPLES_IMG 0x9135
+#define GL_TEXTURE_SAMPLES_IMG 0x9136
+#endif
+
/*------------------------------------------------------------------------*
* NV extension tokens
*------------------------------------------------------------------------*/
-/* GL_NV_fence */
-#ifndef GL_NV_fence
-#define GL_ALL_COMPLETED_NV 0x84F2
-#define GL_FENCE_STATUS_NV 0x84F3
-#define GL_FENCE_CONDITION_NV 0x84F4
-#endif
-
/* GL_NV_coverage_sample */
#ifndef GL_NV_coverage_sample
#define GL_COVERAGE_COMPONENT_NV 0x8ED0
#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C
#endif
+/* GL_NV_draw_buffers */
+#ifndef GL_NV_draw_buffers
+#define GL_MAX_DRAW_BUFFERS_NV 0x8824
+#define GL_DRAW_BUFFER0_NV 0x8825
+#define GL_DRAW_BUFFER1_NV 0x8826
+#define GL_DRAW_BUFFER2_NV 0x8827
+#define GL_DRAW_BUFFER3_NV 0x8828
+#define GL_DRAW_BUFFER4_NV 0x8829
+#define GL_DRAW_BUFFER5_NV 0x882A
+#define GL_DRAW_BUFFER6_NV 0x882B
+#define GL_DRAW_BUFFER7_NV 0x882C
+#define GL_DRAW_BUFFER8_NV 0x882D
+#define GL_DRAW_BUFFER9_NV 0x882E
+#define GL_DRAW_BUFFER10_NV 0x882F
+#define GL_DRAW_BUFFER11_NV 0x8830
+#define GL_DRAW_BUFFER12_NV 0x8831
+#define GL_DRAW_BUFFER13_NV 0x8832
+#define GL_DRAW_BUFFER14_NV 0x8833
+#define GL_DRAW_BUFFER15_NV 0x8834
+#define GL_COLOR_ATTACHMENT0_NV 0x8CE0
+#define GL_COLOR_ATTACHMENT1_NV 0x8CE1
+#define GL_COLOR_ATTACHMENT2_NV 0x8CE2
+#define GL_COLOR_ATTACHMENT3_NV 0x8CE3
+#define GL_COLOR_ATTACHMENT4_NV 0x8CE4
+#define GL_COLOR_ATTACHMENT5_NV 0x8CE5
+#define GL_COLOR_ATTACHMENT6_NV 0x8CE6
+#define GL_COLOR_ATTACHMENT7_NV 0x8CE7
+#define GL_COLOR_ATTACHMENT8_NV 0x8CE8
+#define GL_COLOR_ATTACHMENT9_NV 0x8CE9
+#define GL_COLOR_ATTACHMENT10_NV 0x8CEA
+#define GL_COLOR_ATTACHMENT11_NV 0x8CEB
+#define GL_COLOR_ATTACHMENT12_NV 0x8CEC
+#define GL_COLOR_ATTACHMENT13_NV 0x8CED
+#define GL_COLOR_ATTACHMENT14_NV 0x8CEE
+#define GL_COLOR_ATTACHMENT15_NV 0x8CEF
+#endif
+
+/* GL_NV_fbo_color_attachments */
+#ifndef GL_NV_fbo_color_attachments
+#define GL_MAX_COLOR_ATTACHMENTS_NV 0x8CDF
+/* GL_COLOR_ATTACHMENT{0-15}_NV defined in GL_NV_draw_buffers already. */
+#endif
+
+/* GL_NV_fence */
+#ifndef GL_NV_fence
+#define GL_ALL_COMPLETED_NV 0x84F2
+#define GL_FENCE_STATUS_NV 0x84F3
+#define GL_FENCE_CONDITION_NV 0x84F4
+#endif
+
+/* GL_NV_read_buffer */
+#ifndef GL_NV_read_buffer
+#define GL_READ_BUFFER_NV 0x0C02
+#endif
+
+/* GL_NV_read_buffer_front */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_depth */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_depth_stencil */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_read_stencil */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_texture_compression_s3tc_update */
+/* No new tokens introduced by this extension. */
+
+/* GL_NV_texture_npot_2D_mipmap */
+/* No new tokens introduced by this extension. */
+
/*------------------------------------------------------------------------*
* QCOM extension tokens
*------------------------------------------------------------------------*/
+/* GL_QCOM_alpha_test */
+#ifndef GL_QCOM_alpha_test
+#define GL_ALPHA_TEST_QCOM 0x0BC0
+#define GL_ALPHA_TEST_FUNC_QCOM 0x0BC1
+#define GL_ALPHA_TEST_REF_QCOM 0x0BC2
+#endif
+
/* GL_QCOM_driver_control */
/* No new tokens introduced by this extension. */
#endif
/*------------------------------------------------------------------------*
- * ANGLE extension tokens
+ * VIV extension tokens
*------------------------------------------------------------------------*/
-/* GL_ANGLE_framebuffer_blit */
-#ifndef GL_ANGLE_framebuffer_blit
-#define GL_READ_FRAMEBUFFER_ANGLE 0x8CA8
-#define GL_DRAW_FRAMEBUFFER_ANGLE 0x8CA9
-#define GL_DRAW_FRAMEBUFFER_BINDING_ANGLE 0x8CA6 // alias GL_FRAMEBUFFER_BINDING
-#define GL_READ_FRAMEBUFFER_BINDING_ANGLE 0x8CAA
-#endif
-
-/* GL_ANGLE_framebuffer_multisample */
-#ifndef GL_ANGLE_framebuffer_multisample
-#define GL_RENDERBUFFER_SAMPLES_ANGLE 0x8CAB
-#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE 0x8D56
-#define GL_MAX_SAMPLES_ANGLE 0x8D57
+/* GL_VIV_shader_binary */
+#ifndef GL_VIV_shader_binary
+#define GL_SHADER_BINARY_VIV 0x8FC4
#endif
/*------------------------------------------------------------------------*
typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image);
#endif
+/* GL_OES_EGL_image_external */
+#ifndef GL_OES_EGL_image_external
+#define GL_OES_EGL_image_external 1
+/* glEGLImageTargetTexture2DOES defined in GL_OES_EGL_image already. */
+#endif
+
/* GL_OES_element_index_uint */
#ifndef GL_OES_element_index_uint
#define GL_OES_element_index_uint 1
#define GL_AMD_program_binary_Z400 1
#endif
+/*------------------------------------------------------------------------*
+ * ANGLE extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_ANGLE_framebuffer_blit */
+#ifndef GL_ANGLE_framebuffer_blit
+#define GL_ANGLE_framebuffer_blit 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+#endif
+
+/* GL_ANGLE_framebuffer_multisample */
+#ifndef GL_ANGLE_framebuffer_multisample
+#define GL_ANGLE_framebuffer_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+
+/* GL_ANGLE_pack_reverse_row_order */
+#ifndef GL_ANGLE_pack_reverse_row_order
+#define GL_ANGLE_pack_reverse_row_order 1
+#endif
+
+/* GL_ANGLE_texture_compression_dxt3 */
+#ifndef GL_ANGLE_texture_compression_dxt3
+#define GL_ANGLE_texture_compression_dxt3 1
+#endif
+
+/* GL_ANGLE_texture_compression_dxt5 */
+#ifndef GL_ANGLE_texture_compression_dxt5
+#define GL_ANGLE_texture_compression_dxt5 1
+#endif
+
+/* GL_ANGLE_translated_shader_source */
+#ifndef GL_ANGLE_translated_shader_source
+#define GL_ANGLE_translated_shader_source 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glGetTranslatedShaderSourceANGLE (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
+#endif
+typedef void (GL_APIENTRYP PFNGLGETTRANSLATEDSHADERSOURCEANGLEPROC) (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source);
+#endif
+
+/* GL_ANGLE_texture_usage */
+#ifndef GL_ANGLE_texture_usage
+#define GL_ANGLE_texture_usage 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * APPLE extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_APPLE_rgb_422 */
+#ifndef GL_APPLE_rgb_422
+#define GL_APPLE_rgb_422 1
+#endif
+
+/* GL_APPLE_framebuffer_multisample */
+#ifndef GL_APPLE_framebuffer_multisample
+#define GL_APPLE_framebuffer_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleAPPLE (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
+GL_APICALL void GL_APIENTRY glResolveMultisampleFramebufferAPPLE (void);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLRESOLVEMULTISAMPLEFRAMEBUFFERAPPLEPROC) (void);
+#endif
+
+/* GL_APPLE_texture_format_BGRA8888 */
+#ifndef GL_APPLE_texture_format_BGRA8888
+#define GL_APPLE_texture_format_BGRA8888 1
+#endif
+
+/* GL_APPLE_texture_max_level */
+#ifndef GL_APPLE_texture_max_level
+#define GL_APPLE_texture_max_level 1
+#endif
+
+/*------------------------------------------------------------------------*
+ * ARM extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_ARM_mali_shader_binary */
+#ifndef GL_ARM_mali_shader_binary
+#define GL_ARM_mali_shader_binary 1
+#endif
+
+/* GL_ARM_rgba8 */
+#ifndef GL_ARM_rgba8
+#define GL_ARM_rgba8 1
+#endif
+
/*------------------------------------------------------------------------*
* EXT extension functions
*------------------------------------------------------------------------*/
#define GL_EXT_read_format_bgra 1
#endif
+/* GL_EXT_shader_texture_lod */
+#ifndef GL_EXT_shader_texture_lod
+#define GL_EXT_shader_texture_lod 1
+#endif
+
/* GL_EXT_texture_filter_anisotropic */
#ifndef GL_EXT_texture_filter_anisotropic
#define GL_EXT_texture_filter_anisotropic 1
#define GL_EXT_texture_compression_dxt1 1
#endif
+/* GL_EXT_unpack_subimage */
+#ifndef GL_EXT_unpack_subimage
+#define GL_EXT_unpack_subimage 1
+#endif
+
+/* GL_EXT_robustness */
+#ifndef GL_EXT_robustness
+#define GL_EXT_robustness 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatusEXT (void);
+GL_APICALL void GL_APIENTRY glReadnPixelsEXT (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
+GL_APICALL void GL_APIENTRY glGetnUniformfvEXT (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
+GL_APICALL void GL_APIENTRY glGetnUniformivEXT (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSEXTPROC) (void);
+typedef void (GL_APIENTRYP PFNGLREADNPIXELSEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
+typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+#endif
+
+/* GL_EXT_texture_storage */
+#ifndef GL_EXT_texture_storage
+#define GL_EXT_texture_storage 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY TexStorage2DEXT (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DEXT) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+#endif
+
+/*------------------------------------------------------------------------*
+ * DMP extension functions
+ *------------------------------------------------------------------------*/
+
+/* GL_DMP_shader_binary */
+#ifndef GL_DMP_shader_binary
+#define GL_DMP_shader_binary 1
+#endif
+
/*------------------------------------------------------------------------*
* IMG extension functions
*------------------------------------------------------------------------*/
#define GL_IMG_texture_compression_pvrtc 1
#endif
+/* GL_IMG_multisampled_render_to_texture */
+#ifndef GL_IMG_multisampled_render_to_texture
+#define GL_IMG_multisampled_render_to_texture 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei);
+GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei);
+#endif
+typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples);
+#endif
+
/*------------------------------------------------------------------------*
* NV extension functions
*------------------------------------------------------------------------*/
+/* GL_NV_coverage_sample */
+#ifndef GL_NV_coverage_sample
+#define GL_NV_coverage_sample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
+GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
+#endif
+typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
+typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
+#endif
+
+/* GL_NV_depth_nonlinear */
+#ifndef GL_NV_depth_nonlinear
+#define GL_NV_depth_nonlinear 1
+#endif
+
+/* GL_NV_draw_buffers */
+#ifndef GL_NV_draw_buffers
+#define GL_NV_draw_buffers 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glDrawBuffersNV (GLsizei n, const GLenum *bufs);
+#endif
+typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSNVPROC) (GLsizei n, const GLenum *bufs);
+#endif
+
+/* GL_NV_fbo_color_attachments */
+#ifndef GL_NV_fbo_color_attachments
+#define GL_NV_fbo_color_attachments 1
+#endif
+
/* GL_NV_fence */
#ifndef GL_NV_fence
#define GL_NV_fence 1
typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition);
#endif
-/* GL_NV_coverage_sample */
-#ifndef GL_NV_coverage_sample
-#define GL_NV_coverage_sample 1
+/* GL_NV_read_buffer */
+#ifndef GL_NV_read_buffer
+#define GL_NV_read_buffer 1
#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask);
-GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation);
+GL_APICALL void GL_APIENTRY glReadBufferNV (GLenum mode);
#endif
-typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask);
-typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation);
+typedef void (GL_APIENTRYP PFNGLREADBUFFERNVPROC) (GLenum mode);
#endif
-/* GL_NV_depth_nonlinear */
-#ifndef GL_NV_depth_nonlinear
-#define GL_NV_depth_nonlinear 1
+/* GL_NV_read_buffer_front */
+#ifndef GL_NV_read_buffer_front
+#define GL_NV_read_buffer_front 1
+#endif
+
+/* GL_NV_read_depth */
+#ifndef GL_NV_read_depth
+#define GL_NV_read_depth 1
+#endif
+
+/* GL_NV_read_depth_stencil */
+#ifndef GL_NV_read_depth_stencil
+#define GL_NV_read_depth_stencil 1
+#endif
+
+/* GL_NV_read_stencil */
+#ifndef GL_NV_read_stencil
+#define GL_NV_read_stencil 1
+#endif
+
+/* GL_NV_texture_compression_s3tc_update */
+#ifndef GL_NV_texture_compression_s3tc_update
+#define GL_NV_texture_compression_s3tc_update 1
+#endif
+
+/* GL_NV_texture_npot_2D_mipmap */
+#ifndef GL_NV_texture_npot_2D_mipmap
+#define GL_NV_texture_npot_2D_mipmap 1
#endif
/*------------------------------------------------------------------------*
* QCOM extension functions
*------------------------------------------------------------------------*/
+/* GL_QCOM_alpha_test */
+#ifndef GL_QCOM_alpha_test
+#define GL_QCOM_alpha_test 1
+#ifdef GL_GLEXT_PROTOTYPES
+GL_APICALL void GL_APIENTRY glAlphaFuncQCOM (GLenum func, GLclampf ref);
+#endif
+typedef void (GL_APIENTRYP PFNGLALPHAFUNCQCOMPROC) (GLenum func, GLclampf ref);
+#endif
+
/* GL_QCOM_driver_control */
#ifndef GL_QCOM_driver_control
#define GL_QCOM_driver_control 1
#endif
/*------------------------------------------------------------------------*
- * ANGLE extension functions
+ * VIV extension tokens
*------------------------------------------------------------------------*/
-/* GL_ANGLE_framebuffer_blit */
-#ifndef GL_ANGLE_framebuffer_blit
-#define GL_ANGLE_framebuffer_blit 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glBlitFramebufferANGLE (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
- GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
- GLbitfield mask, GLenum filter);
-#endif
-typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
- GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
- GLbitfield mask, GLenum filter);
-#endif
-
-/* GL_ANGLE_framebuffer_multisample */
-#ifndef GL_ANGLE_framebuffer_multisample
-#define GL_ANGLE_framebuffer_multisample 1
-#ifdef GL_GLEXT_PROTOTYPES
-GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleANGLE (GLenum target, GLsizei samples, GLenum internalformat,
- GLsizei width, GLsizei height);
-#endif
-typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat,
- GLsizei width, GLsizei height);
+/* GL_VIV_shader_binary */
+#ifndef GL_VIV_shader_binary
+#define GL_VIV_shader_binary 1
#endif
#ifdef __cplusplus
#ifndef _COMPILER_INTERFACE_INCLUDED_
#define _COMPILER_INTERFACE_INCLUDED_
+#if defined(COMPONENT_BUILD)
+#if defined(_WIN32) || defined(_WIN64)
+
+#if defined(COMPILER_IMPLEMENTATION)
+#define COMPILER_EXPORT __declspec(dllexport)
+#else
+#define COMPILER_EXPORT __declspec(dllimport)
+#endif // defined(COMPILER_IMPLEMENTATION)
+
+#else // defined(WIN32)
+#define COMPILER_EXPORT __attribute__((visibility("default")))
+#endif
+
+#else // defined(COMPONENT_BUILD)
+#define COMPILER_EXPORT
+#endif
+
//
// This is the platform independent interface between an OGL driver
// and the shading language compiler.
SH_FLOAT_MAT3 = 0x8B5B,
SH_FLOAT_MAT4 = 0x8B5C,
SH_SAMPLER_2D = 0x8B5E,
- SH_SAMPLER_CUBE = 0x8B60
+ SH_SAMPLER_CUBE = 0x8B60,
+ SH_SAMPLER_2D_RECT_ARB = 0x8B63
} ShDataType;
typedef enum {
SH_ATTRIBUTES_UNIFORMS = 0x0008,
SH_LINE_DIRECTIVES = 0x0010,
SH_SOURCE_PATH = 0x0020,
- SH_MAP_LONG_VARIABLE_NAMES = 0x0040
+ SH_MAP_LONG_VARIABLE_NAMES = 0x0040,
+ SH_UNROLL_FOR_LOOP_WITH_INTEGER_INDEX = 0x0080,
+
+ // This is needed only as a workaround for certain OpenGL driver bugs.
+ SH_EMULATE_BUILT_IN_FUNCTIONS = 0x0100
} ShCompileOptions;
//
// compiler operations.
// If the function succeeds, the return value is nonzero, else zero.
//
-int ShInitialize();
+COMPILER_EXPORT int ShInitialize();
//
// Driver should call this at shutdown.
// If the function succeeds, the return value is nonzero, else zero.
//
-int ShFinalize();
+COMPILER_EXPORT int ShFinalize();
//
// Implementation dependent built-in resources (constants and extensions).
// Extensions.
// Set to 1 to enable the extension, else 0.
int OES_standard_derivatives;
+ int OES_EGL_image_external;
+ int ARB_texture_rectangle;
} ShBuiltInResources;
//
// Initialize built-in resources with minimum expected values.
//
-void ShInitBuiltInResources(ShBuiltInResources* resources);
+COMPILER_EXPORT void ShInitBuiltInResources(ShBuiltInResources* resources);
//
// ShHandle held by but opaque to the driver. It is allocated,
// output: Specifies the output code type - SH_ESSL_OUTPUT, SH_GLSL_OUTPUT,
// or SH_HLSL_OUTPUT.
// resources: Specifies the built-in resources.
-ShHandle ShConstructCompiler(ShShaderType type, ShShaderSpec spec,
- ShShaderOutput output,
- const ShBuiltInResources* resources);
-void ShDestruct(ShHandle handle);
+COMPILER_EXPORT ShHandle ShConstructCompiler(
+ ShShaderType type,
+ ShShaderSpec spec,
+ ShShaderOutput output,
+ const ShBuiltInResources* resources);
+COMPILER_EXPORT void ShDestruct(ShHandle handle);
//
// Compiles the given shader source.
// Can be queried by calling ShGetActiveAttrib() and
// ShGetActiveUniform().
//
-int ShCompile(
+COMPILER_EXPORT int ShCompile(
const ShHandle handle,
const char* const shaderStrings[],
const int numStrings,
// the null termination character.
//
// params: Requested parameter
-void ShGetInfo(const ShHandle handle, ShShaderInfo pname, int* params);
+COMPILER_EXPORT void ShGetInfo(const ShHandle handle,
+ ShShaderInfo pname,
+ int* params);
// Returns nul-terminated information log for a compiled shader.
// Parameters:
// to accomodate the information log. The size of the buffer required
// to store the returned information log can be obtained by calling
// ShGetInfo with SH_INFO_LOG_LENGTH.
-void ShGetInfoLog(const ShHandle handle, char* infoLog);
+COMPILER_EXPORT void ShGetInfoLog(const ShHandle handle, char* infoLog);
// Returns null-terminated object code for a compiled shader.
// Parameters:
// accomodate the object code. The size of the buffer required to
// store the returned object code can be obtained by calling
// ShGetInfo with SH_OBJECT_CODE_LENGTH.
-void ShGetObjectCode(const ShHandle handle, char* objCode);
+COMPILER_EXPORT void ShGetObjectCode(const ShHandle handle, char* objCode);
// Returns information about an active attribute variable.
// Parameters:
// memory (SH_MAPPED_NAME_MAX_LENGTH), or NULL if don't care
// about the mapped name. If the name is not mapped, then name and
// mappedName are the same.
-void ShGetActiveAttrib(const ShHandle handle,
- int index,
- int* length,
- int* size,
- ShDataType* type,
- char* name,
- char* mappedName);
+COMPILER_EXPORT void ShGetActiveAttrib(const ShHandle handle,
+ int index,
+ int* length,
+ int* size,
+ ShDataType* type,
+ char* name,
+ char* mappedName);
// Returns information about an active uniform variable.
// Parameters:
// memory (SH_MAPPED_NAME_MAX_LENGTH), or NULL if don't care
// about the mapped name. If the name is not mapped, then name and
// mappedName are the same.
-void ShGetActiveUniform(const ShHandle handle,
- int index,
- int* length,
- int* size,
- ShDataType* type,
- char* name,
- char* mappedName);
+COMPILER_EXPORT void ShGetActiveUniform(const ShHandle handle,
+ int index,
+ int* length,
+ int* size,
+ ShDataType* type,
+ char* name,
+ char* mappedName);
#ifdef __cplusplus
}
-//
-// 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
-// found in the LICENSE file.
-//
-
-// debug.cpp: Debugging utilities.
-
-#include "common/debug.h"
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <d3d9.h>
-#include <windows.h>
-
-namespace gl
-{
-
-typedef void (WINAPI *PerfOutputFunction)(D3DCOLOR, LPCWSTR);
-
-static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const char *format, va_list vararg)
-{
-#if !defined(ANGLE_DISABLE_PERF)
- if (perfActive())
- {
- char message[4096];
- int len = vsprintf_s(message, format, vararg);
- if (len < 0)
- {
- return;
- }
-
- // There are no ASCII variants of these D3DPERF functions.
- wchar_t wideMessage[4096];
- for (int i = 0; i < len; ++i)
- {
- wideMessage[i] = message[i];
- }
- wideMessage[len] = 0;
-
- perfFunc(0, wideMessage);
- }
-#endif
-
-#if !defined(ANGLE_DISABLE_TRACE)
-#if defined(NDEBUG)
- if (traceFileDebugOnly)
- {
- return;
- }
-#endif
-
- FILE* file = fopen(TRACE_OUTPUT_FILE, "a");
- if (file)
- {
- vfprintf(file, format, vararg);
- fclose(file);
- }
-#endif
-}
-
-void trace(bool traceFileDebugOnly, const char *format, ...)
-{
- va_list vararg;
- va_start(vararg, format);
- output(traceFileDebugOnly, D3DPERF_SetMarker, format, vararg);
- va_end(vararg);
-}
-
-bool perfActive()
-{
-#if defined(ANGLE_DISABLE_PERF)
- return false;
-#else
- static bool active = D3DPERF_GetStatus() != 0;
- return active;
-#endif
-}
-
-ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...)
-{
- va_list vararg;
- va_start(vararg, format);
- output(true, reinterpret_cast<PerfOutputFunction>(D3DPERF_BeginEvent), format, vararg);
- va_end(vararg);
-}
-
-ScopedPerfEventHelper::~ScopedPerfEventHelper()
-{
-#if !defined(ANGLE_DISABLE_PERF)
- if (perfActive())
- {
- D3DPERF_EndEvent();
- }
-#endif
-}
-}
+//\r
+// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.\r
+// Use of this source code is governed by a BSD-style license that can be\r
+// found in the LICENSE file.\r
+//\r
+\r
+// debug.cpp: Debugging utilities.\r
+\r
+#include "common/debug.h"\r
+\r
+#include <stdio.h>\r
+#include <stdarg.h>\r
+#include <d3d9.h>\r
+#include <windows.h>\r
+\r
+namespace gl\r
+{\r
+\r
+typedef void (WINAPI *PerfOutputFunction)(D3DCOLOR, LPCWSTR);\r
+\r
+static void output(bool traceFileDebugOnly, PerfOutputFunction perfFunc, const char *format, va_list vararg)\r
+{\r
+#if !defined(ANGLE_DISABLE_PERF)\r
+ if (perfActive())\r
+ {\r
+ char message[4096];\r
+ int len = vsprintf_s(message, format, vararg);\r
+ if (len < 0)\r
+ {\r
+ return;\r
+ }\r
+\r
+ // There are no ASCII variants of these D3DPERF functions.\r
+ wchar_t wideMessage[4096];\r
+ for (int i = 0; i < len; ++i)\r
+ {\r
+ wideMessage[i] = message[i];\r
+ }\r
+ wideMessage[len] = 0;\r
+\r
+ perfFunc(0, wideMessage);\r
+ }\r
+#endif\r
+\r
+#if !defined(ANGLE_DISABLE_TRACE)\r
+#if defined(NDEBUG)\r
+ if (traceFileDebugOnly)\r
+ {\r
+ return;\r
+ }\r
+#endif\r
+\r
+ FILE* file = fopen(TRACE_OUTPUT_FILE, "a");\r
+ if (file)\r
+ {\r
+ vfprintf(file, format, vararg);\r
+ fclose(file);\r
+ }\r
+#endif\r
+}\r
+\r
+void trace(bool traceFileDebugOnly, const char *format, ...)\r
+{\r
+ va_list vararg;\r
+ va_start(vararg, format);\r
+#if defined(ANGLE_DISABLE_PERF)\r
+ output(traceFileDebugOnly, NULL, format, vararg);\r
+#else\r
+ output(traceFileDebugOnly, D3DPERF_SetMarker, format, vararg);\r
+#endif\r
+ va_end(vararg);\r
+}\r
+\r
+bool perfActive()\r
+{\r
+#if defined(ANGLE_DISABLE_PERF)\r
+ return false;\r
+#else\r
+ static bool active = D3DPERF_GetStatus() != 0;\r
+ return active;\r
+#endif\r
+}\r
+\r
+ScopedPerfEventHelper::ScopedPerfEventHelper(const char* format, ...)\r
+{\r
+#if !defined(ANGLE_DISABLE_PERF)\r
+ va_list vararg;\r
+ va_start(vararg, format);\r
+ output(true, reinterpret_cast<PerfOutputFunction>(D3DPERF_BeginEvent), format, vararg);\r
+ va_end(vararg);\r
+#endif\r
+}\r
+\r
+ScopedPerfEventHelper::~ScopedPerfEventHelper()\r
+{\r
+#if !defined(ANGLE_DISABLE_PERF)\r
+ if (perfActive())\r
+ {\r
+ D3DPERF_EndEvent();\r
+ }\r
+#endif\r
+}\r
+}\r
-#define MAJOR_VERSION 0
+#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define BUILD_VERSION 0
-#define BUILD_REVISION 696
+#define BUILD_REVISION 939
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
EbtGuardSamplerBegin, // non type: see implementation of IsSampler()
EbtSampler2D,
EbtSamplerCube,
+ EbtSamplerExternalOES, // Only valid if OES_EGL_image_external exists.
+ EbtSampler2DRect, // Only valid if GL_ARB_texture_rectangle exists.
EbtGuardSamplerEnd, // non type: see implementation of IsSampler()
EbtStruct,
EbtAddress, // should be deprecated??
case EbtBool: return "bool"; break;
case EbtSampler2D: return "sampler2D"; break;
case EbtSamplerCube: return "samplerCube"; break;
+ case EbtSamplerExternalOES: return "samplerExternalOES"; break;
+ case EbtSampler2DRect: return "sampler2DRect"; break;
case EbtStruct: return "structure"; break;
default: return "unknown type";
}
--- /dev/null
+//
+// 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/BuiltInFunctionEmulator.h"
+
+#include "compiler/SymbolTable.h"
+
+namespace {
+
+// we use macros here instead of function definitions to work around more GLSL
+// compiler bugs, in particular on NVIDIA hardware on Mac OSX. Macros are
+// problematic because if the argument has side-effects they will be repeatedly
+// evaluated. This is unlikely to show up in real shaders, but is something to
+// consider.
+const char* kFunctionEmulationVertexSource[] = {
+ "#error no emulation for atan(float, float)",
+ "vec2 webgl_atan_emu(vec2 y, vec2 x) { return vec2(atan(y[0], x[0]), atan(y[1], x[1])); }",
+ "vec3 webgl_atan_emu(vec3 y, vec3 x) { return vec3(atan(y[0], x[0]), atan(y[1], x[1]), atan(y[2], x[2])); }",
+ "vec4 webgl_atan_emu(vec4 y, vec4 x) { return vec4(atan(y[0], x[0]), atan(y[1], x[1]), atan(y[2], x[2]), atan(y[3], x[3])); }",
+
+ "#error no emulation for cos(float)",
+ "#error no emulation for cos(vec2)",
+ "#error no emulation for cos(vec3)",
+ "#error no emulation for cos(vec4)",
+
+ "#define webgl_distance_emu(x, y) ((x) >= (y) ? (x) - (y) : (y) - (x))",
+ "#error no emulation for distance(vec2, vec2)",
+ "#error no emulation for distance(vec3, vec3)",
+ "#error no emulation for distance(vec4, vec4)",
+
+ "#define webgl_dot_emu(x, y) ((x) * (y))",
+ "#error no emulation for dot(vec2, vec2)",
+ "#error no emulation for dot(vec3, vec3)",
+ "#error no emulation for dot(vec4, vec4)",
+
+ "#define webgl_length_emu(x) ((x) >= 0.0 ? (x) : -(x))",
+ "#error no emulation for length(vec2)",
+ "#error no emulation for length(vec3)",
+ "#error no emulation for length(vec4)",
+
+ "#error no emulation for mod(float, float)",
+ "vec2 webgl_mod_emu(vec2 x, vec2 y) { return vec2(mod(x[0], y[0]), mod(x[1], y[1])); }",
+ "vec3 webgl_mod_emu(vec3 x, vec3 y) { return vec3(mod(x[0], y[0]), mod(x[1], y[1]), mod(x[2], y[2])); }",
+ "vec4 webgl_mod_emu(vec4 x, vec4 y) { return vec4(mod(x[0], y[0]), mod(x[1], y[1]), mod(x[2], y[2]), mod(x[3], y[3])); }",
+
+ "#define webgl_normalize_emu(x) ((x) == 0.0 ? 0.0 : ((x) > 0.0 ? 1.0 : -1.0))",
+ "#error no emulation for normalize(vec2)",
+ "#error no emulation for normalize(vec3)",
+ "#error no emulation for normalize(vec4)",
+
+ "#define webgl_reflect_emu(I, N) ((I) - 2.0 * (N) * (I) * (N))",
+ "#error no emulation for reflect(vec2, vec2)",
+ "#error no emulation for reflect(vec3, vec3)",
+ "#error no emulation for reflect(vec4, vec4)"
+};
+
+const char* kFunctionEmulationFragmentSource[] = {
+ "#error no emulation for atan(float, float)",
+ "#error no emulation for atan(vec2, vec2)",
+ "#error no emulation for atan(vec3, vec3)",
+ "#error no emulation for atan(vec4, vec4)",
+
+ "webgl_emu_precision float webgl_cos_emu(webgl_emu_precision float a) { return cos(a); }",
+ "webgl_emu_precision vec2 webgl_cos_emu(webgl_emu_precision vec2 a) { return cos(a); }",
+ "webgl_emu_precision vec3 webgl_cos_emu(webgl_emu_precision vec3 a) { return cos(a); }",
+ "webgl_emu_precision vec4 webgl_cos_emu(webgl_emu_precision vec4 a) { return cos(a); }",
+
+ "#error no emulation for distance(float, float)",
+ "#error no emulation for distance(vec2, vec2)",
+ "#error no emulation for distance(vec3, vec3)",
+ "#error no emulation for distance(vec4, vec4)",
+
+ "#error no emulation for dot(float, float)",
+ "#error no emulation for dot(vec2, vec2)",
+ "#error no emulation for dot(vec3, vec3)",
+ "#error no emulation for dot(vec4, vec4)",
+
+ "#error no emulation for length(float)",
+ "#error no emulation for length(vec2)",
+ "#error no emulation for length(vec3)",
+ "#error no emulation for length(vec4)",
+
+ "#error no emulation for mod(float, float)",
+ "#error no emulation for mod(vec2, vec2)",
+ "#error no emulation for mod(vec3, vec3)",
+ "#error no emulation for mod(vec4, vec4)",
+
+ "#error no emulation for normalize(float)",
+ "#error no emulation for normalize(vec2)",
+ "#error no emulation for normalize(vec3)",
+ "#error no emulation for normalize(vec4)",
+
+ "#error no emulation for reflect(float, float)",
+ "#error no emulation for reflect(vec2, vec2)",
+ "#error no emulation for reflect(vec3, vec3)",
+ "#error no emulation for reflect(vec4, vec4)"
+};
+
+const bool kFunctionEmulationVertexMask[] = {
+#if defined(__APPLE__)
+ // Work around ATI driver bugs in Mac.
+ false, // TFunctionAtan1_1
+ false, // TFunctionAtan2_2
+ false, // TFunctionAtan3_3
+ false, // TFunctionAtan4_4
+ false, // TFunctionCos1
+ false, // TFunctionCos2
+ false, // TFunctionCos3
+ false, // TFunctionCos4
+ true, // TFunctionDistance1_1
+ false, // TFunctionDistance2_2
+ false, // TFunctionDistance3_3
+ false, // TFunctionDistance4_4
+ true, // TFunctionDot1_1
+ false, // TFunctionDot2_2
+ false, // TFunctionDot3_3
+ false, // TFunctionDot4_4
+ true, // TFunctionLength1
+ false, // TFunctionLength2
+ false, // TFunctionLength3
+ false, // TFunctionLength4
+ false, // TFunctionMod1_1
+ false, // TFunctionMod2_2
+ false, // TFunctionMod3_3
+ false, // TFunctionMod4_4
+ true, // TFunctionNormalize1
+ false, // TFunctionNormalize2
+ false, // TFunctionNormalize3
+ false, // TFunctionNormalize4
+ true, // TFunctionReflect1_1
+ false, // TFunctionReflect2_2
+ false, // TFunctionReflect3_3
+ false, // TFunctionReflect4_4
+#else
+ // Work around D3D driver bug in Win.
+ false, // TFunctionAtan1_1
+ true, // TFunctionAtan2_2
+ true, // TFunctionAtan3_3
+ true, // TFunctionAtan4_4
+ false, // TFunctionCos1
+ false, // TFunctionCos2
+ false, // TFunctionCos3
+ false, // TFunctionCos4
+ false, // TFunctionDistance1_1
+ false, // TFunctionDistance2_2
+ false, // TFunctionDistance3_3
+ false, // TFunctionDistance4_4
+ false, // TFunctionDot1_1
+ false, // TFunctionDot2_2
+ false, // TFunctionDot3_3
+ false, // TFunctionDot4_4
+ false, // TFunctionLength1
+ false, // TFunctionLength2
+ false, // TFunctionLength3
+ false, // TFunctionLength4
+ false, // TFunctionMod1_1
+ true, // TFunctionMod2_2
+ true, // TFunctionMod3_3
+ true, // TFunctionMod4_4
+ false, // TFunctionNormalize1
+ false, // TFunctionNormalize2
+ false, // TFunctionNormalize3
+ false, // TFunctionNormalize4
+ false, // TFunctionReflect1_1
+ false, // TFunctionReflect2_2
+ false, // TFunctionReflect3_3
+ false, // TFunctionReflect4_4
+#endif
+ false // TFunctionUnknown
+};
+
+const bool kFunctionEmulationFragmentMask[] = {
+ false, // TFunctionAtan1_1
+ false, // TFunctionAtan2_2
+ false, // TFunctionAtan3_3
+ false, // TFunctionAtan4_4
+#if defined(__APPLE__)
+ // Work around a ATI driver bug in Mac that causes crashes.
+ true, // TFunctionCos1
+ true, // TFunctionCos2
+ true, // TFunctionCos3
+ true, // TFunctionCos4
+#else
+ false, // TFunctionCos1
+ false, // TFunctionCos2
+ false, // TFunctionCos3
+ false, // TFunctionCos4
+#endif
+ false, // TFunctionDistance1_1
+ false, // TFunctionDistance2_2
+ false, // TFunctionDistance3_3
+ false, // TFunctionDistance4_4
+ false, // TFunctionDot1_1
+ false, // TFunctionDot2_2
+ false, // TFunctionDot3_3
+ false, // TFunctionDot4_4
+ false, // TFunctionLength1
+ false, // TFunctionLength2
+ false, // TFunctionLength3
+ false, // TFunctionLength4
+ false, // TFunctionMod1_1
+ false, // TFunctionMod2_2
+ false, // TFunctionMod3_3
+ false, // TFunctionMod4_4
+ false, // TFunctionNormalize1
+ false, // TFunctionNormalize2
+ false, // TFunctionNormalize3
+ false, // TFunctionNormalize4
+ false, // TFunctionReflect1_1
+ false, // TFunctionReflect2_2
+ false, // TFunctionReflect3_3
+ false, // TFunctionReflect4_4
+ false // TFunctionUnknown
+};
+
+class BuiltInFunctionEmulationMarker : public TIntermTraverser {
+public:
+ BuiltInFunctionEmulationMarker(BuiltInFunctionEmulator& emulator)
+ : mEmulator(emulator)
+ {
+ }
+
+ virtual bool visitUnary(Visit visit, TIntermUnary* node)
+ {
+ if (visit == PreVisit) {
+ bool needToEmulate = mEmulator.SetFunctionCalled(
+ node->getOp(), node->getOperand()->getType());
+ if (needToEmulate)
+ node->setUseEmulatedFunction();
+ }
+ return true;
+ }
+
+ virtual bool visitAggregate(Visit visit, TIntermAggregate* node)
+ {
+ if (visit == PreVisit) {
+ // Here we handle all the built-in functions instead of the ones we
+ // currently identified as problematic.
+ switch (node->getOp()) {
+ case EOpLessThan:
+ case EOpGreaterThan:
+ case EOpLessThanEqual:
+ case EOpGreaterThanEqual:
+ case EOpVectorEqual:
+ case EOpVectorNotEqual:
+ case EOpMod:
+ case EOpPow:
+ case EOpAtan:
+ case EOpMin:
+ case EOpMax:
+ case EOpClamp:
+ case EOpMix:
+ case EOpStep:
+ case EOpSmoothStep:
+ case EOpDistance:
+ case EOpDot:
+ case EOpCross:
+ case EOpFaceForward:
+ case EOpReflect:
+ case EOpRefract:
+ case EOpMul:
+ break;
+ default:
+ return true;
+ };
+ const TIntermSequence& sequence = node->getSequence();
+ // Right now we only handle built-in functions with two parameters.
+ if (sequence.size() != 2)
+ return true;
+ TIntermTyped* param1 = sequence[0]->getAsTyped();
+ TIntermTyped* param2 = sequence[1]->getAsTyped();
+ if (!param1 || !param2)
+ return true;
+ bool needToEmulate = mEmulator.SetFunctionCalled(
+ node->getOp(), param1->getType(), param2->getType());
+ if (needToEmulate)
+ node->setUseEmulatedFunction();
+ }
+ return true;
+ }
+
+private:
+ BuiltInFunctionEmulator& mEmulator;
+};
+
+} // anonymous namepsace
+
+BuiltInFunctionEmulator::BuiltInFunctionEmulator(ShShaderType shaderType)
+{
+ if (shaderType == SH_FRAGMENT_SHADER) {
+ mFunctionMask = kFunctionEmulationFragmentMask;
+ mFunctionSource = kFunctionEmulationFragmentSource;
+ } else {
+ mFunctionMask = kFunctionEmulationVertexMask;
+ mFunctionSource = kFunctionEmulationVertexSource;
+ }
+}
+
+bool BuiltInFunctionEmulator::SetFunctionCalled(
+ TOperator op, const TType& param)
+{
+ TBuiltInFunction function = IdentifyFunction(op, param);
+ return SetFunctionCalled(function);
+}
+
+bool BuiltInFunctionEmulator::SetFunctionCalled(
+ TOperator op, const TType& param1, const TType& param2)
+{
+ TBuiltInFunction function = IdentifyFunction(op, param1, param2);
+ return SetFunctionCalled(function);
+}
+
+bool BuiltInFunctionEmulator::SetFunctionCalled(
+ BuiltInFunctionEmulator::TBuiltInFunction function) {
+ if (function == TFunctionUnknown || mFunctionMask[function] == false)
+ return false;
+ for (size_t i = 0; i < mFunctions.size(); ++i) {
+ if (mFunctions[i] == function)
+ return true;
+ }
+ mFunctions.push_back(function);
+ return true;
+}
+
+void BuiltInFunctionEmulator::OutputEmulatedFunctionDefinition(
+ TInfoSinkBase& out, bool withPrecision) const
+{
+ if (mFunctions.size() == 0)
+ return;
+ out << "// BEGIN: Generated code for built-in function emulation\n\n";
+ if (withPrecision) {
+ out << "#if defined(GL_FRAGMENT_PRECISION_HIGH)\n"
+ << "#define webgl_emu_precision highp\n"
+ << "#else\n"
+ << "#define webgl_emu_precision mediump\n"
+ << "#endif\n\n";
+ } else {
+ out << "#define webgl_emu_precision\n\n";
+ }
+ for (size_t i = 0; i < mFunctions.size(); ++i) {
+ out << mFunctionSource[mFunctions[i]] << "\n\n";
+ }
+ out << "// END: Generated code for built-in function emulation\n\n";
+}
+
+BuiltInFunctionEmulator::TBuiltInFunction
+BuiltInFunctionEmulator::IdentifyFunction(
+ TOperator op, const TType& param)
+{
+ if (param.getNominalSize() > 4)
+ return TFunctionUnknown;
+ unsigned int function = TFunctionUnknown;
+ switch (op) {
+ case EOpCos:
+ function = TFunctionCos1;
+ break;
+ case EOpLength:
+ function = TFunctionLength1;
+ break;
+ case EOpNormalize:
+ function = TFunctionNormalize1;
+ break;
+ default:
+ break;
+ }
+ if (function == TFunctionUnknown)
+ return TFunctionUnknown;
+ if (param.isVector())
+ function += param.getNominalSize() - 1;
+ return static_cast<TBuiltInFunction>(function);
+}
+
+BuiltInFunctionEmulator::TBuiltInFunction
+BuiltInFunctionEmulator::IdentifyFunction(
+ TOperator op, const TType& param1, const TType& param2)
+{
+ // Right now for all the emulated functions with two parameters, the two
+ // parameters have the same type.
+ if (param1.isVector() != param2.isVector() ||
+ param1.getNominalSize() != param2.getNominalSize() ||
+ param1.getNominalSize() > 4)
+ return TFunctionUnknown;
+
+ unsigned int function = TFunctionUnknown;
+ switch (op) {
+ case EOpAtan:
+ function = TFunctionAtan1_1;
+ break;
+ case EOpDistance:
+ function = TFunctionDistance1_1;
+ break;
+ case EOpDot:
+ function = TFunctionDot1_1;
+ break;
+ case EOpMod:
+ function = TFunctionMod1_1;
+ break;
+ case EOpReflect:
+ function = TFunctionReflect1_1;
+ break;
+ default:
+ break;
+ }
+ if (function == TFunctionUnknown)
+ return TFunctionUnknown;
+ if (param1.isVector())
+ function += param1.getNominalSize() - 1;
+ return static_cast<TBuiltInFunction>(function);
+}
+
+void BuiltInFunctionEmulator::MarkBuiltInFunctionsForEmulation(
+ TIntermNode* root)
+{
+ ASSERT(root);
+
+ BuiltInFunctionEmulationMarker marker(*this);
+ root->traverse(&marker);
+}
+
+void BuiltInFunctionEmulator::Cleanup()
+{
+ mFunctions.clear();
+}
+
+//static
+TString BuiltInFunctionEmulator::GetEmulatedFunctionName(
+ const TString& name)
+{
+ ASSERT(name[name.length() - 1] == '(');
+ return "webgl_" + name.substr(0, name.length() - 1) + "_emu(";
+}
+
--- /dev/null
+//
+// Copyright (c) 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.
+//
+
+#ifndef COMPILIER_BUILT_IN_FUNCTION_EMULATOR_H_
+#define COMPILIER_BUILT_IN_FUNCTION_EMULATOR_H_
+
+#include "GLSLANG/ShaderLang.h"
+
+#include "compiler/InfoSink.h"
+#include "compiler/intermediate.h"
+
+//
+// This class decides which built-in functions need to be replaced with the
+// emulated ones.
+// It's only a workaround for OpenGL driver bugs, and isn't needed in general.
+//
+class BuiltInFunctionEmulator {
+public:
+ BuiltInFunctionEmulator(ShShaderType shaderType);
+ // Records that a function is called by the shader and might needs to be
+ // emulated. If the function's group is not in mFunctionGroupFilter, this
+ // becomes an no-op.
+ // Returns true if the function call needs to be replaced with an emulated
+ // one.
+ bool SetFunctionCalled(TOperator op, const TType& param);
+ bool SetFunctionCalled(
+ TOperator op, const TType& param1, const TType& param2);
+
+ // Output function emulation definition. This should be before any other
+ // shader source.
+ void OutputEmulatedFunctionDefinition(TInfoSinkBase& out, bool withPrecision) const;
+
+ void MarkBuiltInFunctionsForEmulation(TIntermNode* root);
+
+ void Cleanup();
+
+ // "name(" becomes "webgl_name_emu(".
+ static TString GetEmulatedFunctionName(const TString& name);
+
+private:
+ //
+ // Built-in functions.
+ //
+ enum TBuiltInFunction {
+ TFunctionAtan1_1 = 0, // float atan(float, float);
+ TFunctionAtan2_2, // vec2 atan(vec2, vec2);
+ TFunctionAtan3_3, // vec3 atan(vec3, vec2);
+ TFunctionAtan4_4, // vec4 atan(vec4, vec2);
+
+ TFunctionCos1, // float cos(float);
+ TFunctionCos2, // vec2 cos(vec2);
+ TFunctionCos3, // vec3 cos(vec3);
+ TFunctionCos4, // vec4 cos(vec4);
+
+ TFunctionDistance1_1, // float distance(float, float);
+ TFunctionDistance2_2, // vec2 distance(vec2, vec2);
+ TFunctionDistance3_3, // vec3 distance(vec3, vec3);
+ TFunctionDistance4_4, // vec4 distance(vec4, vec4);
+
+ TFunctionDot1_1, // float dot(float, float);
+ TFunctionDot2_2, // vec2 dot(vec2, vec2);
+ TFunctionDot3_3, // vec3 dot(vec3, vec3);
+ TFunctionDot4_4, // vec4 dot(vec4, vec4);
+
+ TFunctionLength1, // float length(float);
+ TFunctionLength2, // float length(vec2);
+ TFunctionLength3, // float length(vec3);
+ TFunctionLength4, // float length(vec4);
+
+ TFunctionMod1_1, // float mod(float, float);
+ TFunctionMod2_2, // vec2 mod(vec2, vec2);
+ TFunctionMod3_3, // vec3 mod(vec3, vec3);
+ TFunctionMod4_4, // vec4 mod(vec4, vec4);
+
+ TFunctionNormalize1, // float normalize(float);
+ TFunctionNormalize2, // vec2 normalize(vec2);
+ TFunctionNormalize3, // vec3 normalize(vec3);
+ TFunctionNormalize4, // vec4 normalize(vec4);
+
+ TFunctionReflect1_1, // float reflect(float, float);
+ TFunctionReflect2_2, // vec2 reflect(vec2, vec2);
+ TFunctionReflect3_3, // vec3 reflect(vec3, vec3);
+ TFunctionReflect4_4, // vec4 reflect(vec4, vec4);
+
+ TFunctionUnknown
+ };
+
+ TBuiltInFunction IdentifyFunction(TOperator op, const TType& param);
+ TBuiltInFunction IdentifyFunction(
+ TOperator op, const TType& param1, const TType& param2);
+
+ bool SetFunctionCalled(TBuiltInFunction function);
+
+ std::vector<TBuiltInFunction> mFunctions;
+
+ const bool* mFunctionMask; // a boolean flag for each function.
+ const char** mFunctionSource;
+};
+
+#endif // COMPILIER_BUILT_IN_FUNCTION_EMULATOR_H_
//
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// 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/BuiltInFunctionEmulator.h"
+#include "compiler/DetectRecursion.h"
+#include "compiler/ForLoopUnroll.h"
#include "compiler/Initialize.h"
#include "compiler/ParseHelper.h"
#include "compiler/ShHandle.h"
{
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);
TCompiler::TCompiler(ShShaderType type, ShShaderSpec spec)
: shaderType(type),
- shaderSpec(spec)
+ shaderSpec(spec),
+ builtInFunctionEmulator(type)
{
}
TIntermNode* root = parseContext.treeRoot;
success = intermediate.postProcess(root);
+ if (success)
+ success = detectRecursion(root);
+
if (success && (compileOptions & SH_VALIDATE_LOOP_INDEXING))
success = validateLimitations(root);
+ // Unroll for-loop markup needs to happen after validateLimitations pass.
+ if (success && (compileOptions & SH_UNROLL_FOR_LOOP_WITH_INTEGER_INDEX))
+ ForLoopUnroll::MarkForLoopsWithIntegerIndicesForUnrolling(root);
+
+ // Built-in function emulation needs to happen after validateLimitations pass.
+ if (success && (compileOptions & SH_EMULATE_BUILT_IN_FUNCTIONS))
+ builtInFunctionEmulator.MarkBuiltInFunctionsForEmulation(root);
+
// Call mapLongVariableNames() before collectAttribsUniforms() so in
// collectAttribsUniforms() we already have the mapped symbol names and
// we could composite mapped and original variable names.
- if (compileOptions & SH_MAP_LONG_VARIABLE_NAMES)
+ if (success && (compileOptions & SH_MAP_LONG_VARIABLE_NAMES))
mapLongVariableNames(root);
if (success && (compileOptions & SH_ATTRIBUTES_UNIFORMS))
attribs.clear();
uniforms.clear();
+
+ builtInFunctionEmulator.Cleanup();
+}
+
+bool TCompiler::detectRecursion(TIntermNode* root)
+{
+ DetectRecursion detect;
+ root->traverse(&detect);
+ switch (detect.detectRecursion()) {
+ case DetectRecursion::kErrorNone:
+ return true;
+ case DetectRecursion::kErrorMissingMain:
+ infoSink.info.message(EPrefixError, "Missing main()");
+ return false;
+ case DetectRecursion::kErrorRecursion:
+ infoSink.info.message(EPrefixError, "Function recursion detected");
+ return false;
+ default:
+ UNREACHABLE();
+ return false;
+ }
}
bool TCompiler::validateLimitations(TIntermNode* root) {
int TCompiler::getMappedNameMaxLength() const
{
- return MAX_IDENTIFIER_NAME_SIZE + 1;
+ return MAX_SHORTENED_IDENTIFIER_SIZE + 1;
}
const TExtensionBehavior& TCompiler::getExtensionBehavior() const
{
return extensionBehavior;
}
+
+const BuiltInFunctionEmulator& TCompiler::getBuiltInFunctionEmulator() const
+{
+ return builtInFunctionEmulator;
+}
--- /dev/null
+//
+// 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 (int 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;
+}
+
--- /dev/null
+//
+// 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.
+//
+
+#ifndef COMPILER_DETECT_RECURSION_H_
+#define COMPILER_DETECT_RECURSION_H_
+
+#include "GLSLANG/ShaderLang.h"
+
+#include "compiler/intermediate.h"
+#include "compiler/VariableInfo.h"
+
+// Traverses intermediate tree to detect function recursion.
+class DetectRecursion : public TIntermTraverser {
+public:
+ enum ErrorCode {
+ kErrorMissingMain,
+ kErrorRecursion,
+ kErrorNone
+ };
+
+ DetectRecursion();
+ ~DetectRecursion();
+
+ virtual bool visitAggregate(Visit, TIntermAggregate*);
+
+ ErrorCode detectRecursion();
+
+private:
+ class FunctionNode {
+ public:
+ FunctionNode(const TString& fname);
+
+ const TString& getName() const;
+
+ // 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();
+
+ private:
+ // mangled function name is unique.
+ TString name;
+
+ // functions that are directly called by this function.
+ TVector<FunctionNode*> callees;
+
+ Visit visit;
+ };
+
+ FunctionNode* findFunctionByName(const TString& name);
+
+ TVector<FunctionNode*> functions;
+ FunctionNode* currentFunction;
+};
+
+#endif // COMPILER_DETECT_RECURSION_H_
EBhRequire,
EBhEnable,
EBhWarn,
- EBhDisable
+ EBhDisable,
+ EBhUndefined,
} TBehavior;
inline const char* getBehaviorString(TBehavior b)
#include "compiler/ForLoopUnroll.h"
+namespace {
+
+class IntegerForLoopUnrollMarker : public TIntermTraverser {
+public:
+
+ virtual bool visitLoop(Visit, TIntermLoop* node)
+ {
+ // This is called after ValidateLimitations pass, so all the ASSERT
+ // should never fail.
+ // See ValidateLimitations::validateForLoopInit().
+ ASSERT(node);
+ ASSERT(node->getType() == ELoopFor);
+ ASSERT(node->getInit());
+ TIntermAggregate* decl = node->getInit()->getAsAggregate();
+ ASSERT(decl && decl->getOp() == EOpDeclaration);
+ TIntermSequence& declSeq = decl->getSequence();
+ ASSERT(declSeq.size() == 1);
+ TIntermBinary* declInit = declSeq[0]->getAsBinaryNode();
+ ASSERT(declInit && declInit->getOp() == EOpInitialize);
+ ASSERT(declInit->getLeft());
+ TIntermSymbol* symbol = declInit->getLeft()->getAsSymbolNode();
+ ASSERT(symbol);
+ TBasicType type = symbol->getBasicType();
+ ASSERT(type == EbtInt || type == EbtFloat);
+ if (type == EbtInt)
+ node->setUnrollFlag(true);
+ return true;
+ }
+
+};
+
+} // anonymous namepsace
+
void ForLoopUnroll::FillLoopIndexInfo(TIntermLoop* node, TLoopIndexInfo& info)
{
ASSERT(node->getType() == ELoopFor);
mLoopIndexStack.pop_back();
}
+// static
+void ForLoopUnroll::MarkForLoopsWithIntegerIndicesForUnrolling(
+ TIntermNode* root)
+{
+ ASSERT(root);
+
+ IntegerForLoopUnrollMarker marker;
+ root->traverse(&marker);
+}
+
int ForLoopUnroll::getLoopIncrement(TIntermLoop* node)
{
TIntermNode* expr = node->getExpression();
void Push(TLoopIndexInfo& info);
void Pop();
+ static void MarkForLoopsWithIntegerIndicesForUnrolling(TIntermNode* root);
+
private:
int getLoopIncrement(TIntermLoop* node);
// Prototypes for built-in functions seen by both vertex and fragment shaders.
//
//============================================================================
-static TString BuiltInFunctionsCommon()
+static TString BuiltInFunctionsCommon(const ShBuiltInResources& resources)
{
TString s;
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);"));
+ }
+
+ 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);"));
+ }
+
//
// Noise functions.
//
//
// 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);"));
-
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);"));
//
// 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);"));
-
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);"));
switch (type) {
case SH_FRAGMENT_SHADER:
builtInStrings.push_back(DefaultPrecisionFragment());
- builtInStrings.push_back(BuiltInFunctionsCommon());
+ 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());
+ builtInStrings.push_back(BuiltInFunctionsCommon(resources));
builtInStrings.push_back(BuiltInFunctionsVertex(resources));
builtInStrings.push_back(StandardUniforms());
break;
switch(type) {
case SH_FRAGMENT_SHADER: {
// Set up gl_FragData. The array size.
- TType fragData(EbtFloat, EbpMedium, EvqFragColor, 4, false, true);
+ TType fragData(EbtFloat, EbpMedium, EvqFragData, 4, false, true);
fragData.setArraySize(resources.MaxDrawBuffers);
symbolTable.insert(*new TVariable(NewPoolTString("gl_FragData"), fragData));
}
TExtensionBehavior& extBehavior)
{
if (resources.OES_standard_derivatives)
- extBehavior["GL_OES_standard_derivatives"] = EBhDisable;
+ extBehavior["GL_OES_standard_derivatives"] = EBhUndefined;
+ if (resources.OES_EGL_image_external)
+ extBehavior["GL_OES_EGL_image_external"] = EBhUndefined;
+ if (resources.ARB_texture_rectangle)
+ extBehavior["GL_ARB_texture_rectangle"] = EBhUndefined;
}
//
-// Copyright (c) 2002-2011 The ANGLE Project Authors. All rights reserved.
+// Copyright (c) 2002-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.
//
TString mapLongName(int id, const TString& name, bool isVarying)
{
- ASSERT(name.size() > MAX_IDENTIFIER_NAME_SIZE);
+ ASSERT(name.size() > MAX_SHORTENED_IDENTIFIER_SIZE);
TStringStream stream;
stream << "webgl_";
if (isVarying)
stream << "v";
stream << id << "_";
- stream << name.substr(0, MAX_IDENTIFIER_NAME_SIZE - stream.str().size());
+ stream << name.substr(0, MAX_SHORTENED_IDENTIFIER_SIZE - stream.str().size());
return stream.str();
}
} // anonymous namespace
MapLongVariableNames::MapLongVariableNames(
- TMap<TString, TString>& varyingLongNameMap)
+ std::map<std::string, std::string>& varyingLongNameMap)
: mVaryingLongNameMap(varyingLongNameMap)
{
}
void MapLongVariableNames::visitSymbol(TIntermSymbol* symbol)
{
ASSERT(symbol != NULL);
- if (symbol->getSymbol().size() > MAX_IDENTIFIER_NAME_SIZE) {
+ if (symbol->getSymbol().size() > MAX_SHORTENED_IDENTIFIER_SIZE) {
switch (symbol->getQualifier()) {
case EvqVaryingIn:
case EvqVaryingOut:
case EvqInvariantVaryingIn:
case EvqInvariantVaryingOut:
+ case EvqUniform:
symbol->setSymbol(
mapVaryingLongName(symbol->getSymbol()));
break;
}
}
-void MapLongVariableNames::visitConstantUnion(TIntermConstantUnion*)
-{
-}
-
-bool MapLongVariableNames::visitBinary(Visit, TIntermBinary*)
-{
- return true;
-}
-
-bool MapLongVariableNames::visitUnary(Visit, TIntermUnary*)
-{
- return true;
-}
-
-bool MapLongVariableNames::visitSelection(Visit, TIntermSelection*)
-{
- return true;
-}
-
-bool MapLongVariableNames::visitAggregate(Visit, TIntermAggregate*)
-{
- return true;
-}
-
bool MapLongVariableNames::visitLoop(Visit, TIntermLoop* node)
{
if (node->getInit())
return true;
}
-bool MapLongVariableNames::visitBranch(Visit, TIntermBranch*)
-{
- return true;
-}
-
TString MapLongVariableNames::mapVaryingLongName(const TString& name)
{
- TMap<TString, TString>::const_iterator it = mVaryingLongNameMap.find(name);
+ std::map<std::string, std::string>::const_iterator it = mVaryingLongNameMap.find(name.c_str());
if (it != mVaryingLongNameMap.end())
- return (*it).second;
+ return (*it).second.c_str();
int id = mVaryingLongNameMap.size();
TString mappedName = mapLongName(id, name, true);
mVaryingLongNameMap.insert(
- TMap<TString, TString>::value_type(name, mappedName));
+ std::map<std::string, std::string>::value_type(name.c_str(), mappedName.c_str()));
return mappedName;
}
#include "compiler/VariableInfo.h"
// This size does not include '\0' in the end.
-#define MAX_IDENTIFIER_NAME_SIZE 32
+#define MAX_SHORTENED_IDENTIFIER_SIZE 32
// Traverses intermediate tree to map attributes and uniforms names that are
-// longer than MAX_IDENTIFIER_NAME_SIZE to MAX_IDENTIFIER_NAME_SIZE.
+// longer than MAX_SHORTENED_IDENTIFIER_SIZE to MAX_SHORTENED_IDENTIFIER_SIZE.
class MapLongVariableNames : public TIntermTraverser {
public:
- MapLongVariableNames(TMap<TString, TString>& varyingLongNameMap);
+ MapLongVariableNames(std::map<std::string, std::string>& varyingLongNameMap);
virtual void visitSymbol(TIntermSymbol*);
- virtual void visitConstantUnion(TIntermConstantUnion*);
- virtual bool visitBinary(Visit, TIntermBinary*);
- virtual bool visitUnary(Visit, TIntermUnary*);
- virtual bool visitSelection(Visit, TIntermSelection*);
- virtual bool visitAggregate(Visit, TIntermAggregate*);
virtual bool visitLoop(Visit, TIntermLoop*);
- virtual bool visitBranch(Visit, TIntermBranch*);
private:
TString mapVaryingLongName(const TString& name);
- TMap<TString, TString>& mVaryingLongNameMap;
+ std::map<std::string, std::string>& mVaryingLongNameMap;
};
#endif // COMPILER_MAP_LONG_VARIABLE_NAMES_H_
bool TOutputGLSLBase::visitUnary(Visit visit, TIntermUnary* node)
{
+ TString preString;
+ TString postString = ")";
+
switch (node->getOp())
{
- case EOpNegative: writeTriplet(visit, "(-", NULL, ")"); break;
- case EOpVectorLogicalNot: writeTriplet(visit, "not(", NULL, ")"); break;
- case EOpLogicalNot: writeTriplet(visit, "(!", NULL, ")"); break;
+ case EOpNegative: preString = "(-"; break;
+ case EOpVectorLogicalNot: preString = "not("; break;
+ case EOpLogicalNot: preString = "(!"; break;
- case EOpPostIncrement: writeTriplet(visit, "(", NULL, "++)"); break;
- case EOpPostDecrement: writeTriplet(visit, "(", NULL, "--)"); break;
- case EOpPreIncrement: writeTriplet(visit, "(++", NULL, ")"); break;
- case EOpPreDecrement: writeTriplet(visit, "(--", NULL, ")"); break;
+ case EOpPostIncrement: preString = "("; postString = "++)"; break;
+ case EOpPostDecrement: preString = "("; postString = "--)"; break;
+ case EOpPreIncrement: preString = "(++"; break;
+ case EOpPreDecrement: preString = "(--"; break;
case EOpConvIntToBool:
case EOpConvFloatToBool:
switch (node->getOperand()->getType().getNominalSize())
{
- case 1: writeTriplet(visit, "bool(", NULL, ")"); break;
- case 2: writeTriplet(visit, "bvec2(", NULL, ")"); break;
- case 3: writeTriplet(visit, "bvec3(", NULL, ")"); break;
- case 4: writeTriplet(visit, "bvec4(", NULL, ")"); break;
+ case 1: preString = "bool("; break;
+ case 2: preString = "bvec2("; break;
+ case 3: preString = "bvec3("; break;
+ case 4: preString = "bvec4("; break;
default: UNREACHABLE();
}
break;
case EOpConvIntToFloat:
switch (node->getOperand()->getType().getNominalSize())
{
- case 1: writeTriplet(visit, "float(", NULL, ")"); break;
- case 2: writeTriplet(visit, "vec2(", NULL, ")"); break;
- case 3: writeTriplet(visit, "vec3(", NULL, ")"); break;
- case 4: writeTriplet(visit, "vec4(", NULL, ")"); break;
+ case 1: preString = "float("; break;
+ case 2: preString = "vec2("; break;
+ case 3: preString = "vec3("; break;
+ case 4: preString = "vec4("; break;
default: UNREACHABLE();
}
break;
case EOpConvBoolToInt:
switch (node->getOperand()->getType().getNominalSize())
{
- case 1: writeTriplet(visit, "int(", NULL, ")"); break;
- case 2: writeTriplet(visit, "ivec2(", NULL, ")"); break;
- case 3: writeTriplet(visit, "ivec3(", NULL, ")"); break;
- case 4: writeTriplet(visit, "ivec4(", NULL, ")"); break;
+ case 1: preString = "int("; break;
+ case 2: preString = "ivec2("; break;
+ case 3: preString = "ivec3("; break;
+ case 4: preString = "ivec4("; break;
default: UNREACHABLE();
}
break;
- case EOpRadians: writeTriplet(visit, "radians(", NULL, ")"); break;
- case EOpDegrees: writeTriplet(visit, "degrees(", NULL, ")"); break;
- case EOpSin: writeTriplet(visit, "sin(", NULL, ")"); break;
- case EOpCos: writeTriplet(visit, "cos(", NULL, ")"); break;
- case EOpTan: writeTriplet(visit, "tan(", NULL, ")"); break;
- case EOpAsin: writeTriplet(visit, "asin(", NULL, ")"); break;
- case EOpAcos: writeTriplet(visit, "acos(", NULL, ")"); break;
- case EOpAtan: writeTriplet(visit, "atan(", NULL, ")"); break;
-
- case EOpExp: writeTriplet(visit, "exp(", NULL, ")"); break;
- case EOpLog: writeTriplet(visit, "log(", NULL, ")"); break;
- case EOpExp2: writeTriplet(visit, "exp2(", NULL, ")"); break;
- case EOpLog2: writeTriplet(visit, "log2(", NULL, ")"); break;
- case EOpSqrt: writeTriplet(visit, "sqrt(", NULL, ")"); break;
- case EOpInverseSqrt: writeTriplet(visit, "inversesqrt(", NULL, ")"); break;
-
- case EOpAbs: writeTriplet(visit, "abs(", NULL, ")"); break;
- case EOpSign: writeTriplet(visit, "sign(", NULL, ")"); break;
- case EOpFloor: writeTriplet(visit, "floor(", NULL, ")"); break;
- case EOpCeil: writeTriplet(visit, "ceil(", NULL, ")"); break;
- case EOpFract: writeTriplet(visit, "fract(", NULL, ")"); break;
-
- case EOpLength: writeTriplet(visit, "length(", NULL, ")"); break;
- case EOpNormalize: writeTriplet(visit, "normalize(", NULL, ")"); break;
-
- case EOpDFdx: writeTriplet(visit, "dFdx(", NULL, ")"); break;
- case EOpDFdy: writeTriplet(visit, "dFdy(", NULL, ")"); break;
- case EOpFwidth: writeTriplet(visit, "fwidth(", NULL, ")"); break;
-
- case EOpAny: writeTriplet(visit, "any(", NULL, ")"); break;
- case EOpAll: writeTriplet(visit, "all(", NULL, ")"); break;
+ case EOpRadians: preString = "radians("; break;
+ case EOpDegrees: preString = "degrees("; break;
+ case EOpSin: preString = "sin("; break;
+ case EOpCos: preString = "cos("; break;
+ case EOpTan: preString = "tan("; break;
+ case EOpAsin: preString = "asin("; break;
+ case EOpAcos: preString = "acos("; break;
+ case EOpAtan: preString = "atan("; break;
+
+ case EOpExp: preString = "exp("; break;
+ case EOpLog: preString = "log("; break;
+ case EOpExp2: preString = "exp2("; break;
+ case EOpLog2: preString = "log2("; break;
+ case EOpSqrt: preString = "sqrt("; break;
+ case EOpInverseSqrt: preString = "inversesqrt("; break;
+
+ case EOpAbs: preString = "abs("; break;
+ case EOpSign: preString = "sign("; break;
+ case EOpFloor: preString = "floor("; break;
+ case EOpCeil: preString = "ceil("; break;
+ case EOpFract: preString = "fract("; break;
+
+ case EOpLength: preString = "length("; break;
+ case EOpNormalize: preString = "normalize("; break;
+
+ case EOpDFdx: preString = "dFdx("; break;
+ case EOpDFdy: preString = "dFdy("; break;
+ case EOpFwidth: preString = "fwidth("; break;
+
+ case EOpAny: preString = "any("; break;
+ case EOpAll: preString = "all("; break;
default: UNREACHABLE(); break;
}
+ if (visit == PreVisit && node->getUseEmulatedFunction())
+ preString = BuiltInFunctionEmulator::GetEmulatedFunctionName(preString);
+ writeTriplet(visit, preString.c_str(), NULL, postString.c_str());
+
return true;
}
{
bool visitChildren = true;
TInfoSinkBase& out = objSink();
+ TString preString;
+ bool delayedWrite = false;
switch (node->getOp())
{
case EOpSequence: {
case EOpPrototype: {
// Function declaration.
ASSERT(visit == PreVisit);
- TString returnType = getTypeName(node->getType());
- out << returnType << " " << node->getName();
+ writeVariableType(node->getType());
+ out << " " << node->getName();
out << "(";
writeFunctionParameters(node->getSequence());
}
break;
- case EOpLessThan: writeTriplet(visit, "lessThan(", ", ", ")"); break;
- case EOpGreaterThan: writeTriplet(visit, "greaterThan(", ", ", ")"); break;
- case EOpLessThanEqual: writeTriplet(visit, "lessThanEqual(", ", ", ")"); break;
- case EOpGreaterThanEqual: writeTriplet(visit, "greaterThanEqual(", ", ", ")"); break;
- case EOpVectorEqual: writeTriplet(visit, "equal(", ", ", ")"); break;
- case EOpVectorNotEqual: writeTriplet(visit, "notEqual(", ", ", ")"); break;
+ case EOpLessThan: preString = "lessThan("; delayedWrite = true; break;
+ case EOpGreaterThan: preString = "greaterThan("; delayedWrite = true; break;
+ case EOpLessThanEqual: preString = "lessThanEqual("; delayedWrite = true; break;
+ case EOpGreaterThanEqual: preString = "greaterThanEqual("; delayedWrite = true; break;
+ case EOpVectorEqual: preString = "equal("; delayedWrite = true; break;
+ case EOpVectorNotEqual: preString = "notEqual("; delayedWrite = true; break;
case EOpComma: writeTriplet(visit, NULL, ", ", NULL); break;
- case EOpMod: writeTriplet(visit, "mod(", ", ", ")"); break;
- case EOpPow: writeTriplet(visit, "pow(", ", ", ")"); break;
- case EOpAtan: writeTriplet(visit, "atan(", ", ", ")"); break;
- case EOpMin: writeTriplet(visit, "min(", ", ", ")"); break;
- case EOpMax: writeTriplet(visit, "max(", ", ", ")"); break;
- case EOpClamp: writeTriplet(visit, "clamp(", ", ", ")"); break;
- case EOpMix: writeTriplet(visit, "mix(", ", ", ")"); break;
- case EOpStep: writeTriplet(visit, "step(", ", ", ")"); break;
- case EOpSmoothStep: writeTriplet(visit, "smoothstep(", ", ", ")"); break;
-
- case EOpDistance: writeTriplet(visit, "distance(", ", ", ")"); break;
- case EOpDot: writeTriplet(visit, "dot(", ", ", ")"); break;
- case EOpCross: writeTriplet(visit, "cross(", ", ", ")"); break;
- case EOpFaceForward: writeTriplet(visit, "faceforward(", ", ", ")"); break;
- case EOpReflect: writeTriplet(visit, "reflect(", ", ", ")"); break;
- case EOpRefract: writeTriplet(visit, "refract(", ", ", ")"); break;
- case EOpMul: writeTriplet(visit, "matrixCompMult(", ", ", ")"); break;
+ case EOpMod: preString = "mod("; delayedWrite = true; break;
+ case EOpPow: preString = "pow("; delayedWrite = true; break;
+ case EOpAtan: preString = "atan("; delayedWrite = true; break;
+ case EOpMin: preString = "min("; delayedWrite = true; break;
+ case EOpMax: preString = "max("; delayedWrite = true; break;
+ case EOpClamp: preString = "clamp("; delayedWrite = true; break;
+ case EOpMix: preString = "mix("; delayedWrite = true; break;
+ case EOpStep: preString = "step("; delayedWrite = true; break;
+ case EOpSmoothStep: preString = "smoothstep("; delayedWrite = true; break;
+
+ case EOpDistance: preString = "distance("; delayedWrite = true; break;
+ case EOpDot: preString = "dot("; delayedWrite = true; break;
+ case EOpCross: preString = "cross("; delayedWrite = true; break;
+ case EOpFaceForward: preString = "faceforward("; delayedWrite = true; break;
+ case EOpReflect: preString = "reflect("; delayedWrite = true; break;
+ case EOpRefract: preString = "refract("; delayedWrite = true; break;
+ case EOpMul: preString = "matrixCompMult("; delayedWrite = true; break;
default: UNREACHABLE(); break;
}
+ if (delayedWrite && visit == PreVisit && node->getUseEmulatedFunction())
+ preString = BuiltInFunctionEmulator::GetEmulatedFunctionName(preString);
+ if (delayedWrite)
+ writeTriplet(visit, preString.c_str(), ", ", ")");
return visitChildren;
}
mUsesPointSize = false;
mUsesXor = false;
mUsesMod1 = false;
- mUsesMod2 = false;
- mUsesMod3 = false;
- mUsesMod4 = false;
+ mUsesMod2v = false;
+ mUsesMod2f = false;
+ mUsesMod3v = false;
+ mUsesMod3f = false;
+ mUsesMod4v = false;
+ mUsesMod4f = false;
mUsesFaceforward1 = false;
mUsesFaceforward2 = false;
mUsesFaceforward3 = false;
{
if (mReferencedUniforms.find(name.c_str()) != mReferencedUniforms.end())
{
- uniforms += "uniform " + typeString(type) + " " + decorate(name) + arrayString(type) + ";\n";
+ uniforms += "uniform " + typeString(type) + " " + decorateUniform(name, type.isArray()) + arrayString(type) + ";\n";
}
}
else if (qualifier == EvqVaryingIn || qualifier == EvqInvariantVaryingIn)
if (mUsesFragCoord)
{
- out << "uniform float4 dx_Viewport;\n"
+ out << "uniform float4 dx_Coord;\n"
"uniform float2 dx_Depth;\n";
}
{
if (mReferencedUniforms.find(name.c_str()) != mReferencedUniforms.end())
{
- uniforms += "uniform " + typeString(type) + " " + decorate(name) + arrayString(type) + ";\n";
+ uniforms += "uniform " + typeString(type) + " " + decorateUniform(name, type.isArray()) + arrayString(type) + ";\n";
}
}
else if (qualifier == EvqAttribute)
"}\n"
"\n";
}
-
- if (mUsesMod2)
+
+ if (mUsesMod2v)
+ {
+ out << "float2 mod(float2 x, float2 y)\n"
+ "{\n"
+ " return x - y * floor(x / y);\n"
+ "}\n"
+ "\n";
+ }
+
+ if (mUsesMod2f)
{
out << "float2 mod(float2 x, float y)\n"
"{\n"
"\n";
}
- if (mUsesMod3)
+ if (mUsesMod3v)
+ {
+ out << "float3 mod(float3 x, float3 y)\n"
+ "{\n"
+ " return x - y * floor(x / y);\n"
+ "}\n"
+ "\n";
+ }
+
+ if (mUsesMod3f)
{
out << "float3 mod(float3 x, float y)\n"
"{\n"
"\n";
}
- if (mUsesMod4)
+ if (mUsesMod4v)
+ {
+ out << "float4 mod(float4 x, float4 y)\n"
+ "{\n"
+ " return x - y * floor(x / y);\n"
+ "}\n"
+ "\n";
+ }
+
+ if (mUsesMod4f)
{
out << "float4 mod(float4 x, float y)\n"
"{\n"
if (qualifier == EvqUniform)
{
mReferencedUniforms.insert(name.c_str());
+ out << decorateUniform(name, node->isArray());
}
else if (qualifier == EvqAttribute)
{
mReferencedAttributes.insert(name.c_str());
+ out << decorate(name);
}
else if (qualifier == EvqVaryingOut || qualifier == EvqInvariantVaryingOut || qualifier == EvqVaryingIn || qualifier == EvqInvariantVaryingIn)
{
mReferencedVaryings.insert(name.c_str());
+ out << decorate(name);
+ }
+ else
+ {
+ out << decorate(name);
}
-
- out << decorate(name);
}
}
case EOpVectorNotEqual: outputTriplet(visit, "(", " != ", ")"); break;
case EOpMod:
{
- switch (node->getSequence()[0]->getAsTyped()->getNominalSize()) // Number of components in the first argument
+ // We need to look at the number of components in both arguments
+ switch (node->getSequence()[0]->getAsTyped()->getNominalSize() * 10
+ + node->getSequence()[1]->getAsTyped()->getNominalSize())
{
- case 1: mUsesMod1 = true; break;
- case 2: mUsesMod2 = true; break;
- case 3: mUsesMod3 = true; break;
- case 4: mUsesMod4 = true; break;
+ case 11: mUsesMod1 = true; break;
+ case 22: mUsesMod2v = true; break;
+ case 21: mUsesMod2f = true; break;
+ case 33: mUsesMod3v = true; break;
+ case 31: mUsesMod3f = true; break;
+ case 44: mUsesMod4v = true; break;
+ case 41: mUsesMod4f = true; break;
default: UNREACHABLE();
}
if (node->usesTernaryOperator())
{
- out << "t" << mUnfoldSelect->getTemporaryIndex();
+ out << "s" << mUnfoldSelect->getNextTemporaryIndex();
}
else // if/else statement
{
}
else
{
- if (node->getInit())
- {
- mUnfoldSelect->traverse(node->getInit());
- }
-
- if (node->getCondition())
- {
- mUnfoldSelect->traverse(node->getCondition());
- }
-
- if (node->getExpression())
- {
- mUnfoldSelect->traverse(node->getExpression());
- }
-
out << "for(";
if (node->getInit())
}
outputLineDirective(node->getLine());
- out << "}\n";
+ out << ";}\n";
if (node->getType() == ELoopDoWhile)
{
}
outputLineDirective(node->getLine());
- out << "}\n";
+ out << ";}\n";
initial += 255 * increment;
iterations -= 255;
typedef std::vector<TType> ParameterArray;
ParameterArray ctorParameters;
- if (parameters)
- {
- for (TIntermSequence::const_iterator parameter = parameters->begin(); parameter != parameters->end(); parameter++)
- {
- ctorParameters.push_back((*parameter)->getAsTyped()->getType());
- }
- }
- else if (type.getStruct())
+ if (type.getStruct())
{
mStructNames.insert(decorate(name));
ctorParameters.push_back(*fields[i].type);
}
}
+ else if (parameters)
+ {
+ for (TIntermSequence::const_iterator parameter = parameters->begin(); parameter != parameters->end(); parameter++)
+ {
+ ctorParameters.push_back((*parameter)->getAsTyped()->getType());
+ }
+ }
else UNREACHABLE();
TString constructor;
TString OutputHLSL::decorate(const TString &string)
{
- if (string.substr(0, 3) != "gl_" && string.substr(0, 3) != "dx_")
+ if (string.compare(0, 3, "gl_") != 0 && string.compare(0, 3, "dx_") != 0)
{
return "_" + string;
}
- else
+
+ return string;
+}
+
+TString OutputHLSL::decorateUniform(const TString &string, bool array)
+{
+ if (array)
{
- return string;
+ return "ar_" + string; // Allows identifying arrays of size 1
}
+
+ return decorate(string);
}
}
static TString qualifierString(TQualifier qualifier);
static TString arrayString(const TType &type);
static TString initializer(const TType &type);
- static TString decorate(const TString &string); // Prepend an underscore to avoid naming clashes
+ static TString decorate(const TString &string); // Prepends an underscore to avoid naming clashes
+ static TString decorateUniform(const TString &string, bool array);
protected:
void header();
bool mUsesPointSize;
bool mUsesXor;
bool mUsesMod1;
- bool mUsesMod2;
- bool mUsesMod3;
- bool mUsesMod4;
+ bool mUsesMod2v;
+ bool mUsesMod2f;
+ bool mUsesMod3v;
+ bool mUsesMod3f;
+ bool mUsesMod4v;
+ bool mUsesMod4f;
bool mUsesFaceforward1;
bool mUsesFaceforward2;
bool mUsesFaceforward3;
//
void TParseContext::recover()
{
- recoveredFromError = true;
}
//
{
static const char* reservedErrMsg = "reserved built-in name";
if (!symbolTable.atBuiltInLevel()) {
- if (identifier.substr(0, 3) == TString("gl_")) {
+ if (identifier.compare(0, 3, "gl_") == 0) {
error(line, reservedErrMsg, "gl_", "");
return true;
}
if (shaderSpec == SH_WEBGL_SPEC) {
- if (identifier.substr(0, 6) == TString("webgl_")) {
+ if (identifier.compare(0, 6, "webgl_") == 0) {
error(line, reservedErrMsg, "webgl_", "");
return true;
}
- if (identifier.substr(0, 7) == TString("_webgl_")) {
+ if (identifier.compare(0, 7, "_webgl_") == 0) {
error(line, reservedErrMsg, "_webgl_", "");
return true;
}
return true;
}
- if (!type->isMatrix()) {
+ if (!type->isMatrix() || !matrixInMatrix) {
if ((op != EOpConstructStruct && size != 1 && size < type->getObjectSize()) ||
(op == EOpConstructStruct && size < type->getObjectSize())) {
error(line, "not enough data provided for construction", "constructor", "");
error(line, "extension", extension.c_str(), "is not supported");
return true;
}
- if (iter->second == EBhDisable) {
+ // In GLSL ES, an extension's default behavior is "disable".
+ if (iter->second == EBhDisable || iter->second == EBhUndefined) {
error(line, "extension", extension.c_str(), "is disabled");
return true;
}
return false;
}
+bool TParseContext::supportsExtension(const char* extension)
+{
+ TExtensionBehavior::const_iterator iter = extensionBehavior.find(extension);
+ return (iter != extensionBehavior.end());
+}
+
/////////////////////////////////////////////////////////////////////////////////
//
// Non-Errors.
return typedNode;
}
+bool TParseContext::enterStructDeclaration(int line, const TString& identifier)
+{
+ ++structNestingLevel;
+
+ // Embedded structure definitions are not supported per GLSL ES spec.
+ // They aren't allowed in GLSL either, but we need to detect this here
+ // so we don't rely on the GLSL compiler to catch it.
+ if (structNestingLevel > 1) {
+ error(line, "", "Embedded struct definitions are not allowed", "");
+ return true;
+ }
+
+ return false;
+}
+
+void TParseContext::exitStructDeclaration()
+{
+ --structNestingLevel;
+}
+
+namespace {
+
+const int kWebGLMaxStructNesting = 4;
+
+} // namespace
+
+bool TParseContext::structNestingErrorCheck(TSourceLoc line, const TType& fieldType)
+{
+ if (shaderSpec != SH_WEBGL_SPEC) {
+ return false;
+ }
+
+ if (fieldType.getBasicType() != EbtStruct) {
+ return false;
+ }
+
+ // We're already inside a structure definition at this point, so add
+ // one to the field's struct nesting.
+ if (1 + fieldType.getDeepestStructNesting() > kWebGLMaxStructNesting) {
+ error(line, "", "", "Reference of struct type %s exceeds maximum struct nesting of %d",
+ fieldType.getTypeName().c_str(), kWebGLMaxStructNesting);
+ return true;
+ }
+
+ return false;
+}
+
//
// Parse an array of strings using yyparse.
//
//
struct TParseContext {
TParseContext(TSymbolTable& symt, TExtensionBehavior& ext, TIntermediate& interm, ShShaderType type, ShShaderSpec spec, int options, bool checksPrecErrors, const char* sourcePath, TInfoSink& is) :
- intermediate(interm), symbolTable(symt), extensionBehavior(ext), infoSink(is), shaderType(type), shaderSpec(spec), compileOptions(options), checksPrecisionErrors(checksPrecErrors), sourcePath(sourcePath), treeRoot(0),
- recoveredFromError(false), numErrors(0), lexAfterType(false), loopNestingLevel(0),
- inTypeParen(false), scanner(NULL), contextPragma(true, false) { }
+ intermediate(interm),
+ symbolTable(symt),
+ extensionBehavior(ext),
+ infoSink(is),
+ shaderType(type),
+ shaderSpec(spec),
+ compileOptions(options),
+ sourcePath(sourcePath),
+ treeRoot(0),
+ numErrors(0),
+ lexAfterType(false),
+ loopNestingLevel(0),
+ structNestingLevel(0),
+ inTypeParen(false),
+ currentFunctionType(NULL),
+ functionReturnsValue(false),
+ checksPrecisionErrors(checksPrecErrors),
+ contextPragma(true, false),
+ scanner(NULL) { }
TIntermediate& intermediate; // to hold and build a parse tree
TSymbolTable& symbolTable; // symbol table that goes with the language currently being parsed
TExtensionBehavior& extensionBehavior; // mapping between supported extensions and current behavior.
int compileOptions;
const char* sourcePath; // Path of source file or NULL.
TIntermNode* treeRoot; // root of parse tree being created
- bool recoveredFromError; // true if a parse error has occurred, but we continue to parse
int numErrors;
bool lexAfterType; // true if we've recognized a type, so can only be looking for an identifier
int loopNestingLevel; // 0 if outside all loops
+ int structNestingLevel; // incremented while parsing a struct declaration
bool inTypeParen; // true if in parentheses, looking only for an identifier
const TType* currentFunctionType; // the return type of the function that's currently being parsed
bool functionReturnsValue; // true if a non-void function has a return
bool checksPrecisionErrors; // true if an error will be generated when a variable is declared without precision, explicit or implicit.
+ struct TPragma contextPragma;
+ TString HashErrMsg;
+ bool AfterEOF;
+ void* scanner;
void error(TSourceLoc loc, const char *reason, const char* token,
const char* extraInfoFormat, ...);
void warning(TSourceLoc loc, const char* reason, const char* token,
const char* extraInfoFormat, ...);
- bool reservedErrorCheck(int line, const TString& identifier);
void recover();
bool parseVectorFields(const TString&, int vecSize, TVectorFields&, int line);
bool parseMatrixFields(const TString&, int matSize, TMatrixFields&, int line);
+
+ bool reservedErrorCheck(int line, const TString& identifier);
void assignError(int line, const char* op, TString left, TString right);
void unaryOpError(int line, const char* op, TString operand);
void binaryOpError(int line, const char* op, TString left, TString right);
bool samplerErrorCheck(int line, const TPublicType& pType, const char* reason);
bool structQualifierErrorCheck(int line, const TPublicType& pType);
bool parameterSamplerErrorCheck(int line, TQualifier qualifier, const TType& type);
- bool containsSampler(TType& type);
bool nonInitConstErrorCheck(int line, TString& identifier, TPublicType& type);
bool nonInitErrorCheck(int line, TString& identifier, TPublicType& type, TVariable*& variable);
bool paramErrorCheck(int line, TQualifier qualifier, TQualifier paramQualifier, TType* type);
bool extensionErrorCheck(int line, const TString&);
+ bool supportsExtension(const char* extension);
+
+ bool containsSampler(TType& type);
+ bool areAllChildConst(TIntermAggregate* aggrNode);
const TFunction* findFunction(int line, TFunction* pfnCall, bool *builtIn = 0);
bool executeInitializer(TSourceLoc line, TString& identifier, TPublicType& pType,
TIntermTyped* initializer, TIntermNode*& intermNode, TVariable* variable = 0);
- bool areAllChildConst(TIntermAggregate* aggrNode);
+ bool arraySetMaxSize(TIntermSymbol*, TType*, int, bool, TSourceLoc);
+
TIntermTyped* addConstructor(TIntermNode*, const TType*, TOperator, TFunction*, TSourceLoc);
TIntermTyped* foldConstConstructor(TIntermAggregate* aggrNode, const TType& type);
TIntermTyped* constructStruct(TIntermNode*, TType*, int, TSourceLoc, bool subset);
TIntermTyped* addConstMatrixNode(int , TIntermTyped*, TSourceLoc);
TIntermTyped* addConstArrayNode(int index, TIntermTyped* node, TSourceLoc line);
TIntermTyped* addConstStruct(TString& , TIntermTyped*, TSourceLoc);
- bool arraySetMaxSize(TIntermSymbol*, TType*, int, bool, TSourceLoc);
- void* scanner;
- struct TPragma contextPragma;
- TString HashErrMsg;
- bool AfterEOF;
+
+ // Performs an error check for embedded struct declarations.
+ // Returns true if an error was raised due to the declaration of
+ // this struct.
+ bool enterStructDeclaration(TSourceLoc line, const TString& identifier);
+ void exitStructDeclaration();
+
+ bool structNestingErrorCheck(TSourceLoc line, const TType& fieldType);
};
int PaParseStrings(int count, const char* const string[], const int length[],
pointer address(reference x) const { return &x; }
const_pointer address(const_reference x) const { return &x; }
- pool_allocator() : allocator(GlobalPoolAllocator) { }
- pool_allocator(TPoolAllocator& a) : allocator(a) { }
+ pool_allocator() : allocator(&GlobalPoolAllocator) { }
+ pool_allocator(TPoolAllocator& a) : allocator(&a) { }
pool_allocator(const pool_allocator<T>& p) : allocator(p.allocator) { }
+ template <class Other>
+ pool_allocator<T>& operator=(const pool_allocator<Other>& p) {
+ allocator = p.allocator;
+ return *this;
+ }
+
template<class Other>
- pool_allocator(const pool_allocator<Other>& p) : allocator(p.getAllocator()) { }
+ pool_allocator(const pool_allocator<Other>& p) : allocator(&p.getAllocator()) { }
#if defined(__SUNPRO_CC) && !defined(_RWSTD_ALLOCATOR)
// libCStd on some platforms have a different allocate/deallocate interface.
size_type max_size() const { return static_cast<size_type>(-1) / sizeof(T); }
size_type max_size(int size) const { return static_cast<size_type>(-1) / size; }
- void setAllocator(TPoolAllocator* a) { allocator = *a; }
- TPoolAllocator& getAllocator() const { return allocator; }
+ void setAllocator(TPoolAllocator* a) { allocator = a; }
+ TPoolAllocator& getAllocator() const { return *allocator; }
protected:
- TPoolAllocator& allocator;
+ TPoolAllocator* allocator;
};
#endif // _POOLALLOC_INCLUDED_
#include "GLSLANG/ShaderLang.h"
+#include "compiler/BuiltInFunctionEmulator.h"
#include "compiler/ExtensionBehavior.h"
#include "compiler/InfoSink.h"
#include "compiler/SymbolTable.h"
bool InitBuiltInSymbolTable(const ShBuiltInResources& resources);
// Clears the results from the previous compilation.
void clearResults();
+ // Return true if function recursion is detected.
+ bool detectRecursion(TIntermNode* root);
// Returns true if the given shader does not exceed the minimum
// functionality mandated in GLSL 1.0 spec Appendix A.
bool validateLimitations(TIntermNode* root);
// Get built-in extensions with default behavior.
const TExtensionBehavior& getExtensionBehavior() const;
+ const BuiltInFunctionEmulator& getBuiltInFunctionEmulator() const;
+
private:
ShShaderType shaderType;
ShShaderSpec shaderSpec;
// Built-in extensions with default behavior.
TExtensionBehavior extensionBehavior;
+ BuiltInFunctionEmulator builtInFunctionEmulator;
+
// Results of compilation.
TInfoSink infoSink; // Output sink.
TVariableInfoList attribs; // Active attributes in the compiled shader.
TVariableInfoList uniforms; // Active uniforms in the compiled shader.
// Pair of long varying varibale name <originalName, mappedName>.
- TMap<TString, TString> varyingLongNameMap;
+ std::map<std::string, std::string> varyingLongNameMap;
};
//
//
-// Copyright (c) 2002-2010 The ANGLE Project Authors. All rights reserved.
+// 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 "GLSLANG/ShaderLang.h"
#include "compiler/InitializeDll.h"
+#include "compiler/preprocessor/length_limits.h"
#include "compiler/ShHandle.h"
//
// and the shading language compiler.
//
-static int getVariableMaxLength(const TVariableInfoList& varList)
+static bool checkActiveUniformAndAttribMaxLengths(const ShHandle handle,
+ int expectedValue)
{
- TString::size_type maxLen = 0;
- for (TVariableInfoList::const_iterator i = varList.begin();
- i != varList.end(); ++i)
- {
- maxLen = std::max(maxLen, i->name.size());
- }
- // Add 1 to include null-termination character.
- return static_cast<int>(maxLen) + 1;
+ int activeUniformLimit = 0;
+ ShGetInfo(handle, SH_ACTIVE_UNIFORM_MAX_LENGTH, &activeUniformLimit);
+ int activeAttribLimit = 0;
+ ShGetInfo(handle, SH_ACTIVE_ATTRIBUTE_MAX_LENGTH, &activeAttribLimit);
+ return (expectedValue == activeUniformLimit && expectedValue == activeAttribLimit);
+}
+
+static bool checkMappedNameMaxLength(const ShHandle handle, int expectedValue)
+{
+ int mappedNameMaxLength = 0;
+ ShGetInfo(handle, SH_MAPPED_NAME_MAX_LENGTH, &mappedNameMaxLength);
+ return (expectedValue == mappedNameMaxLength);
}
static void getVariableInfo(ShShaderInfo varType,
if (length) *length = varInfo.name.size();
*size = varInfo.size;
*type = varInfo.type;
- strcpy(name, varInfo.name.c_str());
- if (mappedName)
- strcpy(mappedName, varInfo.mappedName.c_str());
+
+ // This size must match that queried by
+ // SH_ACTIVE_UNIFORM_MAX_LENGTH and SH_ACTIVE_ATTRIBUTE_MAX_LENGTH
+ // in ShGetInfo, below.
+ int activeUniformAndAttribLength = 1 + MAX_SYMBOL_NAME_LEN;
+ ASSERT(checkActiveUniformAndAttribMaxLengths(handle, activeUniformAndAttribLength));
+ strncpy(name, varInfo.name.c_str(), activeUniformAndAttribLength);
+ if (mappedName) {
+ // This size must match that queried by
+ // SH_MAPPED_NAME_MAX_LENGTH in ShGetInfo, below.
+ int maxMappedNameLength = 1 + MAX_SYMBOL_NAME_LEN;
+ ASSERT(checkMappedNameMaxLength(handle, maxMappedNameLength));
+ strncpy(mappedName, varInfo.mappedName.c_str(), maxMappedNameLength);
+ }
}
//
// Extensions.
resources->OES_standard_derivatives = 0;
+ resources->OES_EGL_image_external = 0;
+ resources->ARB_texture_rectangle = 0;
}
//
*params = compiler->getUniforms().size();
break;
case SH_ACTIVE_UNIFORM_MAX_LENGTH:
- *params = getVariableMaxLength(compiler->getUniforms());
+ *params = 1 + MAX_SYMBOL_NAME_LEN;
break;
case SH_ACTIVE_ATTRIBUTES:
*params = compiler->getAttribs().size();
break;
case SH_ACTIVE_ATTRIBUTE_MAX_LENGTH:
- *params = getVariableMaxLength(compiler->getAttribs());
+ *params = 1 + MAX_SYMBOL_NAME_LEN;
break;
case SH_MAPPED_NAME_MAX_LENGTH:
- *params = compiler->getMappedNameMaxLength();
+ // Use longer length than MAX_SHORTENED_IDENTIFIER_SIZE to
+ // handle array and struct dereferences.
+ *params = 1 + MAX_SYMBOL_NAME_LEN;
break;
default: UNREACHABLE();
}
#include <stdio.h>
+#include <algorithm>
+
//
// TType helper function needs a place to live.
//
return structureSize;
}
+void TType::computeDeepestStructNesting()
+{
+ if (!getStruct()) {
+ return;
+ }
+
+ int maxNesting = 0;
+ for (TTypeList::const_iterator tl = getStruct()->begin(); tl != getStruct()->end(); ++tl) {
+ maxNesting = std::max(maxNesting, ((*tl).type)->getDeepestStructNesting());
+ }
+
+ deepestStructNesting = 1 + maxNesting;
+}
+
//
// Dump functions.
//
// Write built-in extension behaviors.
writeExtensionBehavior();
+ // Write emulated built-in functions if needed.
+ getBuiltInFunctionEmulator().OutputEmulatedFunctionDefinition(
+ sink, getShaderType() == SH_FRAGMENT_SHADER);
+
// Write translated shader.
TOutputESSL outputESSL(sink);
root->traverse(&outputESSL);
const TExtensionBehavior& extensionBehavior = getExtensionBehavior();
for (TExtensionBehavior::const_iterator iter = extensionBehavior.begin();
iter != extensionBehavior.end(); ++iter) {
- sink << "#extension " << iter->first << " : "
- << getBehaviorString(iter->second) << "\n";
+ if (iter->second != EBhUndefined) {
+ sink << "#extension " << iter->first << " : "
+ << getBehaviorString(iter->second) << "\n";
+ }
}
}
// Write GLSL version.
writeVersion(getShaderType(), root, sink);
+ // Write emulated built-in functions if needed.
+ getBuiltInFunctionEmulator().OutputEmulatedFunctionDefinition(
+ sink, false);
+
// Write translated shader.
TOutputGLSL outputGLSL(sink);
root->traverse(&outputGLSL);
TType() {}
TType(TBasicType t, TPrecision p, TQualifier q = EvqTemporary, int s = 1, bool m = false, bool a = false) :
type(t), precision(p), qualifier(q), size(s), matrix(m), array(a), arraySize(0),
- maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), fieldName(0), mangled(0), typeName(0)
+ maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0), typeName(0)
{
}
explicit TType(const TPublicType &p) :
type(p.type), precision(p.precision), qualifier(p.qualifier), size(p.size), matrix(p.matrix), array(p.array), arraySize(p.arraySize),
- maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), fieldName(0), mangled(0), typeName(0)
+ maxArraySize(0), arrayInformationType(0), structure(0), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0), typeName(0)
{
if (p.userDef) {
structure = p.userDef->getStruct();
typeName = NewPoolTString(p.userDef->getTypeName().c_str());
+ computeDeepestStructNesting();
}
}
TType(TTypeList* userDef, const TString& n, TPrecision p = EbpUndefined) :
type(EbtStruct), precision(p), qualifier(EvqTemporary), size(1), matrix(false), array(false), arraySize(0),
- maxArraySize(0), arrayInformationType(0), structure(userDef), structureSize(0), fieldName(0), mangled(0)
+ maxArraySize(0), arrayInformationType(0), structure(userDef), structureSize(0), deepestStructNesting(0), fieldName(0), mangled(0)
{
typeName = NewPoolTString(n.c_str());
}
structureSize = copyOf.structureSize;
maxArraySize = copyOf.maxArraySize;
+ deepestStructNesting = copyOf.deepestStructNesting;
assert(copyOf.arrayInformationType == 0);
arrayInformationType = 0; // arrayInformationType should not be set for builtIn symbol table level
}
bool isScalar() const { return size == 1 && !matrix && !structure; }
TTypeList* getStruct() const { return structure; }
- void setStruct(TTypeList* s) { structure = s; }
+ void setStruct(TTypeList* s) { structure = s; computeDeepestStructNesting(); }
const TString& getTypeName() const
{
const char* getQualifierString() const { return ::getQualifierString(qualifier); }
TString getCompleteString() const;
+ // If this type is a struct, returns the deepest struct nesting of
+ // any field in the struct. For example:
+ // struct nesting1 {
+ // vec4 position;
+ // };
+ // struct nesting2 {
+ // nesting1 field1;
+ // vec4 field2;
+ // };
+ // For type "nesting2", this method would return 2 -- the number
+ // of structures through which indirection must occur to reach the
+ // deepest field (nesting2.field1.position).
+ int getDeepestStructNesting() const { return deepestStructNesting; }
+
protected:
void buildMangledName(TString&);
int getStructSize() const;
+ void computeDeepestStructNesting();
TBasicType type : 6;
TPrecision precision;
TTypeList* structure; // 0 unless this is a struct
mutable int structureSize;
+ int deepestStructNesting;
TString *fieldName; // for structure field names
TString *mangled;
void UnfoldSelect::traverse(TIntermNode *node)
{
- mTemporaryIndex++;
+ int rewindIndex = mTemporaryIndex;
node->traverse(this);
+ mTemporaryIndex = rewindIndex;
}
bool UnfoldSelect::visitSelection(Visit visit, TIntermSelection *node)
if (node->usesTernaryOperator())
{
- int i = mTemporaryIndex++;
+ int i = mTemporaryIndex;
- out << mOutputHLSL->typeString(node->getType()) << " t" << i << ";\n";
+ out << mOutputHLSL->typeString(node->getType()) << " s" << i << ";\n";
+ mTemporaryIndex = i + 1;
node->getCondition()->traverse(this);
out << "if(";
+ mTemporaryIndex = i + 1;
node->getCondition()->traverse(mOutputHLSL);
out << ")\n"
"{\n";
+ mTemporaryIndex = i + 1;
node->getTrueBlock()->traverse(this);
- out << " t" << i << " = ";
+ out << " s" << i << " = ";
+ mTemporaryIndex = i + 1;
node->getTrueBlock()->traverse(mOutputHLSL);
out << ";\n"
"}\n"
"else\n"
"{\n";
+ mTemporaryIndex = i + 1;
node->getFalseBlock()->traverse(this);
- out << " t" << i << " = ";
+ out << " s" << i << " = ";
+ mTemporaryIndex = i + 1;
node->getFalseBlock()->traverse(mOutputHLSL);
out << ";\n"
"}\n";
- mTemporaryIndex--;
+ mTemporaryIndex = i + 1;
}
return false;
}
-int UnfoldSelect::getTemporaryIndex()
+bool UnfoldSelect::visitLoop(Visit visit, TIntermLoop *node)
{
- return mTemporaryIndex;
+ int rewindIndex = mTemporaryIndex;
+
+ if (node->getInit())
+ {
+ node->getInit()->traverse(this);
+ }
+
+ if (node->getCondition())
+ {
+ node->getCondition()->traverse(this);
+ }
+
+ if (node->getExpression())
+ {
+ node->getExpression()->traverse(this);
+ }
+
+ mTemporaryIndex = rewindIndex;
+
+ return false;
+}
+
+int UnfoldSelect::getNextTemporaryIndex()
+{
+ return mTemporaryIndex++;
}
}
void traverse(TIntermNode *node);
bool visitSelection(Visit visit, TIntermSelection *node);
+ bool visitLoop(Visit visit, TIntermLoop *node);
- int getTemporaryIndex();
+ int getNextTemporaryIndex();
protected:
TParseContext &mContext;
IsLoopIndex(symbol, mLoopStack);
}
}
- virtual void visitConstantUnion(TIntermConstantUnion*) {}
- virtual bool visitBinary(Visit, TIntermBinary*) { return true; }
- virtual bool visitUnary(Visit, TIntermUnary*) { return true; }
- virtual bool visitSelection(Visit, TIntermSelection*) { return true; }
- virtual bool visitAggregate(Visit, TIntermAggregate*) { return true; }
- virtual bool visitLoop(Visit, TIntermLoop*) { return true; }
- virtual bool visitBranch(Visit, TIntermBranch*) { return true; }
private:
bool mValid;
}
}
}
- virtual void visitConstantUnion(TIntermConstantUnion*) {}
- virtual bool visitBinary(Visit, TIntermBinary*) { return true; }
- virtual bool visitUnary(Visit, TIntermUnary*) { return true; }
- virtual bool visitSelection(Visit, TIntermSelection*) { return true; }
- virtual bool visitAggregate(Visit, TIntermAggregate*) { return true; }
- virtual bool visitLoop(Visit, TIntermLoop*) { return true; }
- virtual bool visitBranch(Visit, TIntermBranch*) { return true; }
private:
bool mUsesFloatLoopIndex;
{
}
-void ValidateLimitations::visitSymbol(TIntermSymbol*)
-{
-}
-
-void ValidateLimitations::visitConstantUnion(TIntermConstantUnion*)
-{
-}
-
bool ValidateLimitations::visitBinary(Visit, TIntermBinary* node)
{
// Check if loop index is modified in the loop body.
return true;
}
-bool ValidateLimitations::visitSelection(Visit, TIntermSelection*)
-{
- return true;
-}
-
bool ValidateLimitations::visitAggregate(Visit, TIntermAggregate* node)
{
switch (node->getOp()) {
return false;
}
-bool ValidateLimitations::visitBranch(Visit, TIntermBranch*)
-{
- return true;
-}
-
void ValidateLimitations::error(TSourceLoc loc,
const char *reason, const char* token)
{
int numErrors() const { return mNumErrors; }
- virtual void visitSymbol(TIntermSymbol*);
- virtual void visitConstantUnion(TIntermConstantUnion*);
virtual bool visitBinary(Visit, TIntermBinary*);
virtual bool visitUnary(Visit, TIntermUnary*);
- virtual bool visitSelection(Visit, TIntermSelection*);
virtual bool visitAggregate(Visit, TIntermAggregate*);
virtual bool visitLoop(Visit, TIntermLoop*);
- virtual bool visitBranch(Visit, TIntermBranch*);
private:
void error(TSourceLoc loc, const char *reason, const char* token);
}
case EbtSampler2D: return SH_SAMPLER_2D;
case EbtSamplerCube: return SH_SAMPLER_CUBE;
+ case EbtSampler2DRect: return SH_SAMPLER_2D_RECT_ARB;
default: UNREACHABLE();
}
return SH_NONE;
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2010 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.
-
-# Generates GLSL ES lexer - glslang_lex.cpp
-
-script_dir=$(dirname $0)
-input_file=$script_dir/glslang.l
-output_file=$script_dir/glslang_lex.cpp
-flex --noline --nounistd --outfile=$output_file $input_file
+++ /dev/null
-#!/bin/bash
-# Copyright (c) 2010 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.
-
-# Generates GLSL ES parser - glslang_tab.h and glslang_tab.cpp
-
-script_dir=$(dirname $0)
-input_file=$script_dir/glslang.y
-output_header=$script_dir/glslang_tab.h
-output_source=$script_dir/glslang_tab.cpp
-bison --no-lines --skeleton=yacc.c --defines=$output_header --output=$output_source $input_file
--- /dev/null
+#!/bin/bash
+# Copyright (c) 2010 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.
+
+# Generates GLSL ES parser - glslang_lex.cpp, glslang_tab.h, and glslang_tab.cpp
+
+run_flex()
+{
+input_file=$script_dir/$1.l
+output_source=$script_dir/$1_lex.cpp
+flex --noline --nounistd --outfile=$output_source $input_file
+}
+
+run_bison()
+{
+input_file=$script_dir/$1.y
+output_header=$script_dir/$1_tab.h
+output_source=$script_dir/$1_tab.cpp
+bison --no-lines --skeleton=yacc.c --defines=$output_header --output=$output_source $input_file
+}
+
+script_dir=$(dirname $0)
+
+# Generate Parser
+run_flex glslang
+run_bison glslang
Based on ANSI C grammar, Lex specification:
http://www.lysator.liu.se/c/ANSI-C-grammar-l.html
-IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_glslang_lexer.sh,
+IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh,
WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp).
*/
// found in the LICENSE file.
//
-// This file is auto-generated by generate_glslang_lexer.sh. DO NOT EDIT!
+// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
}
%{
"sampler2D" { context->lexAfterType = true; return SAMPLER2D; }
"samplerCube" { context->lexAfterType = true; return SAMPLERCUBE; }
+"samplerExternalOES" { context->lexAfterType = true; return SAMPLER_EXTERNAL_OES; }
+"sampler2DRect" { context->lexAfterType = true; return SAMPLER2DRECT; }
"struct" { context->lexAfterType = true; return(STRUCT); }
Based on ANSI C Yacc grammar:
http://www.lysator.liu.se/c/ANSI-C-grammar-y.html
-IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_glslang_parser.sh,
+IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh,
WHICH GENERATES THE GLSL ES PARSER (glslang_tab.cpp AND glslang_tab.h).
*/
// found in the LICENSE file.
//
-// This file is auto-generated by generate_glslang_parser.sh. DO NOT EDIT!
+// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
#include "compiler/SymbolTable.h"
#include "compiler/ParseHelper.h"
%token <lex> BVEC2 BVEC3 BVEC4 IVEC2 IVEC3 IVEC4 VEC2 VEC3 VEC4
%token <lex> MATRIX2 MATRIX3 MATRIX4 IN_QUAL OUT_QUAL INOUT_QUAL UNIFORM VARYING
%token <lex> STRUCT VOID_TYPE WHILE
-%token <lex> SAMPLER2D SAMPLERCUBE
+%token <lex> SAMPLER2D SAMPLERCUBE SAMPLER_EXTERNAL_OES SAMPLER2DRECT
%token <lex> IDENTIFIER TYPE_NAME FLOATCONSTANT INTCONSTANT BOOLCONSTANT
%token <lex> FIELD_SELECTION
TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
$$.setBasic(EbtSamplerCube, qual, $1.line);
}
+ | SAMPLER_EXTERNAL_OES {
+ if (!context->supportsExtension("GL_OES_EGL_image_external")) {
+ context->error($1.line, "unsupported type", "samplerExternalOES", "");
+ context->recover();
+ }
+ FRAG_VERT_ONLY("samplerExternalOES", $1.line);
+ TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
+ $$.setBasic(EbtSamplerExternalOES, qual, $1.line);
+ }
+ | SAMPLER2DRECT {
+ if (!context->supportsExtension("GL_ARB_texture_rectangle")) {
+ context->error($1.line, "unsupported type", "sampler2DRect", "");
+ context->recover();
+ }
+ FRAG_VERT_ONLY("sampler2DRect", $1.line);
+ TQualifier qual = context->symbolTable.atGlobalLevel() ? EvqGlobal : EvqTemporary;
+ $$.setBasic(EbtSampler2DRect, qual, $1.line);
+ }
| struct_specifier {
FRAG_VERT_ONLY("struct", $1.line);
$$ = $1;
;
struct_specifier
- : STRUCT IDENTIFIER LEFT_BRACE struct_declaration_list RIGHT_BRACE {
+ : STRUCT IDENTIFIER LEFT_BRACE { if (context->enterStructDeclaration($2.line, *$2.string)) context->recover(); } struct_declaration_list RIGHT_BRACE {
if (context->reservedErrorCheck($2.line, *$2.string))
context->recover();
- TType* structure = new TType($4, *$2.string);
+ TType* structure = new TType($5, *$2.string);
TVariable* userTypeDef = new TVariable($2.string, *structure, true);
if (! context->symbolTable.insert(*userTypeDef)) {
context->error($2.line, "redefinition", $2.string->c_str(), "struct");
}
$$.setBasic(EbtStruct, EvqTemporary, $1.line);
$$.userDef = structure;
+ context->exitStructDeclaration();
}
- | STRUCT LEFT_BRACE struct_declaration_list RIGHT_BRACE {
- TType* structure = new TType($3, TString(""));
+ | STRUCT LEFT_BRACE { if (context->enterStructDeclaration($2.line, *$2.string)) context->recover(); } struct_declaration_list RIGHT_BRACE {
+ TType* structure = new TType($4, TString(""));
$$.setBasic(EbtStruct, EvqTemporary, $1.line);
$$.userDef = structure;
+ context->exitStructDeclaration();
}
;
type->setStruct($1.userDef->getStruct());
type->setTypeName($1.userDef->getTypeName());
}
+
+ if (context->structNestingErrorCheck($1.line, *type)) {
+ context->recover();
+ }
}
}
;
// found in the LICENSE file.
//
-// This file is auto-generated by generate_glslang_lexer.sh. DO NOT EDIT!
+// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
-#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
#define UINT32_MAX (4294967295U)
#endif
+#endif /* ! C99 */
+
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
/* Size of default input buffer. */
#ifndef YY_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k.
+ * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
+ * Ditto for the __ia64__ case accordingly.
+ */
+#define YY_BUF_SIZE 32768
+#else
#define YY_BUF_SIZE 16384
+#endif /* __ia64__ */
#endif
/* The state buf must be large enough to hold one state per character in the main buffer.
*yy_cp = '\0'; \
yyg->yy_c_buf_p = yy_cp;
-#define YY_NUM_RULES 145
-#define YY_END_OF_BUFFER 146
+#define YY_NUM_RULES 147
+#define YY_END_OF_BUFFER 148
/* This struct is not used in this scanner,
but its presence is necessary. */
struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
-static yyconst flex_int16_t yy_accept[411] =
+static yyconst flex_int16_t yy_accept[426] =
{ 0,
- 0, 0, 0, 0, 0, 0, 146, 144, 143, 143,
- 128, 134, 139, 123, 124, 132, 131, 120, 129, 127,
- 133, 92, 92, 121, 117, 135, 122, 136, 140, 88,
- 125, 126, 138, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 118, 137, 119, 130, 3, 4, 3,
- 142, 145, 141, 114, 100, 119, 108, 103, 98, 106,
- 96, 107, 97, 95, 2, 1, 99, 94, 90, 91,
- 0, 0, 92, 126, 118, 125, 115, 111, 113, 112,
- 116, 88, 104, 110, 88, 88, 88, 88, 88, 88,
-
- 88, 88, 88, 88, 17, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 20, 22,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 105, 109, 5, 141,
- 0, 1, 94, 0, 0, 93, 89, 101, 102, 48,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 18, 88, 88,
- 88, 88, 88, 88, 88, 88, 26, 88, 88, 88,
- 88, 88, 88, 88, 88, 23, 88, 88, 88, 88,
-
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 0, 95,
- 0, 94, 88, 28, 88, 88, 85, 88, 88, 88,
- 88, 88, 88, 88, 21, 51, 88, 88, 88, 88,
- 88, 56, 70, 88, 88, 88, 88, 88, 88, 88,
- 88, 67, 9, 33, 34, 35, 88, 88, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 88, 88, 88,
- 88, 54, 29, 88, 88, 88, 88, 88, 88, 36,
- 37, 38, 27, 88, 88, 88, 15, 42, 43, 44,
- 49, 12, 88, 88, 88, 88, 81, 82, 83, 88,
-
- 30, 71, 25, 78, 79, 80, 7, 75, 76, 77,
- 88, 24, 73, 88, 88, 39, 40, 41, 88, 88,
- 88, 88, 88, 88, 88, 88, 88, 68, 88, 88,
- 88, 88, 88, 88, 88, 50, 88, 87, 88, 88,
- 19, 88, 88, 88, 88, 69, 64, 59, 88, 88,
- 88, 88, 88, 74, 55, 88, 62, 32, 88, 84,
- 63, 47, 57, 88, 88, 88, 88, 88, 88, 88,
- 88, 58, 31, 88, 88, 88, 8, 88, 88, 88,
- 88, 88, 52, 13, 88, 14, 88, 88, 16, 65,
- 88, 88, 88, 60, 88, 88, 88, 53, 72, 61,
-
- 11, 66, 6, 86, 10, 45, 88, 88, 46, 0
+ 0, 0, 0, 0, 0, 0, 148, 146, 145, 145,
+ 130, 136, 141, 125, 126, 134, 133, 122, 131, 129,
+ 135, 94, 94, 123, 119, 137, 124, 138, 142, 90,
+ 127, 128, 140, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 120, 139, 121, 132, 3, 4, 3,
+ 144, 147, 143, 116, 102, 121, 110, 105, 100, 108,
+ 98, 109, 99, 97, 2, 1, 101, 96, 92, 93,
+ 0, 0, 94, 128, 120, 127, 117, 113, 115, 114,
+ 118, 90, 106, 112, 90, 90, 90, 90, 90, 90,
+
+ 90, 90, 90, 90, 17, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90, 20, 22,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 107, 111, 5, 143,
+ 0, 1, 96, 0, 0, 95, 91, 103, 104, 50,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 18, 90, 90,
+ 90, 90, 90, 90, 90, 90, 26, 90, 90, 90,
+ 90, 90, 90, 90, 90, 23, 90, 90, 90, 90,
+
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90, 0, 97,
+ 0, 96, 90, 28, 90, 90, 87, 90, 90, 90,
+ 90, 90, 90, 90, 21, 53, 90, 90, 90, 90,
+ 90, 58, 72, 90, 90, 90, 90, 90, 90, 90,
+ 90, 69, 9, 33, 34, 35, 90, 90, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 90, 90, 90,
+ 90, 56, 29, 90, 90, 90, 90, 90, 90, 36,
+ 37, 38, 27, 90, 90, 90, 15, 42, 43, 44,
+ 51, 12, 90, 90, 90, 90, 83, 84, 85, 90,
+
+ 30, 73, 25, 80, 81, 82, 7, 77, 78, 79,
+ 90, 24, 75, 90, 90, 39, 40, 41, 90, 90,
+ 90, 90, 90, 90, 90, 90, 90, 70, 90, 90,
+ 90, 90, 90, 90, 90, 52, 90, 89, 90, 90,
+ 19, 90, 90, 90, 90, 71, 66, 61, 90, 90,
+ 90, 90, 90, 76, 57, 90, 64, 32, 90, 86,
+ 65, 49, 59, 90, 90, 90, 90, 90, 90, 90,
+ 90, 60, 31, 90, 90, 90, 8, 90, 90, 90,
+ 90, 90, 54, 13, 90, 14, 90, 90, 16, 67,
+ 90, 90, 90, 62, 90, 90, 90, 90, 55, 74,
+
+ 63, 11, 68, 6, 88, 10, 45, 90, 90, 90,
+ 90, 90, 90, 46, 90, 90, 90, 48, 90, 90,
+ 90, 90, 90, 47, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 16, 16, 16, 20, 20, 21, 22, 23,
24, 25, 26, 1, 27, 27, 28, 29, 30, 27,
- 31, 31, 31, 31, 31, 31, 31, 31, 31, 31,
- 31, 31, 31, 31, 31, 31, 31, 32, 31, 31,
- 33, 1, 34, 35, 31, 1, 36, 37, 38, 39,
+ 31, 31, 31, 31, 31, 31, 31, 31, 32, 31,
+ 31, 33, 34, 31, 31, 31, 31, 35, 31, 31,
+ 36, 1, 37, 38, 31, 1, 39, 40, 41, 42,
- 40, 41, 42, 43, 44, 31, 45, 46, 47, 48,
- 49, 50, 31, 51, 52, 53, 54, 55, 56, 57,
- 58, 59, 60, 61, 62, 63, 1, 1, 1, 1,
+ 43, 44, 45, 46, 47, 31, 48, 49, 50, 51,
+ 52, 53, 31, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1
} ;
-static yyconst flex_int32_t yy_meta[64] =
+static yyconst flex_int32_t yy_meta[67] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 3, 3, 3, 3, 3, 3,
1, 1, 1, 1, 1, 1, 3, 3, 3, 3,
- 4, 4, 1, 1, 1, 3, 3, 3, 3, 3,
- 3, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 1,
- 1, 1, 1
+ 4, 4, 4, 4, 4, 1, 1, 1, 3, 3,
+ 3, 3, 3, 3, 4, 4, 4, 4, 4, 4,
+ 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
+ 4, 4, 1, 1, 1, 1
} ;
-static yyconst flex_int16_t yy_base[416] =
+static yyconst flex_int16_t yy_base[431] =
{ 0,
- 0, 0, 61, 62, 71, 0, 606, 607, 607, 607,
- 581, 42, 129, 607, 607, 580, 126, 607, 125, 123,
- 137, 149, 157, 578, 607, 175, 578, 44, 607, 0,
- 607, 607, 120, 95, 103, 142, 146, 136, 156, 552,
- 168, 162, 551, 120, 158, 545, 173, 558, 172, 178,
- 111, 186, 554, 607, 159, 607, 607, 607, 607, 582,
- 607, 607, 0, 607, 607, 607, 607, 607, 607, 607,
- 607, 607, 607, 222, 607, 0, 607, 228, 254, 262,
- 281, 0, 290, 607, 607, 607, 571, 607, 607, 607,
- 570, 0, 607, 607, 546, 539, 542, 550, 549, 536,
-
- 551, 538, 544, 532, 529, 542, 529, 526, 526, 532,
- 520, 527, 524, 534, 520, 526, 529, 530, 0, 204,
- 529, 207, 515, 528, 519, 521, 511, 525, 522, 524,
- 507, 512, 509, 498, 183, 512, 508, 510, 499, 502,
- 212, 507, 499, 511, 186, 504, 607, 607, 607, 0,
- 306, 0, 316, 332, 270, 342, 0, 607, 607, 0,
- 496, 500, 509, 506, 490, 490, 161, 505, 502, 502,
- 500, 497, 489, 495, 482, 493, 496, 0, 493, 481,
- 488, 485, 489, 482, 471, 470, 483, 486, 483, 478,
- 469, 294, 474, 477, 468, 465, 469, 475, 466, 457,
-
- 460, 458, 468, 454, 452, 452, 454, 451, 462, 461,
- 278, 456, 451, 440, 320, 458, 460, 449, 348, 354,
- 360, 366, 450, 0, 448, 336, 0, 440, 438, 446,
- 435, 452, 441, 370, 0, 0, 435, 445, 445, 430,
- 373, 0, 0, 432, 376, 433, 427, 426, 427, 426,
- 379, 0, 0, 0, 0, 0, 422, 423, 428, 419,
- 432, 427, 426, 418, 422, 414, 417, 421, 426, 425,
- 416, 0, 0, 422, 411, 411, 416, 415, 412, 0,
- 0, 0, 0, 402, 414, 416, 0, 0, 0, 0,
- 0, 0, 404, 405, 399, 409, 0, 0, 0, 400,
+ 0, 0, 64, 65, 74, 0, 627, 628, 628, 628,
+ 602, 45, 135, 628, 628, 601, 132, 628, 131, 129,
+ 143, 155, 163, 599, 628, 179, 599, 47, 628, 0,
+ 628, 628, 126, 98, 108, 147, 158, 158, 165, 570,
+ 130, 107, 569, 148, 156, 563, 172, 576, 174, 181,
+ 177, 195, 572, 628, 173, 628, 628, 628, 628, 603,
+ 628, 628, 0, 628, 628, 628, 628, 628, 628, 628,
+ 628, 628, 628, 233, 628, 0, 628, 239, 255, 271,
+ 287, 0, 300, 628, 628, 628, 592, 628, 628, 628,
+ 591, 0, 628, 628, 564, 557, 560, 568, 567, 554,
+
+ 569, 556, 562, 550, 547, 560, 547, 544, 544, 550,
+ 538, 545, 542, 552, 538, 544, 547, 548, 0, 187,
+ 547, 241, 533, 546, 537, 539, 529, 543, 540, 542,
+ 525, 530, 527, 516, 192, 530, 526, 528, 517, 520,
+ 274, 525, 517, 529, 114, 522, 628, 628, 628, 0,
+ 316, 0, 322, 338, 344, 351, 0, 628, 628, 0,
+ 514, 518, 527, 524, 508, 508, 205, 523, 520, 520,
+ 518, 515, 507, 513, 500, 511, 514, 0, 511, 499,
+ 506, 503, 507, 500, 489, 488, 501, 504, 501, 496,
+ 487, 247, 492, 495, 486, 483, 487, 493, 484, 475,
+
+ 478, 476, 486, 472, 470, 470, 472, 469, 480, 479,
+ 328, 474, 469, 458, 260, 476, 478, 467, 358, 366,
+ 372, 378, 468, 0, 466, 276, 0, 458, 456, 464,
+ 453, 470, 459, 291, 0, 0, 453, 463, 463, 448,
+ 305, 0, 0, 450, 327, 451, 445, 444, 445, 444,
+ 382, 0, 0, 0, 0, 0, 440, 441, 446, 437,
+ 450, 445, 444, 436, 440, 432, 435, 439, 444, 443,
+ 434, 0, 0, 440, 429, 429, 434, 433, 430, 0,
+ 0, 0, 0, 420, 432, 434, 0, 0, 0, 0,
+ 0, 0, 422, 423, 417, 427, 0, 0, 0, 418,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 407, 0, 0, 405, 401, 0, 0, 0, 397, 393,
- 398, 388, 401, 387, 400, 389, 396, 0, 394, 396,
- 380, 389, 395, 390, 378, 0, 380, 0, 379, 382,
- 0, 371, 370, 370, 383, 0, 385, 0, 384, 383,
- 368, 381, 368, 0, 0, 371, 0, 0, 363, 0,
- 0, 0, 0, 360, 371, 364, 368, 303, 297, 288,
- 300, 0, 0, 283, 290, 269, 0, 277, 274, 255,
- 232, 255, 0, 0, 244, 0, 236, 226, 0, 0,
- 225, 208, 211, 0, 185, 202, 131, 0, 0, 0,
-
- 0, 0, 0, 0, 0, 0, 134, 117, 0, 607,
- 398, 400, 402, 406, 142
+ 425, 0, 0, 423, 419, 0, 0, 0, 415, 411,
+ 416, 406, 419, 405, 418, 407, 414, 0, 412, 414,
+ 398, 407, 413, 408, 396, 0, 398, 0, 397, 400,
+ 0, 389, 388, 388, 401, 0, 403, 0, 402, 401,
+ 386, 399, 386, 0, 0, 389, 0, 0, 381, 0,
+ 0, 0, 0, 378, 389, 382, 388, 385, 380, 372,
+ 382, 0, 0, 365, 371, 360, 0, 369, 366, 356,
+ 385, 364, 0, 0, 364, 0, 362, 361, 0, 0,
+ 360, 323, 308, 0, 298, 318, 270, 265, 0, 0,
+
+ 0, 0, 0, 0, 0, 0, 279, 271, 240, 240,
+ 238, 237, 226, 0, 208, 188, 190, 0, 186, 173,
+ 187, 164, 158, 0, 628, 415, 417, 419, 423, 186
} ;
-static yyconst flex_int16_t yy_def[416] =
+static yyconst flex_int16_t yy_def[431] =
{ 0,
- 410, 1, 411, 411, 410, 5, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 412,
- 410, 410, 410, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 413, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 414, 410, 410, 410, 410,
- 410, 415, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 412, 410, 410, 412, 412, 412, 412, 412, 412,
-
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 410, 410, 410, 413,
- 410, 414, 410, 410, 410, 410, 415, 410, 410, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
-
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 410, 410,
- 410, 410, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
-
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 412,
-
- 412, 412, 412, 412, 412, 412, 412, 412, 412, 0,
- 410, 410, 410, 410, 410
+ 425, 1, 426, 426, 425, 5, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 427,
+ 425, 425, 425, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 428, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 429, 425, 425, 425, 425,
+ 425, 430, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 427, 425, 425, 427, 427, 427, 427, 427, 427,
+
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 425, 425, 425, 428,
+ 425, 429, 425, 425, 425, 425, 430, 425, 425, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 425, 425,
+ 425, 425, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 427, 427, 427, 427, 427, 427,
+ 427, 427, 427, 427, 0, 425, 425, 425, 425, 425
} ;
-static yyconst flex_int16_t yy_nxt[671] =
+static yyconst flex_int16_t yy_nxt[695] =
{ 0,
8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 23, 23, 23, 23,
24, 25, 26, 27, 28, 29, 30, 30, 30, 30,
- 30, 30, 31, 32, 33, 34, 35, 36, 37, 38,
- 39, 40, 41, 42, 30, 43, 44, 45, 46, 47,
- 48, 49, 50, 51, 52, 53, 30, 30, 30, 54,
- 55, 56, 57, 59, 59, 65, 66, 90, 91, 60,
- 60, 8, 61, 62, 8, 8, 8, 8, 8, 8,
+ 30, 30, 30, 30, 30, 31, 32, 33, 34, 35,
+ 36, 37, 38, 39, 40, 41, 42, 30, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 30,
+ 30, 30, 54, 55, 56, 57, 59, 59, 65, 66,
+ 90, 91, 60, 60, 8, 61, 62, 8, 8, 8,
+ 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 8, 8, 8, 63, 63, 63,
- 63, 63, 63, 8, 8, 8, 63, 63, 63, 63,
- 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 8,
+ 8, 8, 63, 63, 63, 63, 63, 63, 63, 63,
63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
- 8, 8, 8, 8, 67, 70, 72, 74, 74, 74,
- 74, 74, 74, 93, 157, 75, 95, 96, 73, 71,
- 76, 97, 68, 98, 94, 123, 409, 99, 141, 124,
- 77, 78, 142, 79, 79, 79, 79, 79, 80, 78,
- 408, 83, 83, 83, 83, 83, 83, 100, 81, 85,
- 82, 107, 147, 108, 407, 103, 81, 101, 81, 104,
- 102, 110, 109, 125, 105, 86, 81, 87, 88, 111,
-
- 106, 112, 119, 116, 113, 82, 126, 132, 128, 120,
- 114, 117, 229, 230, 133, 134, 121, 137, 204, 148,
- 138, 143, 118, 129, 135, 144, 130, 136, 139, 216,
- 406, 217, 405, 205, 145, 140, 74, 74, 74, 74,
- 74, 74, 153, 153, 153, 153, 153, 153, 396, 184,
- 404, 151, 185, 186, 190, 211, 187, 154, 188, 397,
- 403, 151, 191, 212, 402, 401, 78, 154, 79, 79,
- 79, 79, 79, 80, 78, 400, 80, 80, 80, 80,
- 80, 80, 399, 81, 156, 156, 156, 156, 156, 156,
- 155, 81, 155, 81, 398, 156, 156, 156, 156, 156,
-
- 156, 81, 78, 395, 83, 83, 83, 83, 83, 83,
- 254, 255, 256, 394, 393, 219, 392, 219, 275, 81,
- 220, 220, 220, 220, 220, 220, 276, 391, 390, 81,
- 153, 153, 153, 153, 153, 153, 280, 281, 282, 389,
- 388, 221, 387, 221, 386, 154, 222, 222, 222, 222,
- 222, 222, 288, 289, 290, 154, 156, 156, 156, 156,
- 156, 156, 220, 220, 220, 220, 220, 220, 220, 220,
- 220, 220, 220, 220, 222, 222, 222, 222, 222, 222,
- 222, 222, 222, 222, 222, 222, 297, 298, 299, 304,
- 305, 306, 308, 309, 310, 316, 317, 318, 58, 58,
-
- 58, 58, 92, 92, 150, 150, 152, 385, 152, 152,
- 384, 383, 382, 381, 380, 379, 378, 377, 376, 375,
- 374, 373, 372, 371, 370, 369, 368, 367, 366, 365,
- 364, 363, 362, 361, 360, 359, 358, 357, 356, 355,
- 354, 353, 352, 351, 350, 349, 348, 347, 346, 345,
- 344, 343, 342, 341, 340, 339, 338, 337, 336, 335,
- 334, 333, 332, 331, 330, 329, 328, 327, 326, 325,
- 324, 323, 322, 321, 320, 319, 315, 314, 313, 312,
- 311, 307, 303, 302, 301, 300, 296, 295, 294, 293,
- 292, 291, 287, 286, 285, 284, 283, 279, 278, 277,
-
- 274, 273, 272, 271, 270, 269, 268, 267, 266, 265,
- 264, 263, 262, 261, 260, 259, 258, 257, 253, 252,
- 251, 250, 249, 248, 247, 246, 245, 244, 243, 242,
- 241, 240, 239, 238, 237, 236, 235, 234, 233, 232,
- 231, 228, 227, 226, 225, 224, 223, 218, 215, 214,
- 213, 210, 209, 208, 207, 206, 203, 202, 201, 200,
- 199, 198, 197, 196, 195, 194, 193, 192, 189, 183,
- 182, 181, 180, 179, 178, 177, 176, 175, 174, 173,
- 172, 171, 170, 169, 168, 167, 166, 165, 164, 163,
- 162, 161, 160, 159, 158, 149, 146, 131, 127, 122,
-
- 115, 89, 84, 69, 64, 410, 7, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410
+ 63, 63, 63, 63, 63, 63, 8, 8, 8, 8,
+ 67, 70, 72, 74, 74, 74, 74, 74, 74, 93,
+ 119, 75, 95, 96, 73, 71, 76, 120, 68, 97,
+ 216, 98, 217, 94, 121, 99, 77, 78, 116, 79,
+ 79, 79, 79, 79, 80, 78, 117, 83, 83, 83,
+ 83, 83, 83, 85, 81, 100, 123, 118, 157, 82,
+ 124, 424, 81, 423, 125, 101, 147, 81, 102, 86,
+
+ 103, 87, 88, 110, 104, 81, 107, 126, 108, 105,
+ 128, 111, 132, 112, 82, 106, 113, 109, 422, 133,
+ 134, 421, 114, 137, 420, 129, 138, 141, 130, 135,
+ 204, 142, 136, 143, 139, 184, 148, 144, 185, 186,
+ 419, 140, 187, 418, 188, 205, 145, 74, 74, 74,
+ 74, 74, 74, 153, 153, 153, 153, 153, 153, 229,
+ 230, 417, 151, 254, 255, 256, 416, 78, 154, 79,
+ 79, 79, 79, 79, 80, 151, 280, 281, 282, 415,
+ 414, 154, 413, 78, 81, 80, 80, 80, 80, 80,
+ 80, 190, 288, 289, 290, 412, 155, 81, 155, 191,
+
+ 81, 156, 156, 156, 156, 156, 156, 297, 298, 299,
+ 411, 410, 78, 81, 83, 83, 83, 83, 83, 83,
+ 211, 304, 305, 306, 409, 219, 408, 219, 212, 81,
+ 220, 220, 220, 220, 220, 220, 153, 153, 153, 153,
+ 153, 153, 81, 308, 309, 310, 407, 221, 406, 221,
+ 405, 154, 222, 222, 222, 222, 222, 222, 156, 156,
+ 156, 156, 156, 156, 154, 156, 156, 156, 156, 156,
+ 156, 275, 220, 220, 220, 220, 220, 220, 404, 276,
+ 220, 220, 220, 220, 220, 220, 222, 222, 222, 222,
+ 222, 222, 222, 222, 222, 222, 222, 222, 316, 317,
+
+ 318, 396, 403, 402, 401, 400, 399, 395, 394, 393,
+ 392, 391, 397, 390, 398, 58, 58, 58, 58, 92,
+ 92, 150, 150, 152, 389, 152, 152, 388, 387, 386,
+ 385, 384, 383, 382, 381, 380, 379, 378, 377, 376,
+ 375, 374, 373, 372, 371, 370, 369, 368, 367, 366,
+ 365, 364, 363, 362, 361, 360, 359, 358, 357, 356,
+ 355, 354, 353, 352, 351, 350, 349, 348, 347, 346,
+ 345, 344, 343, 342, 341, 340, 339, 338, 337, 336,
+ 335, 334, 333, 332, 331, 330, 329, 328, 327, 326,
+ 325, 324, 323, 322, 321, 320, 319, 315, 314, 313,
+
+ 312, 311, 307, 303, 302, 301, 300, 296, 295, 294,
+ 293, 292, 291, 287, 286, 285, 284, 283, 279, 278,
+ 277, 274, 273, 272, 271, 270, 269, 268, 267, 266,
+ 265, 264, 263, 262, 261, 260, 259, 258, 257, 253,
+ 252, 251, 250, 249, 248, 247, 246, 245, 244, 243,
+ 242, 241, 240, 239, 238, 237, 236, 235, 234, 233,
+ 232, 231, 228, 227, 226, 225, 224, 223, 218, 215,
+ 214, 213, 210, 209, 208, 207, 206, 203, 202, 201,
+ 200, 199, 198, 197, 196, 195, 194, 193, 192, 189,
+ 183, 182, 181, 180, 179, 178, 177, 176, 175, 174,
+
+ 173, 172, 171, 170, 169, 168, 167, 166, 165, 164,
+ 163, 162, 161, 160, 159, 158, 149, 146, 131, 127,
+ 122, 115, 89, 84, 69, 64, 425, 7, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425
+
} ;
-static yyconst flex_int16_t yy_chk[671] =
+static yyconst flex_int16_t yy_chk[695] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 3, 4, 12, 12, 28, 28, 3,
- 4, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 1, 1, 1, 1, 1, 1, 3, 4, 12, 12,
+ 28, 28, 3, 4, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 13, 17, 19, 20, 20, 20,
- 20, 20, 20, 33, 415, 21, 34, 34, 19, 17,
- 21, 35, 13, 35, 33, 44, 408, 35, 51, 44,
- 21, 22, 51, 22, 22, 22, 22, 22, 22, 23,
- 407, 23, 23, 23, 23, 23, 23, 36, 22, 26,
- 22, 38, 55, 38, 397, 37, 23, 36, 22, 37,
- 36, 39, 38, 45, 37, 26, 23, 26, 26, 39,
-
- 37, 39, 42, 41, 39, 22, 45, 49, 47, 42,
- 39, 41, 167, 167, 49, 49, 42, 50, 135, 55,
- 50, 52, 41, 47, 49, 52, 47, 49, 50, 145,
- 396, 145, 395, 135, 52, 50, 74, 74, 74, 74,
- 74, 74, 78, 78, 78, 78, 78, 78, 381, 120,
- 393, 74, 120, 120, 122, 141, 120, 78, 120, 381,
- 392, 74, 122, 141, 391, 388, 79, 78, 79, 79,
- 79, 79, 79, 79, 80, 387, 80, 80, 80, 80,
- 80, 80, 385, 79, 155, 155, 155, 155, 155, 155,
- 81, 80, 81, 79, 382, 81, 81, 81, 81, 81,
-
- 81, 80, 83, 380, 83, 83, 83, 83, 83, 83,
- 192, 192, 192, 379, 378, 151, 376, 151, 211, 83,
- 151, 151, 151, 151, 151, 151, 211, 375, 374, 83,
- 153, 153, 153, 153, 153, 153, 215, 215, 215, 371,
- 370, 154, 369, 154, 368, 153, 154, 154, 154, 154,
- 154, 154, 226, 226, 226, 153, 156, 156, 156, 156,
- 156, 156, 219, 219, 219, 219, 219, 219, 220, 220,
- 220, 220, 220, 220, 221, 221, 221, 221, 221, 221,
- 222, 222, 222, 222, 222, 222, 234, 234, 234, 241,
- 241, 241, 245, 245, 245, 251, 251, 251, 411, 411,
-
- 411, 411, 412, 412, 413, 413, 414, 367, 414, 414,
- 366, 365, 364, 359, 356, 353, 352, 351, 350, 349,
- 347, 345, 344, 343, 342, 340, 339, 337, 335, 334,
- 333, 332, 331, 330, 329, 327, 326, 325, 324, 323,
- 322, 321, 320, 319, 315, 314, 311, 300, 296, 295,
- 294, 293, 286, 285, 284, 279, 278, 277, 276, 275,
- 274, 271, 270, 269, 268, 267, 266, 265, 264, 263,
- 262, 261, 260, 259, 258, 257, 250, 249, 248, 247,
- 246, 244, 240, 239, 238, 237, 233, 232, 231, 230,
- 229, 228, 225, 223, 218, 217, 216, 214, 213, 212,
-
- 210, 209, 208, 207, 206, 205, 204, 203, 202, 201,
- 200, 199, 198, 197, 196, 195, 194, 193, 191, 190,
- 189, 188, 187, 186, 185, 184, 183, 182, 181, 180,
- 179, 177, 176, 175, 174, 173, 172, 171, 170, 169,
- 168, 166, 165, 164, 163, 162, 161, 146, 144, 143,
- 142, 140, 139, 138, 137, 136, 134, 133, 132, 131,
- 130, 129, 128, 127, 126, 125, 124, 123, 121, 118,
- 117, 116, 115, 114, 113, 112, 111, 110, 109, 108,
- 107, 106, 105, 104, 103, 102, 101, 100, 99, 98,
- 97, 96, 95, 91, 87, 60, 53, 48, 46, 43,
-
- 40, 27, 24, 16, 11, 7, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410,
- 410, 410, 410, 410, 410, 410, 410, 410, 410, 410
+ 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
+ 13, 17, 19, 20, 20, 20, 20, 20, 20, 33,
+ 42, 21, 34, 34, 19, 17, 21, 42, 13, 35,
+ 145, 35, 145, 33, 42, 35, 21, 22, 41, 22,
+ 22, 22, 22, 22, 22, 23, 41, 23, 23, 23,
+ 23, 23, 23, 26, 22, 36, 44, 41, 430, 22,
+ 44, 423, 23, 422, 45, 36, 55, 22, 36, 26,
+
+ 37, 26, 26, 39, 37, 23, 38, 45, 38, 37,
+ 47, 39, 49, 39, 22, 37, 39, 38, 421, 49,
+ 49, 420, 39, 50, 419, 47, 50, 51, 47, 49,
+ 135, 51, 49, 52, 50, 120, 55, 52, 120, 120,
+ 417, 50, 120, 416, 120, 135, 52, 74, 74, 74,
+ 74, 74, 74, 78, 78, 78, 78, 78, 78, 167,
+ 167, 415, 74, 192, 192, 192, 413, 79, 78, 79,
+ 79, 79, 79, 79, 79, 74, 215, 215, 215, 412,
+ 411, 78, 410, 80, 79, 80, 80, 80, 80, 80,
+ 80, 122, 226, 226, 226, 409, 81, 79, 81, 122,
+
+ 80, 81, 81, 81, 81, 81, 81, 234, 234, 234,
+ 408, 407, 83, 80, 83, 83, 83, 83, 83, 83,
+ 141, 241, 241, 241, 398, 151, 397, 151, 141, 83,
+ 151, 151, 151, 151, 151, 151, 153, 153, 153, 153,
+ 153, 153, 83, 245, 245, 245, 396, 154, 395, 154,
+ 393, 153, 154, 154, 154, 154, 154, 154, 155, 155,
+ 155, 155, 155, 155, 153, 156, 156, 156, 156, 156,
+ 156, 211, 219, 219, 219, 219, 219, 219, 392, 211,
+ 220, 220, 220, 220, 220, 220, 221, 221, 221, 221,
+ 221, 221, 222, 222, 222, 222, 222, 222, 251, 251,
+
+ 251, 381, 391, 388, 387, 385, 382, 380, 379, 378,
+ 376, 375, 381, 374, 381, 426, 426, 426, 426, 427,
+ 427, 428, 428, 429, 371, 429, 429, 370, 369, 368,
+ 367, 366, 365, 364, 359, 356, 353, 352, 351, 350,
+ 349, 347, 345, 344, 343, 342, 340, 339, 337, 335,
+ 334, 333, 332, 331, 330, 329, 327, 326, 325, 324,
+ 323, 322, 321, 320, 319, 315, 314, 311, 300, 296,
+ 295, 294, 293, 286, 285, 284, 279, 278, 277, 276,
+ 275, 274, 271, 270, 269, 268, 267, 266, 265, 264,
+ 263, 262, 261, 260, 259, 258, 257, 250, 249, 248,
+
+ 247, 246, 244, 240, 239, 238, 237, 233, 232, 231,
+ 230, 229, 228, 225, 223, 218, 217, 216, 214, 213,
+ 212, 210, 209, 208, 207, 206, 205, 204, 203, 202,
+ 201, 200, 199, 198, 197, 196, 195, 194, 193, 191,
+ 190, 189, 188, 187, 186, 185, 184, 183, 182, 181,
+ 180, 179, 177, 176, 175, 174, 173, 172, 171, 170,
+ 169, 168, 166, 165, 164, 163, 162, 161, 146, 144,
+ 143, 142, 140, 139, 138, 137, 136, 134, 133, 132,
+ 131, 130, 129, 128, 127, 126, 125, 124, 123, 121,
+ 118, 117, 116, 115, 114, 113, 112, 111, 110, 109,
+
+ 108, 107, 106, 105, 104, 103, 102, 101, 100, 99,
+ 98, 97, 96, 95, 91, 87, 60, 53, 48, 46,
+ 43, 40, 27, 24, 16, 11, 7, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425, 425, 425, 425, 425, 425, 425,
+ 425, 425, 425, 425
+
} ;
/* Table of booleans, true if rule could match eol. */
-static yyconst flex_int32_t yy_rule_can_match_eol[146] =
+static yyconst flex_int32_t yy_rule_can_match_eol[148] =
{ 0,
0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 0, 0, };
+ 0, 0, 0, 0, 0, 1, 0, 0, };
/* The intent behind this definition is that it'll catch
* any uses of REJECT which flex missed.
Based on ANSI C grammar, Lex specification:
http://www.lysator.liu.se/c/ANSI-C-grammar-l.html
-IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_glslang_lexer.sh,
+IF YOU MODIFY THIS FILE YOU ALSO NEED TO RUN generate_parser.sh,
WHICH GENERATES THE GLSL ES LEXER (glslang_lex.cpp).
*/
void yyset_lineno (int line_number ,yyscan_t yyscanner );
-int yyget_column (yyscan_t yyscanner );
-
-void yyset_column (int column_no ,yyscan_t yyscanner );
-
YYSTYPE * yyget_lval (yyscan_t yyscanner );
void yyset_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner );
/* Amount of stuff to slurp up with each read. */
#ifndef YY_READ_BUF_SIZE
+#ifdef __ia64__
+/* On IA-64, the buffer size is 16k, not 8k */
+#define YY_READ_BUF_SIZE 16384
+#else
#define YY_READ_BUF_SIZE 8192
+#endif /* __ia64__ */
#endif
/* Copy whatever the last rule matched to the standard output. */
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
- unsigned n; \
+ size_t n; \
for ( n = 0; n < max_size && \
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 411 )
+ if ( yy_current_state >= 426 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
- while ( yy_current_state != 410 );
+ while ( yy_current_state != 425 );
yy_cp = yyg->yy_last_accepting_cpos;
yy_current_state = yyg->yy_last_accepting_state;
YY_BREAK
case 47:
YY_RULE_SETUP
-{ context->lexAfterType = true; return(STRUCT); }
+{ context->lexAfterType = true; return SAMPLER_EXTERNAL_OES; }
YY_BREAK
case 48:
YY_RULE_SETUP
-{ return reserved_word(yyscanner); }
+{ context->lexAfterType = true; return SAMPLER2DRECT; }
YY_BREAK
case 49:
YY_RULE_SETUP
-{ return reserved_word(yyscanner); }
+{ context->lexAfterType = true; return(STRUCT); }
YY_BREAK
case 50:
YY_RULE_SETUP
YY_BREAK
case 88:
YY_RULE_SETUP
+{ return reserved_word(yyscanner); }
+ YY_BREAK
+case 89:
+YY_RULE_SETUP
+{ return reserved_word(yyscanner); }
+ YY_BREAK
+case 90:
+YY_RULE_SETUP
{
yylval->lex.string = NewPoolTString(yytext);
return check_type(yyscanner);
}
YY_BREAK
-case 89:
+case 91:
YY_RULE_SETUP
{ yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
YY_BREAK
-case 90:
+case 92:
YY_RULE_SETUP
{ yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
YY_BREAK
-case 91:
+case 93:
YY_RULE_SETUP
{ context->error(yylineno, "Invalid Octal number.", yytext, "", ""); context->recover(); return 0;}
YY_BREAK
-case 92:
+case 94:
YY_RULE_SETUP
{ yylval->lex.i = strtol(yytext, 0, 0); return(INTCONSTANT); }
YY_BREAK
-case 93:
+case 95:
YY_RULE_SETUP
{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
YY_BREAK
-case 94:
+case 96:
YY_RULE_SETUP
{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
YY_BREAK
-case 95:
+case 97:
YY_RULE_SETUP
{ yylval->lex.f = static_cast<float>(atof_dot(yytext)); return(FLOATCONSTANT); }
YY_BREAK
-case 96:
+case 98:
YY_RULE_SETUP
{ return(ADD_ASSIGN); }
YY_BREAK
-case 97:
+case 99:
YY_RULE_SETUP
{ return(SUB_ASSIGN); }
YY_BREAK
-case 98:
+case 100:
YY_RULE_SETUP
{ return(MUL_ASSIGN); }
YY_BREAK
-case 99:
+case 101:
YY_RULE_SETUP
{ return(DIV_ASSIGN); }
YY_BREAK
-case 100:
+case 102:
YY_RULE_SETUP
{ return(MOD_ASSIGN); }
YY_BREAK
-case 101:
+case 103:
YY_RULE_SETUP
{ return(LEFT_ASSIGN); }
YY_BREAK
-case 102:
+case 104:
YY_RULE_SETUP
{ return(RIGHT_ASSIGN); }
YY_BREAK
-case 103:
+case 105:
YY_RULE_SETUP
{ return(AND_ASSIGN); }
YY_BREAK
-case 104:
+case 106:
YY_RULE_SETUP
{ return(XOR_ASSIGN); }
YY_BREAK
-case 105:
+case 107:
YY_RULE_SETUP
{ return(OR_ASSIGN); }
YY_BREAK
-case 106:
+case 108:
YY_RULE_SETUP
{ return(INC_OP); }
YY_BREAK
-case 107:
+case 109:
YY_RULE_SETUP
{ return(DEC_OP); }
YY_BREAK
-case 108:
+case 110:
YY_RULE_SETUP
{ return(AND_OP); }
YY_BREAK
-case 109:
+case 111:
YY_RULE_SETUP
{ return(OR_OP); }
YY_BREAK
-case 110:
+case 112:
YY_RULE_SETUP
{ return(XOR_OP); }
YY_BREAK
-case 111:
+case 113:
YY_RULE_SETUP
{ return(LE_OP); }
YY_BREAK
-case 112:
+case 114:
YY_RULE_SETUP
{ return(GE_OP); }
YY_BREAK
-case 113:
+case 115:
YY_RULE_SETUP
{ return(EQ_OP); }
YY_BREAK
-case 114:
+case 116:
YY_RULE_SETUP
{ return(NE_OP); }
YY_BREAK
-case 115:
+case 117:
YY_RULE_SETUP
{ return(LEFT_OP); }
YY_BREAK
-case 116:
+case 118:
YY_RULE_SETUP
{ return(RIGHT_OP); }
YY_BREAK
-case 117:
+case 119:
YY_RULE_SETUP
{ context->lexAfterType = false; return(SEMICOLON); }
YY_BREAK
-case 118:
+case 120:
YY_RULE_SETUP
{ context->lexAfterType = false; return(LEFT_BRACE); }
YY_BREAK
-case 119:
+case 121:
YY_RULE_SETUP
{ return(RIGHT_BRACE); }
YY_BREAK
-case 120:
+case 122:
YY_RULE_SETUP
{ if (context->inTypeParen) context->lexAfterType = false; return(COMMA); }
YY_BREAK
-case 121:
+case 123:
YY_RULE_SETUP
{ return(COLON); }
YY_BREAK
-case 122:
+case 124:
YY_RULE_SETUP
{ context->lexAfterType = false; return(EQUAL); }
YY_BREAK
-case 123:
+case 125:
YY_RULE_SETUP
{ context->lexAfterType = false; context->inTypeParen = true; return(LEFT_PAREN); }
YY_BREAK
-case 124:
+case 126:
YY_RULE_SETUP
{ context->inTypeParen = false; return(RIGHT_PAREN); }
YY_BREAK
-case 125:
+case 127:
YY_RULE_SETUP
{ return(LEFT_BRACKET); }
YY_BREAK
-case 126:
+case 128:
YY_RULE_SETUP
{ return(RIGHT_BRACKET); }
YY_BREAK
-case 127:
+case 129:
YY_RULE_SETUP
{ BEGIN(FIELDS); return(DOT); }
YY_BREAK
-case 128:
+case 130:
YY_RULE_SETUP
{ return(BANG); }
YY_BREAK
-case 129:
+case 131:
YY_RULE_SETUP
{ return(DASH); }
YY_BREAK
-case 130:
+case 132:
YY_RULE_SETUP
{ return(TILDE); }
YY_BREAK
-case 131:
+case 133:
YY_RULE_SETUP
{ return(PLUS); }
YY_BREAK
-case 132:
+case 134:
YY_RULE_SETUP
{ return(STAR); }
YY_BREAK
-case 133:
+case 135:
YY_RULE_SETUP
{ return(SLASH); }
YY_BREAK
-case 134:
+case 136:
YY_RULE_SETUP
{ return(PERCENT); }
YY_BREAK
-case 135:
+case 137:
YY_RULE_SETUP
{ return(LEFT_ANGLE); }
YY_BREAK
-case 136:
+case 138:
YY_RULE_SETUP
{ return(RIGHT_ANGLE); }
YY_BREAK
-case 137:
+case 139:
YY_RULE_SETUP
{ return(VERTICAL_BAR); }
YY_BREAK
-case 138:
+case 140:
YY_RULE_SETUP
{ return(CARET); }
YY_BREAK
-case 139:
+case 141:
YY_RULE_SETUP
{ return(AMPERSAND); }
YY_BREAK
-case 140:
+case 142:
YY_RULE_SETUP
{ return(QUESTION); }
YY_BREAK
-case 141:
+case 143:
YY_RULE_SETUP
{
BEGIN(INITIAL);
return FIELD_SELECTION;
}
YY_BREAK
-case 142:
+case 144:
YY_RULE_SETUP
{}
YY_BREAK
-case 143:
-/* rule 143 can match eol */
+case 145:
+/* rule 145 can match eol */
YY_RULE_SETUP
{ }
YY_BREAK
case YY_STATE_EOF(FIELDS):
{ context->AfterEOF = true; yyterminate(); }
YY_BREAK
-case 144:
+case 146:
YY_RULE_SETUP
{ context->warning(yylineno, "Unknown char", yytext, ""); return 0; }
YY_BREAK
-case 145:
+case 147:
YY_RULE_SETUP
ECHO;
YY_BREAK
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 411 )
+ if ( yy_current_state >= 426 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
- if ( yy_current_state >= 411 )
+ if ( yy_current_state >= 426 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
- yy_is_jam = (yy_current_state == 410);
+ yy_is_jam = (yy_current_state == 425);
return yy_is_jam ? 0 : yy_current_state;
}
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
* scan from a @e copy of @a bytes.
- * @param bytes the byte buffer to scan
- * @param len the number of bytes in the buffer pointed to by @a bytes.
+ * @param yybytes the byte buffer to scan
+ * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param yyscanner The scanner object.
* @return the newly allocated buffer state object.
*/
case EBhEnable:
case EBhWarn:
case EBhDisable:
+ case EBhUndefined:
msg = TString("extension '") + extName + "' is not supported";
context->infoSink.info.message(EPrefixWarning, msg.c_str(), yylineno);
break;
-/* A Bison parser, made by GNU Bison 2.3. */
-/* Skeleton implementation for Bison's Yacc-like parsers in C
+/* A Bison parser, made by GNU Bison 2.4.1. */
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
-
- This program is free software; you can redistribute it and/or modify
+
+ This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2, or (at your option)
- any later version.
-
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
-
+
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA. */
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
-
+
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#define YYBISON 1
/* Bison version. */
-#define YYBISON_VERSION "2.3"
+#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Pure parsers. */
#define YYPURE 1
+/* Push parsers. */
+#define YYPUSH 0
+
+/* Pull parsers. */
+#define YYPULL 1
+
/* Using locations. */
#define YYLSP_NEEDED 0
+/* Copy the first part of user declarations. */
+
+
+//
+// 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
+// found in the LICENSE file.
+//
+
+// This file is auto-generated by generate_parser.sh. DO NOT EDIT!
+
+#include "compiler/SymbolTable.h"
+#include "compiler/ParseHelper.h"
+#include "GLSLANG/ShaderLang.h"
+
+#define YYLEX_PARAM context->scanner
+
+
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
WHILE = 295,
SAMPLER2D = 296,
SAMPLERCUBE = 297,
- IDENTIFIER = 298,
- TYPE_NAME = 299,
- FLOATCONSTANT = 300,
- INTCONSTANT = 301,
- BOOLCONSTANT = 302,
- FIELD_SELECTION = 303,
- LEFT_OP = 304,
- RIGHT_OP = 305,
- INC_OP = 306,
- DEC_OP = 307,
- LE_OP = 308,
- GE_OP = 309,
- EQ_OP = 310,
- NE_OP = 311,
- AND_OP = 312,
- OR_OP = 313,
- XOR_OP = 314,
- MUL_ASSIGN = 315,
- DIV_ASSIGN = 316,
- ADD_ASSIGN = 317,
- MOD_ASSIGN = 318,
- LEFT_ASSIGN = 319,
- RIGHT_ASSIGN = 320,
- AND_ASSIGN = 321,
- XOR_ASSIGN = 322,
- OR_ASSIGN = 323,
- SUB_ASSIGN = 324,
- LEFT_PAREN = 325,
- RIGHT_PAREN = 326,
- LEFT_BRACKET = 327,
- RIGHT_BRACKET = 328,
- LEFT_BRACE = 329,
- RIGHT_BRACE = 330,
- DOT = 331,
- COMMA = 332,
- COLON = 333,
- EQUAL = 334,
- SEMICOLON = 335,
- BANG = 336,
- DASH = 337,
- TILDE = 338,
- PLUS = 339,
- STAR = 340,
- SLASH = 341,
- PERCENT = 342,
- LEFT_ANGLE = 343,
- RIGHT_ANGLE = 344,
- VERTICAL_BAR = 345,
- CARET = 346,
- AMPERSAND = 347,
- QUESTION = 348
+ SAMPLER_EXTERNAL_OES = 298,
+ SAMPLER2DRECT = 299,
+ IDENTIFIER = 300,
+ TYPE_NAME = 301,
+ FLOATCONSTANT = 302,
+ INTCONSTANT = 303,
+ BOOLCONSTANT = 304,
+ FIELD_SELECTION = 305,
+ LEFT_OP = 306,
+ RIGHT_OP = 307,
+ INC_OP = 308,
+ DEC_OP = 309,
+ LE_OP = 310,
+ GE_OP = 311,
+ EQ_OP = 312,
+ NE_OP = 313,
+ AND_OP = 314,
+ OR_OP = 315,
+ XOR_OP = 316,
+ MUL_ASSIGN = 317,
+ DIV_ASSIGN = 318,
+ ADD_ASSIGN = 319,
+ MOD_ASSIGN = 320,
+ LEFT_ASSIGN = 321,
+ RIGHT_ASSIGN = 322,
+ AND_ASSIGN = 323,
+ XOR_ASSIGN = 324,
+ OR_ASSIGN = 325,
+ SUB_ASSIGN = 326,
+ LEFT_PAREN = 327,
+ RIGHT_PAREN = 328,
+ LEFT_BRACKET = 329,
+ RIGHT_BRACKET = 330,
+ LEFT_BRACE = 331,
+ RIGHT_BRACE = 332,
+ DOT = 333,
+ COMMA = 334,
+ COLON = 335,
+ EQUAL = 336,
+ SEMICOLON = 337,
+ BANG = 338,
+ DASH = 339,
+ TILDE = 340,
+ PLUS = 341,
+ STAR = 342,
+ SLASH = 343,
+ PERCENT = 344,
+ LEFT_ANGLE = 345,
+ RIGHT_ANGLE = 346,
+ VERTICAL_BAR = 347,
+ CARET = 348,
+ AMPERSAND = 349,
+ QUESTION = 350
};
#endif
-/* Tokens. */
-#define INVARIANT 258
-#define HIGH_PRECISION 259
-#define MEDIUM_PRECISION 260
-#define LOW_PRECISION 261
-#define PRECISION 262
-#define ATTRIBUTE 263
-#define CONST_QUAL 264
-#define BOOL_TYPE 265
-#define FLOAT_TYPE 266
-#define INT_TYPE 267
-#define BREAK 268
-#define CONTINUE 269
-#define DO 270
-#define ELSE 271
-#define FOR 272
-#define IF 273
-#define DISCARD 274
-#define RETURN 275
-#define BVEC2 276
-#define BVEC3 277
-#define BVEC4 278
-#define IVEC2 279
-#define IVEC3 280
-#define IVEC4 281
-#define VEC2 282
-#define VEC3 283
-#define VEC4 284
-#define MATRIX2 285
-#define MATRIX3 286
-#define MATRIX4 287
-#define IN_QUAL 288
-#define OUT_QUAL 289
-#define INOUT_QUAL 290
-#define UNIFORM 291
-#define VARYING 292
-#define STRUCT 293
-#define VOID_TYPE 294
-#define WHILE 295
-#define SAMPLER2D 296
-#define SAMPLERCUBE 297
-#define IDENTIFIER 298
-#define TYPE_NAME 299
-#define FLOATCONSTANT 300
-#define INTCONSTANT 301
-#define BOOLCONSTANT 302
-#define FIELD_SELECTION 303
-#define LEFT_OP 304
-#define RIGHT_OP 305
-#define INC_OP 306
-#define DEC_OP 307
-#define LE_OP 308
-#define GE_OP 309
-#define EQ_OP 310
-#define NE_OP 311
-#define AND_OP 312
-#define OR_OP 313
-#define XOR_OP 314
-#define MUL_ASSIGN 315
-#define DIV_ASSIGN 316
-#define ADD_ASSIGN 317
-#define MOD_ASSIGN 318
-#define LEFT_ASSIGN 319
-#define RIGHT_ASSIGN 320
-#define AND_ASSIGN 321
-#define XOR_ASSIGN 322
-#define OR_ASSIGN 323
-#define SUB_ASSIGN 324
-#define LEFT_PAREN 325
-#define RIGHT_PAREN 326
-#define LEFT_BRACKET 327
-#define RIGHT_BRACKET 328
-#define LEFT_BRACE 329
-#define RIGHT_BRACE 330
-#define DOT 331
-#define COMMA 332
-#define COLON 333
-#define EQUAL 334
-#define SEMICOLON 335
-#define BANG 336
-#define DASH 337
-#define TILDE 338
-#define PLUS 339
-#define STAR 340
-#define SLASH 341
-#define PERCENT 342
-#define LEFT_ANGLE 343
-#define RIGHT_ANGLE 344
-#define VERTICAL_BAR 345
-#define CARET 346
-#define AMPERSAND 347
-#define QUESTION 348
-
-
-
-
-/* Copy the first part of user declarations. */
-
-
-//
-// 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
-// found in the LICENSE file.
-//
-
-// This file is auto-generated by generate_glslang_parser.sh. DO NOT EDIT!
-
-#include "compiler/SymbolTable.h"
-#include "compiler/ParseHelper.h"
-#include "GLSLANG/ShaderLang.h"
-
-#define YYLEX_PARAM context->scanner
-
-
-/* Enabling traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-/* Enabling verbose error messages. */
-#ifdef YYERROR_VERBOSE
-# undef YYERROR_VERBOSE
-# define YYERROR_VERBOSE 1
-#else
-# define YYERROR_VERBOSE 0
-#endif
-/* Enabling the token table. */
-#ifndef YYTOKEN_TABLE
-# define YYTOKEN_TABLE 0
-#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
-
{
+
+
struct {
TSourceLoc line;
union {
TTypeList* typeList;
};
} interm;
-}
-/* Line 193 of yacc.c. */
- YYSTYPE;
+
+
+} YYSTYPE;
+# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
-# define YYSTYPE_IS_TRIVIAL 1
#endif
-
/* Copy the second part of user declarations. */
}
-/* Line 216 of yacc.c. */
-
#ifdef short
# undef short
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
-# if defined YYENABLE_NLS && YYENABLE_NLS
+# if YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
-YYID (int i)
+YYID (int yyi)
#else
static int
-YYID (i)
- int i;
+YYID (yyi)
+ int yyi;
#endif
{
- return i;
+ return yyi;
}
#endif
/* A type that is properly aligned for any stack member. */
union yyalloc
{
- yytype_int16 yyss;
- YYSTYPE yyvs;
- };
+ yytype_int16 yyss_alloc;
+ YYSTYPE yyvs_alloc;
+};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
-# define YYSTACK_RELOCATE(Stack) \
+# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
- YYCOPY (&yyptr->Stack, Stack, yysize); \
- Stack = &yyptr->Stack; \
+ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
+ Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
#endif
/* YYFINAL -- State number of the termination state. */
-#define YYFINAL 69
+#define YYFINAL 71
/* YYLAST -- Last index in YYTABLE. */
-#define YYLAST 1362
+#define YYLAST 1370
/* YYNTOKENS -- Number of terminals. */
-#define YYNTOKENS 94
+#define YYNTOKENS 96
/* YYNNTS -- Number of nonterminals. */
-#define YYNNTS 78
+#define YYNNTS 80
/* YYNRULES -- Number of rules. */
-#define YYNRULES 193
+#define YYNRULES 197
/* YYNRULES -- Number of states. */
-#define YYNSTATES 296
+#define YYNSTATES 300
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
-#define YYMAXUTOK 348
+#define YYMAXUTOK 350
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
75, 76, 77, 78, 79, 80, 81, 82, 83, 84,
- 85, 86, 87, 88, 89, 90, 91, 92, 93
+ 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
+ 95
};
#if YYDEBUG
298, 303, 306, 308, 311, 313, 315, 317, 320, 322,
324, 327, 329, 331, 333, 335, 340, 342, 344, 346,
348, 350, 352, 354, 356, 358, 360, 362, 364, 366,
- 368, 370, 372, 374, 376, 378, 380, 386, 391, 393,
- 396, 400, 402, 406, 408, 413, 415, 417, 419, 421,
- 423, 425, 427, 429, 431, 434, 435, 436, 442, 444,
- 446, 449, 453, 455, 458, 460, 463, 469, 473, 475,
- 477, 482, 483, 490, 491, 500, 501, 509, 511, 513,
- 515, 516, 519, 523, 526, 529, 532, 536, 539, 541,
- 544, 546, 548, 549
+ 368, 370, 372, 374, 376, 378, 380, 382, 384, 385,
+ 392, 393, 399, 401, 404, 408, 410, 414, 416, 421,
+ 423, 425, 427, 429, 431, 433, 435, 437, 439, 442,
+ 443, 444, 450, 452, 454, 457, 461, 463, 466, 468,
+ 471, 477, 481, 483, 485, 490, 491, 498, 499, 508,
+ 509, 517, 519, 521, 523, 524, 527, 531, 534, 537,
+ 540, 544, 547, 549, 552, 554, 556, 557
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
- 168, 0, -1, 43, -1, 95, -1, 46, -1, 45,
- -1, 47, -1, 70, 122, 71, -1, 96, -1, 97,
- 72, 98, 73, -1, 99, -1, 97, 76, 48, -1,
- 97, 51, -1, 97, 52, -1, 122, -1, 100, -1,
- 101, -1, 97, 76, 101, -1, 103, 71, -1, 102,
- 71, -1, 104, 39, -1, 104, -1, 104, 120, -1,
- 103, 77, 120, -1, 105, 70, -1, 140, -1, 43,
- -1, 48, -1, 97, -1, 51, 106, -1, 52, 106,
- -1, 107, 106, -1, 84, -1, 82, -1, 81, -1,
- 106, -1, 108, 85, 106, -1, 108, 86, 106, -1,
- 108, -1, 109, 84, 108, -1, 109, 82, 108, -1,
- 109, -1, 110, -1, 111, 88, 110, -1, 111, 89,
- 110, -1, 111, 53, 110, -1, 111, 54, 110, -1,
- 111, -1, 112, 55, 111, -1, 112, 56, 111, -1,
- 112, -1, 113, -1, 114, -1, 115, -1, 116, 57,
- 115, -1, 116, -1, 117, 59, 116, -1, 117, -1,
- 118, 58, 117, -1, 118, -1, 118, 93, 122, 78,
- 120, -1, 119, -1, 106, 121, 120, -1, 79, -1,
- 60, -1, 61, -1, 62, -1, 69, -1, 120, -1,
- 122, 77, 120, -1, 119, -1, 125, 80, -1, 133,
- 80, -1, 7, 138, 139, 80, -1, 126, 71, -1,
- 128, -1, 127, -1, 128, 130, -1, 127, 77, 130,
- -1, 135, 43, 70, -1, 137, 43, -1, 137, 43,
- 72, 123, 73, -1, 136, 131, 129, -1, 131, 129,
- -1, 136, 131, 132, -1, 131, 132, -1, -1, 33,
- -1, 34, -1, 35, -1, 137, -1, 134, -1, 133,
- 77, 43, -1, 133, 77, 43, 72, 73, -1, 133,
- 77, 43, 72, 123, 73, -1, 133, 77, 43, 79,
- 146, -1, 135, -1, 135, 43, -1, 135, 43, 72,
- 73, -1, 135, 43, 72, 123, 73, -1, 135, 43,
- 79, 146, -1, 3, 43, -1, 137, -1, 136, 137,
+ 172, 0, -1, 45, -1, 97, -1, 48, -1, 47,
+ -1, 49, -1, 72, 124, 73, -1, 98, -1, 99,
+ 74, 100, 75, -1, 101, -1, 99, 78, 50, -1,
+ 99, 53, -1, 99, 54, -1, 124, -1, 102, -1,
+ 103, -1, 99, 78, 103, -1, 105, 73, -1, 104,
+ 73, -1, 106, 39, -1, 106, -1, 106, 122, -1,
+ 105, 79, 122, -1, 107, 72, -1, 142, -1, 45,
+ -1, 50, -1, 99, -1, 53, 108, -1, 54, 108,
+ -1, 109, 108, -1, 86, -1, 84, -1, 83, -1,
+ 108, -1, 110, 87, 108, -1, 110, 88, 108, -1,
+ 110, -1, 111, 86, 110, -1, 111, 84, 110, -1,
+ 111, -1, 112, -1, 113, 90, 112, -1, 113, 91,
+ 112, -1, 113, 55, 112, -1, 113, 56, 112, -1,
+ 113, -1, 114, 57, 113, -1, 114, 58, 113, -1,
+ 114, -1, 115, -1, 116, -1, 117, -1, 118, 59,
+ 117, -1, 118, -1, 119, 61, 118, -1, 119, -1,
+ 120, 60, 119, -1, 120, -1, 120, 95, 124, 80,
+ 122, -1, 121, -1, 108, 123, 122, -1, 81, -1,
+ 62, -1, 63, -1, 64, -1, 71, -1, 122, -1,
+ 124, 79, 122, -1, 121, -1, 127, 82, -1, 135,
+ 82, -1, 7, 140, 141, 82, -1, 128, 73, -1,
+ 130, -1, 129, -1, 130, 132, -1, 129, 79, 132,
+ -1, 137, 45, 72, -1, 139, 45, -1, 139, 45,
+ 74, 125, 75, -1, 138, 133, 131, -1, 133, 131,
+ -1, 138, 133, 134, -1, 133, 134, -1, -1, 33,
+ -1, 34, -1, 35, -1, 139, -1, 136, -1, 135,
+ 79, 45, -1, 135, 79, 45, 74, 75, -1, 135,
+ 79, 45, 74, 125, 75, -1, 135, 79, 45, 81,
+ 150, -1, 137, -1, 137, 45, -1, 137, 45, 74,
+ 75, -1, 137, 45, 74, 125, 75, -1, 137, 45,
+ 81, 150, -1, 3, 45, -1, 139, -1, 138, 139,
-1, 9, -1, 8, -1, 37, -1, 3, 37, -1,
- 36, -1, 139, -1, 138, 139, -1, 4, -1, 5,
- -1, 6, -1, 140, -1, 140, 72, 123, 73, -1,
+ 36, -1, 141, -1, 140, 141, -1, 4, -1, 5,
+ -1, 6, -1, 142, -1, 142, 74, 125, 75, -1,
39, -1, 11, -1, 12, -1, 10, -1, 27, -1,
28, -1, 29, -1, 21, -1, 22, -1, 23, -1,
24, -1, 25, -1, 26, -1, 30, -1, 31, -1,
- 32, -1, 41, -1, 42, -1, 141, -1, 44, -1,
- 38, 43, 74, 142, 75, -1, 38, 74, 142, 75,
- -1, 143, -1, 142, 143, -1, 137, 144, 80, -1,
- 145, -1, 144, 77, 145, -1, 43, -1, 43, 72,
- 123, 73, -1, 120, -1, 124, -1, 150, -1, 149,
- -1, 147, -1, 156, -1, 157, -1, 160, -1, 167,
- -1, 74, 75, -1, -1, -1, 74, 151, 155, 152,
- 75, -1, 154, -1, 149, -1, 74, 75, -1, 74,
- 155, 75, -1, 148, -1, 155, 148, -1, 80, -1,
- 122, 80, -1, 18, 70, 122, 71, 158, -1, 148,
- 16, 148, -1, 148, -1, 122, -1, 135, 43, 79,
- 146, -1, -1, 40, 70, 161, 159, 71, 153, -1,
- -1, 15, 162, 148, 40, 70, 122, 71, 80, -1,
- -1, 17, 70, 163, 164, 166, 71, 153, -1, 156,
- -1, 147, -1, 159, -1, -1, 165, 80, -1, 165,
- 80, 122, -1, 14, 80, -1, 13, 80, -1, 20,
- 80, -1, 20, 122, 80, -1, 19, 80, -1, 169,
- -1, 168, 169, -1, 170, -1, 124, -1, -1, 125,
- 171, 154, -1
+ 32, -1, 41, -1, 42, -1, 43, -1, 44, -1,
+ 143, -1, 46, -1, -1, 38, 45, 76, 144, 146,
+ 77, -1, -1, 38, 76, 145, 146, 77, -1, 147,
+ -1, 146, 147, -1, 139, 148, 82, -1, 149, -1,
+ 148, 79, 149, -1, 45, -1, 45, 74, 125, 75,
+ -1, 122, -1, 126, -1, 154, -1, 153, -1, 151,
+ -1, 160, -1, 161, -1, 164, -1, 171, -1, 76,
+ 77, -1, -1, -1, 76, 155, 159, 156, 77, -1,
+ 158, -1, 153, -1, 76, 77, -1, 76, 159, 77,
+ -1, 152, -1, 159, 152, -1, 82, -1, 124, 82,
+ -1, 18, 72, 124, 73, 162, -1, 152, 16, 152,
+ -1, 152, -1, 124, -1, 137, 45, 81, 150, -1,
+ -1, 40, 72, 165, 163, 73, 157, -1, -1, 15,
+ 166, 152, 40, 72, 124, 73, 82, -1, -1, 17,
+ 72, 167, 168, 170, 73, 157, -1, 160, -1, 151,
+ -1, 163, -1, -1, 169, 82, -1, 169, 82, 124,
+ -1, 14, 82, -1, 13, 82, -1, 20, 82, -1,
+ 20, 124, 82, -1, 19, 82, -1, 173, -1, 172,
+ 173, -1, 174, -1, 126, -1, -1, 127, 175, 158,
+ -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
1316, 1336, 1412, 1421, 1444, 1447, 1453, 1461, 1469, 1477,
1487, 1494, 1497, 1500, 1506, 1509, 1524, 1528, 1532, 1536,
1545, 1550, 1555, 1560, 1565, 1570, 1575, 1580, 1585, 1590,
- 1596, 1602, 1608, 1613, 1618, 1623, 1636, 1649, 1657, 1660,
- 1675, 1707, 1711, 1717, 1725, 1741, 1745, 1749, 1750, 1756,
- 1757, 1758, 1759, 1760, 1764, 1765, 1765, 1765, 1775, 1776,
- 1781, 1784, 1794, 1797, 1803, 1804, 1808, 1816, 1820, 1830,
- 1835, 1852, 1852, 1857, 1857, 1864, 1864, 1872, 1875, 1881,
- 1884, 1890, 1894, 1901, 1908, 1915, 1922, 1933, 1942, 1946,
- 1953, 1956, 1962, 1962
+ 1596, 1602, 1608, 1613, 1618, 1627, 1636, 1641, 1654, 1654,
+ 1668, 1668, 1677, 1680, 1695, 1731, 1735, 1741, 1749, 1765,
+ 1769, 1773, 1774, 1780, 1781, 1782, 1783, 1784, 1788, 1789,
+ 1789, 1789, 1799, 1800, 1805, 1808, 1818, 1821, 1827, 1828,
+ 1832, 1840, 1844, 1854, 1859, 1876, 1876, 1881, 1881, 1888,
+ 1888, 1896, 1899, 1905, 1908, 1914, 1918, 1925, 1932, 1939,
+ 1946, 1957, 1966, 1970, 1977, 1980, 1986, 1986
};
#endif
"BVEC4", "IVEC2", "IVEC3", "IVEC4", "VEC2", "VEC3", "VEC4", "MATRIX2",
"MATRIX3", "MATRIX4", "IN_QUAL", "OUT_QUAL", "INOUT_QUAL", "UNIFORM",
"VARYING", "STRUCT", "VOID_TYPE", "WHILE", "SAMPLER2D", "SAMPLERCUBE",
- "IDENTIFIER", "TYPE_NAME", "FLOATCONSTANT", "INTCONSTANT",
- "BOOLCONSTANT", "FIELD_SELECTION", "LEFT_OP", "RIGHT_OP", "INC_OP",
- "DEC_OP", "LE_OP", "GE_OP", "EQ_OP", "NE_OP", "AND_OP", "OR_OP",
- "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN", "ADD_ASSIGN", "MOD_ASSIGN",
- "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN", "XOR_ASSIGN", "OR_ASSIGN",
- "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN", "LEFT_BRACKET",
- "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT", "COMMA", "COLON",
- "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS", "STAR", "SLASH",
- "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR", "CARET",
- "AMPERSAND", "QUESTION", "$accept", "variable_identifier",
+ "SAMPLER_EXTERNAL_OES", "SAMPLER2DRECT", "IDENTIFIER", "TYPE_NAME",
+ "FLOATCONSTANT", "INTCONSTANT", "BOOLCONSTANT", "FIELD_SELECTION",
+ "LEFT_OP", "RIGHT_OP", "INC_OP", "DEC_OP", "LE_OP", "GE_OP", "EQ_OP",
+ "NE_OP", "AND_OP", "OR_OP", "XOR_OP", "MUL_ASSIGN", "DIV_ASSIGN",
+ "ADD_ASSIGN", "MOD_ASSIGN", "LEFT_ASSIGN", "RIGHT_ASSIGN", "AND_ASSIGN",
+ "XOR_ASSIGN", "OR_ASSIGN", "SUB_ASSIGN", "LEFT_PAREN", "RIGHT_PAREN",
+ "LEFT_BRACKET", "RIGHT_BRACKET", "LEFT_BRACE", "RIGHT_BRACE", "DOT",
+ "COMMA", "COLON", "EQUAL", "SEMICOLON", "BANG", "DASH", "TILDE", "PLUS",
+ "STAR", "SLASH", "PERCENT", "LEFT_ANGLE", "RIGHT_ANGLE", "VERTICAL_BAR",
+ "CARET", "AMPERSAND", "QUESTION", "$accept", "variable_identifier",
"primary_expression", "postfix_expression", "integer_expression",
"function_call", "function_call_or_method", "function_call_generic",
"function_call_header_no_parameters",
"init_declarator_list", "single_declaration", "fully_specified_type",
"type_qualifier", "type_specifier", "precision_qualifier",
"type_specifier_no_prec", "type_specifier_nonarray", "struct_specifier",
- "struct_declaration_list", "struct_declaration",
+ "$@1", "$@2", "struct_declaration_list", "struct_declaration",
"struct_declarator_list", "struct_declarator", "initializer",
"declaration_statement", "statement", "simple_statement",
- "compound_statement", "@1", "@2", "statement_no_new_scope",
+ "compound_statement", "$@3", "$@4", "statement_no_new_scope",
"compound_statement_no_new_scope", "statement_list",
"expression_statement", "selection_statement",
- "selection_rest_statement", "condition", "iteration_statement", "@3",
- "@4", "@5", "for_init_statement", "conditionopt", "for_rest_statement",
+ "selection_rest_statement", "condition", "iteration_statement", "$@5",
+ "$@6", "$@7", "for_init_statement", "conditionopt", "for_rest_statement",
"jump_statement", "translation_unit", "external_declaration",
- "function_definition", "@6", 0
+ "function_definition", "$@8", 0
};
#endif
315, 316, 317, 318, 319, 320, 321, 322, 323, 324,
325, 326, 327, 328, 329, 330, 331, 332, 333, 334,
335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
- 345, 346, 347, 348
+ 345, 346, 347, 348, 349, 350
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
- 0, 94, 95, 96, 96, 96, 96, 96, 97, 97,
- 97, 97, 97, 97, 98, 99, 100, 100, 101, 101,
- 102, 102, 103, 103, 104, 105, 105, 105, 106, 106,
- 106, 106, 107, 107, 107, 108, 108, 108, 109, 109,
- 109, 110, 111, 111, 111, 111, 111, 112, 112, 112,
- 113, 114, 115, 116, 116, 117, 117, 118, 118, 119,
- 119, 120, 120, 121, 121, 121, 121, 121, 122, 122,
- 123, 124, 124, 124, 125, 126, 126, 127, 127, 128,
- 129, 129, 130, 130, 130, 130, 131, 131, 131, 131,
- 132, 133, 133, 133, 133, 133, 134, 134, 134, 134,
- 134, 134, 135, 135, 136, 136, 136, 136, 136, 137,
- 137, 138, 138, 138, 139, 139, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
- 140, 140, 140, 140, 140, 140, 141, 141, 142, 142,
- 143, 144, 144, 145, 145, 146, 147, 148, 148, 149,
- 149, 149, 149, 149, 150, 151, 152, 150, 153, 153,
- 154, 154, 155, 155, 156, 156, 157, 158, 158, 159,
- 159, 161, 160, 162, 160, 163, 160, 164, 164, 165,
- 165, 166, 166, 167, 167, 167, 167, 167, 168, 168,
- 169, 169, 171, 170
+ 0, 96, 97, 98, 98, 98, 98, 98, 99, 99,
+ 99, 99, 99, 99, 100, 101, 102, 102, 103, 103,
+ 104, 104, 105, 105, 106, 107, 107, 107, 108, 108,
+ 108, 108, 109, 109, 109, 110, 110, 110, 111, 111,
+ 111, 112, 113, 113, 113, 113, 113, 114, 114, 114,
+ 115, 116, 117, 118, 118, 119, 119, 120, 120, 121,
+ 121, 122, 122, 123, 123, 123, 123, 123, 124, 124,
+ 125, 126, 126, 126, 127, 128, 128, 129, 129, 130,
+ 131, 131, 132, 132, 132, 132, 133, 133, 133, 133,
+ 134, 135, 135, 135, 135, 135, 136, 136, 136, 136,
+ 136, 136, 137, 137, 138, 138, 138, 138, 138, 139,
+ 139, 140, 140, 140, 141, 141, 142, 142, 142, 142,
+ 142, 142, 142, 142, 142, 142, 142, 142, 142, 142,
+ 142, 142, 142, 142, 142, 142, 142, 142, 144, 143,
+ 145, 143, 146, 146, 147, 148, 148, 149, 149, 150,
+ 151, 152, 152, 153, 153, 153, 153, 153, 154, 155,
+ 156, 154, 157, 157, 158, 158, 159, 159, 160, 160,
+ 161, 162, 162, 163, 163, 165, 164, 166, 164, 167,
+ 164, 168, 168, 169, 169, 170, 170, 171, 171, 171,
+ 171, 171, 172, 172, 173, 173, 175, 174
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
4, 2, 1, 2, 1, 1, 1, 2, 1, 1,
2, 1, 1, 1, 1, 4, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 5, 4, 1, 2,
- 3, 1, 3, 1, 4, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 2, 0, 0, 5, 1, 1,
- 2, 3, 1, 2, 1, 2, 5, 3, 1, 1,
- 4, 0, 6, 0, 8, 0, 7, 1, 1, 1,
- 0, 2, 3, 2, 2, 2, 3, 2, 1, 2,
- 1, 1, 0, 3
+ 1, 1, 1, 1, 1, 1, 1, 1, 0, 6,
+ 0, 5, 1, 2, 3, 1, 3, 1, 4, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 2, 0,
+ 0, 5, 1, 1, 2, 3, 1, 2, 1, 2,
+ 5, 3, 1, 1, 4, 0, 6, 0, 8, 0,
+ 7, 1, 1, 1, 0, 2, 3, 2, 2, 2,
+ 3, 2, 1, 2, 1, 1, 0, 3
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
{
0, 0, 111, 112, 113, 0, 105, 104, 119, 117,
118, 123, 124, 125, 126, 127, 128, 120, 121, 122,
- 129, 130, 131, 108, 106, 0, 116, 132, 133, 135,
- 191, 192, 0, 76, 86, 0, 91, 96, 0, 102,
- 0, 109, 114, 134, 0, 188, 190, 107, 101, 0,
- 0, 0, 71, 0, 74, 86, 0, 87, 88, 89,
- 77, 0, 86, 0, 72, 97, 103, 110, 0, 1,
- 189, 0, 0, 0, 0, 138, 0, 193, 78, 83,
+ 129, 130, 131, 108, 106, 0, 116, 132, 133, 134,
+ 135, 137, 195, 196, 0, 76, 86, 0, 91, 96,
+ 0, 102, 0, 109, 114, 136, 0, 192, 194, 107,
+ 101, 0, 0, 140, 71, 0, 74, 86, 0, 87,
+ 88, 89, 77, 0, 86, 0, 72, 97, 103, 110,
+ 0, 1, 193, 0, 138, 0, 0, 197, 78, 83,
85, 90, 0, 92, 79, 0, 0, 2, 5, 4,
6, 27, 0, 0, 0, 34, 33, 32, 3, 8,
28, 10, 15, 16, 0, 0, 21, 0, 35, 0,
38, 41, 42, 47, 50, 51, 52, 53, 55, 57,
- 59, 70, 0, 25, 73, 0, 143, 0, 141, 137,
- 139, 0, 0, 173, 0, 0, 0, 0, 0, 155,
- 160, 164, 35, 61, 68, 0, 146, 0, 114, 149,
- 162, 148, 147, 0, 150, 151, 152, 153, 80, 82,
- 84, 0, 0, 98, 0, 145, 100, 29, 30, 0,
- 12, 13, 0, 0, 19, 18, 0, 20, 22, 24,
- 31, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 115, 136, 0, 0, 140,
- 184, 183, 0, 175, 0, 187, 185, 0, 171, 154,
- 0, 64, 65, 66, 67, 63, 0, 0, 165, 161,
- 163, 0, 93, 0, 95, 99, 7, 0, 14, 26,
+ 59, 70, 0, 25, 73, 0, 0, 0, 142, 0,
+ 0, 177, 0, 0, 0, 0, 0, 159, 164, 168,
+ 35, 61, 68, 0, 150, 0, 114, 153, 166, 152,
+ 151, 0, 154, 155, 156, 157, 80, 82, 84, 0,
+ 0, 98, 0, 149, 100, 29, 30, 0, 12, 13,
+ 0, 0, 19, 18, 0, 20, 22, 24, 31, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 115, 0, 147, 0, 145, 141, 143,
+ 188, 187, 0, 179, 0, 191, 189, 0, 175, 158,
+ 0, 64, 65, 66, 67, 63, 0, 0, 169, 165,
+ 167, 0, 93, 0, 95, 99, 7, 0, 14, 26,
11, 17, 23, 36, 37, 40, 39, 45, 46, 43,
- 44, 48, 49, 54, 56, 58, 0, 0, 142, 0,
- 0, 0, 186, 0, 156, 62, 69, 0, 94, 9,
- 0, 144, 0, 178, 177, 180, 0, 169, 0, 0,
- 0, 81, 60, 0, 179, 0, 0, 168, 166, 0,
- 0, 157, 0, 181, 0, 0, 0, 159, 172, 158,
- 0, 182, 176, 167, 170, 174
+ 44, 48, 49, 54, 56, 58, 0, 139, 0, 0,
+ 144, 0, 0, 0, 190, 0, 160, 62, 69, 0,
+ 94, 9, 0, 0, 146, 0, 182, 181, 184, 0,
+ 173, 0, 0, 0, 81, 60, 148, 0, 183, 0,
+ 0, 172, 170, 0, 0, 161, 0, 185, 0, 0,
+ 0, 163, 176, 162, 0, 186, 180, 171, 174, 178
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
-1, 98, 99, 100, 227, 101, 102, 103, 104, 105,
- 106, 107, 142, 109, 110, 111, 112, 113, 114, 115,
- 116, 117, 118, 119, 120, 143, 144, 216, 145, 122,
- 146, 147, 32, 33, 34, 79, 60, 61, 80, 35,
- 36, 37, 38, 39, 40, 41, 123, 43, 74, 75,
- 127, 128, 166, 149, 150, 151, 152, 210, 270, 288,
- 289, 153, 154, 155, 278, 269, 156, 253, 202, 250,
- 265, 275, 276, 157, 44, 45, 46, 53
+ 106, 107, 140, 109, 110, 111, 112, 113, 114, 115,
+ 116, 117, 118, 119, 120, 141, 142, 216, 143, 122,
+ 144, 145, 34, 35, 36, 79, 62, 63, 80, 37,
+ 38, 39, 40, 41, 42, 43, 123, 45, 125, 75,
+ 127, 128, 196, 197, 164, 147, 148, 149, 150, 210,
+ 273, 292, 293, 151, 152, 153, 282, 272, 154, 255,
+ 202, 252, 268, 279, 280, 155, 46, 47, 48, 55
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
-#define YYPACT_NINF -250
+#define YYPACT_NINF -251
static const yytype_int16 yypact[] =
{
- 1218, -13, -250, -250, -250, 137, -250, -250, -250, -250,
- -250, -250, -250, -250, -250, -250, -250, -250, -250, -250,
- -250, -250, -250, -250, -250, -28, -250, -250, -250, -250,
- -250, -55, -38, -4, 33, -20, -250, 44, 1259, -250,
- 1318, -250, 18, -250, 1176, -250, -250, -250, -250, 1318,
- -22, 1259, -250, 29, -250, 85, 73, -250, -250, -250,
- -250, 1259, 113, 70, -250, 13, -250, -250, 949, -250,
<