mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 22:51:57 +00:00
SW renderer works properly but doesn't keep kovaak happy. :(
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@921 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
ed133d107c
commit
b2f6366a24
3 changed files with 18 additions and 17 deletions
|
@ -65,8 +65,8 @@ lzistepx: .long 0
|
||||||
|
|
||||||
#define skinwidth 4+0
|
#define skinwidth 4+0
|
||||||
|
|
||||||
.globl C(D_PolysetCalcGradients)
|
.globl C(D_PolysetCalcGradientsAsm)
|
||||||
C(D_PolysetCalcGradients):
|
C(D_PolysetCalcGradientsAsm):
|
||||||
|
|
||||||
// p00_minus_p20 = r_p0[0] - r_p2[0];
|
// p00_minus_p20 = r_p0[0] - r_p2[0];
|
||||||
// p01_minus_p21 = r_p0[1] - r_p2[1];
|
// p01_minus_p21 = r_p0[1] - r_p2[1];
|
||||||
|
@ -1473,8 +1473,8 @@ LSkip2:
|
||||||
#define fv 4+8
|
#define fv 4+8
|
||||||
#define numverts 8+8
|
#define numverts 8+8
|
||||||
|
|
||||||
.globl C(D_PolysetDrawFinalVerts)
|
.globl C(D_PolysetDrawFinalVertsAsm)
|
||||||
C(D_PolysetDrawFinalVerts):
|
C(D_PolysetDrawFinalVertsAsm):
|
||||||
pushl %ebp // preserve caller stack frame pointer
|
pushl %ebp // preserve caller stack frame pointer
|
||||||
pushl %ebx
|
pushl %ebx
|
||||||
|
|
||||||
|
|
|
@ -127,8 +127,8 @@ void D_PolysetScanLeftEdge (int height);
|
||||||
|
|
||||||
void D_PolysetDrawSpans8 (spanpackage_t *pspanpackage);
|
void D_PolysetDrawSpans8 (spanpackage_t *pspanpackage);
|
||||||
void D_PolysetDrawSpans8C (spanpackage_t *pspanpackage);
|
void D_PolysetDrawSpans8C (spanpackage_t *pspanpackage);
|
||||||
void D_PolysetCalcGradients (int skinwidth);
|
void D_PolysetCalcGradientsC (int skinwidth);
|
||||||
void D_PolysetCalcGradients32 (int skinwidth);
|
void D_PolysetCalcGradientsAsm (int skinwidth);
|
||||||
void D_DrawSubdiv (void);
|
void D_DrawSubdiv (void);
|
||||||
void D_DrawSubdivC (void);
|
void D_DrawSubdivC (void);
|
||||||
void D_DrawSubdiv32C (void);
|
void D_DrawSubdiv32C (void);
|
||||||
|
@ -145,7 +145,6 @@ void D_PolysetSetUpForLineScan(fixed8_t startvertu, fixed8_t startvertv,
|
||||||
fixed8_t endvertu, fixed8_t endvertv);
|
fixed8_t endvertu, fixed8_t endvertv);
|
||||||
|
|
||||||
|
|
||||||
#ifdef PEXT_TRANS
|
|
||||||
void D_PolysetDrawFinalVertsTrans (finalvert_t *fv, int numverts)
|
void D_PolysetDrawFinalVertsTrans (finalvert_t *fv, int numverts)
|
||||||
{
|
{
|
||||||
int i, z;
|
int i, z;
|
||||||
|
@ -968,7 +967,7 @@ void D_RasterizeAliasPolySmoothC (void)
|
||||||
// set the s, t, and light gradients, which are consistent across the triangle
|
// set the s, t, and light gradients, which are consistent across the triangle
|
||||||
// because being a triangle, things are affine
|
// because being a triangle, things are affine
|
||||||
//
|
//
|
||||||
D_PolysetCalcGradients32 (r_affinetridesc.skinwidth); //D_PolysetCalcGradients32 but not with asm possibilities
|
D_PolysetCalcGradientsC (r_affinetridesc.skinwidth); //D_PolysetCalcGradients32 but not with asm possibilities
|
||||||
|
|
||||||
//
|
//
|
||||||
// rasterize the polygon
|
// rasterize the polygon
|
||||||
|
@ -1161,7 +1160,6 @@ void D_RasterizeAliasPolySmoothC (void)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void D_PolysetDraw32 (void)
|
void D_PolysetDraw32 (void)
|
||||||
{
|
{
|
||||||
|
@ -1751,7 +1749,7 @@ void D_PolysetCalcGradientsAsm (int skinwidth)
|
||||||
|
|
||||||
#endif // !id386
|
#endif // !id386
|
||||||
|
|
||||||
void D_PolysetCalcGradients32 (int skinwidth)
|
void D_PolysetCalcGradientsC (int skinwidth)
|
||||||
{
|
{
|
||||||
float xstepdenominv, ystepdenominv, t0, t1;
|
float xstepdenominv, ystepdenominv, t0, t1;
|
||||||
float p01_minus_p21, p11_minus_p21, p00_minus_p20, p10_minus_p20;
|
float p01_minus_p21, p11_minus_p21, p00_minus_p20, p10_minus_p20;
|
||||||
|
@ -1956,7 +1954,7 @@ void D_RasterizeAliasPolySmooth8Asm (void)
|
||||||
// set the s, t, and light gradients, which are consistent across the triangle
|
// set the s, t, and light gradients, which are consistent across the triangle
|
||||||
// because being a triangle, things are affine
|
// because being a triangle, things are affine
|
||||||
//
|
//
|
||||||
D_PolysetCalcGradients (r_affinetridesc.skinwidth);
|
D_PolysetCalcGradientsAsm (r_affinetridesc.skinwidth);
|
||||||
|
|
||||||
//
|
//
|
||||||
// rasterize the polygon
|
// rasterize the polygon
|
||||||
|
@ -2153,7 +2151,7 @@ void D_RasterizeAliasPolySmooth8C (void)
|
||||||
|
|
||||||
void (*DrawSpans) (spanpackage_t *pspanpackage);
|
void (*DrawSpans) (spanpackage_t *pspanpackage);
|
||||||
if (r_pixbytes == 1)
|
if (r_pixbytes == 1)
|
||||||
DrawSpans = D_PolysetDrawSpans8;
|
DrawSpans = D_PolysetDrawSpans8C;
|
||||||
else
|
else
|
||||||
DrawSpans = D_PolysetDrawSpans16;
|
DrawSpans = D_PolysetDrawSpans16;
|
||||||
|
|
||||||
|
@ -2170,7 +2168,7 @@ void D_RasterizeAliasPolySmooth8C (void)
|
||||||
// set the s, t, and light gradients, which are consistent across the triangle
|
// set the s, t, and light gradients, which are consistent across the triangle
|
||||||
// because being a triangle, things are affine
|
// because being a triangle, things are affine
|
||||||
//
|
//
|
||||||
D_PolysetCalcGradients (r_affinetridesc.skinwidth);
|
D_PolysetCalcGradientsC (r_affinetridesc.skinwidth);
|
||||||
|
|
||||||
//
|
//
|
||||||
// rasterize the polygon
|
// rasterize the polygon
|
||||||
|
|
|
@ -270,8 +270,7 @@ qboolean R_AliasCheckBBox (void)
|
||||||
{
|
{
|
||||||
if (minz > (r_aliastransition + (pmdl->size * r_resfudge)))
|
if (minz > (r_aliastransition + (pmdl->size * r_resfudge)))
|
||||||
{
|
{
|
||||||
Con_Printf("Trivial accept 2 on %s\n", currententity->model->name);
|
// currententity->trivial_accept |= 2;
|
||||||
currententity->trivial_accept |= 2;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -602,8 +601,12 @@ void R_AliasPrepareUnclippedPoints (void)
|
||||||
{
|
{
|
||||||
if (r_pixbytes == 4)
|
if (r_pixbytes == 4)
|
||||||
D_PolysetDrawFinalVerts32Trans (pfinalverts, r_anumverts);
|
D_PolysetDrawFinalVerts32Trans (pfinalverts, r_anumverts);
|
||||||
|
#if id386
|
||||||
|
else if (t_state & TT_ONE)
|
||||||
|
D_PolysetDrawFinalVertsAsm (pfinalverts, r_anumverts);
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
D_PolysetDrawFinalVerts (pfinalverts, r_anumverts);
|
D_PolysetDrawFinalVertsC (pfinalverts, r_anumverts);
|
||||||
}
|
}
|
||||||
|
|
||||||
r_affinetridesc.pfinalverts = pfinalverts;
|
r_affinetridesc.pfinalverts = pfinalverts;
|
||||||
|
@ -613,7 +616,7 @@ void R_AliasPrepareUnclippedPoints (void)
|
||||||
|
|
||||||
if (r_pixbytes == 4)
|
if (r_pixbytes == 4)
|
||||||
D_PolysetDraw32 ();
|
D_PolysetDraw32 ();
|
||||||
#if 0//id386
|
#if id386
|
||||||
else if (t_state & TT_ONE)
|
else if (t_state & TT_ONE)
|
||||||
D_PolysetDrawAsm ();
|
D_PolysetDrawAsm ();
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue