mirror of
https://github.com/RPCSX/rpcsx.git
synced 2025-12-06 07:12:14 +01:00
vm: do not lock gpu
This commit is contained in:
parent
837cca331c
commit
d7a5bbcc57
|
|
@ -931,7 +931,6 @@ void *vm::map(void *addr, std::uint64_t len, std::int32_t prot,
|
|||
}
|
||||
|
||||
if (auto thr = orbis::g_currentThread) {
|
||||
std::lock_guard lock(orbis::g_context.gpuDeviceMtx);
|
||||
if (auto gpu = amdgpu::DeviceCtl{orbis::g_context.gpuDevice}) {
|
||||
gpu.submitMapMemory(thr->tproc->pid, address, len, -1, -1, prot,
|
||||
address - kMinAddress);
|
||||
|
|
@ -988,7 +987,6 @@ bool vm::unmap(void *addr, std::uint64_t size) {
|
|||
gBlocks[(address >> kBlockShift) - kFirstBlock].removeFlags(
|
||||
(address & kBlockMask) >> kPageShift, pages, ~0);
|
||||
if (auto thr = orbis::g_currentThread) {
|
||||
std::lock_guard lock(orbis::g_context.gpuDeviceMtx);
|
||||
if (auto gpu = amdgpu::DeviceCtl{orbis::g_context.gpuDevice}) {
|
||||
gpu.submitUnmapMemory(thr->tproc->pid, address, size);
|
||||
}
|
||||
|
|
@ -1033,7 +1031,6 @@ bool vm::protect(void *addr, std::uint64_t size, std::int32_t prot) {
|
|||
|
||||
if (auto thr = orbis::g_currentThread) {
|
||||
std::println("memory prot: {:x}", prot);
|
||||
std::lock_guard lock(orbis::g_context.gpuDeviceMtx);
|
||||
if (auto gpu = amdgpu::DeviceCtl{orbis::g_context.gpuDevice}) {
|
||||
gpu.submitProtectMemory(thr->tproc->pid, address, size, prot);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue