summaryrefslogtreecommitdiffstats
path: root/gfx/angle/src/libANGLE/Compiler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/angle/src/libANGLE/Compiler.cpp')
-rwxr-xr-xgfx/angle/src/libANGLE/Compiler.cpp30
1 files changed, 14 insertions, 16 deletions
diff --git a/gfx/angle/src/libANGLE/Compiler.cpp b/gfx/angle/src/libANGLE/Compiler.cpp
index 078491284..b745888f2 100755
--- a/gfx/angle/src/libANGLE/Compiler.cpp
+++ b/gfx/angle/src/libANGLE/Compiler.cpp
@@ -19,33 +19,31 @@ namespace gl
namespace
{
-// Global count of active shader compiler handles. Needed to know when to call sh::Initialize and
-// sh::Finalize.
+// Global count of active shader compiler handles. Needed to know when to call ShInitialize and
+// ShFinalize.
size_t activeCompilerHandles = 0;
-ShShaderSpec SelectShaderSpec(GLint majorVersion, GLint minorVersion, bool isWebGL)
+ShShaderSpec SelectShaderSpec(GLint majorVersion, GLint minorVersion)
{
if (majorVersion >= 3)
{
if (minorVersion == 1)
{
- return isWebGL ? SH_WEBGL3_SPEC : SH_GLES3_1_SPEC;
+ return SH_GLES3_1_SPEC;
}
else
{
- return isWebGL ? SH_WEBGL2_SPEC : SH_GLES3_SPEC;
+ return SH_GLES3_SPEC;
}
}
- return isWebGL ? SH_WEBGL_SPEC : SH_GLES2_SPEC;
+ return SH_GLES2_SPEC;
}
} // anonymous namespace
Compiler::Compiler(rx::GLImplFactory *implFactory, const ContextState &state)
: mImplementation(implFactory->createCompiler()),
- mSpec(SelectShaderSpec(state.getClientMajorVersion(),
- state.getClientMinorVersion(),
- state.getExtensions().webglCompatibility)),
+ mSpec(SelectShaderSpec(state.getClientMajorVersion(), state.getClientMinorVersion())),
mOutputType(mImplementation->getTranslatorOutputType()),
mResources(),
mFragmentCompiler(nullptr),
@@ -57,7 +55,7 @@ Compiler::Compiler(rx::GLImplFactory *implFactory, const ContextState &state)
const gl::Caps &caps = state.getCaps();
const gl::Extensions &extensions = state.getExtensions();
- sh::InitBuiltInResources(&mResources);
+ ShInitBuiltInResources(&mResources);
mResources.MaxVertexAttribs = caps.maxVertexAttributes;
mResources.MaxVertexUniformVectors = caps.maxVertexUniformVectors;
mResources.MaxVaryingVectors = caps.maxVaryingVectors;
@@ -122,7 +120,7 @@ Error Compiler::release()
{
if (mFragmentCompiler)
{
- sh::Destruct(mFragmentCompiler);
+ ShDestruct(mFragmentCompiler);
mFragmentCompiler = nullptr;
ASSERT(activeCompilerHandles > 0);
@@ -131,7 +129,7 @@ Error Compiler::release()
if (mVertexCompiler)
{
- sh::Destruct(mVertexCompiler);
+ ShDestruct(mVertexCompiler);
mVertexCompiler = nullptr;
ASSERT(activeCompilerHandles > 0);
@@ -140,7 +138,7 @@ Error Compiler::release()
if (mComputeCompiler)
{
- sh::Destruct(mComputeCompiler);
+ ShDestruct(mComputeCompiler);
mComputeCompiler = nullptr;
ASSERT(activeCompilerHandles > 0);
@@ -149,7 +147,7 @@ Error Compiler::release()
if (activeCompilerHandles == 0)
{
- sh::Finalize();
+ ShFinalize();
}
mImplementation->release();
@@ -181,10 +179,10 @@ ShHandle Compiler::getCompilerHandle(GLenum type)
{
if (activeCompilerHandles == 0)
{
- sh::Initialize();
+ ShInitialize();
}
- *compiler = sh::ConstructCompiler(type, mSpec, mOutputType, &mResources);
+ *compiler = ShConstructCompiler(type, mSpec, mOutputType, &mResources);
activeCompilerHandles++;
}