Hi, I ran into a bit of trouble compiling the r300 mesa driver. I'm using the latest r300_driver from cvs with mesa_6_2_branch, which I presume is the latest release. I'm compiling with gcc 3.4.0 and receive the following message:
... gcc -c -I. -I../../../../../src/mesa/drivers/dri/common -Iserver -I../../../../../../drm/shared -I../../../../../../drm/linux -I../../../../../include -I../../../../../include/GL/internal -I../../../../../src/mesa -I../../../../../src/mesa/main -I../../../../../src/mesa/glapi -I../../../../../src/mesa/math -I../../../../../src/mesa/transform -I../../../../../src/mesa/shader -I../../../../../src/mesa/swrast -I../../../../../src/mesa/swrast_setup -I../dri_client -I../dri_client/imports -DDRI_NEW_INTERFACE_ONLY -Wall -g -O -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM -std=c99 -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE -DPTHREADS -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions -DCOMPILE_R300 -DGLX_DIRECT_RENDERING radeon_lock.c -o radeon_lock.o radeon_lock.c: In function `radeonUpdatePageFlipping': radeon_lock.c:56: error: subscripted value is neither array nor pointer ... It seems to be falling over on radeon->glCtx->Color._DrawDestMask[0]. On my machine _DrawDestMask is a GLbitfield (unsigned int). I had to use the following patches to get it to compile correctly. Is this correct or is there something wrong with my set up? Thanks Kevin
Index: r200_state.c =================================================================== RCS file: /cvsroot/r300/r300_driver/r300/r200_state.c,v retrieving revision 1.4 diff -u -3 -p -r1.4 r200_state.c --- r200_state.c 19 Dec 2004 16:18:10 -0000 1.4 +++ r200_state.c 24 Dec 2004 17:34:30 -0000 @@ -1684,7 +1684,7 @@ static void r200DrawBuffer(GLcontext * c /* * _DrawDestMask is easier to cope with than <mode>. */ - switch (ctx->Color._DrawDestMask[0]) { + switch (ctx->Color._DrawDestMask) { case DD_FRONT_LEFT_BIT: FALLBACK(&r200->radeon, RADEON_FALLBACK_DRAW_BUFFER, GL_FALSE); radeonSetCliprects(&r200->radeon, GL_FRONT_LEFT);
Index: radeon_lock.c =================================================================== RCS file: /cvsroot/r300/r300_driver/r300/radeon_lock.c,v retrieving revision 1.3 diff -u -3 -p -r1.3 radeon_lock.c --- radeon_lock.c 17 Oct 2004 20:26:06 -0000 1.3 +++ radeon_lock.c 24 Dec 2004 17:32:02 -0000 @@ -53,7 +53,7 @@ static void radeonUpdatePageFlipping(rad radeon->doPageFlip = radeon->sarea->pfState; - use_back = (radeon->glCtx->Color._DrawDestMask[0] == DD_BACK_LEFT_BIT); + use_back = (radeon->glCtx->Color._DrawDestMask == DD_BACK_LEFT_BIT); use_back ^= (radeon->sarea->pfCurrentPage == 1); if (use_back) { @@ -82,7 +82,7 @@ static void r200RegainedLock(r200Context r200->hw.ctx.cmd[CTX_RB3D_COLORPITCH] = r200->radeon.state.color.drawPitch; - if (r200->radeon.glCtx->Color._DrawDestMask[0] == DD_BACK_LEFT_BIT) + if (r200->radeon.glCtx->Color._DrawDestMask == DD_BACK_LEFT_BIT) radeonSetCliprects(&r200->radeon, GL_BACK_LEFT); else radeonSetCliprects(&r200->radeon, GL_FRONT_LEFT); @@ -102,7 +102,7 @@ static void r300RegainedLock(radeonConte if (radeon->lastStamp != dPriv->lastStamp) { radeonUpdatePageFlipping(radeon); - if (radeon->glCtx->Color._DrawDestMask[0] == DD_BACK_LEFT_BIT) + if (radeon->glCtx->Color._DrawDestMask == DD_BACK_LEFT_BIT) radeonSetCliprects(radeon, GL_BACK_LEFT); else radeonSetCliprects(radeon, GL_FRONT_LEFT);