[Mesa-dev] [PATCH] st/dri: Remove useless flush front.
Stéphane Marchesin
marcheu at chromium.org
Tue Jan 10 19:35:37 PST 2012
In the following scenario:
- CreateContext C1
- MakeCurrent C1
- DestroyContext C1 (does not actually destroy the first context, postponed
until the next MakeCurrent)
- CreateContext C2
- MakeCurrent C2
MakeCurrent will call flush on a context which might not even have had a front
buffer, leading to crashes. Since none of the dri drivers use the flush in
their unbind_context implementation either, we remove this useless flush front
call.
This fixes GPU crashes with Chrome and gallium drivers.
---
.../state_trackers/dri/common/dri_context.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/src/gallium/state_trackers/dri/common/dri_context.c b/src/gallium/state_trackers/dri/common/dri_context.c
index b47d8d9..226c630 100644
--- a/src/gallium/state_trackers/dri/common/dri_context.c
+++ b/src/gallium/state_trackers/dri/common/dri_context.c
@@ -188,7 +188,6 @@ dri_unbind_context(__DRIcontext * cPriv)
if (--ctx->bind_count == 0) {
if (ctx->st == ctx->stapi->get_current(ctx->stapi)) {
- ctx->st->flush(ctx->st, ST_FLUSH_FRONT, NULL);
stapi->make_current(stapi, NULL, NULL, NULL);
}
}
--
1.7.5.3.367.ga9930
More information about the mesa-dev
mailing list