mirror of
https://github.com/RPCSX/rpcsx.git
synced 2024-11-27 05:10:53 +00:00
kevent: fix graphics core events
This commit is contained in:
parent
e0650ef782
commit
28ceb7471d
@ -184,10 +184,6 @@ static SysResult keventChange(KQueue *kq, KEvent &change, Thread *thread) {
|
|||||||
nodeIt->triggered = true;
|
nodeIt->triggered = true;
|
||||||
nodeIt->event.data |= 1000ull << 16; // clock
|
nodeIt->event.data |= 1000ull << 16; // clock
|
||||||
|
|
||||||
kq->cv.notify_all(kq->mtx);
|
|
||||||
} else if (change.filter == kEvFiltGraphicsCore && change.ident == 0x41) {
|
|
||||||
// hp3d idle
|
|
||||||
nodeIt->triggered = true;
|
|
||||||
kq->cv.notify_all(kq->mtx);
|
kq->cv.notify_all(kq->mtx);
|
||||||
} else if (g_context.fwType == FwType::Ps5 &&
|
} else if (g_context.fwType == FwType::Ps5 &&
|
||||||
change.filter == kEvFiltGraphicsCore && change.ident == 0) {
|
change.filter == kEvFiltGraphicsCore && change.ident == 0) {
|
||||||
@ -316,8 +312,10 @@ orbis::SysResult orbis::sys_kevent(Thread *thread, sint fd,
|
|||||||
if (note.enabled && note.triggered) {
|
if (note.enabled && note.triggered) {
|
||||||
result.push_back(note.event);
|
result.push_back(note.event);
|
||||||
|
|
||||||
if (note.event.filter == kEvFiltDisplay &&
|
if (note.event.filter == kEvFiltDisplay) {
|
||||||
note.event.ident >> 48 != 0x6301) {
|
note.triggered = false;
|
||||||
|
} else if (note.event.filter == kEvFiltGraphicsCore &&
|
||||||
|
note.event.ident != 0x84) {
|
||||||
note.triggered = false;
|
note.triggered = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,8 +344,15 @@ bool ComputePipe::releaseMem(Ring &ring) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (intSel) {
|
if (intSel) {
|
||||||
orbis::g_context.deviceEventEmitter->emit(orbis::kEvFiltGraphicsCore, 0,
|
orbis::g_context.deviceEventEmitter->emit(
|
||||||
kGcEventCompute0RelMem + index);
|
orbis::kEvFiltGraphicsCore,
|
||||||
|
[=, this](orbis::KNote *note) -> std::optional<std::int64_t> {
|
||||||
|
if (note->event.ident == kGcEventCompute0RelMem + index) {
|
||||||
|
return dataLo | (static_cast<std::uint64_t>(dataHi) << 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
return {};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -1364,8 +1371,19 @@ bool GraphicsPipe::eventWriteEop(Ring &ring) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (intSel != 0) {
|
if (intSel != 0) {
|
||||||
orbis::g_context.deviceEventEmitter->emit(orbis::kEvFiltGraphicsCore, 0,
|
orbis::g_context.deviceEventEmitter->emit(
|
||||||
kGcEventGfxEop);
|
orbis::kEvFiltGraphicsCore,
|
||||||
|
[=](orbis::KNote *note) -> std::optional<std::int64_t> {
|
||||||
|
if (note->event.ident == kGcEventGfxEop) {
|
||||||
|
return dataLo | (static_cast<std::uint64_t>(dataHi) << 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (note->event.ident == kGcEventGfxEop + 1) { // hp3d
|
||||||
|
return dataLo | (static_cast<std::uint64_t>(dataHi) << 32);
|
||||||
|
}
|
||||||
|
|
||||||
|
return {};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intSel == 2 && dataSel == 2) {
|
if (intSel == 2 && dataSel == 2) {
|
||||||
|
@ -488,7 +488,19 @@ static orbis::ErrorCode dce_ioctl(orbis::File *file, std::uint64_t request,
|
|||||||
} else if (args->id == 0x1e) {
|
} else if (args->id == 0x1e) {
|
||||||
// TODO
|
// TODO
|
||||||
return {};
|
return {};
|
||||||
} else if (args->id != 1) { // used during open/close
|
} else if (args->id == 1) {
|
||||||
|
|
||||||
|
// Mode set
|
||||||
|
orbis::g_context.deviceEventEmitter->emit(
|
||||||
|
orbis::kEvFiltDisplay,
|
||||||
|
[](orbis::KNote *note) -> std::optional<orbis::intptr_t> {
|
||||||
|
if ((note->event.ident >> 48) == 0x64) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return {};
|
||||||
|
});
|
||||||
|
|
||||||
|
} else { // used during open/close
|
||||||
ORBIS_LOG_NOTICE("dce: UNIMPLEMENTED FlipControl", args->id, args->arg2,
|
ORBIS_LOG_NOTICE("dce: UNIMPLEMENTED FlipControl", args->id, args->arg2,
|
||||||
args->ptr, args->size);
|
args->ptr, args->size);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user