mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-26 16:24:17 +01:00
Fixup Host1x syncpoint locking
This commit is contained in:
parent
d8ff318a1a
commit
f89bacf8ae
@ -76,7 +76,7 @@ namespace skyline::soc::host1x {
|
||||
case Host1xOpcode::SetClass:
|
||||
targetClass = methodHeader.classId;
|
||||
|
||||
for (u32 i{}; i < std::numeric_limits<u8>::max(); i++)
|
||||
for (u32 i{}; i < std::numeric_limits<u8>::digits; i++)
|
||||
if (methodHeader.classMethodMask & (1 << i))
|
||||
Send(targetClass, methodHeader.methodAddress + i, *++entry);
|
||||
|
||||
|
@ -23,6 +23,11 @@ namespace skyline::soc::host1x {
|
||||
std::queue<u32> incrQueue; //!< Queue of syncpoint IDs to be incremented when a device operation is finished, the same syncpoint may be held multiple times within the queue
|
||||
std::mutex incrMutex;
|
||||
|
||||
void AddIncr(u32 syncpointId) {
|
||||
std::scoped_lock lock(incrMutex);
|
||||
incrQueue.push(syncpointId);
|
||||
}
|
||||
|
||||
void SubmitPendingIncrs() {
|
||||
std::scoped_lock lock(incrMutex);
|
||||
|
||||
@ -55,9 +60,9 @@ namespace skyline::soc::host1x {
|
||||
break;
|
||||
case IncrementSyncpointMethod::Condition::OpDone:
|
||||
Logger::Debug("Queue syncpoint for OpDone: {}", incrSyncpoint.index);
|
||||
incrQueue.push(incrSyncpoint.index);
|
||||
|
||||
AddIncr(incrSyncpoint.index);
|
||||
SubmitPendingIncrs(); // FIXME: immediately submit the incrs as classes are not yet implemented
|
||||
break;
|
||||
default:
|
||||
Logger::Warn("Unimplemented syncpoint condition: {}", static_cast<u8>(incrSyncpoint.condition));
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user