mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 01:10:16 +01:00
asahi: Don't hardcode is_dmabuf_modifier_supported
So we can add more modifiers more easily. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19999>
This commit is contained in:
parent
a6079e5aa8
commit
efa240b74b
1 changed files with 5 additions and 6 deletions
|
|
@ -1543,13 +1543,12 @@ agx_is_dmabuf_modifier_supported(struct pipe_screen *screen,
|
|||
if (external_only)
|
||||
*external_only = false;
|
||||
|
||||
switch (modifier) {
|
||||
case DRM_FORMAT_MOD_APPLE_TWIDDLED:
|
||||
case DRM_FORMAT_MOD_LINEAR:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
for (unsigned i = 0; i < ARRAY_SIZE(agx_best_modifiers); ++i) {
|
||||
if (agx_best_modifiers[i] == modifier)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue