//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
}
//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();
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)
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);
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;
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);
}