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.
This commit is contained in:
parent
2cc3f9cdee
commit
61ef8c0087
1 changed files with 5 additions and 1 deletions
|
@ -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…
Reference in a new issue