temporary solution for 0x10 byte gpucmd alignment
fixes A LOT of gpu related issues (temporary solution because big gpu refactor is coming soon)
This commit is contained in:
parent
8cb3fad657
commit
c282d4262e
@ -96,6 +96,7 @@ void GPUCMD_Finalize()
|
||||
GPUCMD_AddSingleParam(0x000F0111, 0x00000001);
|
||||
GPUCMD_AddSingleParam(0x000F0110, 0x00000001);
|
||||
GPUCMD_AddSingleParam(0x000F0010, 0x12345678);
|
||||
GPUCMD_AddSingleParam(0x000F0010, 0x12345678); //not the cleanest way of guaranteeing 0x10-byte size but whatever good enough for now
|
||||
}
|
||||
|
||||
extern u32 gpuResetSequence[];
|
||||
|
@ -71,18 +71,6 @@ s8 SHDR_GetUniformRegister(DVLB_s* dvlb, char* name, u8 programID)
|
||||
return -1;
|
||||
}
|
||||
|
||||
//hm
|
||||
static inline u8 minu8(u8 a, u8 b)
|
||||
{
|
||||
if(a<b)return a;
|
||||
return b;
|
||||
}
|
||||
static inline u8 maxu8(u8 a, u8 b)
|
||||
{
|
||||
if(a<b)return b;
|
||||
return a;
|
||||
}
|
||||
|
||||
void DVLP_SendCode(DVLP_s* dvlp)
|
||||
{
|
||||
if(!dvlp)return;
|
||||
@ -90,8 +78,7 @@ void DVLP_SendCode(DVLP_s* dvlp)
|
||||
GPUCMD_AddSingleParam(0x000F02CB, 0x00000000);
|
||||
|
||||
int i;
|
||||
// for(i=0;i<dvlp->codeSize;i+=0x80)GPUCMD_Add(0x000F02CC, &dvlp->codeData[i], ((dvlp->codeSize-i)<0x80)?(dvlp->codeSize-i):0x80);
|
||||
for(i=0;i<dvlp->codeSize;i+=0x80)GPUCMD_Add(0x000F02CC, &dvlp->codeData[i], maxu8(minu8(dvlp->codeSize-i,0x80),0x37)); //not sure why, but anything smaller than 0x37 seems to break stuff atm...
|
||||
for(i=0;i<dvlp->codeSize;i+=0x80)GPUCMD_Add(0x000F02CC, &dvlp->codeData[i], ((dvlp->codeSize-i)<0x80)?(dvlp->codeSize-i):0x80);
|
||||
|
||||
GPUCMD_AddSingleParam(0x000F02BF, 0x00000001);
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
Handle gspGpuHandle=0;
|
||||
Handle gspEvents[GSPEVENT_MAX];
|
||||
u32 gspEventCounts[GSPEVENT_MAX];
|
||||
u64 gspEventStack[GSP_EVENT_STACK_SIZE/sizeof(u64)]; //u64 so that it's 8-byte aligned
|
||||
volatile bool gspRunEvents;
|
||||
Handle gspEventThread;
|
||||
@ -97,6 +98,7 @@ void gspEventThreadMain(u32 arg)
|
||||
if (cur >= 0x34) cur -= 0x34;
|
||||
if (curEvt >= GSPEVENT_MAX) continue;
|
||||
svcSignalEvent(gspEvents[curEvt]);
|
||||
gspEventCounts[curEvt]++;
|
||||
}
|
||||
|
||||
gspEventData[0] = last;
|
||||
|
Loading…
Reference in New Issue
Block a user