fixed grDrawTriangle triangle dispatch code
This commit is contained in:
@@ -106,17 +106,17 @@ main (int argc, char **argv)
|
||||
printf("\n");
|
||||
|
||||
#if GLIDE_DISPATCH_SETUP
|
||||
printf("#define kCurGCOffset 0x%XUL\n",
|
||||
printf("#define kCurGCOffset 0x%lXUL\n",
|
||||
offsetof(struct _GlideRoot_s, curGC));
|
||||
|
||||
printf("#define kTriProcOffset 0x%XUL\n",
|
||||
printf("#define kTriProcOffset 0x%lXUL\n",
|
||||
offsetof(struct GrGC_s, curArchProcs.triSetupProc));
|
||||
printf("#define kTriProcOffsetClean %d\n",
|
||||
offsetof(struct GrGC_s, curArchProcs.triSetupProc));
|
||||
#endif /* GLIDE_DISPATCH_SETUP */
|
||||
|
||||
printf("/* The # of 2-byte entries in the hw fog table */\n");
|
||||
printf("#define kInternalFogTableEntryCount 0x%XUL\n",
|
||||
printf("#define kInternalFogTableEntryCount 0x%lXUL\n",
|
||||
sizeof(dummyRegs.fogTable) >> 1);
|
||||
|
||||
printf("\n");
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
**
|
||||
** $Header$
|
||||
** $Log$
|
||||
** Revision 1.4.2.2 2005/01/22 14:52:01 koolsmoky
|
||||
** enabled packed argb for cmd packet type 3
|
||||
**
|
||||
** Revision 1.4.2.1 2004/12/23 20:45:56 koolsmoky
|
||||
** converted to nasm syntax
|
||||
** added x86 asm, 3dnow! triangle and mmx, 3dnow! texture download optimizations
|
||||
@@ -642,7 +645,9 @@ all_done: /* come here on degenerate lines */
|
||||
/*---------------------------------------------------------------------------
|
||||
** grDrawTriangle
|
||||
*/
|
||||
|
||||
#if !defined(GLIDE_USE_C_TRISETUP) && !defined(__WATCOMC__) && !defined(GLIDE_DEBUG)
|
||||
__declspec(naked)
|
||||
#endif
|
||||
GR_ENTRY(grDrawTriangle, void, (const GrVertex *a, const GrVertex *b, const GrVertex *c))
|
||||
{
|
||||
#define FN_NAME grDrawTriangle
|
||||
@@ -687,19 +692,11 @@ all_done:
|
||||
#else
|
||||
#if defined(__MSC__)
|
||||
{
|
||||
/* XXX [koolsmoky] fix this. for now we just call TRISETUP
|
||||
extern struct _GlideRoot_s _GlideRoot;
|
||||
|
||||
_asm {
|
||||
mov eax, [_GlideRoot + kCurGCOffset];
|
||||
mov eax, [eax + kTriProcOffset];
|
||||
__asm {
|
||||
mov edx, [_GlideRoot + kCurGCOffset];
|
||||
mov eax, [edx + kTriProcOffset];
|
||||
jmp eax;
|
||||
}*/
|
||||
|
||||
GR_BEGIN_NOFIFOCHECK("grDrawTriangle",92);
|
||||
GR_CHECK_F(myName, !a || !b || !c, "NULL pointer passed");
|
||||
TRISETUP(a, b, c);
|
||||
GR_END();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#if defined( __linux__ )
|
||||
@@ -785,8 +782,7 @@ GR_ENTRY(grDrawPlanarPolygon,
|
||||
/* now all the gradients are loaded into the chip, so we just have to */
|
||||
/* draw all the rest of the triangles */
|
||||
for (i = i+1; i < nVerts - 1; i++) {
|
||||
//_trisetup_nogradients(firstv, &vList[iList[i]], &vList[iList[i+1]]);
|
||||
TRISETUP(firstv, &vList[iList[i]], &vList[iList[i+1]]);
|
||||
_trisetup_nogradients(firstv, &vList[iList[i]], &vList[iList[i+1]]);
|
||||
}
|
||||
}
|
||||
all_done:
|
||||
@@ -824,8 +820,7 @@ GR_ENTRY(grDrawPlanarPolygonVertexList, void, (int nVerts, const GrVertex vList[
|
||||
/* now all the gradients are loaded into the chip, so we just have to */
|
||||
/* draw all the rest of the triangles */
|
||||
for (i = i+1; i < nVerts - 1; i++) {
|
||||
//_trisetup_nogradients(firstv, &vList[i], &vList[i+1]);
|
||||
TRISETUP(firstv, &vList[i], &vList[i+1]);
|
||||
_trisetup_nogradients(firstv, &vList[i], &vList[i+1]);
|
||||
}
|
||||
|
||||
all_done:
|
||||
|
||||
Reference in New Issue
Block a user