OSDN Git Service

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 121496a..4e2edd2 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,