Signed-off-by: Leo Liu <leo....@amd.com> --- src/gallium/auxiliary/vl/vl_winsys_dri3.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/gallium/auxiliary/vl/vl_winsys_dri3.c b/src/gallium/auxiliary/vl/vl_winsys_dri3.c index 8e3c4a0e04d..0233f58441e 100644 --- a/src/gallium/auxiliary/vl/vl_winsys_dri3.c +++ b/src/gallium/auxiliary/vl/vl_winsys_dri3.c @@ -238,7 +238,13 @@ dri3_alloc_back_buffer(struct vl_dri3_screen *scrn) memset(&templ, 0, sizeof(templ)); templ.bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW; - templ.format = PIPE_FORMAT_B8G8R8X8_UNORM; + if (scrn->depth == 24) + templ.format = PIPE_FORMAT_B8G8R8X8_UNORM; + else if (scrn->depth == 30) + templ.format = PIPE_FORMAT_B10G10R10X2_UNORM; + else + goto unmap_shm; + templ.target = PIPE_TEXTURE_2D; templ.last_level = 0; templ.width0 = (scrn->output_texture) ? @@ -809,8 +815,8 @@ vl_dri3_screen_create(Display *display, int screen) geom_reply = xcb_get_geometry_reply(scrn->conn, geom_cookie, NULL); if (!geom_reply) goto close_fd; - /* TODO support depth other than 24 */ - if (geom_reply->depth != 24) { + /* TODO support depth other than 24 or 30 */ + if (geom_reply->depth != 24 && geom_reply->depth != 30) { free(geom_reply); goto close_fd; } -- 2.17.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev