summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-01-16 15:34:26 -0800
committerIan Romanick <[email protected]>2013-01-17 10:47:42 -0800
commit311cc5d973115465cb7b0e272702e14124478ded (patch)
tree92d940665986f26b4862fbb19f1902e81391966a
parent57ddf1227fffbfda52c9310f9092c036ad4558b6 (diff)
mesa: Don't allow DEPTH_STENCIL for 3D textures
Just like DEPTH_COMPONENT. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
-rw-r--r--src/mesa/main/teximage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 5e451e235d4..99b145ef77d 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2006,7 +2006,8 @@ texture_error_check( struct gl_context *ctx,
}
/* additional checks for depth textures */
- if (_mesa_base_tex_format(ctx, internalFormat) == GL_DEPTH_COMPONENT) {
+ if (_mesa_base_tex_format(ctx, internalFormat) == GL_DEPTH_COMPONENT
+ || _mesa_base_tex_format(ctx, internalFormat) == GL_DEPTH_STENCIL) {
/* Only 1D, 2D, rect, array and cube textures supported, not 3D
* Cubemaps are only supported for GL version > 3.0 or with EXT_gpu_shader4 */
if (target != GL_TEXTURE_1D &&