remove color_rb[] and lots of dead code
authorBrian <brian@i915.localnet.net>
Thu, 9 Aug 2007 17:30:40 +0000 (11:30 -0600)
committerBrian <brian@i915.localnet.net>
Thu, 9 Aug 2007 20:26:31 +0000 (14:26 -0600)
src/mesa/drivers/dri/intel_winsys/intel_buffers.c
src/mesa/drivers/dri/intel_winsys/intel_context.c
src/mesa/drivers/dri/intel_winsys/intel_fbo.c
src/mesa/drivers/dri/intel_winsys/intel_fbo.h
src/mesa/drivers/dri/intel_winsys/intel_screen.c

index c4db4467881f530ecf414a63c0364fe7c60fb591..9266fb62affb5713cbfcd2d199b41fe3f1f9978c 100644 (file)
@@ -242,9 +242,7 @@ intelWindowMoved(struct intel_context *intel)
         }
 
         for (i = 0; i < intel_fb->pf_num_pages; i++) {
-           if (!intel_fb->color_rb[i] ||
-               (intel_fb->vbl_waited - intel_fb->vbl_pending[i]) <=
-               (1<<23))
+           if ((intel_fb->vbl_waited - intel_fb->vbl_pending[i]) <= (1<<23))
               continue;
 
            vbl.request.sequence = intel_fb->vbl_pending[i];
@@ -256,8 +254,7 @@ intelWindowMoved(struct intel_context *intel)
         intel_fb->vbl_waited = intel_fb->vbl_seq;
 
         for (i = 0; i < intel_fb->pf_num_pages; i++) {
-           if (intel_fb->color_rb[i])
-              intel_fb->vbl_pending[i] = intel_fb->vbl_waited;
+            intel_fb->vbl_pending[i] = intel_fb->vbl_waited;
         }
       }
    }
index 5c184d5c8d7f78cdf5d0e765f22fa1c813afd353..9defcc1aaec8efbfac9d276cd15ea3f3cb280296 100644 (file)
@@ -574,12 +574,7 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
               intel_fb->vbl_waited = intel_fb->vbl_seq;
 
               for (i = 0; i < 2; i++) {
-#if 1
                   intel_fb->vbl_pending[i] = intel_fb->vbl_seq;
-#else
-                 if (intel_fb->color_rb[i])
-                    intel_fb->color_rb[i]->vbl_pending = intel_fb->vbl_seq;
-#endif
               }
            }
         }
index 5382ab342c7eaa17cd0fd8185cc34af811db6aea..3dd99747da93f1542be9ce0241dc53f67c311d03 100644 (file)
@@ -68,64 +68,6 @@ intel_renderbuffer(struct gl_renderbuffer *rb)
 }
 
 
-struct intel_renderbuffer *
-intel_get_renderbuffer(struct gl_framebuffer *fb, GLuint attIndex)
-{
-   return intel_renderbuffer(fb->Attachment[attIndex].Renderbuffer);
-}
-
-#if 0
-void
-intel_flip_renderbuffers(struct intel_framebuffer *intel_fb)
-{
-   int current_page = intel_fb->pf_current_page;
-   int next_page = (current_page + 1) % intel_fb->pf_num_pages;
-   struct gl_renderbuffer *tmp_rb;
-
-   /* Exchange renderbuffers if necessary but make sure their reference counts
-    * are preserved.
-    */
-   if (intel_fb->color_rb[current_page] &&
-       intel_fb->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer !=
-       &intel_fb->color_rb[current_page]->Base) {
-      tmp_rb = NULL;
-      _mesa_reference_renderbuffer(&tmp_rb,
-        intel_fb->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
-      tmp_rb = &intel_fb->color_rb[current_page]->Base;
-      _mesa_reference_renderbuffer(
-        &intel_fb->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer, tmp_rb);
-      _mesa_reference_renderbuffer(&tmp_rb, NULL);
-   }
-
-   if (intel_fb->color_rb[next_page] &&
-       intel_fb->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer !=
-       &intel_fb->color_rb[next_page]->Base) {
-      tmp_rb = NULL;
-      _mesa_reference_renderbuffer(&tmp_rb,
-        intel_fb->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer);
-      tmp_rb = &intel_fb->color_rb[next_page]->Base;
-      _mesa_reference_renderbuffer(
-        &intel_fb->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer, tmp_rb);
-      _mesa_reference_renderbuffer(&tmp_rb, NULL);
-   }
-}
-#endif
-
-
-#if 0
-struct pipe_region *
-intel_get_rb_region(struct gl_framebuffer *fb, GLuint attIndex)
-{
-   struct intel_renderbuffer *irb = intel_get_renderbuffer(fb, attIndex);
-
-   if (irb)
-      return irb->Base.surface->region;
-   else
-      return NULL;
-}
-#endif
-
-
 /**
  * Create a new framebuffer object.
  */
index 63d8e839c510d2672ebb5686c6d70c0516513dc8..578e1013c2dc1b13d8ae571a5f00907d0b26368f 100644 (file)
@@ -44,8 +44,6 @@ struct intel_framebuffer
 {
    struct gl_framebuffer Base;
 
-   struct intel_renderbuffer *color_rb[3];
-
    /* Drawable page flipping state */
    GLboolean pf_active;
    GLuint pf_seq;
@@ -78,53 +76,14 @@ struct intel_framebuffer
 struct intel_renderbuffer
 {
    struct gl_renderbuffer Base;
-#if 0
-   struct pipe_region *region;
-
-   void *pfMap;                 /* possibly paged flipped map pointer */
-   GLuint pfPitch;              /* possibly paged flipped pitch */
-   GLboolean RenderToTexture;   /* RTT? */
-
-   GLuint PairedDepth;   /**< only used if this is a depth renderbuffer */
-   GLuint PairedStencil; /**< only used if this is a stencil renderbuffer */
-
-   GLuint pf_pending;  /**< sequence number of pending flip */
-
-   GLuint vbl_pending;   /**< vblank sequence number of pending flip */
-
-   struct intel_surface *surface;
-#endif
 };
 
-#if 0
-extern struct intel_renderbuffer *intel_create_renderbuffer(GLenum intFormat,
-                                                            GLsizei width,
-                                                            GLsizei height,
-                                                            int offset,
-                                                            int pitch,
-                                                            int cpp,
-                                                            void *map);
-#endif
 
 extern struct intel_renderbuffer *intel_new_renderbuffer_fb(GLuint intFormat);
 
 extern void intel_fbo_init(struct intel_context *intel);
 
 
-/* XXX make inline or macro */
-extern struct intel_renderbuffer *intel_get_renderbuffer(struct gl_framebuffer
-                                                         *fb,
-                                                         GLuint attIndex);
-
-extern void intel_flip_renderbuffers(struct intel_framebuffer *intel_fb);
-
-
-/* XXX make inline or macro */
-extern struct pipe_region *intel_get_rb_region(struct gl_framebuffer *fb,
-                                                GLuint attIndex);
-
-
-
 extern struct pipe_surface *
 intel_new_surface(GLuint intFormat);
 
index fba0c47e598b3e08db986a0d0f4154fe0f671882..74cd714cf340984270214d5c46358b2d4c7b137e 100644 (file)
@@ -302,24 +302,17 @@ intelCreateBuffer(__DRIscreenPrivate * driScrnPriv,
         /* fake frontbuffer */
         /* XXX allocation should only happen in the unusual case
             it's actually needed */
-         intel_fb->color_rb[0]
+         struct intel_renderbuffer *irb 
             = intel_new_renderbuffer_fb(rgbFormat);
          _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_FRONT_LEFT,
-                               &intel_fb->color_rb[0]->Base);
+                               &irb->Base);
       }
 
       if (mesaVis->doubleBufferMode) {
-#if 01
-         intel_fb->color_rb[1]
+         struct intel_renderbuffer *irb 
             = intel_new_renderbuffer_fb(rgbFormat);
          _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_BACK_LEFT,
-                               &intel_fb->color_rb[1]->Base);
-#else
-         intel_fb->color_rb[1]
-            = st_new_renderbuffer_fb(rgbFormat);
-         _mesa_add_renderbuffer(&intel_fb->Base, BUFFER_BACK_LEFT,
-                               &intel_fb->color_rb[1]->Base);
-#endif
+                               &irb->Base);
       }
 
       if (mesaVis->depthBits == 24 && mesaVis->stencilBits == 8) {