From: Anuj Phogat Date: Fri, 30 May 2014 21:55:28 +0000 (-0700) Subject: mesa: Fix error condition for valid texture targets in glTexStorage* functions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a94d78438d35cfde851596dff8461f1e739a0ddc;p=mesa.git mesa: Fix error condition for valid texture targets in glTexStorage* functions Fixes gles3 Khronos CTS test: texture_storage_texture_targets Cc: Signed-off-by: Anuj Phogat Reviewed-by: Jordan Justen --- diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c index 86c8f3c922d..44b5374fdbd 100644 --- a/src/mesa/main/texstorage.c +++ b/src/mesa/main/texstorage.c @@ -53,6 +53,13 @@ static GLboolean legal_texobj_target(struct gl_context *ctx, GLuint dims, GLenum target) { + if (_mesa_is_gles3(ctx) + && target != GL_TEXTURE_2D + && target != GL_TEXTURE_CUBE_MAP + && target != GL_TEXTURE_3D + && target != GL_TEXTURE_2D_ARRAY) + return GL_FALSE; + switch (dims) { case 1: switch (target) {