gspgpu: fix const correctness issues
This commit is contained in:
parent
02f516111f
commit
dcf83900b9
@ -156,7 +156,7 @@ GSPGPU_Event gspWaitForAnyEvent(void);
|
|||||||
* @brief Submits a GX command.
|
* @brief Submits a GX command.
|
||||||
* @param gxCommand GX command to execute.
|
* @param gxCommand GX command to execute.
|
||||||
*/
|
*/
|
||||||
Result gspSubmitGxCommand(u32 gxCommand[0x8]);
|
Result gspSubmitGxCommand(const u32 gxCommand[0x8]);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Acquires GPU rights.
|
* @brief Acquires GPU rights.
|
||||||
@ -193,7 +193,7 @@ Result GSPGPU_SetLcdForceBlack(u8 flags);
|
|||||||
* @param screenid ID of the screen to update.
|
* @param screenid ID of the screen to update.
|
||||||
* @param framebufinfo Framebuffer information to update with.
|
* @param framebufinfo Framebuffer information to update with.
|
||||||
*/
|
*/
|
||||||
Result GSPGPU_SetBufferSwap(u32 screenid, GSPGPU_FramebufferInfo*framebufinfo);
|
Result GSPGPU_SetBufferSwap(u32 screenid, const GSPGPU_FramebufferInfo* framebufinfo);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Flushes memory from the data cache.
|
* @brief Flushes memory from the data cache.
|
||||||
@ -215,7 +215,7 @@ Result GSPGPU_InvalidateDataCache(const void* adr, u32 size);
|
|||||||
* @param data Data to write.
|
* @param data Data to write.
|
||||||
* @param size Size of the data to write.
|
* @param size Size of the data to write.
|
||||||
*/
|
*/
|
||||||
Result GSPGPU_WriteHWRegs(u32 regAddr, u32* data, u8 size);
|
Result GSPGPU_WriteHWRegs(u32 regAddr, const u32* data, u8 size);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Writes to GPU hardware registers with a mask.
|
* @brief Writes to GPU hardware registers with a mask.
|
||||||
@ -225,7 +225,7 @@ Result GSPGPU_WriteHWRegs(u32 regAddr, u32* data, u8 size);
|
|||||||
* @param maskdata Data of the mask.
|
* @param maskdata Data of the mask.
|
||||||
* @param masksize Size of the mask.
|
* @param masksize Size of the mask.
|
||||||
*/
|
*/
|
||||||
Result GSPGPU_WriteHWRegsWithMask(u32 regAddr, u32* data, u8 datasize, u32* maskdata, u8 masksize);
|
Result GSPGPU_WriteHWRegsWithMask(u32 regAddr, const u32* data, u8 datasize, const u32* maskdata, u8 masksize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Reads from GPU hardware registers.
|
* @brief Reads from GPU hardware registers.
|
||||||
|
@ -297,7 +297,7 @@ GSPGPU_Event gspWaitForAnyEvent(void)
|
|||||||
return (GSPGPU_Event)x;
|
return (GSPGPU_Event)x;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int popInterrupt()
|
static int popInterrupt(void)
|
||||||
{
|
{
|
||||||
int curEvt;
|
int curEvt;
|
||||||
bool strexFailed;
|
bool strexFailed;
|
||||||
@ -379,7 +379,7 @@ void gspEventThreadMain(void *arg)
|
|||||||
//essentially : get commandIndex and totalCommands, calculate offset of new command, copy command and update totalCommands
|
//essentially : get commandIndex and totalCommands, calculate offset of new command, copy command and update totalCommands
|
||||||
//use LDREX/STREX because this data may also be accessed by the GSP module and we don't want to break stuff
|
//use LDREX/STREX because this data may also be accessed by the GSP module and we don't want to break stuff
|
||||||
//(mostly, we could overwrite the buffer header with wrong data and make the GSP module reexecute old commands)
|
//(mostly, we could overwrite the buffer header with wrong data and make the GSP module reexecute old commands)
|
||||||
Result gspSubmitGxCommand(u32 gxCommand[0x8])
|
Result gspSubmitGxCommand(const u32 gxCommand[0x8])
|
||||||
{
|
{
|
||||||
u32* sharedGspCmdBuf = (u32*)((u8*)gspSharedMem + 0x800 + gspThreadId*0x200);
|
u32* sharedGspCmdBuf = (u32*)((u8*)gspSharedMem + 0x800 + gspThreadId*0x200);
|
||||||
u32 cmdBufHeader = __ldrex((s32*)sharedGspCmdBuf);
|
u32 cmdBufHeader = __ldrex((s32*)sharedGspCmdBuf);
|
||||||
@ -410,7 +410,7 @@ Result gspSubmitGxCommand(u32 gxCommand[0x8])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
Result GSPGPU_WriteHWRegs(u32 regAddr, u32* data, u8 size)
|
Result GSPGPU_WriteHWRegs(u32 regAddr, const u32* data, u8 size)
|
||||||
{
|
{
|
||||||
if(size>0x80 || !data)return -1;
|
if(size>0x80 || !data)return -1;
|
||||||
|
|
||||||
@ -427,7 +427,7 @@ Result GSPGPU_WriteHWRegs(u32 regAddr, u32* data, u8 size)
|
|||||||
return cmdbuf[1];
|
return cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
Result GSPGPU_WriteHWRegsWithMask(u32 regAddr, u32* data, u8 datasize, u32* maskdata, u8 masksize)
|
Result GSPGPU_WriteHWRegsWithMask(u32 regAddr, const u32* data, u8 datasize, const u32* maskdata, u8 masksize)
|
||||||
{
|
{
|
||||||
if(datasize>0x80 || !data)return -1;
|
if(datasize>0x80 || !data)return -1;
|
||||||
|
|
||||||
@ -463,7 +463,7 @@ Result GSPGPU_ReadHWRegs(u32 regAddr, u32* data, u8 size)
|
|||||||
return cmdbuf[1];
|
return cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
Result GSPGPU_SetBufferSwap(u32 screenid, GSPGPU_FramebufferInfo*framebufinfo)
|
Result GSPGPU_SetBufferSwap(u32 screenid, const GSPGPU_FramebufferInfo*framebufinfo)
|
||||||
{
|
{
|
||||||
u32 *cmdbuf = getThreadCommandBuffer();
|
u32 *cmdbuf = getThreadCommandBuffer();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user