summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstorage.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-12-18 14:38:16 -0800
committerIan Romanick <[email protected]>2014-01-27 14:21:43 -0700
commitaf0b34783e4e4f2a5d03444738a785f15bbb755b (patch)
treefab574383b7b5eac11da6415b5285763632b92ed /src/mesa/main/texstorage.c
parent421b5958eb53fa3558b7be80f3f63aa77d49c336 (diff)
mesa: Validate internalFormat with target in glTexStorage paths
Fixes the glTexStorage3D failure in ext_packed_depth_stencil-depth-stencil-texture and oes_packed_depth_stencil-depth-stencil-texture_gles2. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/texstorage.c')
-rw-r--r--src/mesa/main/texstorage.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/texstorage.c b/src/mesa/main/texstorage.c
index 22208572f51..c1d2a5a6b77 100644
--- a/src/mesa/main/texstorage.c
+++ b/src/mesa/main/texstorage.c
@@ -332,6 +332,11 @@ tex_storage_error_check(struct gl_context *ctx, GLuint dims, GLenum target,
return GL_TRUE;
}
+ /* additional checks for depth textures */
+ if (!_mesa_legal_texture_base_format_for_target(ctx, target, internalformat,
+ dims, "glTexStorage"))
+ return GL_TRUE;
+
return GL_FALSE;
}