summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex VillacĂ­s Lasso <a_villacis@palosanto.com>2008-04-10 12:51:47 -0400
committerAlex Deucher <alex@cube.(none)>2008-04-10 12:51:47 -0400
commit9cb124b3542c942622a54d0ce429661516b1e2f4 (patch)
tree0438c29ba8512933cba551c21e31c0a79886a6b4 /src
parentd0cbce17e1d1e99dbecda339c6704b96606b20d3 (diff)
EXA upload to screen must honor pitch of the source data
Diffstat (limited to 'src')
-rw-r--r--src/savage_exa.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/savage_exa.c b/src/savage_exa.c
index aa6905a..6320e18 100644
--- a/src/savage_exa.c
+++ b/src/savage_exa.c
@@ -460,7 +460,6 @@ SavageUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int
CARD32 * srcp;
Bpp = pDst->drawable.bitsPerPixel / 8;
- dwords = (((w * Bpp) + 3) >> 2) * h;
psav->sbd_offset = exaGetPixmapOffset(pDst);
psav->sbd_high = SavageSetBD(psav, pDst);
@@ -486,17 +485,19 @@ SavageUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int
BCI_SEND(BCI_X_Y(x, y));
BCI_SEND(BCI_W_H(w, h));
- srcp = (CARD32 *)src;
queue = 120 * 1024;
- while (dwords) {
- if (queue < 4) {
- BCI_RESET;
- queue = 120 * 1024;
+ dwords = (((w * Bpp) + 3) >> 2);
+ for (i = 0; i < h; i++) {
+ srcp = (CARD32 *)src;
+ for (j = 0; j < dwords; j++) {
+ if (queue < 4) {
+ BCI_RESET;
+ queue = 120 * 1024;
+ }
+ BCI_SEND(*srcp++);
+ queue -= 4;
}
- BCI_SEND(*srcp);
- queue -= 4;
- dwords--;
- srcp++;
+ src += src_pitch;
}
/*exaWaitSync(pDst->drawable.pScreen);*/