Commit 1d5c803c authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Aleix Pol Gonzalez
Browse files

drm: Change where we call makeCurrent when creating dmabufs

We only need to call it before issuing opengl calls, so it's not
necessary when testing or when gbm fails to create the Buffer Object.
parent 538b848f
......@@ -631,7 +631,6 @@ gbm_bo *DrmBackend::createBo(const QSize &size, quint32 format, const QVector<ui
return nullptr;
}
eglBackend->makeCurrent();
return createGbmBo(primaryGpu()->gbmDevice(), size, format, modifiers);
}
......@@ -663,6 +662,7 @@ std::shared_ptr<DmaBufTexture> DrmBackend::createDmaBufTexture(const QSize &size
// The bo will be kept around until the last fd is closed.
const DmaBufAttributes attributes = dmaBufAttributesForBo(bo);
gbm_bo_destroy(bo);
eglBackend->makeCurrent();
return std::make_shared<DmaBufTexture>(eglBackend->importDmaBufAsTexture(attributes), attributes);
}
......
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