added GX_SetMemoryFill control enums

This commit is contained in:
Lectem 2015-06-03 21:17:38 +02:00
parent 37ae484338
commit de687695cf
3 changed files with 14 additions and 5 deletions

View File

@ -315,7 +315,7 @@ int main(int argc, char** argv)
//we draw the right buffer, wait for it to finish and then switch back to left one
//clear the screen
GX_SetMemoryFill(NULL, (u32*)gpuOut, backgroundColor, (u32*)&gpuOut[0x2EE00], 0x201, (u32*)gpuDOut, 0x00000000, (u32*)&gpuDOut[0x2EE00], 0x201);
GX_SetMemoryFill(NULL, (u32*)gpuOut, backgroundColor, (u32*)&gpuOut[0x2EE00], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH , (u32*)gpuDOut, 0x00000000, (u32*)&gpuDOut[0x2EE00], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH);
gspWaitForPSC0();
//draw the right framebuffer
@ -339,7 +339,7 @@ int main(int argc, char** argv)
}
//clear the screen
GX_SetMemoryFill(NULL, (u32*)gpuOut, backgroundColor, (u32*)&gpuOut[0x2EE00], 0x201, (u32*)gpuDOut, 0x00000000, (u32*)&gpuDOut[0x2EE00], 0x201);
GX_SetMemoryFill(NULL, (u32*)gpuOut, backgroundColor, (u32*)&gpuOut[0x2EE00], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH, (u32*)gpuDOut, 0x00000000, (u32*)&gpuDOut[0x2EE00], GX_FILL_TRIGGER | GX_FILL_32BIT_DEPTH);
gspWaitForPSC0();
gfxSwapBuffersGpu();

View File

@ -18,6 +18,15 @@ typedef enum
GX_TRANSFER_SCALE_Y = 2
} GX_TRANSFER_SCALE;
typedef enum
{
GX_FILL_TRIGGER = 0x001,
GX_FILL_FINISHED = 0x002,
GX_FILL_16BIT_DEPTH = 0x000,
GX_FILL_24BIT_DEPTH = 0x100,
GX_FILL_32BIT_DEPTH = 0x200,
} GX_FILL_CONTROL;
#define GX_TRANSFER_FLIP_VERT(x) ((x)<<0)
#define GX_TRANSFER_OUT_TILED(x) ((x)<<1)
#define GX_TRANSFER_RAW_COPY(x) ((x)<<3)
@ -27,7 +36,7 @@ typedef enum
Result GX_RequestDma(u32* gxbuf, u32* src, u32* dst, u32 length);
Result GX_SetCommandList_Last(u32* gxbuf, u32* buf0a, u32 buf0s, u8 flags);
Result GX_SetMemoryFill(u32* gxbuf, u32* buf0a, u32 buf0v, u32* buf0e, u16 width0, u32* buf1a, u32 buf1v, u32* buf1e, u16 width1);
Result GX_SetMemoryFill(u32* gxbuf, u32* buf0a, u32 buf0v, u32* buf0e, u16 control0, u32* buf1a, u32 buf1v, u32* buf1e, u16 control1);
Result GX_SetDisplayTransfer(u32* gxbuf, u32* inadr, u32 indim, u32* outadr, u32 outdim, u32 flags);
Result GX_SetTextureCopy(u32* gxbuf, u32* inadr, u32 indim, u32* outadr, u32 outdim, u32 size, u32 flags);
Result GX_SetCommandList_First(u32* gxbuf, u32* buf0a, u32 buf0s, u32* buf1a, u32 buf1s, u32* buf2a, u32 buf2s);

View File

@ -40,7 +40,7 @@ Result GX_SetCommandList_Last(u32* gxbuf, u32* buf0a, u32 buf0s, u8 flags)
return GSPGPU_SubmitGxCommand(gxbuf, gxCommand, NULL);
}
Result GX_SetMemoryFill(u32* gxbuf, u32* buf0a, u32 buf0v, u32* buf0e, u16 width0, u32* buf1a, u32 buf1v, u32* buf1e, u16 width1)
Result GX_SetMemoryFill(u32* gxbuf, u32* buf0a, u32 buf0v, u32* buf0e, u16 control0, u32* buf1a, u32 buf1v, u32* buf1e, u16 control1)
{
if(!gxbuf)gxbuf=gxCmdBuf;
@ -53,7 +53,7 @@ Result GX_SetMemoryFill(u32* gxbuf, u32* buf0a, u32 buf0v, u32* buf0e, u16 width
gxCommand[4]=(u32)buf1a; //buf1 address
gxCommand[5]=buf1v; //buf1 value
gxCommand[6]=(u32)buf1e; //buf1 end addr
gxCommand[7]=(width0)|(width1<<16);
gxCommand[7]=(control0)|(control1<<16);
return GSPGPU_SubmitGxCommand(gxbuf, gxCommand, NULL);
}