From: Daniel Borca Date: Mon, 14 Jun 2004 09:11:13 +0000 (+0000) Subject: Fixed a bug in vertex emitter (untile we move to t_vertex.c) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3dc3cc9d40ea37dcf69d242d00f623e580ed9bde;p=mesa.git Fixed a bug in vertex emitter (untile we move to t_vertex.c) --- diff --git a/docs/README.3DFX b/docs/README.3DFX index 69c16560eb9..d9bf09604e9 100644 --- a/docs/README.3DFX +++ b/docs/README.3DFX @@ -191,14 +191,14 @@ MESA_3DFX_STRING Desc: advertise "3dfx" substring in GL_RENDERER Note: used by some games aware by 3dfx hw limitations MESA_GLX_FX - OS: win32, linux - HW: selective - Desc: force display mode - Note: (!) experimental! + OS: linux + HW: Voodoo1, Rush, Voodoo2 + Desc: display mode + Note: (!) experimental: "w" may work in Win32 using non-V1/V2 HW Value: - "w" - windowed mode (linux: V1/2/Rush, win32: all except V1/V2) - "f" - fullscreen mode (linux: V1/V2/Rush) - "d" - disable glide driver (linux: V1/V2/Rush) + "w" - windowed mode + "f" - fullscreen mode + "d" - disable glide driver diff --git a/src/mesa/drivers/glide/fxvbtmp.h b/src/mesa/drivers/glide/fxvbtmp.h index ba6dd15acf7..c20d5fc3c4f 100644 --- a/src/mesa/drivers/glide/fxvbtmp.h +++ b/src/mesa/drivers/glide/fxvbtmp.h @@ -43,7 +43,7 @@ static void TAG(emit)( GLcontext *ctx, GLfloat (*tc0)[4], (*tc1)[4]; GLfloat (*col)[4], (*spec)[4]; GLuint tc0_stride, tc1_stride, col_stride, spec_stride; - GLuint tc0_size, tc1_size; + GLuint tc0_size, tc1_size, col_size; GLfloat (*proj)[4] = VB->NdcPtr->data; GLuint proj_stride = VB->NdcPtr->stride; GLfloat (*psize)[4]; @@ -80,6 +80,7 @@ static void TAG(emit)( GLcontext *ctx, if (IND & SETUP_RGBA) { col = VB->ColorPtr[0]->data; col_stride = VB->ColorPtr[0]->stride; + col_size = VB->ColorPtr[0]->size; } if (IND & SETUP_SPEC) { @@ -138,7 +139,11 @@ static void TAG(emit)( GLcontext *ctx, UNCLAMPED_FLOAT_TO_UBYTE(v->pargb[2], col[0][0]); UNCLAMPED_FLOAT_TO_UBYTE(v->pargb[1], col[0][1]); UNCLAMPED_FLOAT_TO_UBYTE(v->pargb[0], col[0][2]); - UNCLAMPED_FLOAT_TO_UBYTE(v->pargb[3], col[0][3]); + if (col_size == 4) { + UNCLAMPED_FLOAT_TO_UBYTE(v->pargb[3], col[0][3]); + } else { + v->pargb[3] = 255; + } STRIDE_4F(col, col_stride); } if (IND & SETUP_SPEC) {