[Mesa-dev] [PATCH 1/4] vl/dri3: add 10 bits format support for front buffer

Leo Liu leo.liu at amd.com
Fri Sep 7 13:55:33 UTC 2018


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;
-- 
2.17.1



More information about the mesa-dev mailing list