X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fswrast_setup%2Fss_tritmp.h;h=b9b78e16b01a6bd503dcbe5bc82b2d2c3fe0a55f;hb=dadd5094bfe8f8a9d0fc7b48086d3a4bc1c6b15f;hp=8484aab5a93fd7f86f7438e54c0e685aad59fa07;hpb=9eb7fc6661a1d46c06cec8584b898e3e690af6fa;p=mesa.git diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h index 8484aab5a93..b9b78e16b01 100644 --- a/src/mesa/swrast_setup/ss_tritmp.h +++ b/src/mesa/swrast_setup/ss_tritmp.h @@ -40,7 +40,7 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) GLfloat offset, oz0, oz1, oz2; GLenum mode = GL_FILL; GLuint facing = 0; - GLchan saved_color[3][4]; + GLchan saved_color[3][4] = { { 0 } }; GLfloat saved_col0[3][4] = { { 0 } }; GLfloat saved_spec[3][4] = { { 0 } }; GLfloat saved_index[3] = { 0 }; @@ -132,9 +132,9 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) saved_index[1] = v[1]->attrib[FRAG_ATTRIB_CI][0]; saved_index[2] = v[2]->attrib[FRAG_ATTRIB_CI][0]; - SS_IND(v[0]->attrib[FRAG_ATTRIB_CI][0], (GLuint) vbindex[e0]); - SS_IND(v[1]->attrib[FRAG_ATTRIB_CI][0], (GLuint) vbindex[e1]); - SS_IND(v[2]->attrib[FRAG_ATTRIB_CI][0], (GLuint) vbindex[e2]); + SS_IND(v[0]->attrib[FRAG_ATTRIB_CI][0], vbindex[e0]); + SS_IND(v[1]->attrib[FRAG_ATTRIB_CI][0], vbindex[e1]); + SS_IND(v[2]->attrib[FRAG_ATTRIB_CI][0], vbindex[e2]); } } } @@ -159,9 +159,9 @@ static void TAG(triangle)(GLcontext *ctx, GLuint e0, GLuint e1, GLuint e2 ) offset += MAX2(dzdx, dzdy) * ctx->Polygon.OffsetFactor; } /* new Z values */ - oz0 = CLAMP(v[0]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0, max); - oz1 = CLAMP(v[1]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0, max); - oz2 = CLAMP(v[2]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0, max); + oz0 = CLAMP(v[0]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0F, max); + oz1 = CLAMP(v[1]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0F, max); + oz2 = CLAMP(v[2]->attrib[FRAG_ATTRIB_WPOS][2] + offset, 0.0F, max); } }