struct pipe_surface *surf,
const drm_clip_rect_t * rect)
{
-
struct intel_context *intel;
- const intelScreenPrivate *intelScreen;
+ const intelScreenPrivate *intelScreen
+ = (intelScreenPrivate *) dPriv->driScreenPriv->private;
DBG(SWAP, "%s\n", __FUNCTION__);
if (!intel)
return;
- intelScreen = intel->intelScreen;
-
if (intel->last_swap_fence) {
driFenceFinish(intel->last_swap_fence, DRM_FENCE_TYPE_EXE, GL_TRUE);
driFenceUnReference(intel->last_swap_fence);
if (dPriv && dPriv->numClipRects) {
- struct intel_framebuffer *intel_fb = dPriv->driverPrivate;
- const int backWidth = intel_fb->Base.Width;
- const int backHeight = intel_fb->Base.Height;
+ const int srcWidth = surf->width;
+ const int srcHeight = surf->height;
const int nbox = dPriv->numClipRects;
const drm_clip_rect_t *pbox = dPriv->pClipRects;
const int pitch = intelScreen->front.pitch / intelScreen->front.cpp;
const struct pipe_region *srcRegion = surf->region;
const int srcpitch= srcRegion->pitch;
- ASSERT(intel_fb);
- ASSERT(intel_fb->Base.Name == 0); /* Not a user-created FBO */
ASSERT(srcRegion);
ASSERT(srcRegion->cpp == cpp);
- DBG(SWAP, "front pitch %d back pitch %d\n",
+ DBG(SWAP, "screen pitch %d src surface pitch %d\n",
pitch, srcRegion->pitch);
if (cpp == 2) {
}
/* restrict blit to size of actually rendered area */
- if (box.x2 - box.x1 > backWidth)
- box.x2 = backWidth + box.x1;
- if (box.y2 - box.y1 > backHeight)
- box.y2 = backHeight + box.y1;
+ if (box.x2 - box.x1 > srcWidth)
+ box.x2 = srcWidth + box.x1;
+ if (box.y2 - box.y1 > srcHeight)
+ box.y2 = srcHeight + box.y1;
DBG(SWAP, "box x1 x2 y1 y2 %d %d %d %d\n",
box.x1, box.x2, box.y1, box.y2);
}
}
+
+/**
+ * Called via glXCopySubBufferMESA() to copy a subrect of the back
+ * buffer to the front buffer/screen.
+ */
void
intelCopySubBuffer(__DRIdrawablePrivate * dPriv, int x, int y, int w, int h)
{