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>
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