From fcda3df24dd346cb8637209dcb25e05a7adc25ec Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Tue, 25 Aug 2020 03:20:52 -0700 Subject: [PATCH] 3DS: Slightly refactor GPU operations --- src/platform/3ds/ctr-gpu.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/platform/3ds/ctr-gpu.c b/src/platform/3ds/ctr-gpu.c index df99d1e10..4a95c4640 100644 --- a/src/platform/3ds/ctr-gpu.c +++ b/src/platform/3ds/ctr-gpu.c @@ -80,6 +80,10 @@ bool ctrInitGpu(void) { AttrInfo_AddLoader(attrInfo, 2, GPU_UNSIGNED_BYTE, 4); // in_col AttrInfo_AddLoader(attrInfo, 3, GPU_FLOAT, 2); // in_rot + C3D_BufInfo* bufInfo = C3D_GetBufInfo(); + BufInfo_Init(bufInfo); + BufInfo_Add(bufInfo, ctrVertexBuffer, sizeof(struct ctrUIVertex), 4, 0x3210); + return true; } @@ -213,13 +217,8 @@ void ctrStartFrame(void) { ctrNumVerts = 0; ctrVertStart = 0; activeTexture = NULL; - - C3D_BufInfo* bufInfo = C3D_GetBufInfo(); - BufInfo_Init(bufInfo); - BufInfo_Add(bufInfo, ctrVertexBuffer, sizeof(struct ctrUIVertex), 4, 0x3210); } void ctrEndFrame(void) { ctrFlushBatch(); - GSPGPU_FlushDataCache(ctrVertexBuffer, sizeof(struct ctrUIVertex) * ctrNumVerts); }