sst1 gcc4 compile fixes

This commit is contained in:
jwrdegoede
2005-05-10 11:27:23 +00:00
parent 292e2fba9c
commit e2d97af291
5 changed files with 42 additions and 26 deletions

View File

@@ -19,6 +19,11 @@
**
** $Header$
** $Log$
** Revision 1.1.2.5 2004/10/04 09:35:59 dborca
** second cut at Glide3x for Voodoo1/Rush (massive update):
** delayed validation, vertex snapping, clip coordinates, strip/fan_continue, bugfixes.
** and probably a bunch of other crap that I forgot
**
** Revision 1.1.2.1 2004/03/02 07:55:29 dborca
** Bastardised Glide3x for SST1
**
@@ -413,7 +418,7 @@ GR_DIENTRY(grDrawVertexArray, void , (FxU32 mode, FxU32 Count, void *pointers) )
_grAADrawTriangles(GR_VTX_PTR_ARRAY, GR_TRIANGLES, Count, pointers);
else {
FxU32 i;
for (i = 0; i < Count; i+=3, (float *)pointers +=3)
for (i = 0; i < Count; i+=3, pointers = (float *)pointers + 3)
_grAAVpDrawTriangle(*((float **)pointers),
*((float **)pointers+1),
*((float **)pointers+2),
@@ -502,7 +507,7 @@ GR_DIENTRY(grDrawVertexArrayContiguous, void , (FxU32 mode, FxU32 Count, void *p
_grAADrawTriangles(GR_VTX_PTR, GR_TRIANGLES, Count, pointers);
else {
FxU32 i;
for (i = 0; i < Count; i+=3, (float *)pointers +=gc->state.vData.vStride)
for (i = 0; i < Count; i+=3, pointers = (float *)pointers + gc->state.vData.vStride)
_grAAVpDrawTriangle((float *)pointers,
(float *)((int)pointers+stride),
(float *)((int)pointers+(stride<<1)),

View File

@@ -19,6 +19,11 @@
**
** $Header$
** $Log$
** Revision 1.1.2.2 2004/10/04 09:35:59 dborca
** second cut at Glide3x for Voodoo1/Rush (massive update):
** delayed validation, vertex snapping, clip coordinates, strip/fan_continue, bugfixes.
** and probably a bunch of other crap that I forgot
**
** Revision 1.1.2.1 2004/03/02 07:55:30 dborca
** Bastardised Glide3x for SST1
**
@@ -656,7 +661,7 @@ _grAADrawPoints(FxI32 mode, FxI32 count, void *pointers)
else
e = pointers;
(float *)pointers += stride;
pointers = (float *)pointers + stride;
PX = (volatile float) (VX(e)+SNAP_BIAS);
PY = (volatile float) (VY(e)+SNAP_BIAS);
@@ -760,7 +765,7 @@ _grAADrawPoints(FxI32 mode, FxI32 count, void *pointers)
e = pointers;
oow = 1.0f / FARRAY(e, gc->state.vData.wInfo.offset);
(float *)pointers += stride;
pointers = (float *)pointers + stride;
PX = (volatile float) (VX(e)*oow*gc->state.Viewport.hwidth+
gc->state.Viewport.ox + SNAP_BIAS);
@@ -1064,9 +1069,9 @@ _grAADrawLineStrip(FxI32 mode, FxI32 ltype, FxI32 count, void *pointers)
v1 = pointers;
v2 = (float *)pointers + stride;
}
(float *)pointers += stride;
pointers = (float *)pointers + stride;
if (ltype == GR_LINES)
(float *)pointers += stride;
pointers = (float *)pointers + stride;
/* draw from low Y to high Y */
if ( VY(v2) < VY(v1) ) {
@@ -1292,9 +1297,9 @@ _grAADrawLineStrip(FxI32 mode, FxI32 ltype, FxI32 count, void *pointers)
v1 = pointers;
v2 = (float *)pointers + stride;
}
(float *)pointers += stride;
pointers = (float *)pointers + stride;
if (ltype == GR_LINES)
(float *)pointers += stride;
pointers = (float *)pointers + stride;
oowa = 1.0f / FARRAY(v1, gc->state.vData.wInfo.offset);
oowb = 1.0f / FARRAY(v2, gc->state.vData.wInfo.offset);
@@ -1883,7 +1888,7 @@ _grAADrawTriangles(FxI32 mode, FxI32 ttype, FxI32 count, void *pointers)
b = *(float **)b;
c = *(float **)c;
}
(float *)pointers += stride*3;
pointers = (float *)pointers + stride*3;
/* move culling test to here */
{

View File

@@ -19,6 +19,9 @@
**
** $Header$
** $Log$
** Revision 1.1.2.3 2004/10/08 06:30:19 dborca
** save a round-trip with grDrawTriangle in SST1
**
** Revision 1.1.2.2 2004/10/04 09:35:59 dborca
** second cut at Glide3x for Voodoo1/Rush (massive update):
** delayed validation, vertex snapping, clip coordinates, strip/fan_continue, bugfixes.
@@ -1428,7 +1431,7 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers)
else
vPtr = pointers;
(float *)pointers += stride;
pointers = (float *)pointers + stride;
#if 0 //def GLIDE_USE_ALT_REGMAP
hw = SST_WRAP(hw,128); /* use alternate register mapping */
@@ -1499,7 +1502,7 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers)
vPtr = pointers;
oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset);
(float *)pointers += stride;
pointers = (float *)pointers + stride;
#if 0 //def GLIDE_USE_ALT_REGMAP
hw = SST_WRAP(hw,128); /* use alternate register mapping */
@@ -1730,9 +1733,9 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype, FxI32 count, void *pointers)
snap_ya = (volatile float) (*(a+1) + SNAP_BIAS);
snap_yb = (volatile float) (*(b+1) + SNAP_BIAS);
(float *)pointers += stride;
pointers = (float *)pointers + stride;
if (ltype == GR_LINES)
(float *)pointers += stride;
pointers = (float *)pointers + stride;
#if 0 //def GLIDE_USE_ALT_REGMAP
hw = SST_WRAP(hw,128); /* use alternate register mapping */
@@ -1902,7 +1905,7 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype, FxI32 count, void *pointers)
a = *(float **)a;
b = *(float **)b;
}
(float *)pointers += stride;
pointers = (float *)pointers + stride;
owa = oowa = 1.0f / FARRAY(a, gc->state.vData.wInfo.offset);
owb = oowb = 1.0f / FARRAY(b, gc->state.vData.wInfo.offset);
}
@@ -1925,7 +1928,7 @@ _grDrawLineStrip(FxI32 mode, FxI32 ltype, FxI32 count, void *pointers)
fbx = FARRAY(b, gc->state.vData.vertexInfo.offset)
*owb*gc->state.Viewport.hwidth+gc->state.Viewport.ox + SNAP_BIAS;
(float *)pointers += stride;
pointers = (float *)pointers + stride;
#if 0 //def GLIDE_USE_ALT_REGMAP
hw = SST_WRAP(hw,128); /* use alternate register mapping */
#endif
@@ -2441,7 +2444,7 @@ _grDrawTriangles(FxI32 mode, FxI32 count, void *pointers)
vc = (float *)pointers+(stride<<1);
}
(float *)pointers += (stride+(stride<<1));
pointers = (float *)pointers + (stride+(stride<<1));
if (gc->state.grCoordinateSpaceArgs.coordinate_space_mode == GR_WINDOW_COORDS)
grDrawTriangle(va, vb, vc);

View File

@@ -19,6 +19,11 @@
**
** $Header$
** $Log$
** Revision 1.1.2.1 2004/10/04 09:35:32 dborca
** second cut at Glide3x for Voodoo1/Rush (massive update):
** delayed validation, vertex snapping, clip coordinates, strip/fan_continue, bugfixes.
** and probably a bunch of other crap that I forgot
**
**
** 10 8/21/98 1:26p Atai
** fixed GR_TRIANGLES in windows coords
@@ -213,7 +218,7 @@ _grDrawVertexList(FxU32 type, FxI32 mode, FxI32 count, void *pointers)
float *va, *vb = NULL, *vc = NULL;
v1 = va = (mode == 0) ? pointers : *(float **)pointers;
while (sCount > 0) {
(float *)pointers += stride;
pointers = (float *)pointers + stride;
if (mode) {
vb = *(float **)pointers;
vc = *((float **)pointers+1);
@@ -267,7 +272,7 @@ _grDrawVertexList(FxU32 type, FxI32 mode, FxI32 count, void *pointers)
grDrawTriangle(va, vb, vc);
else
_grVpDrawTriangle(va, vb, vc);
(float *)pointers += stride;
pointers = (float *)pointers + stride;
flip = ~flip;
sCount--;
}
@@ -329,7 +334,7 @@ _grDrawVertexListContinue(FxU32 type, FxI32 mode, FxI32 count, void *pointers)
float *v = (mode == 0) ? pointers : *(float **)pointers;
_grStoreVertex(v, &gc->vert2.x);
gc->vert2_status = FXTRUE;
(float *)pointers += stride;
pointers = (float *)pointers + stride;
count--;
}
if (count == 0) return;
@@ -350,7 +355,7 @@ _grDrawVertexListContinue(FxU32 type, FxI32 mode, FxI32 count, void *pointers)
vc = (float *)pointers+stride;
}
triproc(va, vb, vc, FXTRUE, FXFALSE, FXFALSE);
(float *)pointers += stride;
pointers = (float *)pointers + stride;
}
_grStoreVertex(vc, &gc->vert2.x);
}
@@ -364,7 +369,7 @@ _grDrawVertexListContinue(FxU32 type, FxI32 mode, FxI32 count, void *pointers)
if (!gc->vert2_status) {
float *v = (mode == 0) ? pointers : *(float **)pointers;
_grStoreVertex(v, &gc->vert2.x);
(float *)pointers += stride;
pointers = (float *)pointers + stride;
count--;
gc->vert2_status = FXTRUE;
}
@@ -470,7 +475,7 @@ _grDrawVertexListContinue(FxU32 type, FxI32 mode, FxI32 count, void *pointers)
grDrawTriangle(va, vb, vc);
else
_grVpDrawTriangle(va, vb, vc);
(float *)pointers += stride;
pointers = (float *)pointers + stride;
flip = ~flip;
}
_grStoreVertex(v1, &gc->vert1.x);
@@ -522,7 +527,7 @@ _grAADrawVertexList(FxU32 type, FxI32 mode, FxI32 count, void *pointers)
if (type == kSetupFan) {
v[0] = (mode == 0) ? pointers : *(float **)pointers;
while (sCount--) {
(float *)pointers += stride;
pointers = (float *)pointers + stride;
if (mode) {
v[1] = *(float **)pointers;
v[2] = *((float **)pointers+1);
@@ -564,7 +569,7 @@ _grAADrawVertexList(FxU32 type, FxI32 mode, FxI32 count, void *pointers)
grAADrawTriangle((const float *)v[0], (const float *)v[1], (const float *)v[2], FXTRUE, FXTRUE, FXTRUE);
else
_grAAVpDrawTriangle((const float *)v[0], (const float *)v[1], (const float *)v[2], FXTRUE, FXTRUE, FXTRUE);
(float *)pointers += stride;
pointers = (float *)pointers + stride;
flip = ~flip;
}
flip = ~flip;

View File

@@ -58,8 +58,6 @@
#include <fxpci.h>
#include <gdebug.h>
static const PciRegister PCI_VENDOR_ID = { 0x0, 2, READ_ONLY };
static const PciRegister PCI_DEVICE_ID = { 0x2, 2, READ_ONLY };
/*-------------------------------------------------------------------