X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fswrast_setup%2Fss_tritmp.h;h=b9b78e16b01a6bd503dcbe5bc82b2d2c3fe0a55f;hb=dadd5094bfe8f8a9d0fc7b48086d3a4bc1c6b15f;hp=17f38639563fc484d61933a701ce839a74f4899b;hpb=a087eb590d780cb82b49464e05ffc85123adce7e;p=mesa.git diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h index 17f38639563..b9b78e16b01 100644 --- a/src/mesa/swrast_setup/ss_tritmp.h +++ b/src/mesa/swrast_setup/ss_tritmp.h @@ -40,10 +40,10 @@ 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]; - GLfloat saved_col0[3][4]; - GLfloat saved_spec[3][4]; - GLfloat saved_index[3]; + GLchan saved_color[3][4] = { { 0 } }; + GLfloat saved_col0[3][4] = { { 0 } }; + GLfloat saved_spec[3][4] = { { 0 } }; + GLfloat saved_index[3] = { 0 }; v[0] = &verts[e0]; v[1] = &verts[e1]; @@ -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); } }