mirror of
https://github.com/utmapp/angle.git
synced 2026-12-01 22:13:25 -10:00
renderergl_utils: Require explicit location qualifier for OpenGLES3
BUG=525930 Change-Id: I591308078c5a392a527291419567a11241a8be17 Reviewed-on: https://chromium-review.googlesource.com/309636 Tested-by: Corentin Wallez <[email protected]> Reviewed-by: Jamie Madill <[email protected]> Tryjob-Request: Corentin Wallez <[email protected]> Reviewed-by: Geoff Lang <[email protected]>
This commit is contained in:
1 parent
121ea58437
commit
d63243f5be
2 files changed
+15
No files matched your search
@@ -177,6 +177,12 @@ void TranslatorGLSL::writeExtensionBehavior(TIntermNode *root)
|
||||
}
|
||||
}
|
||||
|
||||
// GLSL ES 3 explicit location qualifiers need to use an extension before GLSL 330
|
||||
if (getShaderVersion() >= 300 && getOutputType() < SH_GLSL_330_CORE_OUTPUT)
|
||||
{
|
||||
sink << "#extension GL_ARB_explicit_attrib_location : require\n";
|
||||
}
|
||||
|
||||
TExtensionGLSL extensionGLSL(getOutputType());
|
||||
root->traverse(&extensionGLSL);
|
||||
|
||||
|
||||
@@ -539,6 +539,15 @@ void GenerateCaps(const FunctionsGL *functions, gl::Caps *caps, gl::TextureCapsM
|
||||
LimitVersion(maxSupportedESVersion, gl::Version(2, 0));
|
||||
}
|
||||
|
||||
// ES3 needs to support explicit layout location qualifiers, while it might be possible to
|
||||
// fake them in our side, we currently don't support that.
|
||||
if (!functions->isAtLeastGL(gl::Version(3, 3)) &&
|
||||
!functions->hasGLExtension("GL_ARB_explicit_attrib_location") &&
|
||||
!functions->isAtLeastGLES(gl::Version(3, 0)))
|
||||
{
|
||||
LimitVersion(maxSupportedESVersion, gl::Version(2, 0));
|
||||
}
|
||||
|
||||
// Extension support
|
||||
extensions->setTextureExtensionSupport(*textureCapsMap);
|
||||
extensions->elementIndexUint = functions->standard == STANDARD_GL_DESKTOP ||
|
||||
|
||||
Reference in new issue
Block a user