summaryrefslogtreecommitdiff
path: root/src/radeon_exa.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2006-06-18 14:24:14 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2006-06-18 14:24:14 +0200
commitc8366d7b457565a06acdf6b40c5448c7f13f1641 (patch)
tree59283d3c503d2b7388b4f889c4d79d86b70aae9e /src/radeon_exa.c
parent23a21d00db6f3b88b54c44648f968018a03677d3 (diff)
Add Option "DepthBits".
This allows getting higher depth buffer precision and stencil hardware acceleration in depth 16 or saving some video RAM at the cost of these features in depth 24.
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)
{