From 41082446db4bf728e1722e4bf0ccd34876cd0b04 Mon Sep 17 00:00:00 2001 From: Fritz Koenig Date: Tue, 26 Feb 2019 20:06:31 -0800 Subject: [PATCH] freedreno: pass count to query_dmabuf_modifiers query_dmabuf_modifiers needs to know the max number of modifiers that the list will hold. --- src/gallium/drivers/freedreno/freedreno_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c index 5635d8ffde7..22e3874a246 100644 --- a/src/gallium/drivers/freedreno/freedreno_resource.c +++ b/src/gallium/drivers/freedreno/freedreno_resource.c @@ -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) -- 2.30.2