mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-20 21:20:59 +00:00
Remove sceGxmFinish from RenderPresent on Vita. Make sure that rendering is finished on render texture during locking
This commit is contained in:
parent
f3640e26a4
commit
fba82ad1cb
|
@ -357,12 +357,19 @@ static int
|
||||||
VITA_GXM_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture,
|
VITA_GXM_LockTexture(SDL_Renderer *renderer, SDL_Texture *texture,
|
||||||
const SDL_Rect *rect, void **pixels, int *pitch)
|
const SDL_Rect *rect, void **pixels, int *pitch)
|
||||||
{
|
{
|
||||||
|
VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata;
|
||||||
VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *) texture->driverdata;
|
VITA_GXM_TextureData *vita_texture = (VITA_GXM_TextureData *) texture->driverdata;
|
||||||
|
|
||||||
*pixels =
|
*pixels =
|
||||||
(void *) ((Uint8 *) gxm_texture_get_datap(vita_texture->tex)
|
(void *) ((Uint8 *) gxm_texture_get_datap(vita_texture->tex)
|
||||||
+ (rect->y * vita_texture->pitch) + rect->x * SDL_BYTESPERPIXEL(texture->format));
|
+ (rect->y * vita_texture->pitch) + rect->x * SDL_BYTESPERPIXEL(texture->format));
|
||||||
*pitch = vita_texture->pitch;
|
*pitch = vita_texture->pitch;
|
||||||
|
|
||||||
|
// make sure that rendering is finished on render target textures
|
||||||
|
if (vita_texture->tex->gxm_rendertarget != NULL) {
|
||||||
|
sceGxmFinish(data->gxm_context);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -973,10 +980,6 @@ VITA_GXM_RenderPresent(SDL_Renderer *renderer)
|
||||||
VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata;
|
VITA_GXM_RenderData *data = (VITA_GXM_RenderData *) renderer->driverdata;
|
||||||
SceCommonDialogUpdateParam updateParam;
|
SceCommonDialogUpdateParam updateParam;
|
||||||
|
|
||||||
if (data->displayData.wait_vblank) {
|
|
||||||
sceGxmFinish(data->gxm_context);
|
|
||||||
}
|
|
||||||
|
|
||||||
data->displayData.address = data->displayBufferData[data->backBufferIndex];
|
data->displayData.address = data->displayBufferData[data->backBufferIndex];
|
||||||
|
|
||||||
SDL_memset(&updateParam, 0, sizeof(updateParam));
|
SDL_memset(&updateParam, 0, sizeof(updateParam));
|
||||||
|
|
Loading…
Reference in a new issue