mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-13 02:08:49 +12:00
rsx: Force compatibility checks when applying fast-path optimizations
This commit is contained in:
parent
a37f786a37
commit
4decad6f6b
3 changed files with 22 additions and 5 deletions
|
@ -168,6 +168,22 @@ namespace rsx
|
||||||
{
|
{
|
||||||
return static_cast<viewable_image_type>(external_handle);
|
return static_cast<viewable_image_type>(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
|
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::copy_image_dynamic) ||
|
||||||
(result.external_subresource_desc.op == deferred_request_command::blit_image_static);
|
(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 &&
|
||||||
if (is_simple_subresource_copy && attr.edge_clamped)
|
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 ]]
|
if (result.external_subresource_desc.op != deferred_request_command::blit_image_static) [[ likely ]]
|
||||||
{
|
{
|
||||||
|
|
|
@ -766,7 +766,7 @@ namespace gl
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
// TODO
|
// TODO
|
||||||
// warn_once("Format incompatibility detected, reporting failure to force data copy (GL_INTERNAL_FORMAT=0x%X, GCM_FORMAT=0x%X)", static_cast<u32>(ifmt), gcm_format);
|
err_once("Format incompatibility detected, reporting failure to force data copy (GL_INTERNAL_FORMAT=0x%X, GCM_FORMAT=0x%X)", static_cast<u32>(ifmt), gcm_format);
|
||||||
return false;
|
return false;
|
||||||
case CELL_GCM_TEXTURE_W16_Z16_Y16_X16_FLOAT:
|
case CELL_GCM_TEXTURE_W16_Z16_Y16_X16_FLOAT:
|
||||||
return (ifmt == gl::texture::internal_format::rgba16f);
|
return (ifmt == gl::texture::internal_format::rgba16f);
|
||||||
|
|
|
@ -1112,7 +1112,7 @@ namespace vk
|
||||||
{
|
{
|
||||||
default:
|
default:
|
||||||
//TODO
|
//TODO
|
||||||
// warn_once("Format incompatibility detected, reporting failure to force data copy (VK_FORMAT=0x%X, GCM_FORMAT=0x%X)", static_cast<u32>(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<u32>(vk_format), gcm_format);
|
||||||
return false;
|
return false;
|
||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
case CELL_GCM_TEXTURE_R5G6B5:
|
case CELL_GCM_TEXTURE_R5G6B5:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue