mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-13 10:05:57 +01:00
dont crash on multigpu lol
This commit is contained in:
parent
e09e76aa4a
commit
2fd901321e
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