mesa/st: Fix assertions.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 12 Oct 2012 16:02:55 +0000 (17:02 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 12 Oct 2012 16:04:34 +0000 (17:04 +0100)
Can't access ptDraw before it is written.

src/mesa/state_tracker/st_cb_drawpixels.c

index 121496a41cdbcdb146eb58297dff3c57f0789905..4e2edd2e7fd6e5112579ff9fb0de2dccce3be56c 100644 (file)
@@ -1241,8 +1241,8 @@ copy_stencil_pixels(struct gl_context *ctx, GLint srcx, GLint srcy,
       dsty = rbDraw->Base.Height - dsty - height;
    }
 
-   assert(util_format_get_blockwidth(ptDraw->resource->format) == 1);
-   assert(util_format_get_blockheight(ptDraw->resource->format) == 1);
+   assert(util_format_get_blockwidth(rbDraw->texture->format) == 1);
+   assert(util_format_get_blockheight(rbDraw->texture->format) == 1);
 
    /* map the stencil buffer */
    drawMap = pipe_transfer_map(pipe,