From 0b7b0977fc53c0c6d50fde707f4f8b50479ea521 Mon Sep 17 00:00:00 2001 From: stdgregwar Date: Sun, 27 Dec 2020 17:51:39 +0100 Subject: [PATCH] fix PSP texure artifacts --- src/render/psp/SDL_render_psp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/render/psp/SDL_render_psp.c b/src/render/psp/SDL_render_psp.c index 124ede3e9..f4fbd2c13 100644 --- a/src/render/psp/SDL_render_psp.c +++ b/src/render/psp/SDL_render_psp.c @@ -259,6 +259,7 @@ TextureSwizzle(PSP_TextureData *psp_texture) psp_texture->data = data; psp_texture->swizzled = SDL_TRUE; + sceKernelDcacheWritebackRange(psp_texture->data, psp_texture->size); return 1; } int TextureUnswizzle(PSP_TextureData *psp_texture) @@ -291,8 +292,6 @@ int TextureUnswizzle(PSP_TextureData *psp_texture) if(!data) return 0; - sceKernelDcacheWritebackAll(); - ydst = (unsigned char *)data; for(blocky = 0; blocky < heightblocks; ++blocky) @@ -326,6 +325,7 @@ int TextureUnswizzle(PSP_TextureData *psp_texture) psp_texture->swizzled = SDL_FALSE; + sceKernelDcacheWritebackRange(psp_texture->data, psp_texture->size); return 1; }