Mesa (master): intel: Remove silly check for !bufmgr.

Eric Anholt anholt at kemper.freedesktop.org
Fri Oct 11 00:12:06 UTC 2013


Module: Mesa
Branch: master
Commit: 18a8f31070def704ad65c86166eaadc6e1c3349c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=18a8f31070def704ad65c86166eaadc6e1c3349c

Author: Eric Anholt <eric at anholt.net>
Date:   Thu Sep 26 16:57:17 2013 -0700

intel: Remove silly check for !bufmgr.

If bufmgr didn't get created, then screen creation failed, and we never
should have got here in the first place.  This was added by Chris Wilson
in 2010 with no explanation for why it would be needed.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i915/intel_context.c |    6 ------
 src/mesa/drivers/dri/i965/intel_context.c |    6 ------
 2 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c
index aff51e8..d25358b 100644
--- a/src/mesa/drivers/dri/i915/intel_context.c
+++ b/src/mesa/drivers/dri/i915/intel_context.c
@@ -385,12 +385,6 @@ intelInitContext(struct intel_context *intel,
    int bo_reuse_mode;
    struct gl_config visual;
 
-   /* we can't do anything without a connection to the device */
-   if (intelScreen->bufmgr == NULL) {
-      *dri_ctx_error = __DRI_CTX_ERROR_NO_MEMORY;
-      return false;
-   }
-
    /* Can't rely on invalidate events, fall back to glViewport hack */
    if (!driContextPriv->driScreenPriv->dri2.useInvalidate) {
       intel->saved_viewport = functions->Viewport;
diff --git a/src/mesa/drivers/dri/i965/intel_context.c b/src/mesa/drivers/dri/i965/intel_context.c
index 7526b38..3eb5b8b 100644
--- a/src/mesa/drivers/dri/i965/intel_context.c
+++ b/src/mesa/drivers/dri/i965/intel_context.c
@@ -412,12 +412,6 @@ intelInitContext(struct brw_context *brw,
    int bo_reuse_mode;
    struct gl_config visual;
 
-   /* we can't do anything without a connection to the device */
-   if (intelScreen->bufmgr == NULL) {
-      *dri_ctx_error = __DRI_CTX_ERROR_NO_MEMORY;
-      return false;
-   }
-
    /* Can't rely on invalidate events, fall back to glViewport hack */
    if (!driContextPriv->driScreenPriv->dri2.useInvalidate) {
       brw->saved_viewport = functions->Viewport;




More information about the mesa-commit mailing list