Jonathan Thambidurai wrote:
        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);


You're certainly playing in the right area, but these changes will also try & give you an 8bpp depth buffer in 16bit modes...

Keep reading the code, you're changing something that may have lead to "assumptions" elsewhere -- specifically in the 3d driver. Check files like radeon_span.c and radeon_screen.c as well.

Keith



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger for complex code. Debugging C/C++ programs can leave you feeling lost and disoriented. TotalView can help you find your way. Available on major UNIX and Linux platforms. Try it free. www.etnus.com
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to