GSP/GFX stuff

This commit is contained in:
smea 2014-08-25 21:48:00 -07:00
parent 4f397abd63
commit d30d5283c6
2 changed files with 3 additions and 2 deletions

View File

@ -26,8 +26,6 @@ u8* gspHeap;
u32* gxCmdBuf; u32* gxCmdBuf;
extern u32 __gsp_heap_size; extern u32 __gsp_heap_size;
// TODO: this function is not thread-safe and you cannot 'free' this memory. // TODO: this function is not thread-safe and you cannot 'free' this memory.
void* gfxAllocLinear(size_t size) void* gfxAllocLinear(size_t size)
{ {

View File

@ -356,6 +356,9 @@ Result GSPGPU_RestoreVramSysArea(Handle* handle)
Result GSPGPU_SubmitGxCommand(u32* sharedGspCmdBuf, u32 gxCommand[0x8], Handle* handle) Result GSPGPU_SubmitGxCommand(u32* sharedGspCmdBuf, u32 gxCommand[0x8], Handle* handle)
{ {
if(!sharedGspCmdBuf || !gxCommand)return -1; if(!sharedGspCmdBuf || !gxCommand)return -1;
svcWaitSynchronization(gspEvent, 0x55bcb0);
svcClearEvent(gspEvent);
u32 cmdBufHeader; u32 cmdBufHeader;
__asm__ ("ldrex %[result], [%[adr]]" : [result] "=r" (cmdBufHeader) : [adr] "r" (sharedGspCmdBuf)); __asm__ ("ldrex %[result], [%[adr]]" : [result] "=r" (cmdBufHeader) : [adr] "r" (sharedGspCmdBuf));