early-access version 1562
This commit is contained in:
parent
0f685141d2
commit
aee0610b57
4 changed files with 6 additions and 11 deletions
|
@ -1,7 +1,7 @@
|
||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 1561.
|
This is the source code for early-access 1562.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
|
|
@ -281,11 +281,6 @@ ResultCode ProcessCapabilities::HandleSyscallFlags(u32& set_svc_bits, u32 flags)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (svc_number >= svc_capabilities.size()) {
|
|
||||||
LOG_ERROR(Kernel, "Process svc capability is out of range! svc_number={}", svc_number);
|
|
||||||
return ResultOutOfRange;
|
|
||||||
}
|
|
||||||
|
|
||||||
svc_capabilities[svc_number] = true;
|
svc_capabilities[svc_number] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ enum class ProgramType {
|
||||||
class ProcessCapabilities {
|
class ProcessCapabilities {
|
||||||
public:
|
public:
|
||||||
using InterruptCapabilities = std::bitset<1024>;
|
using InterruptCapabilities = std::bitset<1024>;
|
||||||
using SyscallCapabilities = std::bitset<128>;
|
using SyscallCapabilities = std::bitset<192>;
|
||||||
|
|
||||||
ProcessCapabilities() = default;
|
ProcessCapabilities() = default;
|
||||||
ProcessCapabilities(const ProcessCapabilities&) = delete;
|
ProcessCapabilities(const ProcessCapabilities&) = delete;
|
||||||
|
|
|
@ -64,7 +64,7 @@ static void RunThread(Core::System& system, VideoCore::RendererBase& renderer,
|
||||||
if (next.block) {
|
if (next.block) {
|
||||||
// We have to lock the write_lock to ensure that the condition_variable wait not get a
|
// We have to lock the write_lock to ensure that the condition_variable wait not get a
|
||||||
// race between the check and the lock itself.
|
// race between the check and the lock itself.
|
||||||
std::lock_guard<std::mutex> lk(state.write_lock);
|
std::lock_guard lk(state.write_lock);
|
||||||
state.cv.notify_all();
|
state.cv.notify_all();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -135,7 +135,7 @@ void ThreadManager::ShutDown() {
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lk(state.write_lock);
|
std::lock_guard lk(state.write_lock);
|
||||||
state.is_running = false;
|
state.is_running = false;
|
||||||
state.cv.notify_all();
|
state.cv.notify_all();
|
||||||
}
|
}
|
||||||
|
@ -159,12 +159,12 @@ u64 ThreadManager::PushCommand(CommandData&& command_data, bool block) {
|
||||||
block = true;
|
block = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_lock<std::mutex> lk(state.write_lock);
|
std::unique_lock lk(state.write_lock);
|
||||||
const u64 fence{++state.last_fence};
|
const u64 fence{++state.last_fence};
|
||||||
state.queue.Push(CommandDataContainer(std::move(command_data), fence, block));
|
state.queue.Push(CommandDataContainer(std::move(command_data), fence, block));
|
||||||
|
|
||||||
if (block) {
|
if (block) {
|
||||||
state.cv.wait(lk, [this, fence]() {
|
state.cv.wait(lk, [this, fence] {
|
||||||
return fence <= state.signaled_fence.load(std::memory_order_relaxed) ||
|
return fence <= state.signaled_fence.load(std::memory_order_relaxed) ||
|
||||||
!state.is_running;
|
!state.is_running;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue