mirror of
https://github.com/skyline-emu/skyline.git
synced 2024-11-05 13:45:04 +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:
|
case Host1xOpcode::SetClass:
|
||||||
targetClass = methodHeader.classId;
|
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))
|
if (methodHeader.classMethodMask & (1 << i))
|
||||||
Send(targetClass, methodHeader.methodAddress + i, *++entry);
|
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::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;
|
std::mutex incrMutex;
|
||||||
|
|
||||||
|
void AddIncr(u32 syncpointId) {
|
||||||
|
std::scoped_lock lock(incrMutex);
|
||||||
|
incrQueue.push(syncpointId);
|
||||||
|
}
|
||||||
|
|
||||||
void SubmitPendingIncrs() {
|
void SubmitPendingIncrs() {
|
||||||
std::scoped_lock lock(incrMutex);
|
std::scoped_lock lock(incrMutex);
|
||||||
|
|
||||||
@ -55,9 +60,9 @@ namespace skyline::soc::host1x {
|
|||||||
break;
|
break;
|
||||||
case IncrementSyncpointMethod::Condition::OpDone:
|
case IncrementSyncpointMethod::Condition::OpDone:
|
||||||
Logger::Debug("Queue syncpoint for OpDone: {}", incrSyncpoint.index);
|
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
|
SubmitPendingIncrs(); // FIXME: immediately submit the incrs as classes are not yet implemented
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
Logger::Warn("Unimplemented syncpoint condition: {}", static_cast<u8>(incrSyncpoint.condition));
|
Logger::Warn("Unimplemented syncpoint condition: {}", static_cast<u8>(incrSyncpoint.condition));
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user