Merge pull request #1044 from dsrbecky/image_external_essl3

Add support for GL_OES_EGL_image_external_essl3
This commit is contained in:
John Kessenich 2017-09-15 21:10:08 -06:00 committed by GitHub
commit 31365afaf4
10 changed files with 487 additions and 4 deletions

View file

@ -2438,6 +2438,16 @@ void TParseContext::boolCheck(const TSourceLoc& loc, const TPublicType& pType)
void TParseContext::samplerCheck(const TSourceLoc& loc, const TType& type, const TString& identifier, TIntermTyped* /*initializer*/)
{
// Check that the appropriate extension is enabled if external sampler is used.
// There are two extensions. The correct one must be used based on GLSL version.
if (type.getBasicType() == EbtSampler && type.getSampler().external) {
if (version < 300) {
requireExtensions(loc, 1, &E_GL_OES_EGL_image_external, "samplerExternalOES");
} else {
requireExtensions(loc, 1, &E_GL_OES_EGL_image_external_essl3, "samplerExternalOES");
}
}
if (type.getQualifier().storage == EvqUniform)
return;