rsx: Fix section length calculations when generating new blit targets.

This commit is contained in:
kd-11 2020-01-16 14:35:49 +03:00 committed by kd-11
parent 621fab2ad9
commit db014d8a58
1 changed files with 5 additions and 3 deletions

View File

@ -2492,13 +2492,15 @@ namespace rsx
}
}
const u32 section_length = std::max(write_end, block_end) - dst.rsx_address;
dst_dimensions.height = align2(section_length, dst.pitch) / dst.pitch;
const u32 usable_section_length = std::max(write_end, block_end) - dst.rsx_address;
dst_dimensions.height = align2(usable_section_length, dst.pitch) / dst.pitch;
const u32 full_section_length = ((dst_dimensions.height - 1) * dst.pitch) + (dst_dimensions.width * dst_bpp);
const auto rsx_range = address_range::start_length(dst.rsx_address, full_section_length);
lock.upgrade();
// NOTE: Write flag set to remove all other overlapping regions (e.g shader_read or blit_src)
const auto rsx_range = address_range::start_length(dst.rsx_address, section_length);
invalidate_range_impl_base(cmd, rsx_range, invalidation_cause::write, std::forward<Args>(extras)...);
if (LIKELY(use_null_region))