mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-20 03:25:16 +00:00
rsx: Make the deferred mm flush option usable with OpenGL
This commit is contained in:
parent
83764fbbb4
commit
49d11b2e36
6 changed files with 21 additions and 11 deletions
|
@ -99,6 +99,6 @@ namespace rsx
|
|||
}
|
||||
|
||||
auto& rsxdma = g_fxo->get<rsx::dma_manager>();
|
||||
rsxdma.backend_ctrl(static_cast<u32>(mm_backend_ctrl::mm_flush), nullptr);
|
||||
rsxdma.backend_ctrl(mm_backend_ctrl::mm_flush, nullptr);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,9 +28,9 @@ namespace rsx
|
|||
}
|
||||
};
|
||||
|
||||
enum class mm_backend_ctrl : u32
|
||||
enum mm_backend_ctrl : u32
|
||||
{
|
||||
mm_flush = 0x80000002
|
||||
mm_flush = 0x81000000,
|
||||
};
|
||||
|
||||
void mm_protect(void* start, u64 length, utils::protection prot);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include "Common/time.hpp"
|
||||
#include "Core/RSXReservationLock.hpp"
|
||||
#include "Core/RSXEngLock.hpp"
|
||||
#include "Host/MM.h"
|
||||
#include "Host/RSXDMAWriter.h"
|
||||
#include "NV47/HW/context.h"
|
||||
#include "Program/GLSLCommon.h"
|
||||
|
@ -3627,10 +3628,25 @@ namespace rsx
|
|||
on_invalidate_memory_range(m_invalidated_memory_range, rsx::invalidation_cause::read);
|
||||
}
|
||||
|
||||
// Host sync
|
||||
rsx::mm_flush();
|
||||
|
||||
on_invalidate_memory_range(m_invalidated_memory_range, rsx::invalidation_cause::unmap);
|
||||
m_invalidated_memory_range.invalidate();
|
||||
}
|
||||
|
||||
void thread::renderctl(u32 request_code, void* args)
|
||||
{
|
||||
switch (request_code)
|
||||
{
|
||||
case rsx::mm_backend_ctrl::mm_flush:
|
||||
rsx::mm_flush();
|
||||
break;
|
||||
default:
|
||||
fmt::throw_exception("Unknown backend request: 0x%x", request_code);
|
||||
}
|
||||
}
|
||||
|
||||
//Pause/cont wrappers for FIFO ctrl. Never call this from rsx thread itself!
|
||||
void thread::pause()
|
||||
{
|
||||
|
|
|
@ -404,7 +404,7 @@ namespace rsx
|
|||
virtual void notify_tile_unbound(u32 /*tile*/) {}
|
||||
|
||||
// control
|
||||
virtual void renderctl(u32 /*request_code*/, void* /*args*/) {}
|
||||
virtual void renderctl(u32 request_code, void* args);
|
||||
|
||||
// zcull
|
||||
void notify_zcull_info_changed();
|
||||
|
|
|
@ -10,7 +10,6 @@ namespace vk
|
|||
{
|
||||
rctrl_queue_submit = 0x80000000,
|
||||
rctrl_run_gc = 0x80000001,
|
||||
rctrl_mem_protect = 0x80000002,
|
||||
};
|
||||
|
||||
struct submit_packet
|
||||
|
|
|
@ -2829,13 +2829,8 @@ void VKGSRender::renderctl(u32 request_code, void* args)
|
|||
vk::on_event_completed(eid, true);
|
||||
break;
|
||||
}
|
||||
case vk::rctrl_mem_protect:
|
||||
{
|
||||
rsx::mm_flush();
|
||||
break;
|
||||
}
|
||||
default:
|
||||
fmt::throw_exception("Unhandled request code 0x%x", request_code);
|
||||
rsx::thread::renderctl(request_code, args);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue