[Mesa-dev] [PATCH 19/22] st/dri: Support texture_from_pixmap for BGR[A/X]1010102 formats.

Mario Kleiner mario.kleiner.de at gmail.com
Fri Dec 15 22:05:06 UTC 2017


Signed-off-by: Mario Kleiner <mario.kleiner.de at gmail.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
 src/gallium/state_trackers/dri/dri_drawable.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/state_trackers/dri/dri_drawable.c b/src/gallium/state_trackers/dri/dri_drawable.c
index 92ce9d2..a5999be 100644
--- a/src/gallium/state_trackers/dri/dri_drawable.c
+++ b/src/gallium/state_trackers/dri/dri_drawable.c
@@ -260,6 +260,9 @@ dri_set_tex_buffer2(__DRIcontext *pDRICtx, GLint target,
       if (format == __DRI_TEXTURE_FORMAT_RGB)  {
          /* only need to cover the formats recognized by dri_fill_st_visual */
          switch (internal_format) {
+         case PIPE_FORMAT_B10G10R10A2_UNORM:
+            internal_format = PIPE_FORMAT_B10G10R10X2_UNORM;
+            break;
          case PIPE_FORMAT_BGRA8888_UNORM:
             internal_format = PIPE_FORMAT_BGRX8888_UNORM;
             break;
-- 
2.7.4



More information about the mesa-dev mailing list