backends/drm: check egl config before creating gbm surface
This commit is contained in:
parent
9d3f77f6f4
commit
a23d23593b
2 changed files with 4 additions and 1 deletions
|
@ -291,7 +291,7 @@ bool EglGbmBackend::prefer10bpc() const
|
|||
|
||||
EGLConfig EglGbmBackend::config(uint32_t format) const
|
||||
{
|
||||
return m_configs[format];
|
||||
return m_configs.value(format, EGL_NO_CONFIG_KHR);
|
||||
}
|
||||
|
||||
QSharedPointer<DrmPipelineLayer> EglGbmBackend::createDrmPipelineLayer(DrmPipeline *pipeline)
|
||||
|
|
|
@ -200,6 +200,9 @@ bool EglGbmLayer::createGbmSurface(uint32_t format, const QVector<uint64_t> &mod
|
|||
|
||||
const auto size = m_pipeline->bufferSize();
|
||||
const auto config = m_eglBackend->config(format);
|
||||
if (config == EGL_NO_CONFIG_KHR) {
|
||||
return false;
|
||||
}
|
||||
|
||||
QSharedPointer<GbmSurface> gbmSurface;
|
||||
#if HAVE_GBM_BO_GET_FD_FOR_PLANE
|
||||
|
|
Loading…
Reference in a new issue