mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-10-04 17:09:09 +00:00
Adding assertions
- Adding assertions to each specific sceGu function - Also adding printf for verbose output
This commit is contained in:
@@ -10,6 +10,13 @@
|
||||
|
||||
void sceGuDepthBuffer(void *zbp, int zbw)
|
||||
{
|
||||
#ifdef GU_DEBUG
|
||||
printf("sceGuDepthBuffer(%p, %d);\n", zbp, zbw);
|
||||
assert(gu_init && "GU not initialized");
|
||||
assert((zbw & 0x1FFF) == 0 && "Depth buffer pointer must be 8192-byte aligned");
|
||||
assert(zbw > 64 && zbw <= 1024 && (zbw & 0x3F) == 0 && "Invalid depth buffer width, must be multiple of 64");
|
||||
#endif
|
||||
|
||||
sendCommandi(Z_BUF_PTR, ((unsigned int)zbp));
|
||||
sendCommandi(Z_BUF_WIDTH, ((((unsigned int)zbp) & 0xff000000) >> 8) | zbw);
|
||||
|
||||
|
Reference in New Issue
Block a user