From ddfe7200e2afa2c16e79302e417fdee8da30760f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Cadete?= Date: Mon, 18 Jan 2021 15:00:50 +0000 Subject: [PATCH] Rendering improvements - Improve performance for unbatched rendering - Support direct texture access --- src/render/vitagxm/SDL_render_vita_gxm.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/render/vitagxm/SDL_render_vita_gxm.c b/src/render/vitagxm/SDL_render_vita_gxm.c index d861c11a3..4be15d5a9 100644 --- a/src/render/vitagxm/SDL_render_vita_gxm.c +++ b/src/render/vitagxm/SDL_render_vita_gxm.c @@ -148,9 +148,7 @@ void StartDrawing(SDL_Renderer *renderer) { VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; - if(data->drawing) - { - SDL_LogError(SDL_LOG_CATEGORY_RENDER, "uh-oh, already drawing\n"); + if (data->drawing) { return; } @@ -993,9 +991,6 @@ VITA_GXM_RunCommandQueue(SDL_Renderer * renderer, SDL_RenderCommand *cmd, void * cmd = cmd->next; } - sceGxmEndScene(data->gxm_context, NULL, NULL); - data->drawing = SDL_FALSE; - return 0; } @@ -1091,6 +1086,11 @@ VITA_GXM_RenderPresent(SDL_Renderer *renderer) VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata; SceCommonDialogUpdateParam updateParam; + if(data->drawing) { + sceGxmEndScene(data->gxm_context, NULL, NULL); + sceGxmFinish(data->gxm_context); + } + data->displayData.address = data->displayBufferData[data->backBufferIndex]; SDL_memset(&updateParam, 0, sizeof(updateParam));