MCPcopy Create free account
hub / github.com/devkitPro/libctru / gfxFlushBuffers

Function gfxFlushBuffers

libctru/source/gfx.c:231–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229}
230
231void gfxFlushBuffers(void)
232{
233 const u32 baseSize = GSP_SCREEN_WIDTH * gspGetBytesPerPixel(gfxGetScreenFormat(GFX_TOP));
234 const u32 topSize = GSP_SCREEN_HEIGHT_TOP * baseSize;
235 const u32 topSize2x = GSP_SCREEN_HEIGHT_TOP_2X * baseSize;
236 const u32 bottomSize = GSP_SCREEN_HEIGHT_BOTTOM * baseSize;
237
238 GSPGPU_FlushDataCache(gfxGetFramebuffer(GFX_TOP, GFX_LEFT, NULL, NULL), gfxTopMode == MODE_WIDE ? topSize2x : topSize);
239 if (gfxTopMode == MODE_3D)
240 GSPGPU_FlushDataCache(gfxGetFramebuffer(GFX_TOP, GFX_RIGHT, NULL, NULL), topSize);
241 GSPGPU_FlushDataCache(gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, NULL, NULL), bottomSize);
242}
243
244void gfxScreenSwapBuffers(gfxScreen_t scr, bool hasStereo)
245{

Callers 3

consoleClsFunction · 0.85
consoleClearLineFunction · 0.85
consolePrintCharFunction · 0.85

Calls 4

gspGetBytesPerPixelFunction · 0.85
gfxGetScreenFormatFunction · 0.85
GSPGPU_FlushDataCacheFunction · 0.85
gfxGetFramebufferFunction · 0.85

Tested by

no test coverage detected