drm render: Don't fallback to linear but implicit modifiers
This commit is contained in:
parent
4ffa329fe9
commit
4e2afb0f1f
|
@ -103,11 +103,11 @@ where
|
||||||
} else if renderer_formats.is_empty() {
|
} else if renderer_formats.is_empty() {
|
||||||
return Err(Error::NoSupportedRendererFormat);
|
return Err(Error::NoSupportedRendererFormat);
|
||||||
}
|
}
|
||||||
|
|
||||||
let formats = {
|
let formats = {
|
||||||
// Special case: if a format supports explicit LINEAR (but no implicit Modifiers)
|
// Special case: if a format supports explicit LINEAR (but no implicit Modifiers)
|
||||||
// and the other doesn't support any modifier, force LINEAR. This will force the allocator to
|
// and the other doesn't support any modifier, force Implicit.
|
||||||
// create a buffer with a LINEAR layout instead of an implicit modifier.
|
// This should at least result in a working pipeline possibly with a linear buffer,
|
||||||
|
// but we cannot be sure.
|
||||||
if (plane_formats.len() == 1
|
if (plane_formats.len() == 1
|
||||||
&& plane_formats.iter().next().unwrap().modifier == Modifier::Invalid
|
&& plane_formats.iter().next().unwrap().modifier == Modifier::Invalid
|
||||||
&& renderer_formats.iter().all(|x| x.modifier != Modifier::Invalid)
|
&& renderer_formats.iter().all(|x| x.modifier != Modifier::Invalid)
|
||||||
|
@ -119,7 +119,7 @@ where
|
||||||
{
|
{
|
||||||
vec![Format {
|
vec![Format {
|
||||||
code,
|
code,
|
||||||
modifier: Modifier::Linear,
|
modifier: Modifier::Invalid,
|
||||||
}]
|
}]
|
||||||
} else {
|
} else {
|
||||||
plane_formats
|
plane_formats
|
||||||
|
|
Loading…
Reference in New Issue