checkpoint: intel_renderbuffer removal (intel_renderbuffer now == gl_renderbuffer
authorBrian <brian@i915.localnet.net>
Thu, 9 Aug 2007 16:52:03 +0000 (10:52 -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_fbo.c
src/mesa/drivers/dri/intel_winsys/intel_fbo.h

index 33e4b16a5cfa40b116a7cc441322e8d8f901b8a7..33fa4b9b40947fcc13fdd2b4645dafb83eb2157e 100644 (file)
@@ -102,7 +102,7 @@ intel_drawbuf_region(struct intel_context *intel)
    struct intel_renderbuffer *irbColor =
       intel_renderbuffer(intel->ctx.DrawBuffer->_ColorDrawBuffers[0][0]);
    if (irbColor)
-      return irbColor->region;
+      return irbColor->Base.surface->region;
    else
       return NULL;
 }
@@ -116,7 +116,7 @@ intel_readbuf_region(struct intel_context *intel)
    struct intel_renderbuffer *irb
       = intel_renderbuffer(intel->ctx.ReadBuffer->_ColorReadBuffer);
    if (irb)
-      return irb->region;
+      return irb->Base.surface->region;
    else
       return NULL;
 }
index 7b9bef73bda74914cd953b50d8d3410b317f03cf..c80fd69fdb12df491c2321799ac6b90e51fc460d 100644 (file)
@@ -117,7 +117,7 @@ intel_get_rb_region(struct gl_framebuffer *fb, GLuint attIndex)
    struct intel_renderbuffer *irb = intel_get_renderbuffer(fb, attIndex);
 
    if (irb)
-      return irb->region;
+      return irb->Base.surface->region;
    else
       return NULL;
 }
@@ -153,8 +153,8 @@ intel_delete_renderbuffer(struct gl_renderbuffer *rb)
       intel_unpair_depth_stencil(ctx, irb);
    }
 #endif
-   if (intel && irb->region) {
-      intel->pipe->region_release(intel->pipe, &irb->region);
+   if (intel && irb->Base.surface->region) {
+      intel->pipe->region_release(intel->pipe, &irb->Base.surface->region);
    }
 
    _mesa_free(irb);
@@ -265,8 +265,8 @@ intel_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
    intelFlush(ctx);
 
    /* free old region */
-   if (irb->region) {
-      intel->pipe->region_release(intel->pipe, &irb->region);
+   if (irb->Base.surface->region) {
+      intel->pipe->region_release(intel->pipe, &irb->Base.surface->region);
    }
 
    /* allocate new memory region/renderbuffer */
@@ -283,11 +283,11 @@ intel_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
       DBG("Allocating %d x %d Intel RBO (pitch %d)\n", width,
          height, pitch);
 
-      irb->region = intel->pipe->region_alloc(intel->pipe, cpp, pitch, height);
-      if (!irb->region)
+      irb->Base.surface->region = intel->pipe->region_alloc(intel->pipe, cpp, pitch, height);
+      if (!irb->Base.surface->region)
          return GL_FALSE;       /* out of memory? */
 
-      ASSERT(irb->region->buffer);
+      ASSERT(irb->Base.surface->region->buffer);
 
       rb->Width = width;
       rb->Height = height;
@@ -295,7 +295,7 @@ intel_alloc_renderbuffer_storage(GLcontext * ctx, struct gl_renderbuffer *rb,
       /* update the surface's size too */
       rb->surface->width = width;
       rb->surface->height = height;
-      rb->surface->region = irb->region;
+      rb->surface->region = irb->Base.surface->region;/*XXX no-op*/
 
       /* This sets the Get/PutRow/Value functions */
       //     intel_set_span_functions(&irb->Base);
@@ -605,7 +605,7 @@ intel_finish_render_texture(GLcontext * ctx,
 
    if (irb) {
       /* just release the region */
-      intel->pipe->region_release(intel->pipe, &irb->region);
+      intel->pipe->region_release(intel->pipe, &irb->Base.surface->region);
    }
    else if (att->Renderbuffer) {
       /* software fallback */
index 63afa6df896c553c8152f49a0a6ec694c730f40a..63d8e839c510d2672ebb5686c6d70c0516513dc8 100644 (file)
@@ -78,8 +78,9 @@ struct intel_framebuffer
 struct intel_renderbuffer
 {
    struct gl_renderbuffer Base;
-   struct pipe_region *region;
 #if 0
+   struct pipe_region *region;
+
    void *pfMap;                 /* possibly paged flipped map pointer */
    GLuint pfPitch;              /* possibly paged flipped pitch */
    GLboolean RenderToTexture;   /* RTT? */
@@ -90,9 +91,9 @@ struct intel_renderbuffer
    GLuint pf_pending;  /**< sequence number of pending flip */
 
    GLuint vbl_pending;   /**< vblank sequence number of pending flip */
-#endif
 
    struct intel_surface *surface;
+#endif
 };
 
 #if 0