summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoland Scheidegger <rscheidegger_lists@hispeed.ch>2005-03-08 23:41:37 +0000
committerRoland Scheidegger <rscheidegger_lists@hispeed.ch>2005-03-08 23:41:37 +0000
commit01a9c1157cdfbc5f74b035383e060b8419979563 (patch)
tree457742e3c4c884ba2bb381bbd6ed60ee56aba90f /src
parent9b994b40710103b263364153429ebdb9ea3f58ed (diff)
Fix accidentally removed depth pitch adjustment if displayWidth is not a
multiple of 32 pixels (bug #788)
Diffstat (limited to 'src')
-rw-r--r--src/radeon_driver.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 1d78c289..8895073c 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -5086,11 +5086,12 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
+ RADEON_BUFFER_ALIGN) & ~RADEON_BUFFER_ALIGN;
}
/* Due to tiling, the Z buffer pitch must be a multiple of 32 pixels,
- * which is always the case due to color pitch and its height a multiple of 16 lines.
+ * which is always the case if color tiling is used due to color pitch
+ * but not necessarily otherwise, and its height a multiple of 16 lines.
*/
- info->depthPitch = pScrn->displayWidth;
+ info->depthPitch = (pScrn->displayWidth + 31) & ~31;
depthSize = ((((pScrn->virtualY + 15) & ~15) * info->depthPitch
- * cpp + RADEON_BUFFER_ALIGN) & ~RADEON_BUFFER_ALIGN);
+ * cpp + RADEON_BUFFER_ALIGN) & ~RADEON_BUFFER_ALIGN);
switch (info->CPMode) {
case RADEON_DEFAULT_CP_PIO_MODE: