rsx: Workarounds for some buggy games

- Replace assert with log message until hardware testing confirms findings
This commit is contained in:
kd-11 2019-08-28 12:54:34 +03:00 committed by kd-11
parent e334a43169
commit e55d216619
2 changed files with 11 additions and 2 deletions

View File

@ -756,7 +756,14 @@ namespace rsx
const auto surface_internal_pitch = (required_width * required_bpp);
verify(HERE), surface_internal_pitch <= required_pitch;
// Sanity check
if (UNLIKELY(surface_internal_pitch > required_pitch))
{
LOG_WARNING(RSX, "Invalid 2D region descriptor. w=%d, h=%d, bpp=%d, pitch=%d",
required_width, required_height, required_bpp, required_pitch);
return {};
}
const auto test_range = utils::address_range::start_length(texaddr, (required_pitch * required_height) - (required_pitch - surface_internal_pitch));
auto process_list_function = [&](std::unordered_map<u32, surface_storage_type>& data, bool is_depth)

View File

@ -2023,8 +2023,10 @@ namespace rsx
scale_x = 0.f;
scale_y = 0.f;
}
else if (extended_dimension == rsx::texture_dimension_extended::texture_dimension_1d)
else if (required_surface_height == 1)
{
// Pitch doesn't matter when height=1 and some games abuse this fact
tex_pitch = std::max<u16>(tex_pitch, get_format_packed_pitch(format, tex_width, !tex.border_type(), !linear));
scale_y = 0.f;
}