Commit 128a99d8 authored by cmarrin@apple.com's avatar 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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@104363 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 1b16c7c6
......@@ -7,6 +7,11 @@
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 */; };
......@@ -63,6 +68,11 @@
/* 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>"; };
......@@ -372,12 +382,16 @@
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 */,
......@@ -445,6 +459,7 @@
FB39D2481200F35A00088E69 /* cpp.c */,
FB39D2491200F35A00088E69 /* cpp.h */,
FB39D24A1200F35A00088E69 /* cppstruct.c */,
49951C0214B7AAB30060E96E /* length_limits.h */,
FB39D24B1200F35A00088E69 /* memory.c */,
FB39D24C1200F35A00088E69 /* memory.h */,
FB39D24D1200F35A00088E69 /* parser.h */,
......@@ -490,6 +505,9 @@
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;
};
......@@ -584,6 +602,8 @@
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;
};
......
This diff is collapsed.
......@@ -6,7 +6,7 @@ extern "C" {
#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
......@@ -34,8 +34,8 @@ extern "C" {
/* 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
......@@ -120,6 +120,7 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGL
#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
......@@ -149,6 +150,7 @@ typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSy
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
......@@ -169,6 +171,11 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EG
#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
......@@ -182,6 +189,7 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EG
#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
......@@ -198,7 +206,7 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EG
#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);
......@@ -214,6 +222,76 @@ typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint
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
......@@ -224,8 +302,43 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay
#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
......
......@@ -25,7 +25,7 @@
*/
/* 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
......@@ -60,6 +60,11 @@
* 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 */
......@@ -78,7 +83,13 @@ typedef int EGLNativeDisplayType;
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>
......@@ -88,6 +99,14 @@ typedef Display *EGLNativeDisplayType;
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
......
......@@ -6,6 +6,23 @@
#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.
......@@ -59,7 +76,8 @@ typedef enum {
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 {
......@@ -81,7 +99,11 @@ 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;
//
......@@ -89,12 +111,12 @@ typedef enum {
// 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).
......@@ -115,12 +137,14 @@ typedef struct
// 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,
......@@ -143,10 +167,12 @@ typedef void* ShHandle;
// 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.
......@@ -173,7 +199,7 @@ void ShDestruct(ShHandle handle);
// Can be queried by calling ShGetActiveAttrib() and
// ShGetActiveUniform().
//
int ShCompile(
COMPILER_EXPORT int ShCompile(
const ShHandle handle,
const char* const shaderStrings[],
const int numStrings,
......@@ -201,7 +227,9 @@ int ShCompile(
// 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:
......@@ -211,7 +239,7 @@ void ShGetInfo(const ShHandle handle, ShShaderInfo pname, int* params);
// 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:
......@@ -221,7 +249,7 @@ void ShGetInfoLog(const ShHandle handle, char* infoLog);
// 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:
......@@ -242,13 +270,13 @@ void ShGetObjectCode(const ShHandle handle, char* objCode);
// 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:
......@@ -269,13 +297,13 @@ void ShGetActiveAttrib(const ShHandle handle,
// 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
}
}
//
// 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>