Commit bd329091 by Olli Etuaho Committed by Commit Bot

Add missing errors specified by OES_EGL_image_external

Previously the code just silently ignored some filtering parameters for external textures, when in fact trying to set them should result in an error according to the extension specs. BUG=angleproject:1332 Change-Id: I3a691b60561638c562bc1a9780a4dcb88ac43012 Reviewed-on: https://chromium-review.googlesource.com/341441Reviewed-by: 's avatarIan Ewell <ewell@google.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 2be8c8cc
...@@ -872,7 +872,14 @@ bool ValidateTexParamParameters(gl::Context *context, GLenum target, GLenum pnam ...@@ -872,7 +872,14 @@ bool ValidateTexParamParameters(gl::Context *context, GLenum target, GLenum pnam
return true; return true;
case GL_REPEAT: case GL_REPEAT:
case GL_MIRRORED_REPEAT: case GL_MIRRORED_REPEAT:
return (target != GL_TEXTURE_EXTERNAL_OES); if (target == GL_TEXTURE_EXTERNAL_OES)
{
// OES_EGL_image_external specifies this error.
context->recordError(Error(
GL_INVALID_ENUM, "external textures only support CLAMP_TO_EDGE wrap mode"));
return false;
}
return true;
default: default:
context->recordError(Error(GL_INVALID_ENUM)); context->recordError(Error(GL_INVALID_ENUM));
return false; return false;
...@@ -888,7 +895,15 @@ bool ValidateTexParamParameters(gl::Context *context, GLenum target, GLenum pnam ...@@ -888,7 +895,15 @@ bool ValidateTexParamParameters(gl::Context *context, GLenum target, GLenum pnam
case GL_LINEAR_MIPMAP_NEAREST: case GL_LINEAR_MIPMAP_NEAREST:
case GL_NEAREST_MIPMAP_LINEAR: case GL_NEAREST_MIPMAP_LINEAR:
case GL_LINEAR_MIPMAP_LINEAR: case GL_LINEAR_MIPMAP_LINEAR:
return (target != GL_TEXTURE_EXTERNAL_OES); if (target == GL_TEXTURE_EXTERNAL_OES)
{
// OES_EGL_image_external specifies this error.
context->recordError(
Error(GL_INVALID_ENUM,
"external textures only support NEAREST and LINEAR filtering"));
return false;
}
return true;
default: default:
context->recordError(Error(GL_INVALID_ENUM)); context->recordError(Error(GL_INVALID_ENUM));
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment