Would the changes expressed in the attached diffs be sufficient to
hardcode a depth-buffer depth of 16 bpp for Radeon Direct Rendering?

--Jonathan Thambidurai
--- radeon_dri.c        2003-02-06 14:13:40.000000000 -0500
+++ radeon_dri.c.change 2003-03-07 16:56:14.000000000 -0500
@@ -1030,7 +1030,7 @@
     drmInfo.usec_timeout        = info->CPusecTimeout;
 
     drmInfo.fb_bpp              = info->CurrentLayout.pixel_code;
-    drmInfo.depth_bpp           = info->CurrentLayout.pixel_code;
+    drmInfo.depth_bpp           = 16;
 
     drmInfo.front_offset        = info->frontOffset;
     drmInfo.front_pitch         = info->frontPitch * cpp;
--- radeon_driver.c     2003-01-25 17:25:44.000000000 -0500
+++ radeon_driver.c.change      2003-03-07 16:53:54.000000000 -0500
@@ -3556,7 +3556,7 @@
        int        bufferSize  = ((pScrn->virtualY * width_bytes
                                   + RADEON_BUFFER_ALIGN)
                                  & ~RADEON_BUFFER_ALIGN);
-       int        depthSize   = ((((pScrn->virtualY+15) & ~15) * width_bytes
+       int        depthSize   = ((((pScrn->virtualY+15) & ~15) * width_bytes/2
                                   + RADEON_BUFFER_ALIGN)
                                  & ~RADEON_BUFFER_ALIGN);
        int        l;
@@ -3655,7 +3655,7 @@
        info->depthOffset = ((info->textureOffset - depthSize +
                              RADEON_BUFFER_ALIGN) &
                             ~(CARD32)RADEON_BUFFER_ALIGN);
-       info->depthPitch = pScrn->displayWidth;
+       info->depthPitch = pScrn->displayWidth/2;
 
                                /* Reserve space for the shared back buffer */
        if (info->noBackBuffer) {
@@ -3712,7 +3712,7 @@
                 * textures
                 */
                info->depthTexLines = (scanlines
-                                      - info->depthOffset / width_bytes);
+                                      - info->depthOffset / (width_bytes/2));
                info->backLines     = (scanlines
                                       - info->backOffset / width_bytes
                                       - info->depthTexLines);

Reply via email to