summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide/fxvbtmp.h
diff options
context:
space:
mode:
authorDaniel Borca <[email protected]>2003-12-10 15:24:49 +0000
committerDaniel Borca <[email protected]>2003-12-10 15:24:49 +0000
commit28442852978e8ca0bcc5fda6393fc7b94fcf2bbf (patch)
treefb627fe1aea1faccf98d34316041aa925a56115a /src/mesa/drivers/glide/fxvbtmp.h
parent43be8ee414369f2745de0cf936f9767ee31df991 (diff)
got rid of __FUNCTION__ :(
Texus2 functions are dynamically linked now made getRegistryOrEnvironmentString more portable bugfix: unnecessary total SW fallback -- glColorMask bugfix: when shared palette was not loaded correctly point_attenuation_stage back in business (point size/atten) fxTexGetInfo is not required for fxIsTexSupported fxDDChooseTextureFormat optimized for RGB/RGBA textures accelerated Quads with Triangle_Fans more WGL extensions/functions (also updated export file) DXTC/S3TC -> FXT1 wrapping hack quick & dirty fix for Quake2
Diffstat (limited to 'src/mesa/drivers/glide/fxvbtmp.h')
-rw-r--r--src/mesa/drivers/glide/fxvbtmp.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/mesa/drivers/glide/fxvbtmp.h b/src/mesa/drivers/glide/fxvbtmp.h
index e0af9bdb4fe..9028cd17a0a 100644
--- a/src/mesa/drivers/glide/fxvbtmp.h
+++ b/src/mesa/drivers/glide/fxvbtmp.h
@@ -46,12 +46,18 @@ static void TAG(emit)( GLcontext *ctx,
GLuint tc0_size, tc1_size;
GLfloat (*proj)[4] = VB->NdcPtr->data;
GLuint proj_stride = VB->NdcPtr->stride;
+ GLfloat (*psize)[4];
+ GLuint psize_stride;
GrVertex *v = (GrVertex *)dest;
GLfloat u0scale,v0scale,u1scale,v1scale;
const GLubyte *mask = VB->ClipMask;
const GLfloat *const s = ctx->Viewport._WindowMap.m;
int i;
+ if (IND & SETUP_PSIZ) {
+ psize = VB->PointSizePtr->data;
+ psize_stride = VB->PointSizePtr->stride;
+ }
if (IND & SETUP_TMU0) {
tc0 = VB->TexCoordPtr[tmu0_source]->data;
@@ -78,6 +84,9 @@ static void TAG(emit)( GLcontext *ctx,
if (start) {
proj = (GLfloat (*)[4])((GLubyte *)proj + start * proj_stride);
+ if (IND & SETUP_PSIZ) {
+ psize = (GLfloat (*)[4])((GLubyte *)psize + start * psize_stride);
+ }
if (IND & SETUP_TMU0)
tc0 = (GLfloat (*)[4])((GLubyte *)tc0 + start * tc0_stride);
if (IND & SETUP_TMU1)
@@ -87,6 +96,11 @@ static void TAG(emit)( GLcontext *ctx,
}
for (i=start; i < end; i++, v++) {
+ if (IND & SETUP_PSIZ) {
+ v->psize = psize[0][0];
+ psize = (GLfloat (*)[4])((GLubyte *)psize + psize_stride);
+ }
+
if (IND & SETUP_XYZW) {
if (mask[i] == 0) {
/* unclipped */
@@ -115,10 +129,10 @@ static void TAG(emit)( GLcontext *ctx,
proj = (GLfloat (*)[4])((GLubyte *)proj + proj_stride);
}
if (IND & SETUP_RGBA) {
- v->pargb[2] = col[0][0] * 255.;
- v->pargb[1] = col[0][1] * 255.;
- v->pargb[0] = col[0][2] * 255.;
- v->pargb[3] = col[0][3] * 255.;
+ 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]);
STRIDE_4F(col, col_stride);
}
if (IND & SETUP_TMU0) {