summaryrefslogtreecommitdiff
path: root/src/radeon_exa.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/radeon_exa.c')
-rw-r--r--src/radeon_exa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/radeon_exa.c b/src/radeon_exa.c
index 8070da18..0cf86f54 100644
--- a/src/radeon_exa.c
+++ b/src/radeon_exa.c
@@ -367,6 +367,7 @@ Bool RADEONSetupMemEXA (ScreenPtr pScreen)
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
RADEONInfoPtr info = RADEONPTR(pScrn);
int cpp = info->CurrentLayout.pixel_bytes;
+ int depthCpp = (info->depthBits - 8) / 4;
int l;
int next, screen_size;
int byteStride = pScrn->displayWidth * cpp;
@@ -435,7 +436,7 @@ Bool RADEONSetupMemEXA (ScreenPtr pScreen)
* handle tiling.
*/
info->depthPitch = RADEON_ALIGN(pScrn->displayWidth, 32);
- depth_size = RADEON_ALIGN(pScrn->virtualY, 16) * info->depthPitch * cpp;
+ depth_size = RADEON_ALIGN(pScrn->virtualY, 16) * info->depthPitch * depthCpp;
next = RADEON_ALIGN(info->exa->offScreenBase, RADEON_BUFFER_ALIGN);
if (next + depth_size <= info->exa->memorySize)
{