summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorAnuj Phogat <[email protected]>2014-05-30 14:55:28 -0700
committerAnuj Phogat <[email protected]>2014-08-04 17:10:48 -0700
commita94d78438d35cfde851596dff8461f1e739a0ddc (patch)
tree3fad672bd37de43c7464ab85db175422da253f5d /src/mesa/main
parent7b1898314709e3e70571c491f7f62745c05e13e1 (diff)
mesa: Fix error condition for valid texture targets in glTexStorage* functions
Fixes gles3 Khronos CTS test: texture_storage_texture_targets Cc: <[email protected]> Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/texstorage.c7
1 files changed, 7 insertions, 0 deletions
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) {