st/dri: Support texture_from_pixmap for BGR[A/X]1010102 formats.
authorMario Kleiner <mario.kleiner.de@gmail.com>
Fri, 15 Dec 2017 22:05:06 +0000 (23:05 +0100)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 3 Jan 2018 21:57:57 +0000 (22:57 +0100)
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/state_trackers/dri/dri_drawable.c

index 92ce9d288b1ce79f0bf83aaad3ff4a02cdc222dc..a5999be574ae65b5baa6ab6953257316f27b725e 100644 (file)
@@ -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;