Skip to content

Commit

Permalink
Init gpu interrupt queue header
Browse files Browse the repository at this point in the history
  • Loading branch information
kynex7510 authored and fincs committed Nov 20, 2024
1 parent 8cbcce7 commit 30dc651
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libctru/source/services/gspgpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ Result gspInit(void)
gspSharedMem = mappableAlloc(0x1000);
svcMapMemoryBlock(gspSharedMemHandle, (u32)gspSharedMem, MEMPERM_READWRITE, MEMPERM_DONTCARE);

// Initialize interrupt queue header
s32* sharedGspCmdBuf = (s32*)((u8*)gspSharedMem + 0x800 + gspThreadId*0x200);
do {
__ldrex(sharedGspCmdBuf);
} while (__strex(sharedGspCmdBuf, 0));

// Start event handling thread
gspRunEvents = true;
gspLastEvent = -1;
Expand Down

0 comments on commit 30dc651

Please sign in to comment.