summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-11-19 00:24:40 +0100
committerMarek Olšák <[email protected]>2017-11-25 17:16:56 +0100
commite5148791f65cef066fb20fb44f90fb53f7308f80 (patch)
tree18eaf7eb1609ade58d9a37ad72caee7e044c37bf /src/gallium/state_trackers
parent6ad83b58e28cbcc84fc7d70b7a52eb3f2f803450 (diff)
st/dri: remove dead code and incorrect comment around make_current
Core Mesa already handles flushing based on ContextReleaseBehavior, so the comment is wrong. Also, old_st is always NULL, because unbind_context always precedes make_current. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/dri/dri_context.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/gallium/state_trackers/dri/dri_context.c b/src/gallium/state_trackers/dri/dri_context.c
index f5400ab21e6..d123f9c5534 100644
--- a/src/gallium/state_trackers/dri/dri_context.c
+++ b/src/gallium/state_trackers/dri/dri_context.c
@@ -236,11 +236,6 @@ dri_unbind_context(__DRIcontext * cPriv)
if (st->thread_finish)
st->thread_finish(st);
- /* For conformance, unbind is supposed to flush the context.
- * However, if we do it here we might end up flushing a partially
- * destroyed context. Instead, we flush in dri_make_current and
- * in dri_destroy_context which should cover all the cases.
- */
stapi->make_current(stapi, NULL, NULL, NULL);
}
}
@@ -257,14 +252,6 @@ dri_make_current(__DRIcontext * cPriv,
struct dri_context *ctx = dri_context(cPriv);
struct dri_drawable *draw = dri_drawable(driDrawPriv);
struct dri_drawable *read = dri_drawable(driReadPriv);
- struct st_context_iface *old_st = ctx->stapi->get_current(ctx->stapi);
-
- if (old_st && old_st->thread_finish)
- old_st->thread_finish(old_st);
-
- /* Flush the old context here so we don't have to flush on unbind() */
- if (old_st && old_st != ctx->st)
- old_st->flush(old_st, ST_FLUSH_FRONT, NULL);
++ctx->bind_count;