summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/glide/fxvbtmp.h
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2000-12-28 22:11:04 +0000
committerKeith Whitwell <[email protected]>2000-12-28 22:11:04 +0000
commit88f3b89a2cb77766d2009b9868c44e03abe2dbb2 (patch)
treec382e12f28f661a17974ea79b394fbabf101d89e /src/mesa/drivers/glide/fxvbtmp.h
parente5d6fb20a5c2519ac216a9fa247b5922e76528c1 (diff)
Add render stage for unclipped vb's to fx driver.
Bump MAX_TEXTURE_UNITS to 8 Fix mem. leak in destroy_lists Fix crash in q3 (cva generally)
Diffstat (limited to 'src/mesa/drivers/glide/fxvbtmp.h')
-rw-r--r--src/mesa/drivers/glide/fxvbtmp.h43
1 files changed, 41 insertions, 2 deletions
diff --git a/src/mesa/drivers/glide/fxvbtmp.h b/src/mesa/drivers/glide/fxvbtmp.h
index 5f3a293650a..af21fc40af2 100644
--- a/src/mesa/drivers/glide/fxvbtmp.h
+++ b/src/mesa/drivers/glide/fxvbtmp.h
@@ -56,8 +56,47 @@ static void NAME(GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs)
if (IND & SETUP_RGBA)
color = VB->ColorPtr[0]->data;
- for (i = start ; i < end ; i++, v++) {
- if (!clipmask[i]) {
+ if (VB->ClipOrMask) {
+ for (i = start ; i < end ; i++, v++) {
+ if (!clipmask[i]) {
+ if (IND & SETUP_XYZW) {
+ v->v.x = s[0] * proj[i][0] + s[12];
+ v->v.y = s[5] * proj[i][1] + s[13];
+ v->v.ooz = s[10] * proj[i][2] + s[14];
+ v->v.oow = proj[i][3];
+
+ if (IND & SETUP_SNAP) {
+#if defined(USE_IEEE)
+ const float snapper = (3L<<18);
+ v->v.x += snapper;
+ v->v.x -= snapper;
+ v->v.y += snapper;
+ v->v.y -= snapper;
+#else
+ v->v.x = ((int)(v->v.x*16.0f)) * (1.0f/16.0f);
+ v->v.y = ((int)(v->v.y*16.0f)) * (1.0f/16.0f);
+#endif
+ }
+ }
+ if (IND & SETUP_RGBA) {
+ UBYTE_COLOR_TO_FLOAT_255_COLOR2(v->v.r, color[i][0]);
+ UBYTE_COLOR_TO_FLOAT_255_COLOR2(v->v.g, color[i][1]);
+ UBYTE_COLOR_TO_FLOAT_255_COLOR2(v->v.b, color[i][2]);
+ UBYTE_COLOR_TO_FLOAT_255_COLOR2(v->v.a, color[i][3]);
+ }
+ if (IND & SETUP_TMU0) {
+ v->v.tmuvtx[0].sow = sscale0*tmu0_data[i][0]*v->v.oow;
+ v->v.tmuvtx[0].tow = tscale0*tmu0_data[i][1]*v->v.oow;
+ }
+ if (IND & SETUP_TMU1) {
+ v->v.tmuvtx[1].sow = sscale1*tmu1_data[i][0]*v->v.oow;
+ v->v.tmuvtx[1].tow = tscale1*tmu1_data[i][1]*v->v.oow;
+ }
+ }
+ }
+ }
+ else {
+ for (i = start ; i < end ; i++, v++) {
if (IND & SETUP_XYZW) {
v->v.x = s[0] * proj[i][0] + s[12];
v->v.y = s[5] * proj[i][1] + s[13];