diff options
author | Neil Roberts <[email protected]> | 2015-02-04 10:20:12 -0500 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2017-11-06 16:08:58 -0500 |
commit | 8c0729fd99c8548ceaf40e273b809ce0a69d8a44 (patch) | |
tree | b3fad704126a6d599d1c2c2cfa3d5e49fbe8740b /src/mesa/drivers/dri/i915/intel_context.c | |
parent | 9ef7158a0985d789958eb43cf08476d50af00f2a (diff) |
intel: Don't flush the old context in intelMakeCurrent
It shouldn't be necessary to flush the context within the driver
implementation because the old context is explicitly flushed in
_mesa_make_current which is called a little further on. It is useful to
only have a single place that flushes when switching contexts to make it
easier to later implement the GL_KHR_context_flush_control extension.
The flush in intelMakeCurrent was added in commit 5505865 to implement
the GLX semantics that the context should be flushed when it is
released. When the commit was made there was no flush in
_mesa_make_current because it was only added later in 93102b4c. I think
that later commit effectively makes the first commit redundant.
Reviewed-by: Adam Jackson <[email protected]>
Reviewed-by: Emil Velikov <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Signed-off-by: Neil Roberts <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i915/intel_context.c')
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_context.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index e0766a0e3f3..96d09ca9472 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -626,21 +626,12 @@ intelMakeCurrent(__DRIcontext * driContextPriv, __DRIdrawable * driReadPriv) { struct intel_context *intel; - GET_CURRENT_CONTEXT(curCtx); if (driContextPriv) intel = (struct intel_context *) driContextPriv->driverPrivate; else intel = NULL; - /* According to the glXMakeCurrent() man page: "Pending commands to - * the previous context, if any, are flushed before it is released." - * But only flush if we're actually changing contexts. - */ - if (intel_context(curCtx) && intel_context(curCtx) != intel) { - _mesa_flush(curCtx); - } - if (driContextPriv) { struct gl_context *ctx = &intel->ctx; struct gl_framebuffer *fb, *readFb; |