summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robdclark@gmail.com>2014-08-07 15:29:57 -0400
committerRob Clark <robdclark@gmail.com>2014-08-07 16:26:11 -0400
commita61866b30044344999c40c5ea7e856c7f7009ed6 (patch)
tree5f3389b92bac9deb93f1e91293b9783adf38dccf
parent31b1814c8f7cc51644dc23559a5ce3b9f70188fb (diff)
make sure scanout has a legit stride
The gpu wants pixmaps (including scanout) with width aligned to 32 pixels. We calculate the correct pitch when allocating the scanout buffer (so the buffer is the correct size), but nothing was updating scanout pixmap's pitch, resulting in gpu trying to blit to the wrong places. Signed-off-by: Rob Clark <robdclark@gmail.com>
-rw-r--r--src/msm-driver.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/msm-driver.c b/src/msm-driver.c
index 29dc571..7778840 100644
--- a/src/msm-driver.c
+++ b/src/msm-driver.c
@@ -334,8 +334,14 @@ MSMCreateScreenResources(ScreenPtr pScreen)
return FALSE;
ppix = pScreen->GetScreenPixmap(pScreen);
- if (ppix)
+ if (ppix) {
+ int pitch = MSMAlignedStride(ppix->drawable.width,
+ ppix->drawable.bitsPerPixel);
+ pScreen->ModifyPixmapHeader(ppix, ppix->drawable.width,
+ ppix->drawable.height, ppix->drawable.depth,
+ ppix->drawable.bitsPerPixel, pitch, NULL);
msm_set_pixmap_bo(ppix, pMsm->scanout);
+ }
return TRUE;
}