rsx: Texture cache hotfixes

This commit is contained in:
kd-11 2017-11-24 16:45:31 +03:00
parent 75d0ff177d
commit 145ecb00fc
2 changed files with 8 additions and 2 deletions

View File

@ -459,10 +459,16 @@ static size_t get_texture_size(u32 w, u32 h, u8 format)
case CELL_GCM_TEXTURE_R5G6B5:
return w * h * 2;
case CELL_GCM_TEXTURE_COMPRESSED_DXT1:
w = align(w, 4);
h = align(h, 4);
return w * h / 6;
case CELL_GCM_TEXTURE_COMPRESSED_DXT23:
w = align(w, 4);
h = align(h, 4);
return w * h / 4;
case CELL_GCM_TEXTURE_COMPRESSED_DXT45:
w = align(w, 4);
h = align(h, 4);
return w * h / 4;
case CELL_GCM_TEXTURE_DEPTH16:
return w * h * 2;

View File

@ -1209,7 +1209,7 @@ namespace rsx
if (!texaddr || !tex_size)
{
LOG_ERROR(RSX, "Texture upload requested but texture not found, (address=0x%X, size=0x%X)", texaddr, tex_size);
LOG_ERROR(RSX, "Texture upload requested but texture not found, (address=0x%X, size=0x%X, w=%d, h=%d, p=%d, format=0x%X)", texaddr, tex_size, tex.width(), tex.height(), tex.pitch(), tex.format());
return {};
}
@ -1310,7 +1310,7 @@ namespace rsx
get_native_dimensions(internal_width, internal_height, rsc.surface);
if (!rsc.is_bound || !g_cfg.video.strict_rendering_mode)
{
if (rsc.w == internal_width && rsc.h == internal_height)
if (!rsc.x && !rsc.y && rsc.w == internal_width && rsc.h == internal_height)
{
if (rsc.is_bound)
{