gallium: check ctx->DrawBuffer before flushing bitmap cache.
During context unbind, we may not have a draw buffer. This fixes demos/tunnel2.c
This commit is contained in:
@@ -547,6 +547,7 @@ void
|
||||
st_flush_bitmap_cache(struct st_context *st)
|
||||
{
|
||||
if (!st->bitmap.cache->empty) {
|
||||
if (st->ctx->DrawBuffer) {
|
||||
struct bitmap_cache *cache = st->bitmap.cache;
|
||||
struct pipe_context *pipe = st->pipe;
|
||||
struct pipe_screen *screen = pipe->screen;
|
||||
@@ -577,6 +578,7 @@ st_flush_bitmap_cache(struct st_context *st)
|
||||
BITMAP_CACHE_WIDTH, BITMAP_CACHE_HEIGHT,
|
||||
cache->texture);
|
||||
|
||||
}
|
||||
reset_cache(st);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user