etnaviv: advertise YUV formats as external only
authorLucas Stach <l.stach@pengutronix.de>
Thu, 29 Mar 2018 14:15:15 +0000 (16:15 +0200)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Sun, 8 Apr 2018 20:11:46 +0000 (22:11 +0200)
We only support importing YUV as OES external resources.
This will change in the future, but for now this fixes the
advertised capabilities in eglQueryDmaBufModifiersEXT.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_screen.c

index 2ae4e86c6315d3fbad0da224f35c4c3638c6359d..fff0a250a289a80a290dd0592401e6866bc8a625 100644 (file)
@@ -621,7 +621,7 @@ etna_screen_query_dmabuf_modifiers(struct pipe_screen *pscreen,
       if (modifiers)
          modifiers[num_modifiers] = supported_modifiers[i];
       if (external_only)
-         external_only[num_modifiers] = 0;
+         external_only[num_modifiers] = util_format_is_yuv(format) ? 1 : 0;
       num_modifiers++;
    }