mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-17 17:11:23 +00:00
rsx: Improve MTRSX synchronization
- Properly synchronize DMA transfers when handling RSX pipeline barriers. Texture read barrier is used to signify completion of DMA routines and is often used to signal that Cell can overwrite vertex data!
This commit is contained in:
parent
02ca8f0002
commit
7786681954
@ -2876,6 +2876,8 @@ void VKGSRender::close_and_submit_command_buffer(vk::fence* pFence, VkSemaphore
|
||||
// NOTE: There is no need to wait for dma sync. When MTRSX is enabled, the commands are submitted in order anyway due to CSMT
|
||||
if (vk::test_status_interrupt(vk::heap_dirty))
|
||||
{
|
||||
rsx::g_dma_manager.sync();
|
||||
|
||||
if (m_attrib_ring_info.dirty() ||
|
||||
m_fragment_env_ring_info.dirty() ||
|
||||
m_vertex_env_ring_info.dirty() ||
|
||||
|
@ -203,6 +203,8 @@ namespace rsx
|
||||
void texture_read_semaphore_release(thread* rsx, u32 _reg, u32 arg)
|
||||
{
|
||||
// Pipeline barrier seems to be equivalent to a SHADER_READ stage barrier
|
||||
rsx::g_dma_manager.sync();
|
||||
|
||||
// lle-gcm likes to inject system reserved semaphores, presumably for system/vsh usage
|
||||
// Avoid calling render to avoid any havoc(flickering) they may cause from invalid flush/write
|
||||
const u32 offset = method_registers.semaphore_offset_4097() & -16;
|
||||
@ -217,6 +219,7 @@ namespace rsx
|
||||
void back_end_write_semaphore_release(thread* rsx, u32 _reg, u32 arg)
|
||||
{
|
||||
// Full pipeline barrier
|
||||
rsx::g_dma_manager.sync();
|
||||
rsx->sync();
|
||||
|
||||
const u32 offset = method_registers.semaphore_offset_4097() & -16;
|
||||
|
Loading…
Reference in New Issue
Block a user