rsx: Account for null blit ops (memcpy)

- Do not perform extra memory tasks if no actual image copy was performed
This commit is contained in:
kd-11 2018-02-12 11:26:57 +03:00
parent 661b8b006f
commit a8ab408f64
3 changed files with 21 additions and 14 deletions

View file

@ -998,19 +998,23 @@ namespace gl
if (result.succeeded) if (result.succeeded)
{ {
gl::texture::format fmt; if (result.real_dst_size)
if (!result.is_depth)
{ {
fmt = dst.format == rsx::blit_engine::transfer_destination_format::a8r8g8b8 ? gl::texture::format fmt;
gl::texture::format::bgra : gl::texture::format::rgba; if (!result.is_depth)
} {
else fmt = dst.format == rsx::blit_engine::transfer_destination_format::a8r8g8b8 ?
{ gl::texture::format::bgra : gl::texture::format::rgba;
fmt = dst.format == rsx::blit_engine::transfer_destination_format::a8r8g8b8 ? }
gl::texture::format::depth_stencil : gl::texture::format::depth; else
{
fmt = dst.format == rsx::blit_engine::transfer_destination_format::a8r8g8b8 ?
gl::texture::format::depth_stencil : gl::texture::format::depth;
}
flush_if_cache_miss_likely(fmt, result.real_dst_address, result.real_dst_size);
} }
flush_if_cache_miss_likely(fmt, result.real_dst_address, result.real_dst_size);
return true; return true;
} }

View file

@ -3214,9 +3214,12 @@ bool VKGSRender::scaled_image_from_memory(rsx::blit_src_info& src, rsx::blit_dst
require_flush = true; require_flush = true;
} }
if (m_texture_cache.flush_if_cache_miss_likely(result.dst_image->info.format, result.real_dst_address, result.real_dst_size, if (result.dst_image)
*m_current_command_buffer, m_memory_type_mapping, m_swap_chain->get_present_queue())) {
require_flush = true; if (m_texture_cache.flush_if_cache_miss_likely(result.dst_image->info.format, result.real_dst_address, result.real_dst_size,
*m_current_command_buffer, m_memory_type_mapping, m_swap_chain->get_present_queue()))
require_flush = true;
}
if (require_flush) if (require_flush)
flush_command_queue(); flush_command_queue();

View file

@ -934,7 +934,7 @@ namespace rsx
LOG_ERROR(RSX, "NV0039_OFFSET_IN: Unsupported format: inFormat=%d, outFormat=%d", in_format, out_format); LOG_ERROR(RSX, "NV0039_OFFSET_IN: Unsupported format: inFormat=%d, outFormat=%d", in_format, out_format);
} }
LOG_NOTICE(RSX, "NV0039_OFFSET_IN: pitch(in=0x%x, out=0x%x), line(len=0x%x, cnt=0x%x), fmt(in=0x%x, out=0x%x), notify=0x%x", LOG_TRACE(RSX, "NV0039_OFFSET_IN: pitch(in=0x%x, out=0x%x), line(len=0x%x, cnt=0x%x), fmt(in=0x%x, out=0x%x), notify=0x%x",
in_pitch, out_pitch, line_length, line_count, in_format, out_format, notify); in_pitch, out_pitch, line_length, line_count, in_format, out_format, notify);
if (!in_pitch) if (!in_pitch)