mesa: Take the format from the right structure.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 11 Jun 2009 11:23:09 +0000 (12:23 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 11 Jun 2009 11:23:09 +0000 (12:23 +0100)
src/mesa/state_tracker/st_cb_drawpixels.c

index 588daf79b211fae9b5ee084293055803b1a048ed..b674e6b74a16a56bf810d93b59976e950828d726 100644 (file)
@@ -840,7 +840,7 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
                           GL_STENCIL_INDEX, GL_UNSIGNED_BYTE,
                           &ctx->DefaultPacking, buffer);
 
-   if(pf_get_component_bits( ptDraw->format, PIPE_FORMAT_COMP_Z ) != 0)
+   if(pf_get_component_bits( rbDraw->format, PIPE_FORMAT_COMP_Z ) != 0)
       usage = PIPE_TRANSFER_READ_WRITE;
    else
       usage = PIPE_TRANSFER_WRITE;