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:
parent
d28a2004b8
commit
985134211d
|
@ -547,6 +547,7 @@ void
|
||||||
st_flush_bitmap_cache(struct st_context *st)
|
st_flush_bitmap_cache(struct st_context *st)
|
||||||
{
|
{
|
||||||
if (!st->bitmap.cache->empty) {
|
if (!st->bitmap.cache->empty) {
|
||||||
|
if (st->ctx->DrawBuffer) {
|
||||||
struct bitmap_cache *cache = st->bitmap.cache;
|
struct bitmap_cache *cache = st->bitmap.cache;
|
||||||
struct pipe_context *pipe = st->pipe;
|
struct pipe_context *pipe = st->pipe;
|
||||||
struct pipe_screen *screen = pipe->screen;
|
struct pipe_screen *screen = pipe->screen;
|
||||||
|
@ -577,6 +578,7 @@ st_flush_bitmap_cache(struct st_context *st)
|
||||||
BITMAP_CACHE_WIDTH, BITMAP_CACHE_HEIGHT,
|
BITMAP_CACHE_WIDTH, BITMAP_CACHE_HEIGHT,
|
||||||
cache->texture);
|
cache->texture);
|
||||||
|
|
||||||
|
}
|
||||||
reset_cache(st);
|
reset_cache(st);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue