st/mesa: don't use util_blit_pixels_writemask() for depth or depth/stencil
authorBrian Paul <brianp@vmware.com>
Tue, 3 Nov 2009 16:30:20 +0000 (09:30 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 3 Nov 2009 16:48:04 +0000 (09:48 -0700)
util_blit_pixels_writemask() only works for color formats at this time.
Also, it might never work for depth/stencil surfaces since we can't get
handle stencil values in a fragment shader.

Fixes glCopyTexSubImage(GL_DEPTH_COMPONENT).

src/mesa/state_tracker/st_cb_texture.c

index e8e81ede005cc1a4774e0b9d460fc22385656d60..f45b3e60321294e64b30e84ce22cff8e1144c6b2 100644 (file)
@@ -1560,6 +1560,8 @@ st_copy_texsubimage(GLcontext *ctx,
          use_fallback = GL_FALSE;
       }
       else if (format_writemask &&
+               texBaseFormat != GL_DEPTH_COMPONENT &&
+               texBaseFormat != GL_DEPTH_STENCIL &&
                screen->is_format_supported(screen, src_format,
                                            PIPE_TEXTURE_2D, 
                                            PIPE_TEXTURE_USAGE_SAMPLER,