diff options
Diffstat (limited to 'xc/extras/Mesa/src/tritemp.h')
-rw-r--r-- | xc/extras/Mesa/src/tritemp.h | 138 |
1 files changed, 69 insertions, 69 deletions
diff --git a/xc/extras/Mesa/src/tritemp.h b/xc/extras/Mesa/src/tritemp.h index 2a0d3344d..ed2b8324f 100644 --- a/xc/extras/Mesa/src/tritemp.h +++ b/xc/extras/Mesa/src/tritemp.h @@ -22,7 +22,7 @@ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - +/* $XFree86: xc/extras/Mesa/src/tritemp.h,v 1.7 2000/02/18 12:18:46 tsi Exp $ */ /* * Triangle Rasterizer Template @@ -221,36 +221,36 @@ { GLint ltor; /* true if scanning left-to-right */ -#if INTERP_Z +#ifdef INTERP_Z GLfloat dzdx, dzdy; GLfixed fdzdx; #endif -#if INTERP_RGB +#ifdef INTERP_RGB GLfloat drdx, drdy; GLfixed fdrdx; GLfloat dgdx, dgdy; GLfixed fdgdx; GLfloat dbdx, dbdy; GLfixed fdbdx; #endif -#if INTERP_SPEC +#ifdef INTERP_SPEC GLfloat dsrdx, dsrdy; GLfixed fdsrdx; GLfloat dsgdx, dsgdy; GLfixed fdsgdx; GLfloat dsbdx, dsbdy; GLfixed fdsbdx; #endif -#if INTERP_ALPHA +#ifdef INTERP_ALPHA GLfloat dadx, dady; GLfixed fdadx; #endif -#if INTERP_INDEX +#ifdef INTERP_INDEX GLfloat didx, didy; GLfixed fdidx; #endif -#if INTERP_INT_ST +#ifdef INTERP_INT_ST GLfloat dsdx, dsdy; GLfixed fdsdx; GLfloat dtdx, dtdy; GLfixed fdtdx; #endif -#if INTERP_STUV +#ifdef INTERP_STUV GLfloat dsdx, dsdy; GLfloat dtdx, dtdy; GLfloat dudx, dudy; GLfloat dvdx, dvdy; #endif -#if INTERP_STUV1 +#ifdef INTERP_STUV1 GLfloat ds1dx, ds1dy; GLfloat dt1dx, dt1dy; GLfloat du1dx, du1dy; @@ -267,7 +267,7 @@ ltor = (oneOverArea < 0.0F); /* compute d?/dx and d?/dy derivatives */ -#if INTERP_Z +#ifdef INTERP_Z { GLfloat eMaj_dz, eBot_dz; eMaj_dz = VB->Win.data[vMax][2] - VB->Win.data[vMin][2]; @@ -288,7 +288,7 @@ #endif } #endif -#if INTERP_RGB +#ifdef INTERP_RGB { GLfloat eMaj_dr, eBot_dr; eMaj_dr = (GLint) VB->ColorPtr->data[vMax][0] - (GLint) VB->ColorPtr->data[vMin][0]; @@ -314,7 +314,7 @@ dbdy = oneOverArea * (eMaj.dx * eBot_db - eMaj_db * eBot.dx); } #endif -#if INTERP_SPEC +#ifdef INTERP_SPEC { GLfloat eMaj_dsr, eBot_dsr; eMaj_dsr = (GLint) VB->Specular[vMax][0] - (GLint) VB->Specular[vMin][0]; @@ -340,7 +340,7 @@ dsbdy = oneOverArea * (eMaj.dx * eBot_dsb - eMaj_dsb * eBot.dx); } #endif -#if INTERP_ALPHA +#ifdef INTERP_ALPHA { GLfloat eMaj_da, eBot_da; eMaj_da = (GLint) VB->ColorPtr->data[vMax][3] - (GLint) VB->ColorPtr->data[vMin][3]; @@ -350,7 +350,7 @@ dady = oneOverArea * (eMaj.dx * eBot_da - eMaj_da * eBot.dx); } #endif -#if INTERP_INDEX +#ifdef INTERP_INDEX { GLfloat eMaj_di, eBot_di; eMaj_di = (GLint) VB->IndexPtr->data[vMax] - (GLint) VB->IndexPtr->data[vMin]; @@ -360,7 +360,7 @@ didy = oneOverArea * (eMaj.dx * eBot_di - eMaj_di * eBot.dx); } #endif -#if INTERP_INT_ST +#ifdef INTERP_INT_ST { GLfloat eMaj_ds, eBot_ds; eMaj_ds = (VB->TexCoordPtr[0]->data[vMax][0] - VB->TexCoordPtr[0]->data[vMin][0]) * S_SCALE; @@ -384,7 +384,7 @@ } #endif -#if INTERP_STUV +#ifdef INTERP_STUV { GLfloat wMax = VB->Win.data[vMax][3]; GLfloat wMin = VB->Win.data[vMin][3]; @@ -436,7 +436,7 @@ } } #endif -#if INTERP_STUV1 +#ifdef INTERP_STUV1 { GLfloat wMax = VB->Win.data[vMax][3]; GLfloat wMin = VB->Win.data[vMin][3]; @@ -554,38 +554,38 @@ PIXEL_TYPE *pRow; int dPRowOuter, dPRowInner; /* offset in bytes */ #endif -#if INTERP_Z +#ifdef INTERP_Z GLdepth *zRow; int dZRowOuter, dZRowInner; /* offset in bytes */ GLfixed fz, fdzOuter, fdzInner; #endif -#if INTERP_RGB +#ifdef INTERP_RGB GLfixed fr, fdrOuter, fdrInner; GLfixed fg, fdgOuter, fdgInner; GLfixed fb, fdbOuter, fdbInner; #endif -#if INTERP_SPEC +#ifdef INTERP_SPEC GLfixed fsr, fdsrOuter, fdsrInner; GLfixed fsg, fdsgOuter, fdsgInner; GLfixed fsb, fdsbOuter, fdsbInner; #endif -#if INTERP_ALPHA +#ifdef INTERP_ALPHA GLfixed fa, fdaOuter, fdaInner; #endif -#if INTERP_INDEX +#ifdef INTERP_INDEX GLfixed fi, fdiOuter, fdiInner; #endif -#if INTERP_INT_ST +#ifdef INTERP_INT_ST GLfixed fs, fdsOuter, fdsInner; GLfixed ft, fdtOuter, fdtInner; #endif -#if INTERP_STUV +#ifdef INTERP_STUV GLfloat sLeft, dsOuter, dsInner; GLfloat tLeft, dtOuter, dtInner; GLfloat uLeft, duOuter, duInner; GLfloat vLeft, dvOuter, dvInner; #endif -#if INTERP_STUV1 +#ifdef INTERP_STUV1 GLfloat s1Left, ds1Outer, ds1Inner; GLfloat t1Left, dt1Outer, dt1Inner; GLfloat u1Left, du1Outer, du1Inner; @@ -674,7 +674,7 @@ * pixel that's actually inside the triangle. */ -#if INTERP_Z +#ifdef INTERP_Z { GLfloat z0, tmp; z0 = VB->Win.data[vLower][2] + ctx->PolygonZoffset; @@ -696,7 +696,7 @@ dZRowOuter = (ctx->DrawBuffer->Width + idxOuter) * sizeof(GLdepth); } #endif -#if INTERP_RGB +#ifdef INTERP_RGB fr = (GLfixed)(IntToFixed(VB->ColorPtr->data[vLower][0]) + drdx * adjx + drdy * adjy) + FIXED_HALF; fdrOuter = SignedFloatToFixed(drdy + dxOuter * drdx); @@ -709,7 +709,7 @@ + FIXED_HALF; fdbOuter = SignedFloatToFixed(dbdy + dxOuter * dbdx); #endif -#if INTERP_SPEC +#ifdef INTERP_SPEC fsr = (GLfixed)(IntToFixed(VB->Specular[vLower][0]) + dsrdx * adjx + dsrdy * adjy) + FIXED_HALF; fdsrOuter = SignedFloatToFixed(dsrdy + dxOuter * dsrdx); @@ -722,17 +722,17 @@ + FIXED_HALF; fdsbOuter = SignedFloatToFixed(dsbdy + dxOuter * dsbdx); #endif -#if INTERP_ALPHA +#ifdef INTERP_ALPHA fa = (GLfixed)(IntToFixed(VB->ColorPtr->data[vLower][3]) + dadx * adjx + dady * adjy) + FIXED_HALF; fdaOuter = SignedFloatToFixed(dady + dxOuter * dadx); #endif -#if INTERP_INDEX +#ifdef INTERP_INDEX fi = (GLfixed)(VB->IndexPtr->data[vLower] * FIXED_SCALE + didx * adjx + didy * adjy) + FIXED_HALF; fdiOuter = SignedFloatToFixed(didy + dxOuter * didx); #endif -#if INTERP_INT_ST +#ifdef INTERP_INT_ST { GLfloat s0, t0; s0 = VB->TexCoordPtr[0]->data[vLower][0] * S_SCALE; @@ -753,7 +753,7 @@ } } #endif -#if INTERP_STUV +#ifdef INTERP_STUV { GLfloat invW = VB->Win.data[vLower][3]; GLfloat s0, t0, u0, v0; @@ -786,7 +786,7 @@ dvOuter = dvdy + dxOuter * dvdx; } #endif -#if INTERP_STUV1 +#ifdef INTERP_STUV1 { GLfloat invW = VB->Win.data[vLower][3]; GLfloat s0, t0, u0, v0; @@ -837,37 +837,37 @@ #ifdef PIXEL_ADDRESS dPRowInner = dPRowOuter + sizeof(PIXEL_TYPE); #endif -#if INTERP_Z +#ifdef INTERP_Z dZRowInner = dZRowOuter + sizeof(GLdepth); fdzInner = fdzOuter + fdzdx; #endif -#if INTERP_RGB +#ifdef INTERP_RGB fdrInner = fdrOuter + fdrdx; fdgInner = fdgOuter + fdgdx; fdbInner = fdbOuter + fdbdx; #endif -#if INTERP_SPEC +#ifdef INTERP_SPEC fdsrInner = fdsrOuter + fdsrdx; fdsgInner = fdsgOuter + fdsgdx; fdsbInner = fdsbOuter + fdsbdx; #endif -#if INTERP_ALPHA +#ifdef INTERP_ALPHA fdaInner = fdaOuter + fdadx; #endif -#if INTERP_INDEX +#ifdef INTERP_INDEX fdiInner = fdiOuter + fdidx; #endif -#if INTERP_INT_ST +#ifdef INTERP_INT_ST fdsInner = fdsOuter + fdsdx; fdtInner = fdtOuter + fdtdx; #endif -#if INTERP_STUV +#ifdef INTERP_STUV dsInner = dsOuter + dsdx; dtInner = dtOuter + dtdx; duInner = duOuter + dudx; dvInner = dvOuter + dvdx; #endif -#if INTERP_STUV1 +#ifdef INTERP_STUV1 ds1Inner = ds1Outer + ds1dx; dt1Inner = dt1Outer + dt1dx; du1Inner = du1Outer + du1dx; @@ -877,35 +877,35 @@ while (lines>0) { /* initialize the span interpolants to the leftmost value */ /* ff = fixed-pt fragment */ -#if INTERP_Z +#ifdef INTERP_Z GLfixed ffz = fz; /*GLdepth *zp = zRow;*/ #endif -#if INTERP_RGB +#ifdef INTERP_RGB GLfixed ffr = fr, ffg = fg, ffb = fb; #endif -#if INTERP_SPEC +#ifdef INTERP_SPEC GLfixed ffsr = fsr, ffsg = fsg, ffsb = fsb; #endif -#if INTERP_ALPHA +#ifdef INTERP_ALPHA GLfixed ffa = fa; #endif -#if INTERP_INDEX +#ifdef INTERP_INDEX GLfixed ffi = fi; #endif -#if INTERP_INT_ST +#ifdef INTERP_INT_ST GLfixed ffs = fs, fft = ft; #endif -#if INTERP_STUV +#ifdef INTERP_STUV GLfloat ss = sLeft, tt = tLeft, uu = uLeft, vv = vLeft; #endif -#if INTERP_STUV1 +#ifdef INTERP_STUV1 GLfloat ss1 = s1Left, tt1 = t1Left, uu1 = u1Left, vv1 = v1Left; #endif GLint left = FixedToInt(fxLeftEdge); GLint right = FixedToInt(fxRightEdge); -#if INTERP_RGB +#ifdef INTERP_RGB { /* need this to accomodate round-off errors */ GLfixed ffrend = ffr+(right-left-1)*fdrdx; @@ -919,7 +919,7 @@ if (ffb<0) ffb = 0; } #endif -#if INTERP_SPEC +#ifdef INTERP_SPEC { /* need this to accomodate round-off errors */ GLfixed ffsrend = ffsr+(right-left-1)*fdsrdx; @@ -933,14 +933,14 @@ if (ffsb<0) ffsb = 0; } #endif -#if INTERP_ALPHA +#ifdef INTERP_ALPHA { GLfixed ffaend = ffa+(right-left-1)*fdadx; if (ffaend<0) ffa -= ffaend; if (ffa<0) ffa = 0; } #endif -#if INTERP_INDEX +#ifdef INTERP_INDEX if (ffi<0) ffi = 0; #endif @@ -965,32 +965,32 @@ #ifdef PIXEL_ADDRESS pRow = (PIXEL_TYPE*) ((GLubyte*)pRow + dPRowOuter); #endif -#if INTERP_Z +#ifdef INTERP_Z zRow = (GLdepth*) ((GLubyte*)zRow + dZRowOuter); fz += fdzOuter; #endif -#if INTERP_RGB +#ifdef INTERP_RGB fr += fdrOuter; fg += fdgOuter; fb += fdbOuter; #endif -#if INTERP_SPEC +#ifdef INTERP_SPEC fsr += fdsrOuter; fsg += fdsgOuter; fsb += fdsbOuter; #endif -#if INTERP_ALPHA +#ifdef INTERP_ALPHA fa += fdaOuter; #endif -#if INTERP_INDEX +#ifdef INTERP_INDEX fi += fdiOuter; #endif -#if INTERP_INT_ST +#ifdef INTERP_INT_ST fs += fdsOuter; ft += fdtOuter; #endif -#if INTERP_STUV +#ifdef INTERP_STUV sLeft += dsOuter; tLeft += dtOuter; uLeft += duOuter; vLeft += dvOuter; #endif -#if INTERP_STUV1 +#ifdef INTERP_STUV1 s1Left += ds1Outer; t1Left += dt1Outer; u1Left += du1Outer; @@ -1001,32 +1001,32 @@ #ifdef PIXEL_ADDRESS pRow = (PIXEL_TYPE*) ((GLubyte*)pRow + dPRowInner); #endif -#if INTERP_Z +#ifdef INTERP_Z zRow = (GLdepth*) ((GLubyte*)zRow + dZRowInner); fz += fdzInner; #endif -#if INTERP_RGB +#ifdef INTERP_RGB fr += fdrInner; fg += fdgInner; fb += fdbInner; #endif -#if INTERP_SPEC +#ifdef INTERP_SPEC fsr += fdsrInner; fsg += fdsgInner; fsb += fdsbInner; #endif -#if INTERP_ALPHA +#ifdef INTERP_ALPHA fa += fdaInner; #endif -#if INTERP_INDEX +#ifdef INTERP_INDEX fi += fdiInner; #endif -#if INTERP_INT_ST +#ifdef INTERP_INT_ST fs += fdsInner; ft += fdtInner; #endif -#if INTERP_STUV +#ifdef INTERP_STUV sLeft += dsInner; tLeft += dtInner; uLeft += duInner; vLeft += dvInner; #endif -#if INTERP_STUV1 +#ifdef INTERP_STUV1 s1Left += ds1Inner; t1Left += dt1Inner; u1Left += du1Inner; |