diff --git a/rpcs3/Emu/RSX/Common/texture_cache.h b/rpcs3/Emu/RSX/Common/texture_cache.h index 13c8ddb467..fa330457b6 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache.h +++ b/rpcs3/Emu/RSX/Common/texture_cache.h @@ -168,6 +168,22 @@ namespace rsx { return static_cast(external_handle); } + + image_resource_type src0() const + { + if (external_handle) + { + return external_handle; + } + + if (!sections_to_copy.empty()) + { + return sections_to_copy[0].src; + } + + // Return typed null + return external_handle; + } }; struct sampled_image_descriptor : public sampled_image_descriptor_base @@ -1988,8 +2004,9 @@ namespace rsx (result.external_subresource_desc.op == deferred_request_command::copy_image_dynamic) || (result.external_subresource_desc.op == deferred_request_command::blit_image_static); - // FIXME: We need to check if the formats are compatible here! - if (is_simple_subresource_copy && attr.edge_clamped) + if (is_simple_subresource_copy && + attr.edge_clamped && + render_target_format_is_compatible(result.external_subresource_desc.src0(), attr.gcm_format)) { if (result.external_subresource_desc.op != deferred_request_command::blit_image_static) [[ likely ]] { diff --git a/rpcs3/Emu/RSX/GL/GLTextureCache.h b/rpcs3/Emu/RSX/GL/GLTextureCache.h index aee6909a1b..1503c62a94 100644 --- a/rpcs3/Emu/RSX/GL/GLTextureCache.h +++ b/rpcs3/Emu/RSX/GL/GLTextureCache.h @@ -765,8 +765,8 @@ namespace gl switch (gcm_format) { default: - //TODO - // warn_once("Format incompatibility detected, reporting failure to force data copy (GL_INTERNAL_FORMAT=0x%X, GCM_FORMAT=0x%X)", static_cast(ifmt), gcm_format); + // TODO + err_once("Format incompatibility detected, reporting failure to force data copy (GL_INTERNAL_FORMAT=0x%X, GCM_FORMAT=0x%X)", static_cast(ifmt), gcm_format); return false; case CELL_GCM_TEXTURE_W16_Z16_Y16_X16_FLOAT: return (ifmt == gl::texture::internal_format::rgba16f); diff --git a/rpcs3/Emu/RSX/VK/VKTextureCache.cpp b/rpcs3/Emu/RSX/VK/VKTextureCache.cpp index c732428daf..b0344fc9e6 100644 --- a/rpcs3/Emu/RSX/VK/VKTextureCache.cpp +++ b/rpcs3/Emu/RSX/VK/VKTextureCache.cpp @@ -1112,7 +1112,7 @@ namespace vk { default: //TODO - // warn_once("Format incompatibility detected, reporting failure to force data copy (VK_FORMAT=0x%X, GCM_FORMAT=0x%X)", static_cast(vk_format), gcm_format); + err_once("Format incompatibility detected, reporting failure to force data copy (VK_FORMAT=0x%X, GCM_FORMAT=0x%X)", static_cast(vk_format), gcm_format); return false; #ifndef __APPLE__ case CELL_GCM_TEXTURE_R5G6B5: