On 09/07/2018 10:07 AM, Michel Dänzer wrote:
On 2018-09-07 3:55 p.m., Leo Liu wrote:
Signed-off-by: Leo Liu <leo....@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().

Thanks Michel, I will have a look at this.

BTW: I sent one patch yesterday for DRI3 back buffer case, could you take a look as well?
[PATCH] vl/dri3: add support for 10 bits format

Leo



Patches 2 & 3 are

Reviewed-by: Michel Dänzer <michel.daen...@amd.com>



_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to