Mesa (master): mesa/st: Fix assertions.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Oct 12 16:05:53 UTC 2012


Module: Mesa
Branch: master
Commit: 23c6b8f2edc42a483148c3d7357331bccf1edd11
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=23c6b8f2edc42a483148c3d7357331bccf1edd11

Author: José Fonseca <jfonseca at vmware.com>
Date:   Fri Oct 12 17:02:55 2012 +0100

mesa/st: Fix assertions.

Can't access ptDraw before it is written.

---

 src/mesa/state_tracker/st_cb_drawpixels.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 121496a..4e2edd2 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -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,




More information about the mesa-commit mailing list