diff options
author | Keith Whitwell <[email protected]> | 2010-03-12 12:13:32 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2010-03-12 12:15:09 +0000 |
commit | 475ab3b5aff71edd95776783dd65417006db951f (patch) | |
tree | 5e921108f24d92b4d5f048dd066b41b7c7e82989 /src | |
parent | c16d04bd2939154c0360f1ac51fe61a86e5dd9e5 (diff) |
st/xorg: context transfers
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_crtc.c | 14 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_exa.c | 24 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_xv.c | 46 |
3 files changed, 42 insertions, 42 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_crtc.c b/src/gallium/state_trackers/xorg/xorg_crtc.c index f60e9abb767..eef428232b0 100644 --- a/src/gallium/state_trackers/xorg/xorg_crtc.c +++ b/src/gallium/state_trackers/xorg/xorg_crtc.c @@ -220,16 +220,16 @@ crtc_load_cursor_argb_ga3d(xf86CrtcPtr crtc, CARD32 * image) crtcp->cursor_handle = whandle.handle; } - transfer = ms->screen->get_tex_transfer(ms->screen, crtcp->cursor_tex, - 0, 0, 0, - PIPE_TRANSFER_WRITE, - 0, 0, 64, 64); - ptr = ms->screen->transfer_map(ms->screen, transfer); + transfer = ms->ctx->get_tex_transfer(ms->ctx, crtcp->cursor_tex, + 0, 0, 0, + PIPE_TRANSFER_WRITE, + 0, 0, 64, 64); + ptr = ms->ctx->transfer_map(ms->ctx, transfer); util_copy_rect(ptr, crtcp->cursor_tex->format, transfer->stride, 0, 0, 64, 64, (void*)image, 64 * 4, 0, 0); - ms->screen->transfer_unmap(ms->screen, transfer); - ms->screen->tex_transfer_destroy(transfer); + ms->ctx->transfer_unmap(ms->ctx, transfer); + ms->ctx->tex_transfer_destroy(ms->ctx, transfer); } #if HAVE_LIBKMS diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c index a7ffe3f4992..b5e7adc26ec 100644 --- a/src/gallium/state_trackers/xorg/xorg_exa.c +++ b/src/gallium/state_trackers/xorg/xorg_exa.c @@ -192,7 +192,7 @@ ExaDownloadFromScreen(PixmapPtr pPix, int x, int y, int w, int h, char *dst, PIPE_REFERENCED_FOR_WRITE) exa->pipe->flush(exa->pipe, 0, NULL); - transfer = exa->scrn->get_tex_transfer(exa->scrn, priv->tex, 0, 0, 0, + transfer = exa->pipe->get_tex_transfer(exa->pipe, priv->tex, 0, 0, 0, PIPE_TRANSFER_READ, x, y, w, h); if (!transfer) return FALSE; @@ -203,11 +203,11 @@ ExaDownloadFromScreen(PixmapPtr pPix, int x, int y, int w, int h, char *dst, #endif util_copy_rect((unsigned char*)dst, priv->tex->format, dst_pitch, 0, 0, - w, h, exa->scrn->transfer_map(exa->scrn, transfer), + w, h, exa->pipe->transfer_map(exa->pipe, transfer), transfer->stride, 0, 0); - exa->scrn->transfer_unmap(exa->scrn, transfer); - exa->scrn->tex_transfer_destroy(transfer); + exa->pipe->transfer_unmap(exa->pipe, transfer); + exa->pipe->tex_transfer_destroy(exa->pipe, transfer); return TRUE; } @@ -231,7 +231,7 @@ ExaUploadToScreen(PixmapPtr pPix, int x, int y, int w, int h, char *src, (PIPE_REFERENCED_FOR_READ | PIPE_REFERENCED_FOR_WRITE)) xorg_exa_flush(exa, 0, NULL); - transfer = exa->scrn->get_tex_transfer(exa->scrn, priv->tex, 0, 0, 0, + transfer = exa->pipe->get_tex_transfer(exa->pipe, priv->tex, 0, 0, 0, PIPE_TRANSFER_WRITE, x, y, w, h); if (!transfer) return FALSE; @@ -241,12 +241,12 @@ ExaUploadToScreen(PixmapPtr pPix, int x, int y, int w, int h, char *src, x, y, w, h, src_pitch); #endif - util_copy_rect(exa->scrn->transfer_map(exa->scrn, transfer), + util_copy_rect(exa->pipe->transfer_map(exa->pipe, transfer), priv->tex->format, transfer->stride, 0, 0, w, h, (unsigned char*)src, src_pitch, 0, 0); - exa->scrn->transfer_unmap(exa->scrn, transfer); - exa->scrn->tex_transfer_destroy(transfer); + exa->pipe->transfer_unmap(exa->pipe, transfer); + exa->pipe->tex_transfer_destroy(exa->pipe, transfer); return TRUE; } @@ -278,7 +278,7 @@ ExaPrepareAccess(PixmapPtr pPix, int index) assert(pPix->drawable.height <= priv->tex->height0); priv->map_transfer = - exa->scrn->get_tex_transfer(exa->scrn, priv->tex, 0, 0, 0, + exa->pipe->get_tex_transfer(exa->pipe, priv->tex, 0, 0, 0, #ifdef EXA_MIXED_PIXMAPS PIPE_TRANSFER_MAP_DIRECTLY | #endif @@ -294,7 +294,7 @@ ExaPrepareAccess(PixmapPtr pPix, int index) #endif pPix->devPrivate.ptr = - exa->scrn->transfer_map(exa->scrn, priv->map_transfer); + exa->pipe->transfer_map(exa->pipe, priv->map_transfer); pPix->devKind = priv->map_transfer->stride; } @@ -321,8 +321,8 @@ ExaFinishAccess(PixmapPtr pPix, int index) if (--priv->map_count == 0) { assert(priv->map_transfer); - exa->scrn->transfer_unmap(exa->scrn, priv->map_transfer); - exa->scrn->tex_transfer_destroy(priv->map_transfer); + exa->pipe->transfer_unmap(exa->pipe, priv->map_transfer); + exa->pipe->tex_transfer_destroy(exa->pipe, priv->map_transfer); priv->map_transfer = NULL; pPix->devPrivate.ptr = NULL; } diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c index e37a1c39596..5a195cb482d 100644 --- a/src/gallium/state_trackers/xorg/xorg_xv.c +++ b/src/gallium/state_trackers/xorg/xorg_xv.c @@ -275,28 +275,28 @@ copy_packed_data(ScrnInfoPtr pScrn, int i, j; struct pipe_texture **dst = port->yuv[port->current_set]; struct pipe_transfer *ytrans, *utrans, *vtrans; - struct pipe_screen *screen = port->r->pipe->screen; + struct pipe_context *pipe = port->r->pipe; char *ymap, *vmap, *umap; unsigned char y1, y2, u, v; int yidx, uidx, vidx; int y_array_size = w * h; - ytrans = screen->get_tex_transfer(screen, dst[0], - 0, 0, 0, - PIPE_TRANSFER_WRITE, - left, top, w, h); - utrans = screen->get_tex_transfer(screen, dst[1], - 0, 0, 0, - PIPE_TRANSFER_WRITE, - left, top, w, h); - vtrans = screen->get_tex_transfer(screen, dst[2], - 0, 0, 0, - PIPE_TRANSFER_WRITE, - left, top, w, h); - - ymap = (char*)screen->transfer_map(screen, ytrans); - umap = (char*)screen->transfer_map(screen, utrans); - vmap = (char*)screen->transfer_map(screen, vtrans); + ytrans = pipe->get_tex_transfer(pipe, dst[0], + 0, 0, 0, + PIPE_TRANSFER_WRITE, + left, top, w, h); + utrans = pipe->get_tex_transfer(pipe, dst[1], + 0, 0, 0, + PIPE_TRANSFER_WRITE, + left, top, w, h); + vtrans = pipe->get_tex_transfer(pipe, dst[2], + 0, 0, 0, + PIPE_TRANSFER_WRITE, + left, top, w, h); + + ymap = (char*)pipe->transfer_map(pipe, ytrans); + umap = (char*)pipe->transfer_map(pipe, utrans); + vmap = (char*)pipe->transfer_map(pipe, vtrans); yidx = uidx = vidx = 0; @@ -362,12 +362,12 @@ copy_packed_data(ScrnInfoPtr pScrn, break; } - screen->transfer_unmap(screen, ytrans); - screen->transfer_unmap(screen, utrans); - screen->transfer_unmap(screen, vtrans); - screen->tex_transfer_destroy(ytrans); - screen->tex_transfer_destroy(utrans); - screen->tex_transfer_destroy(vtrans); + pipe->transfer_unmap(pipe, ytrans); + pipe->transfer_unmap(pipe, utrans); + pipe->transfer_unmap(pipe, vtrans); + pipe->tex_transfer_destroy(pipe, ytrans); + pipe->tex_transfer_destroy(pipe, utrans); + pipe->tex_transfer_destroy(pipe, vtrans); } |