st/dri: only expose config formats that are display targets
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 31 Dec 2017 07:36:39 +0000 (02:36 -0500)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 20 Feb 2018 03:33:58 +0000 (22:33 -0500)
In the case of NVIDIA hardware, ABGR is displayable but ARGB is not.
Only advertise the one set in the visuals list.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Acked-by: Daniel Stone <daniels@collabora.com>
src/gallium/state_trackers/dri/dri_screen.c

index bd0925b905518c60b608fe2698dcd173709b320e..aaee98707766b062fa2c3f830b64bfde179f1709 100644 (file)
@@ -249,7 +249,8 @@ dri_fill_in_modes(struct dri_screen *screen)
 
       if (!p_screen->is_format_supported(p_screen, pipe_formats[format],
                                          PIPE_TEXTURE_2D, 0,
-                                         PIPE_BIND_RENDER_TARGET))
+                                         PIPE_BIND_RENDER_TARGET |
+                                         PIPE_BIND_DISPLAY_TARGET))
          continue;
 
       for (i = 1; i <= msaa_samples_max; i++) {