diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-11 18:11:13 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-11 18:11:13 +0200 |
commit | 4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0 (patch) | |
tree | f000dd831240707a03b8c806db292c2a15cde3ce /gfx/angle/src/compiler/translator/util.cpp | |
parent | 3b7ffb477eec078c7036c92c6a51bb5de6de4f28 (diff) | |
download | UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.gz UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.lz UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.tar.xz UXP-4f2ecd53a9daaf88bb7d075745eefb6e2e4741e0.zip |
Roll back to ANGLE/2845
Diffstat (limited to 'gfx/angle/src/compiler/translator/util.cpp')
-rwxr-xr-x | gfx/angle/src/compiler/translator/util.cpp | 84 |
1 files changed, 2 insertions, 82 deletions
diff --git a/gfx/angle/src/compiler/translator/util.cpp b/gfx/angle/src/compiler/translator/util.cpp index 89f237ceb..bd3e484eb 100755 --- a/gfx/angle/src/compiler/translator/util.cpp +++ b/gfx/angle/src/compiler/translator/util.cpp @@ -159,30 +159,6 @@ GLenum GLVariableType(const TType &type) case EbtSampler2DShadow: return GL_SAMPLER_2D_SHADOW; case EbtSamplerCubeShadow: return GL_SAMPLER_CUBE_SHADOW; case EbtSampler2DArrayShadow: return GL_SAMPLER_2D_ARRAY_SHADOW; - case EbtImage2D: - return GL_IMAGE_2D; - case EbtIImage2D: - return GL_INT_IMAGE_2D; - case EbtUImage2D: - return GL_UNSIGNED_INT_IMAGE_2D; - case EbtImage2DArray: - return GL_IMAGE_2D_ARRAY; - case EbtIImage2DArray: - return GL_INT_IMAGE_2D_ARRAY; - case EbtUImage2DArray: - return GL_UNSIGNED_INT_IMAGE_2D_ARRAY; - case EbtImage3D: - return GL_IMAGE_3D; - case EbtIImage3D: - return GL_INT_IMAGE_3D; - case EbtUImage3D: - return GL_UNSIGNED_INT_IMAGE_3D; - case EbtImageCube: - return GL_IMAGE_CUBE; - case EbtIImageCube: - return GL_INT_IMAGE_CUBE; - case EbtUImageCube: - return GL_UNSIGNED_INT_IMAGE_CUBE; default: UNREACHABLE(); } @@ -302,18 +278,10 @@ InterpolationType GetInterpolationType(TQualifier qualifier) } } -TType GetShaderVariableBasicType(const sh::ShaderVariable &var) +TType ConvertShaderVariableTypeToTType(sh::GLenum type) { - switch (var.type) + switch (type) { - case GL_BOOL: - return TType(EbtBool); - case GL_BOOL_VEC2: - return TType(EbtBool, 2); - case GL_BOOL_VEC3: - return TType(EbtBool, 3); - case GL_BOOL_VEC4: - return TType(EbtBool, 4); case GL_FLOAT: return TType(EbtFloat); case GL_FLOAT_VEC2: @@ -569,52 +537,4 @@ template void GetVariableTraverser::traverse(const TType &, const TString &, std template void GetVariableTraverser::traverse(const TType &, const TString &, std::vector<Uniform> *); template void GetVariableTraverser::traverse(const TType &, const TString &, std::vector<Varying> *); -// GLSL ES 1.0.17 4.6.1 The Invariant Qualifier -bool CanBeInvariantESSL1(TQualifier qualifier) -{ - return IsVaryingIn(qualifier) || IsVaryingOut(qualifier) || - IsBuiltinOutputVariable(qualifier) || - (IsBuiltinFragmentInputVariable(qualifier) && qualifier != EvqFrontFacing); -} - -// GLSL ES 3.00 Revision 6, 4.6.1 The Invariant Qualifier -// GLSL ES 3.10 Revision 4, 4.8.1 The Invariant Qualifier -bool CanBeInvariantESSL3OrGreater(TQualifier qualifier) -{ - return IsVaryingOut(qualifier) || qualifier == EvqFragmentOut || - IsBuiltinOutputVariable(qualifier); -} - -bool IsBuiltinOutputVariable(TQualifier qualifier) -{ - switch (qualifier) - { - case EvqPosition: - case EvqPointSize: - case EvqFragDepth: - case EvqFragDepthEXT: - case EvqFragColor: - case EvqSecondaryFragColorEXT: - case EvqFragData: - case EvqSecondaryFragDataEXT: - return true; - default: - break; - } - return false; -} - -bool IsBuiltinFragmentInputVariable(TQualifier qualifier) -{ - switch (qualifier) - { - case EvqFragCoord: - case EvqPointCoord: - case EvqFrontFacing: - return true; - default: - break; - } - return false; } -} // namespace sh |