Axp-List Archive
Re: DRI testing

Subject: Re: DRI testing
From: Jay Estabrook (Jay.Estabrook@compaq.com)
Date: Fri Dec 1 07:06:50 2000


On Thu, Nov 30, 2000 at 07:44:16PM -0500, Peter Petrakis wrote:
>
> I think a few folks have installed DRI by now and I'm wondering
> what you're getting for performance. I can run the gears demo
> windowed at about 150 fps. Strange it seems 3 months ago it was
> much faster. I also went and tried some GL games, one of them
> tuxracer. It compiles fine. I start it, the screen get's lighter, and
> then it segfaults. Has anyone else seen this sort of behavior with
> other GL apps?

Well, tuxracer has a few 32-bit-isms, solved by the attached patch.

As for some others, I think there's more 32-bit-isms lurking, as I
had visual problems with ssytem and xracer, and no time to winkle
them out.

But, glheretic seems to build and run fine... ;-}

As others have said, its *critical* to get the right libraries used.

I'm currently running 2.2.18-pre24 *unpatched*, with 4.0.1g patched
slightly (find this also at the end), on EV6 with Voodoo3/Banshee
with reasonable results.

Next task for us all is to start ferreting out the unaligned accesses
that are killers...

--Jay++

-----------------------------------------------------------------------------
Jay A Estabrook Alpha Engineering - LINUX Project
Compaq Computer Corp. - MRO1-2/K20 (508) 467-2080
200 Forest Street, Marlboro MA 01752 Jay.Estabrook@compaq.com
-----------------------------------------------------------------------------

--- configure.in.orig Mon Nov 20 21:36:12 2000
+++ configure.in Mon Nov 20 21:38:53 2000
@@ -50,6 +50,7 @@
 case "$host" in
 i*86-*-*) TR_CFLAGS="$TR_CFLAGS -malign-loops=2 -malign-jumps=2 -malign-functions=2";
           TR_CXXFLAGS="$TR_CXXFLAGS -malign-loops=2 -malign-jumps=2 -malign-functions=2";;
+alpha*-*-linux-*) TR_CFLAGS="$TR_CFLAGS -mieee";;
 esac
 
 AC_ARG_ENABLE(debug, [ --enable-debug Produce an executable with debugging symbols], [TR_CFLAGS="-g -Wall"; TR_CXXFLAGS="-g -Wall"])
--- src/image.c.orig Mon Nov 20 19:54:02 2000
+++ src/image.c Mon Nov 20 19:55:59 2000
@@ -46,15 +46,15 @@
        FILE *file;
        unsigned char *tmp[5];
        unsigned long rleEnd;
- unsigned long *rowStart;
- unsigned long *rowSize;
+ unsigned int *rowStart;
+ unsigned int *rowSize;
      } Image;
 
 
 static Image *ImageOpen(char *fileName)
 {
   Image *image;
- unsigned long *rowStart, *rowSize, ulTmp;
+ unsigned int *rowStart, *rowSize, ulTmp;
   int x, i;
 
   image = (Image *)malloc(sizeof(Image));
@@ -96,9 +96,9 @@
 
   if ((image->type & 0xFF00) == 0x0100) /* RLE image */
     {
- x = image->sizeY * image->sizeZ * sizeof(long);
- image->rowStart = (unsigned long *)malloc(x);
- image->rowSize = (unsigned long *)malloc(x);
+ x = image->sizeY * image->sizeZ * sizeof(int);
+ image->rowStart = (unsigned int *)malloc(x);
+ image->rowSize = (unsigned int *)malloc(x);
       if (image->rowStart == NULL || image->rowSize == NULL)
         {
           fprintf(stderr, "Out of memory!\n");
@@ -110,7 +110,7 @@
       fread(image->rowSize, 1, x, image->file);
       if (image->imagic == IMAGIC_SWAP)
         {
- x /= sizeof(long);
+ x /= sizeof(int);
           rowStart = image->rowStart;
           rowSize = image->rowSize;
           while (x--)
-----------------------------------------------------------------------------

diff -urN xc-401g/lib/GL/mesa/src/drv/tdfx/fxddspan.c patch-401g/lib/GL/mesa/src/drv/tdfx/fxddspan.c
--- xc-401g/lib/GL/mesa/src/drv/tdfx/fxddspan.c Mon Nov 27 14:38:19 2000
+++ patch-401g/lib/GL/mesa/src/drv/tdfx/fxddspan.c Wed Nov 29 22:05:29 2000
@@ -321,14 +321,13 @@
             ? (fxMesa->screen_width) : (info.strideInBytes / 2);
         const GLushort *data16 = (const GLushort *) info.lfbPtr
             + (winY - y) * srcStride + (winX + x);
- const GLuint *data32 = (const GLuint *) data16;
         GLuint i, j;
         GLuint extraPixel = (n & 1);
         n -= extraPixel;
         for (i = j = 0; i < n; i += 2, j++) {
- GLuint pixel = data32[j];
- GLuint pixel0 = pixel & 0xffff;
- GLuint pixel1 = pixel >> 16;
+ /* use data16[] to keep correct alignment */
+ GLuint pixel0 = data16[i];
+ GLuint pixel1 = data16[i+1];
             rgba[i][RCOMP] = FX_PixelToR(fxMesa, pixel0);
             rgba[i][GCOMP] = FX_PixelToG(fxMesa, pixel0);
             rgba[i][BCOMP] = FX_PixelToB(fxMesa, pixel0);
@@ -1251,7 +1250,7 @@
 {
     FxU32 physicalStrideInBytes, bufferOffset;
     FxU32 strideInBytes = info->strideInBytes;
- FxU32 lfbPtr = (FxU32) (info->lfbPtr);
+ AnyPtr lfbPtr = (AnyPtr) (info->lfbPtr);
 
     /*
      * These two come directly from the info structure.
@@ -1278,7 +1277,7 @@
      * < bufferOffset&(info->strideInBytes-1)
      * the buffer begins in the forbidden zone. We assert for this.
      */
- bufferOffset = lfbPtr - (FxU32) backBufferInfo->lfbPtr;
+ bufferOffset = lfbPtr - (AnyPtr) backBufferInfo->lfbPtr;
     physicalStrideInBytes
         = (fxMesa->screen_width * elementSize + TILE_WIDTH_IN_BYTES - 1)
         & ~(TILE_WIDTH_IN_BYTES - 1);
@@ -1290,7 +1289,7 @@
      * This is the address of the next physical line.
      */
     ReadParamsp->lfbWrapPtr
- = (void *) ((FxU32) backBufferInfo->lfbPtr
+ = (void *) ((AnyPtr) backBufferInfo->lfbPtr
                     + (bufferOffset & ~(strideInBytes - 1))
                     + (TILE_HEIGHT_IN_LINES) * strideInBytes);
 }
diff -urN xc-401g/programs/Xserver/hw/xfree86/drivers/ati/r128.h patch-401g/programs/Xserver/hw/xfree86/drivers/ati/r128.h
--- xc-401g/programs/Xserver/hw/xfree86/drivers/ati/r128.h Wed Nov 29 14:49:48 2000
+++ patch-401g/programs/Xserver/hw/xfree86/drivers/ati/r128.h Wed Nov 29 16:31:45 2000
@@ -40,6 +40,8 @@
 
 #include "xf86str.h"
 
+#include "xf86_OSproc.h"
+
                                 /* PCI support */
 #include "xf86Pci.h"
 
diff -urN xc-401g/programs/Xserver/hw/xfree86/drivers/ati/radeon.h patch-401g/programs/Xserver/hw/xfree86/drivers/ati/radeon.h
--- xc-401g/programs/Xserver/hw/xfree86/drivers/ati/radeon.h Wed Nov 29 14:49:48 2000
+++ patch-401g/programs/Xserver/hw/xfree86/drivers/ati/radeon.h Wed Nov 29 16:33:27 2000
@@ -40,6 +40,7 @@
 
 #include "xf86str.h"
 
+#include "xf86_OSproc.h"
                                 /* PCI support */
 #include "xf86Pci.h"
 
diff -urN xc-401g/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c patch-401g/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c
--- xc-401g/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c Wed Nov 29 14:49:48 2000
+++ patch-401g/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c Wed Nov 29 15:06:42 2000
@@ -69,8 +69,6 @@
 # define isJensen (axpSystem == JENSEN)
 # endif
 
-# define needSparse (_bus_base_sparse() != 0)
-
 # define BUS_BASE _bus_base()
 
 #else
-----------------------------------------------------------------------------

_______________________________________________
Axp-list mailing list
Axp-list@redhat.com
https://listman.redhat.com/mailman/listinfo/axp-list



This archive was generated by hypermail version 2a22 on Tue Jan 2 07:48:31 2001 PST
Send any problems or questions about this archive to webmaster@alphalinux.org.