Bug 1413500 - Use GLSL 100 for blitting on ES r=jgilbert

MozReview-Commit-ID: KlSRfeP7PVi
This commit is contained in:
James Willcox 2017-11-17 08:47:39 -06:00
Родитель 0343981d98
Коммит f0f93b7d2c
1 изменённых файлов: 8 добавлений и 9 удалений

Просмотреть файл

@ -55,11 +55,10 @@ const char* const kFragHeader_Tex2DRect = "\
#endif \n\
";
const char* const kFragHeader_TexExt = "\
#extension GL_OES_EGL_image_external : require \n\
#if __VERSION__ >= 130 \n\
#extension GL_OES_EGL_image_external_essl3 : require \n\
#define TEXTURE texture \n\
#else \n\
#extension GL_OES_EGL_image_external : require \n\
#define TEXTURE texture2D \n\
#endif \n\
#define SAMPLER samplerExternalOES \n\
@ -550,14 +549,14 @@ GLBlitHelper::GLBlitHelper(GLContext* const gl)
// --
const auto glslVersion = mGL->ShadingLanguageVersion();
// Always use 100 on ES because some devices have OES_EGL_image_external but not
// OES_EGL_image_external_essl3. We could just use 100 in that particular case, but
// this is a lot easier and is not harmful to other usages.
if (mGL->IsGLES()) {
if (glslVersion >= 300) {
mDrawBlitProg_VersionLine = nsPrintfCString("#version %u es\n", glslVersion);
}
} else {
if (glslVersion >= 130) {
mDrawBlitProg_VersionLine = nsPrintfCString("#version %u\n", glslVersion);
}
mDrawBlitProg_VersionLine = nsCString("#version 100\n");
} else if (glslVersion >= 130) {
mDrawBlitProg_VersionLine = nsPrintfCString("#version %u\n", glslVersion);
}
const char kVertSource[] = "\