Commit 19666380 authored by Xaver Hugl's avatar Xaver Hugl
Browse files

backends/drm: do cross-gpu imports again for test commits

Otherwise all commits will fail without a clear visible reason.

BUG: 454086
parent 13e36301
Pipeline #192288 failed with stage
in 12 minutes and 12 seconds
......@@ -347,6 +347,19 @@ std::shared_ptr<DrmFramebuffer> EglGbmLayerSurface::renderTestBuffer(const QSize
glClear(GL_COLOR_BUFFER_BIT);
m_currentBuffer = m_gbmSurface->swapBuffers(infiniteRegion());
if (m_currentBuffer) {
if (m_gpu != m_eglBackend->gpu()) {
auto oldImportMode = m_importMode;
auto buffer = importBuffer();
if (buffer) {
return buffer;
} else if (m_importMode != oldImportMode) {
// try again with the new import mode
// recursion depth is limited by the number of import modes
return renderTestBuffer(bufferSize, formats, additionalFlags);
} else {
return nullptr;
}
}
return DrmFramebuffer::createFramebuffer(m_currentBuffer);
} else {
return nullptr;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment