mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-24 19:09:49 +01:00
dont crash on multigpu lol
This commit is contained in:
parent
187abbbcfd
commit
78498c8987
2 changed files with 6 additions and 3 deletions
|
@ -31,8 +31,8 @@ CMonitor::~CMonitor() {
|
|||
void CMonitor::onConnect(bool noRule) {
|
||||
|
||||
if (output->supportsExplicit) {
|
||||
inTimeline = CSyncTimeline::create(g_pCompositor->m_iDRMFD);
|
||||
outTimeline = CSyncTimeline::create(g_pCompositor->m_iDRMFD);
|
||||
inTimeline = CSyncTimeline::create(output->getBackend()->drmFD());
|
||||
outTimeline = CSyncTimeline::create(output->getBackend()->drmFD());
|
||||
}
|
||||
|
||||
listeners.frame = output->events.frame.registerListener([this](std::any d) { Events::listener_monitorFrame(this, nullptr); });
|
||||
|
|
|
@ -176,7 +176,10 @@ bool CSyncTimeline::importFromSyncFileFD(uint64_t dst, int fd) {
|
|||
}
|
||||
|
||||
bool CSyncTimeline::transfer(SP<CSyncTimeline> from, uint64_t fromPoint, uint64_t toPoint) {
|
||||
ASSERT(from->drmFD == drmFD);
|
||||
if (drmFD != from->drmFD) {
|
||||
Debug::log(ERR, "CSyncTimeline::transfer: cannot transfer timelines between gpus");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (drmSyncobjTransfer(drmFD, handle, toPoint, from->handle, fromPoint, 0)) {
|
||||
Debug::log(ERR, "CSyncTimeline::transfer: drmSyncobjTransfer failed");
|
||||
|
|
Loading…
Reference in a new issue