mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-26 04:12:34 +01:00
- [Psy-X] fix more problems with primitive iteration
This commit is contained in:
parent
297ceca586
commit
5f9e5fcc52
@ -352,7 +352,7 @@ u_long* ClearOTag(u_long* ot, int n)
|
||||
// make a linked list with it's next items
|
||||
for (int i = (n-1) * OT_WIDTH; i >= 0; i -= OT_WIDTH)
|
||||
{
|
||||
setaddr(&ot[i], (u_long)&ot[i + OT_WIDTH]);
|
||||
setaddr(&ot[i], &ot[i + OT_WIDTH]);
|
||||
setlen(&ot[i], 0);
|
||||
}
|
||||
|
||||
@ -371,7 +371,7 @@ u_long* ClearOTagR(u_long* ot, int n)
|
||||
// initialize a linked list with it's previous items
|
||||
for (int i = OT_WIDTH; i < n * OT_WIDTH; i += OT_WIDTH)
|
||||
{
|
||||
setaddr(&ot[i], (u_long)&ot[i - OT_WIDTH]);
|
||||
setaddr(&ot[i], &ot[i - OT_WIDTH]);
|
||||
setlen(&ot[i], 0);
|
||||
}
|
||||
|
||||
@ -1380,7 +1380,7 @@ int ParseLinkedPrimitiveList(uintptr_t packetStart, uintptr_t packetEnd)
|
||||
|
||||
int lastSize = -1;
|
||||
|
||||
while (currentAddress != packetEnd)
|
||||
while (currentAddress < packetEnd)
|
||||
{
|
||||
lastSize = ParsePrimitive(currentAddress);
|
||||
|
||||
|
@ -190,13 +190,15 @@ extern int (*GPU_printf)(const char *fmt, ...);
|
||||
#define getcode(p) (u_char)(((P_TAG *)(p))->code)
|
||||
#define getaddr(p) (u_long)(((P_TAG *)(p))->addr)
|
||||
|
||||
#define nextPrim(p) (void *)((((P_TAG *)(p))->addr)|0x80000000)
|
||||
#define isendprim(p) ((((P_TAG *)(p))->addr)==0xffffff)
|
||||
|
||||
#if defined(PGXP) && defined(USE_32_BIT_ADDR)
|
||||
#define setpgxpindex(p, _pgxp_index) (((P_TAG *)(p))->pgxp_index = (u_short)(_pgxp_index))
|
||||
|
||||
#define isendprim(p) ((((P_TAG *)(p))->addr)==0xffffffff)
|
||||
#define nextPrim(p) (void *)(((P_TAG *)(p))->addr)
|
||||
#define addPrim(ot, p) setaddr(p, getaddr(ot)), setaddr(ot, p), setpgxpindex(p, PGXP_GetIndex())
|
||||
#else
|
||||
#define isendprim(p) ((((P_TAG *)(p))->addr)==0xffffff)
|
||||
#define nextPrim(p) (void *)((((P_TAG *)(p))->addr)|0x80000000)
|
||||
#define addPrim(ot, p) setaddr(p, getaddr(ot)), setaddr(ot, p)
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user