mirror of https://github.com/RPCS3/rpcs3.git
vulkan: Do not bother with cache checks if buffer sync is not managed
introduce pause intrin
This commit is contained in:
parent
0ec88bb65d
commit
4b5a30f53d
|
@ -643,10 +643,12 @@ bool VKGSRender::on_access_violation(u32 address, bool is_writing)
|
|||
if (is_writing)
|
||||
return m_texture_cache.invalidate_address(address);
|
||||
else
|
||||
{
|
||||
if (g_cfg_rsx_write_color_buffers || g_cfg_rsx_write_depth_buffer)
|
||||
{
|
||||
bool flushable, synchronized;
|
||||
|
||||
std::tie(flushable, synchronized) = m_texture_cache.address_is_flushable(address);
|
||||
|
||||
if (!flushable)
|
||||
return false;
|
||||
|
||||
|
@ -671,7 +673,7 @@ bool VKGSRender::on_access_violation(u32 address, bool is_writing)
|
|||
m_queued_threads++;
|
||||
|
||||
//This is awful!
|
||||
while (m_flush_commands);
|
||||
while (m_flush_commands) _mm_pause();
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_secondary_cb_guard);
|
||||
bool status = m_texture_cache.flush_address(address, *m_device, m_secondary_command_buffer, m_memory_type_mapping, m_swap_chain->get_present_queue());
|
||||
|
@ -688,6 +690,12 @@ bool VKGSRender::on_access_violation(u32 address, bool is_writing)
|
|||
flush_command_queue();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//If we aren't managing buffer sync, dont bother checking the cache
|
||||
return false;
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> lock(m_secondary_cb_guard);
|
||||
return m_texture_cache.flush_address(address, *m_device, m_secondary_command_buffer, m_memory_type_mapping, m_swap_chain->get_present_queue());
|
||||
|
@ -1201,7 +1209,7 @@ void VKGSRender::do_local_task()
|
|||
flush_command_queue();
|
||||
|
||||
m_flush_commands = false;
|
||||
while (m_queued_threads);
|
||||
while (m_queued_threads) _mm_pause();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ namespace rsx
|
|||
u32 dst_offset = 0;
|
||||
u32 src_offset = 0;
|
||||
|
||||
u32 padding = (dst_pitch - (src_pitch * samples)) / sizeof T;
|
||||
u32 padding = (dst_pitch - (src_pitch * samples)) / sizeof(T);
|
||||
|
||||
for (u16 h = 0; h < src_height; ++h)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue