mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-06 06:51:26 +12:00
rsx: Improve format mismatch detection hack
This commit is contained in:
parent
c5cd758700
commit
cf1b700ebc
1 changed files with 16 additions and 19 deletions
|
@ -1786,7 +1786,6 @@ namespace rsx
|
||||||
{
|
{
|
||||||
//Since we will have dst in vram, we can 'safely' ignore the swizzle flag
|
//Since we will have dst in vram, we can 'safely' ignore the swizzle flag
|
||||||
//TODO: Verify correct behavior
|
//TODO: Verify correct behavior
|
||||||
bool is_depth_blit = false;
|
|
||||||
bool src_is_render_target = false;
|
bool src_is_render_target = false;
|
||||||
bool dst_is_render_target = false;
|
bool dst_is_render_target = false;
|
||||||
bool dst_is_argb8 = (dst.format == rsx::blit_engine::transfer_destination_format::a8r8g8b8);
|
bool dst_is_argb8 = (dst.format == rsx::blit_engine::transfer_destination_format::a8r8g8b8);
|
||||||
|
@ -2038,29 +2037,27 @@ namespace rsx
|
||||||
vram_texture = src_subres.surface->get_surface();
|
vram_texture = src_subres.surface->get_surface();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool format_mismatch = false;
|
const bool src_is_depth = src_subres.is_depth_surface;
|
||||||
|
const bool dst_is_depth = dst_is_render_target? dst_subres.is_depth_surface :
|
||||||
|
dest_texture ? cached_dest->is_depth_texture() : src_is_depth;
|
||||||
|
|
||||||
if (src_subres.is_depth_surface)
|
//Type of blit decided by the source, destination use should adapt on the fly
|
||||||
{
|
const bool is_depth_blit = src_is_depth;
|
||||||
if (dest_texture)
|
|
||||||
|
bool format_mismatch = (src_is_depth != dst_is_depth);
|
||||||
|
if (format_mismatch)
|
||||||
{
|
{
|
||||||
if (dst_is_render_target)
|
if (dst_is_render_target)
|
||||||
{
|
{
|
||||||
if (!dst_subres.is_depth_surface)
|
LOG_ERROR(RSX, "Depth<->RGBA blit on a framebuffer requested but not supported");
|
||||||
{
|
return false;
|
||||||
LOG_ERROR(RSX, "Depth->RGBA blit requested but not supported");
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (src_is_render_target && cached_dest)
|
||||||
{
|
{
|
||||||
if (!cached_dest->has_compatible_format(src_subres.surface))
|
if (!cached_dest->has_compatible_format(src_subres.surface))
|
||||||
format_mismatch = true;
|
format_mismatch = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
is_depth_blit = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: Check for other types of format mismatch
|
//TODO: Check for other types of format mismatch
|
||||||
if (format_mismatch)
|
if (format_mismatch)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue