summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-02-09 09:47:22 -0500
committerAlex Deucher <alexdeucher@gmail.com>2009-02-09 09:47:22 -0500
commit6c76bfe8105e3cf4e7e6ea1bfe1235be2079110f (patch)
treed898536c2859d812ec1095774ef52183ca304178 /src
parent132e4c575dc4675f4995e45f08c53c26bffd999a (diff)
R6xx/R7xx UTS: move actual upload to separate function
So it can be shared with Xv
Diffstat (limited to 'src')
-rw-r--r--src/r600_exa.c28
1 files changed, 21 insertions, 7 deletions
diff --git a/src/r600_exa.c b/src/r600_exa.c
index fa99a6ee..a38469af 100644
--- a/src/r600_exa.c
+++ b/src/r600_exa.c
@@ -2077,15 +2077,12 @@ R600WaitforIdlePoll(ScrnInfoPtr pScrn)
}
static Bool
-R600UploadToScreen(PixmapPtr pDst, int x, int y, int w, int h,
- char *src, int src_pitch)
+R600CopyToVRAM(ScrnInfoPtr pScrn,
+ char *src, int src_pitch,
+ uint32_t dst_pitch, uint32_t dst_mc_addr, uint32_t dst_height, int bpp,
+ int x, int y, int w, int h)
{
- ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
RADEONInfoPtr info = RADEONPTR(pScrn);
- uint32_t dst_pitch = exaGetPixmapPitch(pDst) / (pDst->drawable.bitsPerPixel / 8);
- uint32_t dst_mc_addr = exaGetPixmapOffset(pDst) + info->fbLocation + pScrn->fbOffset;
- uint32_t dst_height = pDst->drawable.height;
- int bpp = pDst->drawable.bitsPerPixel;
uint32_t scratch_mc_addr;
int wpass = w * (bpp/8);
int scratch_pitch_bytes = (wpass + 255) & ~255;
@@ -2149,6 +2146,23 @@ R600UploadToScreen(PixmapPtr pDst, int x, int y, int w, int h,
}
static Bool
+R600UploadToScreen(PixmapPtr pDst, int x, int y, int w, int h,
+ char *src, int src_pitch)
+{
+ ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum];
+ RADEONInfoPtr info = RADEONPTR(pScrn);
+ uint32_t dst_pitch = exaGetPixmapPitch(pDst) / (pDst->drawable.bitsPerPixel / 8);
+ uint32_t dst_mc_addr = exaGetPixmapOffset(pDst) + info->fbLocation + pScrn->fbOffset;
+ uint32_t dst_height = pDst->drawable.height;
+ int bpp = pDst->drawable.bitsPerPixel;
+
+ return R600CopyToVRAM(pScrn,
+ src, src_pitch,
+ dst_pitch, dst_mc_addr, dst_height, bpp,
+ x, y, w, h);
+}
+
+static Bool
R600DownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h,
char *dst, int dst_pitch)
{