rsx: Texture cache hotfixes
This commit is contained in:
@@ -459,10 +459,16 @@ static size_t get_texture_size(u32 w, u32 h, u8 format)
|
|||||||
case CELL_GCM_TEXTURE_R5G6B5:
|
case CELL_GCM_TEXTURE_R5G6B5:
|
||||||
return w * h * 2;
|
return w * h * 2;
|
||||||
case CELL_GCM_TEXTURE_COMPRESSED_DXT1:
|
case CELL_GCM_TEXTURE_COMPRESSED_DXT1:
|
||||||
|
w = align(w, 4);
|
||||||
|
h = align(h, 4);
|
||||||
return w * h / 6;
|
return w * h / 6;
|
||||||
case CELL_GCM_TEXTURE_COMPRESSED_DXT23:
|
case CELL_GCM_TEXTURE_COMPRESSED_DXT23:
|
||||||
|
w = align(w, 4);
|
||||||
|
h = align(h, 4);
|
||||||
return w * h / 4;
|
return w * h / 4;
|
||||||
case CELL_GCM_TEXTURE_COMPRESSED_DXT45:
|
case CELL_GCM_TEXTURE_COMPRESSED_DXT45:
|
||||||
|
w = align(w, 4);
|
||||||
|
h = align(h, 4);
|
||||||
return w * h / 4;
|
return w * h / 4;
|
||||||
case CELL_GCM_TEXTURE_DEPTH16:
|
case CELL_GCM_TEXTURE_DEPTH16:
|
||||||
return w * h * 2;
|
return w * h * 2;
|
||||||
|
|||||||
@@ -1209,7 +1209,7 @@ namespace rsx
|
|||||||
|
|
||||||
if (!texaddr || !tex_size)
|
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 {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1310,7 +1310,7 @@ namespace rsx
|
|||||||
get_native_dimensions(internal_width, internal_height, rsc.surface);
|
get_native_dimensions(internal_width, internal_height, rsc.surface);
|
||||||
if (!rsc.is_bound || !g_cfg.video.strict_rendering_mode)
|
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)
|
if (rsc.is_bound)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user