freedreno: pass count to query_dmabuf_modifiers

query_dmabuf_modifiers needs to know the max number
of modifiers that the list will hold.
This commit is contained in:
Fritz Koenig 2019-02-26 20:06:31 -08:00 committed by Rob Clark
parent 2793417ec6
commit 41082446db

View file

@ -1014,7 +1014,7 @@ is_supported_modifier(struct pipe_screen *pscreen, enum pipe_format pfmt,
/* Get the supported modifiers: */
uint64_t modifiers[count];
pscreen->query_dmabuf_modifiers(pscreen, pfmt, 0, modifiers, NULL, &count);
pscreen->query_dmabuf_modifiers(pscreen, pfmt, count, modifiers, NULL, &count);
for (int i = 0; i < count; i++)
if (modifiers[i] == mod)