[Mesa-dev] [PATCH 1/4] vl/dri3: add 10 bits format support for front buffer
Michel Dänzer
michel at daenzer.net
Fri Sep 7 14:07:07 UTC 2018
On 2018-09-07 3:55 p.m., Leo Liu wrote:
> Signed-off-by: Leo Liu <leo.liu at amd.com>
> ---
> src/gallium/auxiliary/vl/vl_winsys_dri3.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/vl/vl_winsys_dri3.c b/src/gallium/auxiliary/vl/vl_winsys_dri3.c
> index 0233f58441..7ac6924c78 100644
> --- a/src/gallium/auxiliary/vl/vl_winsys_dri3.c
> +++ b/src/gallium/auxiliary/vl/vl_winsys_dri3.c
> @@ -503,7 +503,13 @@ dri3_get_front_buffer(struct vl_dri3_screen *scrn)
> whandle.stride = bp_reply->stride;
> memset(&templ, 0, sizeof(templ));
> templ.bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW;
> - templ.format = PIPE_FORMAT_B8G8R8X8_UNORM;
> + if (bp_reply->depth == 24)
> + templ.format = PIPE_FORMAT_B8G8R8X8_UNORM;
> + else if (bp_reply->depth == 30)
> + templ.format = PIPE_FORMAT_B10G10R10X2_UNORM;
> + else
> + goto free_reply;
> +
> templ.target = PIPE_TEXTURE_2D;
> templ.last_level = 0;
> templ.width0 = bp_reply->width;
>
For this patch and patch 4, it's not that simple unfortunately. See e.g.
src/egl/drivers/dri2/platform_x11.c:dri2_format_for_depth().
Patches 2 & 3 are
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the mesa-dev
mailing list