diff --git a/.pick_status.json b/.pick_status.json index 67404d8ad51..60ee6743b14 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -922,7 +922,7 @@ "description": "nouveau: treat DRM_FORMAT_INVALID as implicit modifier", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "129d83cac2accc4a66eae50c19ac245b864dc98c" }, diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_miptree.c b/src/gallium/drivers/nouveau/nvc0/nvc0_miptree.c index e0a9d48249f..e93d66c71b6 100644 --- a/src/gallium/drivers/nouveau/nvc0/nvc0_miptree.c +++ b/src/gallium/drivers/nouveau/nvc0/nvc0_miptree.c @@ -423,9 +423,12 @@ nvc0_miptree_select_best_modifier(struct pipe_screen *pscreen, for (i = 0u; i < count; i++) { for (p = 0; p < ARRAY_SIZE(prio_supported_mods); p++) { - if (prio_supported_mods[p] == modifiers[i]) { - if (top_mod_slot > p) top_mod_slot = p; - break; + if (prio_supported_mods[p] != DRM_FORMAT_MOD_INVALID) { + if (modifiers[i] == DRM_FORMAT_MOD_INVALID || + prio_supported_mods[p] == modifiers[i]) { + if (top_mod_slot > p) top_mod_slot = p; + break; + } } } }