opengl/egldisplay: add the invalid modifier to the correct list

Adding the invalid modifier to nonExternalOnlyModifiers even for formats that otherwise only
have external_only modifiers means that KWin will advertise support for this modifier to clients,
but using the format without external_only samplers fails.
wilder/Plasma/6.2
Xaver Hugl 2 years ago
parent 2cc3f9cdee
commit 61ef8c0087
  1. 6
      src/opengl/egldisplay.cpp

@ -308,7 +308,11 @@ QHash<uint32_t, EglDisplay::DrmFormatInfo> EglDisplay::queryImportFormats() cons
if (!drmFormatInfo.allModifiers.empty()) {
if (!drmFormatInfo.allModifiers.contains(DRM_FORMAT_MOD_INVALID)) {
drmFormatInfo.allModifiers.push_back(DRM_FORMAT_MOD_INVALID);
drmFormatInfo.nonExternalOnlyModifiers.push_back(DRM_FORMAT_MOD_INVALID);
if (!drmFormatInfo.nonExternalOnlyModifiers.empty()) {
drmFormatInfo.nonExternalOnlyModifiers.push_back(DRM_FORMAT_MOD_INVALID);
} else {
drmFormatInfo.externalOnlyModifiers.push_back(DRM_FORMAT_MOD_INVALID);
}
}
ret.insert(format, drmFormatInfo);
}

Loading…
Cancel
Save