summaryrefslogtreecommitdiffstats
path: root/gfx/angle/src/libANGLE/Compiler.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-11 23:29:50 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-11 23:31:02 +0200
commit70dd5e7c66b1fe3f82e5b4db2406050baba15f05 (patch)
tree3f012200ef3c934f33db1a4ef2b790fae3141860 /gfx/angle/src/libANGLE/Compiler.cpp
parent3b7ffb477eec078c7036c92c6a51bb5de6de4f28 (diff)
parent8481fa25d246f1968d0a254ee3c6cdd82c60781a (diff)
downloadUXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar
UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar.gz
UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar.lz
UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.tar.xz
UXP-70dd5e7c66b1fe3f82e5b4db2406050baba15f05.zip
Merge branch 'ANGLE-rollback'
This resolves #624 Note: Cherry-picked some fixes on top of the ANGLE version that we want to keep.
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++;
}