Mesa (master): st/dri: only expose config formats that are display targets
Ilia Mirkin
imirkin at kemper.freedesktop.org
Tue Feb 20 03:36:05 UTC 2018
Module: Mesa
Branch: master
Commit: f7604d8af521f39e6d5df62981c3b9e10140cc81
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f7604d8af521f39e6d5df62981c3b9e10140cc81
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Sun Dec 31 02:36:39 2017 -0500
st/dri: only expose config formats that are display targets
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 at alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Acked-by: Daniel Stone <daniels at collabora.com>
---
src/gallium/state_trackers/dri/dri_screen.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/gallium/state_trackers/dri/dri_screen.c b/src/gallium/state_trackers/dri/dri_screen.c
index bd0925b905..aaee987077 100644
--- a/src/gallium/state_trackers/dri/dri_screen.c
+++ b/src/gallium/state_trackers/dri/dri_screen.c
@@ -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++) {
More information about the mesa-commit
mailing list