[Mesa-dev] [PATCH 2/3] st/dri: only expose config formats that are display targets

Marek Olšák maraeo at gmail.com
Tue Feb 6 17:48:15 UTC 2018


Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Sun, Feb 4, 2018 at 8:09 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> 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>
> ---
>
> Not sure if this is the right thing, esp for a PRIME-type setup. However
> for the common single-GPU case, it does seem right.
>
>  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 bd0925b9055..aaee9870776 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++) {
> --
> 2.13.6
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list