Remove third buffer support from Mesa.
authorDave Airlie <airlied@redhat.com>
Sat, 20 Dec 2008 01:38:23 +0000 (17:38 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 23 Dec 2008 23:01:53 +0000 (15:01 -0800)
This is part of the deprecated pageflipping infrastructure.

src/mesa/drivers/dri/intel/intel_buffers.c
src/mesa/drivers/dri/intel/intel_context.c
src/mesa/drivers/dri/intel/intel_context.h
src/mesa/drivers/dri/intel/intel_regions.c
src/mesa/drivers/dri/intel/intel_screen.c
src/mesa/drivers/dri/intel/intel_screen.h

index f8f009c6a30c3b8154deb00066944f54fcaf355a..4d036dee42e9858988bec91939b6f757c564de1e 100644 (file)
@@ -181,7 +181,7 @@ intelUpdatePageFlipping(struct intel_context *intel,
    intel_fb->pf_current_page = (intel->sarea->pf_current_page >>
                                (intel_fb->pf_planes & 0x2)) & 0x3;
 
-   intel_fb->pf_num_pages = intel->intelScreen->third.handle ? 3 : 2;
+   intel_fb->pf_num_pages = 2;
 
    pf_active = pf_planes && (pf_planes & intel->sarea->pf_active) == pf_planes;
 
index 6c625b428c0144c5de4eda35e4533bcc510a8aa0..6ff98e9c525131ada3f6fe2da24d1c8b37f3fbfd 100644 (file)
@@ -775,7 +775,6 @@ intelDestroyContext(__DRIcontextPrivate * driContextPriv)
 
       intel_region_release(&intel->front_region);
       intel_region_release(&intel->back_region);
-      intel_region_release(&intel->third_region);
       intel_region_release(&intel->depth_region);
 
       driDestroyOptionCache(&intel->optionCache);
@@ -825,12 +824,7 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
            intel_renderbuffer_set_region(intel_fb->color_rb[1],
                                          intel->back_region);
          }
-#if 0
-         if (intel_fb->color_rb[2]) {
-           intel_renderbuffer_set_region(intel_fb->color_rb[2],
-                                         intel->third_region);
-         }
-#endif
+
          if (irbDepth) {
            intel_renderbuffer_set_region(irbDepth, intel->depth_region);
          }
@@ -867,7 +861,7 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
               driDrawableInitVBlank(driDrawPriv);
               intel_fb->vbl_waited = driDrawPriv->vblSeq;
 
-              for (i = 0; i < (intel->intelScreen->third.handle ? 3 : 2); i++) {
+              for (i = 0; i < 2; i++) {
                  if (intel_fb->color_rb[i])
                     intel_fb->color_rb[i]->vbl_pending = driDrawPriv->vblSeq;
               }
index ee43ed7e83346cecf8b06b9590ad4cd16d37032c..ac08117bb4c084c569661e0339514444819e80ff 100644 (file)
@@ -166,7 +166,6 @@ struct intel_context
 
    struct intel_region *front_region;
    struct intel_region *back_region;
-   struct intel_region *third_region;
    struct intel_region *depth_region;
 
    /**
index 8dbcc3050eef81966ef761779681583a6dafbf44..51ce32a96796325ae21dd25fa701f862b547fbbd 100644 (file)
@@ -550,15 +550,6 @@ intel_recreate_static_regions(struct intel_context *intel)
                            intel->back_region,
                            &intelScreen->back);
 
-#ifdef I915
-   if (intelScreen->third.handle) {
-      intel->third_region =
-        intel_recreate_static(intel, "third",
-                              intel->third_region,
-                              &intelScreen->third);
-   }
-#endif /* I915 */
-
    /* Still assumes front.cpp == depth.cpp.  We can kill this when we move to
     * private buffers.
     */
index 61b55b97b51067f1cc5b9b47973a87eb210a9c66..fc4e82b56c9ec5a43ee861b2dd2a55c2283cab7f 100644 (file)
@@ -177,13 +177,6 @@ intelUpdateScreenFromSAREA(intelScreenPrivate * intelScreen,
    intelScreen->back.size = sarea->back_size;
    intelScreen->back.tiled = sarea->back_tiled;
 
-   if (intelScreen->driScrnPriv->ddx_version.minor >= 8) {
-      intelScreen->third.offset = sarea->third_offset;
-      intelScreen->third.handle = sarea->third_handle;
-      intelScreen->third.size = sarea->third_size;
-      intelScreen->third.tiled = sarea->third_tiled;
-   }
-
    intelScreen->depth.offset = sarea->depth_offset;
    intelScreen->depth.handle = sarea->depth_handle;
    intelScreen->depth.size = sarea->depth_size;
@@ -192,12 +185,10 @@ intelUpdateScreenFromSAREA(intelScreenPrivate * intelScreen,
    if (intelScreen->driScrnPriv->ddx_version.minor >= 9) {
       intelScreen->front.bo_handle = sarea->front_bo_handle;
       intelScreen->back.bo_handle = sarea->back_bo_handle;
-      intelScreen->third.bo_handle = sarea->third_bo_handle;
       intelScreen->depth.bo_handle = sarea->depth_bo_handle;
    } else {
       intelScreen->front.bo_handle = -1;
       intelScreen->back.bo_handle = -1;
-      intelScreen->third.bo_handle = -1;
       intelScreen->depth.bo_handle = -1;
    }
 
@@ -353,12 +344,6 @@ intelCreateBuffer(__DRIscreenPrivate * driScrnPriv,
          _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_BACK_LEFT,
                                &intel_fb->color_rb[1]->Base);
 
-        if (screen->third.handle) {
-           struct gl_renderbuffer *tmp_rb = NULL;
-
-           intel_fb->color_rb[2] = intel_create_renderbuffer(rgbFormat);
-           _mesa_reference_renderbuffer(&tmp_rb, &intel_fb->color_rb[2]->Base);
-        }
       }
 
       if (mesaVis->depthBits == 24) {
index 91f0d6d1ae8c8b88540aefa3988fcabc4428a923..cf5359baaebfe1c3ecf4d2a658e8de04f47d15c0 100644 (file)
@@ -56,7 +56,6 @@ typedef struct
 {
    intelRegion front;
    intelRegion back;
-   intelRegion third;
    intelRegion depth;
    intelRegion tex;