Commit e9b466c4 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧 Committed by Fabian Vogt
Browse files

pipewire: Report DRM_FORMAT_MOD_INVALID when no modifiers are offered

Otherwise we do not offer dmabuf when no modifiers are available


(cherry picked from commit 5f17bc50)
parent e122bafc
......@@ -90,15 +90,16 @@ static std::vector<uint64_t> queryDmaBufModifiers(EGLDisplay display, uint32_t f
}
success = eglQueryDmaBufModifiersEXT(display, drm_format, 0, nullptr, nullptr, &count);
if (!success || count == 0) {
if (!success)
qCWarning(PIPEWIRE_LOGGING) << "Failed to query DMA-BUF modifier count.";
if (!success) {
qCWarning(PIPEWIRE_LOGGING) << "Failed to query DMA-BUF modifier count.";
return {};
}
std::vector<uint64_t> modifiers(count);
if (!eglQueryDmaBufModifiersEXT(display, drm_format, count, modifiers.data(), nullptr, &count)) {
qCWarning(PIPEWIRE_LOGGING) << "Failed to query DMA-BUF modifiers.";
if (count > 0) {
if (!eglQueryDmaBufModifiersEXT(display, drm_format, count, modifiers.data(), nullptr, &count)) {
qCWarning(PIPEWIRE_LOGGING) << "Failed to query DMA-BUF modifiers.";
}
}
// Support modifier-less buffers
......
Markdown is supported
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