diff options
author | marha <marha@users.sourceforge.net> | 2013-03-18 16:34:52 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-03-18 16:34:52 +0100 |
commit | 1923199a967ec1add54ad8c0e5d48ee320efdb9f (patch) | |
tree | b8c3af0c9f15576a65d85bb80f94546d7c0d0542 /mesalib/src/mesa/swrast/s_points.c | |
parent | b5acb643ab1a86b31409900a7c03281fcc48c8e3 (diff) | |
parent | 9c17f511266fff48a936633de280f271f0ce0c11 (diff) | |
download | vcxsrv-1923199a967ec1add54ad8c0e5d48ee320efdb9f.tar.gz vcxsrv-1923199a967ec1add54ad8c0e5d48ee320efdb9f.tar.bz2 vcxsrv-1923199a967ec1add54ad8c0e5d48ee320efdb9f.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
libX11 mesa git update 18 Mar 2013
fontconfig libX11 mesa pixman xserver xkeyboard-config git update 11 Mar 2013
Diffstat (limited to 'mesalib/src/mesa/swrast/s_points.c')
-rw-r--r-- | mesalib/src/mesa/swrast/s_points.c | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/mesalib/src/mesa/swrast/s_points.c b/mesalib/src/mesa/swrast/s_points.c index acbdb2d42..80693be8e 100644 --- a/mesalib/src/mesa/swrast/s_points.c +++ b/mesalib/src/mesa/swrast/s_points.c @@ -37,8 +37,8 @@ */ #define CULL_INVALID(V) \ do { \ - float tmp = (V)->attrib[FRAG_ATTRIB_WPOS][0] \ - + (V)->attrib[FRAG_ATTRIB_WPOS][1]; \ + float tmp = (V)->attrib[VARYING_SLOT_POS][0] \ + + (V)->attrib[VARYING_SLOT_POS][1]; \ if (IS_INF_OR_NAN(tmp)) \ return; \ } while(0) @@ -93,9 +93,9 @@ sprite_point(struct gl_context *ctx, const SWvertex *vert) /* z coord */ if (ctx->DrawBuffer->Visual.depthBits <= 16) - span.z = FloatToFixed(vert->attrib[FRAG_ATTRIB_WPOS][2] + 0.5F); + span.z = FloatToFixed(vert->attrib[VARYING_SLOT_POS][2] + 0.5F); else - span.z = (GLuint) (vert->attrib[FRAG_ATTRIB_WPOS][2] + 0.5F); + span.z = (GLuint) (vert->attrib[VARYING_SLOT_POS][2] + 0.5F); span.zStep = 0; size = get_size(ctx, vert, GL_FALSE); @@ -116,9 +116,9 @@ sprite_point(struct gl_context *ctx, const SWvertex *vert) span.alphaStep = 0; /* need these for fragment programs */ - span.attrStart[FRAG_ATTRIB_WPOS][3] = 1.0F; - span.attrStepX[FRAG_ATTRIB_WPOS][3] = 0.0F; - span.attrStepY[FRAG_ATTRIB_WPOS][3] = 0.0F; + span.attrStart[VARYING_SLOT_POS][3] = 1.0F; + span.attrStepX[VARYING_SLOT_POS][3] = 0.0F; + span.attrStepY[VARYING_SLOT_POS][3] = 0.0F; { GLfloat s, r, dsdx; @@ -137,9 +137,9 @@ sprite_point(struct gl_context *ctx, const SWvertex *vert) } ATTRIB_LOOP_BEGIN - if (attr >= FRAG_ATTRIB_TEX0 && attr <= FRAG_ATTRIB_TEX7) { + if (attr >= VARYING_SLOT_TEX0 && attr <= VARYING_SLOT_TEX7) { /* a texcoord attribute */ - const GLuint u = attr - FRAG_ATTRIB_TEX0; + const GLuint u = attr - VARYING_SLOT_TEX0; ASSERT(u < Elements(ctx->Point.CoordReplace)); if (ctx->Point.CoordReplace[u]) { tCoords[numTcoords++] = attr; @@ -169,15 +169,15 @@ sprite_point(struct gl_context *ctx, const SWvertex *vert) continue; } } - else if (attr == FRAG_ATTRIB_PNTC) { + else if (attr == VARYING_SLOT_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; + span.attrStart[VARYING_SLOT_PNTC][0] = 0.0; + span.attrStart[VARYING_SLOT_PNTC][1] = 0.0; /* t0 set below */ + span.attrStepX[VARYING_SLOT_PNTC][0] = dsdx; + span.attrStepX[VARYING_SLOT_PNTC][1] = 0.0; + span.attrStepY[VARYING_SLOT_PNTC][0] = 0.0; + span.attrStepY[VARYING_SLOT_PNTC][1] = dtdy; + tCoords[numTcoords++] = VARYING_SLOT_PNTC; continue; } /* use vertex's texcoord/attrib */ @@ -189,8 +189,8 @@ sprite_point(struct gl_context *ctx, const SWvertex *vert) /* compute pos, bounds and render */ { - const GLfloat x = vert->attrib[FRAG_ATTRIB_WPOS][0]; - const GLfloat y = vert->attrib[FRAG_ATTRIB_WPOS][1]; + const GLfloat x = vert->attrib[VARYING_SLOT_POS][0]; + const GLfloat y = vert->attrib[VARYING_SLOT_POS][1]; GLint iSize = (GLint) (size + 0.5F); GLint xmin, xmax, ymin, ymax, iy; GLint iRadius; @@ -250,9 +250,9 @@ smooth_point(struct gl_context *ctx, const SWvertex *vert) /* z coord */ if (ctx->DrawBuffer->Visual.depthBits <= 16) - span.z = FloatToFixed(vert->attrib[FRAG_ATTRIB_WPOS][2] + 0.5F); + span.z = FloatToFixed(vert->attrib[VARYING_SLOT_POS][2] + 0.5F); else - span.z = (GLuint) (vert->attrib[FRAG_ATTRIB_WPOS][2] + 0.5F); + span.z = (GLuint) (vert->attrib[VARYING_SLOT_POS][2] + 0.5F); span.zStep = 0; size = get_size(ctx, vert, GL_TRUE); @@ -289,9 +289,9 @@ smooth_point(struct gl_context *ctx, const SWvertex *vert) span.alphaStep = 0; /* need these for fragment programs */ - span.attrStart[FRAG_ATTRIB_WPOS][3] = 1.0F; - span.attrStepX[FRAG_ATTRIB_WPOS][3] = 0.0F; - span.attrStepY[FRAG_ATTRIB_WPOS][3] = 0.0F; + span.attrStart[VARYING_SLOT_POS][3] = 1.0F; + span.attrStepX[VARYING_SLOT_POS][3] = 0.0F; + span.attrStepY[VARYING_SLOT_POS][3] = 0.0F; ATTRIB_LOOP_BEGIN COPY_4V(span.attrStart[attr], vert->attrib[attr]); @@ -301,8 +301,8 @@ smooth_point(struct gl_context *ctx, const SWvertex *vert) /* compute pos, bounds and render */ { - const GLfloat x = vert->attrib[FRAG_ATTRIB_WPOS][0]; - const GLfloat y = vert->attrib[FRAG_ATTRIB_WPOS][1]; + const GLfloat x = vert->attrib[VARYING_SLOT_POS][0]; + const GLfloat y = vert->attrib[VARYING_SLOT_POS][1]; const GLfloat radius = 0.5F * size; const GLfloat rmin = radius - 0.7071F; /* 0.7071 = sqrt(2)/2 */ const GLfloat rmax = radius + 0.7071F; @@ -370,9 +370,9 @@ large_point(struct gl_context *ctx, const SWvertex *vert) /* z coord */ if (ctx->DrawBuffer->Visual.depthBits <= 16) - span.z = FloatToFixed(vert->attrib[FRAG_ATTRIB_WPOS][2] + 0.5F); + span.z = FloatToFixed(vert->attrib[VARYING_SLOT_POS][2] + 0.5F); else - span.z = (GLuint) (vert->attrib[FRAG_ATTRIB_WPOS][2] + 0.5F); + span.z = (GLuint) (vert->attrib[VARYING_SLOT_POS][2] + 0.5F); span.zStep = 0; size = get_size(ctx, vert, GL_FALSE); @@ -393,9 +393,9 @@ large_point(struct gl_context *ctx, const SWvertex *vert) span.alphaStep = 0; /* need these for fragment programs */ - span.attrStart[FRAG_ATTRIB_WPOS][3] = 1.0F; - span.attrStepX[FRAG_ATTRIB_WPOS][3] = 0.0F; - span.attrStepY[FRAG_ATTRIB_WPOS][3] = 0.0F; + span.attrStart[VARYING_SLOT_POS][3] = 1.0F; + span.attrStepX[VARYING_SLOT_POS][3] = 0.0F; + span.attrStepY[VARYING_SLOT_POS][3] = 0.0F; ATTRIB_LOOP_BEGIN COPY_4V(span.attrStart[attr], vert->attrib[attr]); @@ -405,8 +405,8 @@ large_point(struct gl_context *ctx, const SWvertex *vert) /* compute pos, bounds and render */ { - const GLfloat x = vert->attrib[FRAG_ATTRIB_WPOS][0]; - const GLfloat y = vert->attrib[FRAG_ATTRIB_WPOS][1]; + const GLfloat x = vert->attrib[VARYING_SLOT_POS][0]; + const GLfloat y = vert->attrib[VARYING_SLOT_POS][1]; GLint iSize = (GLint) (size + 0.5F); GLint xmin, xmax, ymin, ymax, ix, iy; GLint iRadius; @@ -470,9 +470,9 @@ pixel_point(struct gl_context *ctx, const SWvertex *vert) span->arrayAttribs = swrast->_ActiveAttribMask; /* we'll produce these vals */ /* need these for fragment programs */ - span->attrStart[FRAG_ATTRIB_WPOS][3] = 1.0F; - span->attrStepX[FRAG_ATTRIB_WPOS][3] = 0.0F; - span->attrStepY[FRAG_ATTRIB_WPOS][3] = 0.0F; + span->attrStart[VARYING_SLOT_POS][3] = 1.0F; + span->attrStepX[VARYING_SLOT_POS][3] = 0.0F; + span->attrStepY[VARYING_SLOT_POS][3] = 0.0F; /* check if we need to flush */ if (span->end >= SWRAST_MAX_WIDTH || @@ -499,9 +499,9 @@ pixel_point(struct gl_context *ctx, const SWvertex *vert) ATTRIB_LOOP_END /* fragment position */ - span->array->x[count] = (GLint) vert->attrib[FRAG_ATTRIB_WPOS][0]; - span->array->y[count] = (GLint) vert->attrib[FRAG_ATTRIB_WPOS][1]; - span->array->z[count] = (GLint) (vert->attrib[FRAG_ATTRIB_WPOS][2] + 0.5F); + span->array->x[count] = (GLint) vert->attrib[VARYING_SLOT_POS][0]; + span->array->y[count] = (GLint) vert->attrib[VARYING_SLOT_POS][1]; + span->array->z[count] = (GLint) (vert->attrib[VARYING_SLOT_POS][2] + 0.5F); span->end = count + 1; ASSERT(span->end <= SWRAST_MAX_WIDTH); @@ -522,9 +522,9 @@ _swrast_add_spec_terms_point(struct gl_context *ctx, const SWvertex *v0) /* save */ COPY_CHAN4(cSave, ncv0->color); /* sum */ - rSum = CHAN_TO_FLOAT(ncv0->color[0]) + ncv0->attrib[FRAG_ATTRIB_COL1][0]; - gSum = CHAN_TO_FLOAT(ncv0->color[1]) + ncv0->attrib[FRAG_ATTRIB_COL1][1]; - bSum = CHAN_TO_FLOAT(ncv0->color[2]) + ncv0->attrib[FRAG_ATTRIB_COL1][2]; + rSum = CHAN_TO_FLOAT(ncv0->color[0]) + ncv0->attrib[VARYING_SLOT_COL1][0]; + gSum = CHAN_TO_FLOAT(ncv0->color[1]) + ncv0->attrib[VARYING_SLOT_COL1][1]; + bSum = CHAN_TO_FLOAT(ncv0->color[2]) + ncv0->attrib[VARYING_SLOT_COL1][2]; UNCLAMPED_FLOAT_TO_CHAN(ncv0->color[0], rSum); UNCLAMPED_FLOAT_TO_CHAN(ncv0->color[1], gSum); UNCLAMPED_FLOAT_TO_CHAN(ncv0->color[2], bSum); |