mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-08-17 01:00:27 +03:00
dont crash on multigpu lol
This commit is contained in:
parent
2bee22caec
commit
b6978043f2
@ -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 New Issue
Block a user