Mesa (master): intel: Remove remaining dri2.enabled tests

Kristian Høgsberg krh at kemper.freedesktop.org
Tue Jan 5 15:32:15 UTC 2010


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

Author: Kristian Høgsberg <krh at bitplanet.net>
Date:   Fri Jan  1 23:26:03 2010 -0500

intel: Remove remaining dri2.enabled tests

---

 src/mesa/drivers/dri/intel/intel_context.c |   10 ----------
 src/mesa/drivers/dri/intel/intel_screen.c  |   17 -----------------
 2 files changed, 0 insertions(+), 27 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 046daed..13a28f0 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -389,9 +389,6 @@ intel_viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
     void (*old_viewport)(GLcontext *ctx, GLint x, GLint y,
 			 GLsizei w, GLsizei h);
 
-    if (!driContext->driScreenPriv->dri2.enabled)
-	return;
-
     if (!intel->meta.internal_viewport_call && ctx->DrawBuffer->Name == 0) {
        /* If we're rendering to the fake front buffer, make sure all the pending
 	* drawing has landed on the real front buffer.  Otherwise when we
@@ -475,13 +472,6 @@ intel_flush(GLcontext *ctx, GLboolean needs_mi_flush)
    if (intel->gen < 4)
       INTEL_FIREVERTICES(intel);
 
-   /* Emit a flush so that any frontbuffer rendering that might have occurred
-    * lands onscreen in a timely manner, even if the X Server doesn't trigger
-    * a flush for us.
-    */
-   if (!intel->driScreen->dri2.enabled && needs_mi_flush)
-      intel_batchbuffer_emit_mi_flush(intel->batch);
-
    if (intel->batch->map != intel->batch->ptr)
       intel_batchbuffer_flush(intel->batch);
 
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
index e735bdf..742fd43 100644
--- a/src/mesa/drivers/dri/intel/intel_screen.c
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
@@ -278,28 +278,11 @@ intelCreateContext(const __GLcontextModes * mesaVis,
 static GLboolean
 intel_init_bufmgr(intelScreenPrivate *intelScreen)
 {
-   int gem_kernel = 0;
-   struct drm_i915_getparam gp;
    __DRIscreen *spriv = intelScreen->driScrnPriv;
    int num_fences = 0;
 
    intelScreen->no_hw = getenv("INTEL_NO_HW") != NULL;
 
-   gp.param = I915_PARAM_HAS_GEM;
-   gp.value = &gem_kernel;
-
-   (void) drmCommandWriteRead(spriv->fd, DRM_I915_GETPARAM, &gp, sizeof(gp));
-
-   /* If we've got a new enough DDX that's initializing GEM and giving us
-    * object handles for the shared buffers, use that.
-    */
-   if (!intelScreen->driScrnPriv->dri2.enabled &&
-       intelScreen->driScrnPriv->ddx_version.minor < 9) {
-      fprintf(stderr, "[%s:%u] Error initializing GEM.\n",
-	      __func__, __LINE__);
-      return GL_FALSE;
-   }
-
    intelScreen->bufmgr = intel_bufmgr_gem_init(spriv->fd, BATCH_SZ);
    /* Otherwise, use the classic buffer manager. */
    if (intelScreen->bufmgr == NULL) {




More information about the mesa-commit mailing list