Adapt to latest changes in great-refactor
This commit is contained in:
parent
be1038ee53
commit
ca410a80ac
@ -6,7 +6,7 @@ static void C3Di_SetTex(GPU_TEXUNIT unit, C3D_Tex* tex)
|
|||||||
{
|
{
|
||||||
u32 reg[4];
|
u32 reg[4];
|
||||||
reg[0] = tex->fmt;
|
reg[0] = tex->fmt;
|
||||||
reg[1] = osConvertVirtToPhys((u32)tex->data) >> 3;
|
reg[1] = osConvertVirtToPhys(tex->data) >> 3;
|
||||||
reg[2] = (u32)tex->height | ((u32)tex->width << 16);
|
reg[2] = (u32)tex->height | ((u32)tex->width << 16);
|
||||||
reg[3] = tex->param;
|
reg[3] = tex->param;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ int BufInfo_Add(C3D_BufInfo* info, const void* data, ptrdiff_t stride, int attri
|
|||||||
if (info->bufCount == 12) return -1;
|
if (info->bufCount == 12) return -1;
|
||||||
int id = info->bufCount++;
|
int id = info->bufCount++;
|
||||||
|
|
||||||
u32 pa = osConvertVirtToPhys((u32)data);
|
u32 pa = osConvertVirtToPhys(data);
|
||||||
if (pa < info->base_paddr) return -2;
|
if (pa < info->base_paddr) return -2;
|
||||||
|
|
||||||
C3D_BufCfg* buf = &info->buffers[id];
|
C3D_BufCfg* buf = &info->buffers[id];
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
void C3D_DrawElements(GPU_Primitive_t primitive, int count, int type, const void* indices)
|
void C3D_DrawElements(GPU_Primitive_t primitive, int count, int type, const void* indices)
|
||||||
{
|
{
|
||||||
C3D_Context* ctx = C3Di_GetContext();
|
C3D_Context* ctx = C3Di_GetContext();
|
||||||
u32 pa = osConvertVirtToPhys((u32)indices);
|
u32 pa = osConvertVirtToPhys(indices);
|
||||||
u32 base = ctx->bufInfo.base_paddr;
|
u32 base = ctx->bufInfo.base_paddr;
|
||||||
if (pa < base) return;
|
if (pa < base) return;
|
||||||
|
|
||||||
|
@ -75,8 +75,8 @@ void C3Di_RenderBufBind(C3D_RenderBuf* rb)
|
|||||||
|
|
||||||
GPUCMD_AddWrite(GPUREG_FRAMEBUFFER_INVALIDATE, 1);
|
GPUCMD_AddWrite(GPUREG_FRAMEBUFFER_INVALIDATE, 1);
|
||||||
|
|
||||||
param[0] = osConvertVirtToPhys((u32)rb->depthBuf) >> 3;
|
param[0] = osConvertVirtToPhys(rb->depthBuf) >> 3;
|
||||||
param[1] = osConvertVirtToPhys((u32)rb->colorBuf) >> 3;
|
param[1] = osConvertVirtToPhys(rb->colorBuf) >> 3;
|
||||||
param[2] = 0x01000000 | (((u32)(rb->height-1) & 0xFFF) << 12) | (rb->width & 0xFFF);
|
param[2] = 0x01000000 | (((u32)(rb->height-1) & 0xFFF) << 12) | (rb->width & 0xFFF);
|
||||||
GPUCMD_AddIncrementalWrites(GPUREG_DEPTHBUFFER_LOC, param, 3);
|
GPUCMD_AddIncrementalWrites(GPUREG_DEPTHBUFFER_LOC, param, 3);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user