mesa: Don't allow DEPTH_STENCIL for 3D textures
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 16 Jan 2013 23:34:26 +0000 (15:34 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Thu, 17 Jan 2013 18:47:42 +0000 (10:47 -0800)
Just like DEPTH_COMPONENT.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/teximage.c

index 5e451e235d47df5da4923469ef8935e1a233e076..99b145ef77da5a82c13934a27fd400f0e559ec07 100644 (file)
@@ -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 &&