diff options
author | Michel Dänzer <[email protected]> | 2008-05-27 17:00:59 +0100 |
---|---|---|
committer | Michel Dänzer <[email protected]> | 2008-05-27 17:00:59 +0100 |
commit | 44a7bd0019b9af9ff01336df0aa6eb206f5dc2e9 (patch) | |
tree | 774036025e34b940818b6ac9f3948478f41e2567 /src/mesa | |
parent | f172148c6e3246ffd7c3a33f16d2ac6faca9d6cf (diff) |
gallium: Always unreference bitmap cache texture before resetting the cache.
Fixes assertion failure with tunnel2 demo.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_cb_bitmap.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index 3a102df67f1..593938f8cf5 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -567,8 +567,9 @@ void st_flush_bitmap_cache(struct st_context *st) { if (!st->bitmap.cache->empty) { + struct bitmap_cache *cache = st->bitmap.cache; + if (st->ctx->DrawBuffer) { - struct bitmap_cache *cache = st->bitmap.cache; struct pipe_context *pipe = st->pipe; struct pipe_screen *screen = pipe->screen; @@ -592,10 +593,11 @@ st_flush_bitmap_cache(struct st_context *st) st->ctx->Current.RasterPos[2], BITMAP_CACHE_WIDTH, BITMAP_CACHE_HEIGHT, cache->texture); - - /* release/free the texture */ - pipe_texture_reference(&cache->texture, NULL); } + + /* release/free the texture */ + pipe_texture_reference(&cache->texture, NULL); + reset_cache(st); } } |