assert(smesa->depth.Base.AllocStorage);
}
+ /* XXX Should get the base offset of the frontbuffer from the X Server */
+ smesa->front.offset = smesa->driDrawable->x * smesa->bytesPerPixel +
+ smesa->driDrawable->y * smesa->front.pitch;
+ smesa->front.map = (char *) smesa->driScreen->pFB + smesa->front.offset;
+
if ( smesa->width == smesa->driDrawable->w &&
smesa->height == smesa->driDrawable->h )
{
smesa->front.bpp = smesa->bytesPerPixel * 8;
/* Front pitch set on context create */
smesa->front.size = smesa->front.pitch * smesa->driDrawable->h;
- /* XXX Should get the base offset of the frontbuffer from the X Server */
- smesa->front.offset = smesa->driDrawable->x * smesa->bytesPerPixel +
- smesa->driDrawable->y * smesa->front.pitch;
- smesa->front.map = (char *) smesa->driScreen->pFB + smesa->front.offset;
smesa->width = smesa->driDrawable->w;
smesa->height = smesa->driDrawable->h;
MMIO(REG_SRC_PITCH, smesa->back.pitch | ((smesa->bytesPerPixel == 4) ?
BLIT_DEPTH_32 : BLIT_DEPTH_16));
MMIO(REG_SRC_X_Y, ((box->x1 - dPriv->x) << 16) | (box->y1 - dPriv->y));
- MMIO(REG_DST_X_Y, (box->x1 << 16) | box->y1);
+ MMIO(REG_DST_X_Y, ((box->x1 - dPriv->x) << 16) | (box->y1 - dPriv->y));
MMIO(REG_DST_ADDR, smesa->front.offset);
MMIO(REG_DST_PITCH_HEIGHT, (smesa->virtualY << 16) | smesa->front.pitch);
MMIO(REG_WIDTH_HEIGHT, ((box->y2 - box->y1) << 16) | (box->x2 - box->x1));