Add support for GL_OES_EGL_image_external_essl3

This commit is contained in:
David Srbecký 2017-09-04 17:33:04 +01:00 committed by David Srbecky
parent 3a21c88050
commit 2c5b3d64af
10 changed files with 487 additions and 4 deletions

View file

@ -2457,6 +2457,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;