backends/drm: use the correct format for CPU copy

BUG: 448376
This commit is contained in:
Xaver Hugl 2022-01-14 09:07:12 +01:00
parent f027b979bc
commit 0a3922e29d

View file

@ -334,7 +334,7 @@ QSharedPointer<DrmBuffer> EglGbmBackend::importFramebuffer(Output &output, const
}
// ImportMode::DumbBuffer
if (!output.current.importSwapchain || output.current.importSwapchain->size() != size) {
output.current.importSwapchain = QSharedPointer<DumbSwapchain>::create(m_gpu, size, DRM_FORMAT_XRGB8888);
output.current.importSwapchain = QSharedPointer<DumbSwapchain>::create(m_gpu, size, renderingBackend()->drmFormat(output.output));
if (output.current.importSwapchain->isEmpty()) {
output.current.importSwapchain = nullptr;
}