Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rsx/blit-engine: Account for a rare corner case #7683

Merged
merged 2 commits into from Mar 4, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 20 additions & 1 deletion rpcs3/Emu/RSX/Common/texture_cache.h
Expand Up @@ -2745,9 +2745,28 @@ namespace rsx
dst_subres.surface->transform_blit_coordinates(rsx::surface_access::transfer, dst_area);
}

if (!use_null_region)
if (!use_null_region) [[likely]]
{
// Do preliminary analysis
typeless_info.analyse();

if (dst_is_render_target && src_is_render_target &&
dst_subres.is_depth != src_subres.is_depth) [[unlikely]]
{
// Rare corner case. Typeless transfer from whatever channel is Z
if (!typeless_info.src_is_typeless && !typeless_info.dst_is_typeless)
{
if (dst_subres.is_depth)
{
typeless_info.dst_is_typeless = true;
}
else
{
typeless_info.src_is_typeless = true;
}
}
}

blitter.scale_image(cmd, vram_texture, dest_texture, src_area, dst_area, interpolate, typeless_info);
}
else
Expand Down