1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-23 03:02:53 +01:00

rsx: Fix section base offset calculation for blit_dst targets which affects confirmed memory range

- Fixes flushes only writing partially to target memory
This commit is contained in:
kd-11 2019-04-29 14:37:30 +03:00 committed by kd-11
parent 4e3ec162e2
commit ec9aa74008

View File

@ -2888,9 +2888,19 @@ namespace rsx
typeless_info.dst_context = texture_upload_context::blit_engine_dst;
}
verify(HERE), cached_dest || dst_is_render_target;
// Calculate number of bytes actually modified
u32 mem_length;
const u32 mem_base = dst_address - dst.rsx_address;
u32 mem_base, mem_length;
if (dst_is_render_target)
{
mem_base = dst_address - dst_subres.base_address;
}
else
{
mem_base = dst_address - cached_dest->get_section_base();
}
if (dst.clip_height == 1)
{
mem_length = dst.clip_width * dst_bpp;
@ -2916,7 +2926,6 @@ namespace rsx
}
else
{
verify(HERE), dst_is_render_target;
dst_subres.surface->on_write();
}