X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fswrast%2Fs_points.c;h=64c9cda5165430a20696be2586fb5c711f64f4bf;hb=9d0b8d72d8d704ff4d8e10448b60cbb42f07eecb;hp=0a3ad97a71b34d966220ce7607160976f5fed93b;hpb=0723cd1b0a8a76808844a2216d709f56fbad88e2;p=mesa.git diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c index 0a3ad97a71b..64c9cda5165 100644 --- a/src/mesa/swrast/s_points.c +++ b/src/mesa/swrast/s_points.c @@ -139,7 +139,8 @@ sprite_point(GLcontext *ctx, const SWvertex *vert) } ATTRIB_LOOP_BEGIN - if (attr >= FRAG_ATTRIB_TEX0 && attr < FRAG_ATTRIB_VAR0) { + if ((attr >= FRAG_ATTRIB_TEX0 && attr <= FRAG_ATTRIB_TEX7) || + attr >= FRAG_ATTRIB_VAR0) { const GLuint u = attr - FRAG_ATTRIB_TEX0; /* a texcoord */ if (ctx->Point.CoordReplace[u]) { @@ -170,15 +171,15 @@ sprite_point(GLcontext *ctx, const SWvertex *vert) continue; } } - else if (attr == FRAG_ATTRIB_FOGC) { - /* GLSL gl_PointCoord is stored in fog.zw */ - span.attrStart[FRAG_ATTRIB_FOGC][2] = 0.0; - span.attrStart[FRAG_ATTRIB_FOGC][3] = 0.0; /* t0 set below */ - span.attrStepX[FRAG_ATTRIB_FOGC][2] = dsdx; - span.attrStepX[FRAG_ATTRIB_FOGC][3] = 0.0; - span.attrStepY[FRAG_ATTRIB_FOGC][2] = 0.0; - span.attrStepY[FRAG_ATTRIB_FOGC][3] = dtdy; - tCoords[numTcoords++] = FRAG_ATTRIB_FOGC; + else if (attr == FRAG_ATTRIB_PNTC) { + /* GLSL gl_PointCoord.xy (.zw undefined) */ + span.attrStart[FRAG_ATTRIB_PNTC][0] = 0.0; + span.attrStart[FRAG_ATTRIB_PNTC][1] = 0.0; /* t0 set below */ + span.attrStepX[FRAG_ATTRIB_PNTC][0] = dsdx; + span.attrStepX[FRAG_ATTRIB_PNTC][1] = 0.0; + span.attrStepY[FRAG_ATTRIB_PNTC][0] = 0.0; + span.attrStepY[FRAG_ATTRIB_PNTC][1] = dtdy; + tCoords[numTcoords++] = FRAG_ATTRIB_PNTC; continue; } /* use vertex's texcoord/attrib */ @@ -221,10 +222,7 @@ sprite_point(GLcontext *ctx, const SWvertex *vert) GLuint i; /* setup texcoord T for this row */ for (i = 0; i < numTcoords; i++) { - if (tCoords[i] == FRAG_ATTRIB_FOGC) - span.attrStart[FRAG_ATTRIB_FOGC][3] = tcoord; - else - span.attrStart[tCoords[i]][1] = tcoord; + span.attrStart[tCoords[i]][1] = tcoord; } /* these might get changed by span clipping */