summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian <brian@i915.localnet.net>2007-08-09 11:11:11 -0600
committerBrian <brian@i915.localnet.net>2007-08-09 14:26:31 -0600
commit334d3650a95786a7f4e8212eb84fe9cf70206d8f (patch)
tree4bdc4eaa91e4ce924b095d2c5cc1431b636f80ec
parentd177a00e5bcf6bffb3fc0810b720d8534995c752 (diff)
checkpoint: more intel_renderbuffer removal
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_blit.c17
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_buffers.c6
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_fbo.c5
3 files changed, 27 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_blit.c b/src/mesa/drivers/dri/intel_winsys/intel_blit.c
index 8e878f0088..7e30c7d034 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_blit.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_blit.c
@@ -86,20 +86,37 @@ intelCopyBuffer(__DRIdrawablePrivate * dPriv,
if (dPriv && dPriv->numClipRects) {
struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
+#if 0
const struct pipe_region *backRegion
= intel_fb->Base._ColorDrawBufferMask[0] == BUFFER_BIT_FRONT_LEFT ?
intel_get_rb_region(&intel_fb->Base, BUFFER_FRONT_LEFT) :
intel_get_rb_region(&intel_fb->Base, BUFFER_BACK_LEFT);
+#endif
const int backWidth = intel_fb->Base.Width;
const int backHeight = intel_fb->Base.Height;
const int nbox = dPriv->numClipRects;
const drm_clip_rect_t *pbox = dPriv->pClipRects;
const int pitch = intelScreen->front.pitch / intelScreen->front.cpp;
+#if 0
const int srcpitch = backRegion->pitch;
+#endif
const int cpp = intelScreen->front.cpp;
int BR13, CMD;
int i;
+ const struct pipe_surface *backSurf;
+ const struct pipe_region *backRegion;
+ int srcpitch;
+
+ /* blit from back color buffer if it exists, else front buffer */
+ if (intel_fb->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer)
+ backSurf = intel_fb->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer->surface;
+ else
+ backSurf = intel_fb->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer->surface;
+
+ backRegion = backSurf->region;
+ srcpitch = backRegion->pitch;
+
ASSERT(intel_fb);
ASSERT(intel_fb->Base.Name == 0); /* Not a user-created FBO */
ASSERT(backRegion);
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_buffers.c b/src/mesa/drivers/dri/intel_winsys/intel_buffers.c
index 33fa4b9b40..c4db446788 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_buffers.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_buffers.c
@@ -217,8 +217,10 @@ intelWindowMoved(struct intel_context *intel)
}
intel_fb->pf_active = pf_active;
+#if 0
intel_flip_renderbuffers(intel_fb);
intel_draw_buffer(&intel->ctx, intel->ctx.DrawBuffer);
+#endif
/* Update vblank info
*/
@@ -359,8 +361,10 @@ intelPageFlip(const __DRIdrawablePrivate * dPriv)
++intel_fb->pf_seq;
}
+#if 0
intel_flip_renderbuffers(intel_fb);
intel_draw_buffer(&intel->ctx, &intel_fb->Base);
+#endif
if (INTEL_DEBUG & DEBUG_IOCTL)
fprintf(stderr, "%s: success\n", __FUNCTION__);
@@ -430,8 +434,10 @@ intelScheduleSwap(const __DRIdrawablePrivate * dPriv, GLboolean *missed_target)
#endif
if (swap.seqtype & DRM_VBLANK_FLIP) {
+#if 0
intel_flip_renderbuffers(intel_fb);
intel_draw_buffer(&intel->ctx, intel->ctx.DrawBuffer);
+#endif
}
ret = GL_TRUE;
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_fbo.c b/src/mesa/drivers/dri/intel_winsys/intel_fbo.c
index c80fd69fdb..ff786de1e3 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_fbo.c
@@ -74,7 +74,7 @@ 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)
{
@@ -109,6 +109,7 @@ intel_flip_renderbuffers(struct intel_framebuffer *intel_fb)
_mesa_reference_renderbuffer(&tmp_rb, NULL);
}
}
+#endif
struct pipe_region *
@@ -321,6 +322,7 @@ intel_resize_buffers(GLcontext *ctx, struct gl_framebuffer *fb,
}
/* Make sure all window system renderbuffers are up to date */
+#if 0
for (i = 0; i < 3; i++) {
struct gl_renderbuffer *rb = &intel_fb->color_rb[i]->Base;
@@ -329,6 +331,7 @@ intel_resize_buffers(GLcontext *ctx, struct gl_framebuffer *fb,
rb->AllocStorage(ctx, rb, rb->InternalFormat, width, height);
}
}
+#endif
}
static GLboolean