platforms/drm: correct multi-gpu mistake
As all outputs from secondary GPUs are in the same map as the ones from the primary GPU, EglMultiBackend::findBackend always returned the primary backend. To fix that, search in secondary backends first
This commit is contained in:
parent
89d49b4d5d
commit
85a6dc3cad
1 changed files with 4 additions and 5 deletions
|
@ -100,13 +100,12 @@ QSharedPointer<GLTexture> EglMultiBackend::textureForOutput(AbstractOutput *requ
|
|||
|
||||
AbstractEglDrmBackend *EglMultiBackend::findBackend(AbstractOutput *output) const
|
||||
{
|
||||
for (const auto &backend : qAsConst(m_backends)) {
|
||||
if (backend->hasOutput(output)) {
|
||||
return backend;
|
||||
for (int i = 1; i < m_backends.count(); i++) {
|
||||
if (m_backends[i]->hasOutput(output)) {
|
||||
return m_backends[i];
|
||||
}
|
||||
}
|
||||
Q_UNREACHABLE();
|
||||
return nullptr;
|
||||
return m_backends[0];
|
||||
}
|
||||
|
||||
bool EglMultiBackend::directScanoutAllowed(AbstractOutput *output) const
|
||||
|
|
Loading…
Reference in a new issue