Mesa (master): dri: Add __DRIimage support for the ARGB2101010 format

Kristian Høgsberg krh at kemper.freedesktop.org
Wed Oct 16 06:16:02 UTC 2013


Module: Mesa
Branch: master
Commit: 3160ec353e62fb9fea2ea8a0439f5973b57adcac
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3160ec353e62fb9fea2ea8a0439f5973b57adcac

Author: Kristian Høgsberg <krh at bitplanet.net>
Date:   Sat Sep 14 23:31:08 2013 -0700

dri: Add __DRIimage support for the ARGB2101010 format

We add support for the ARGB2101010 color format to the DRI image extension,
which allows DRI loaders to create a __DRIimage with this color format.

Signed-off-by: Kristian Høgsberg <krh at bitplanet.net>

---

 include/GL/internal/dri_interface.h      |    2 ++
 src/mesa/drivers/dri/i965/intel_screen.c |   10 ++++++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 709fece..33b41ea 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -964,6 +964,8 @@ struct __DRIdri2ExtensionRec {
 #define __DRI_IMAGE_FORMAT_R8           0x1006 /* Since version 5 */
 #define __DRI_IMAGE_FORMAT_GR88         0x1007
 #define __DRI_IMAGE_FORMAT_NONE         0x1008
+#define __DRI_IMAGE_FORMAT_XRGB2101010  0x1009
+#define __DRI_IMAGE_FORMAT_ARGB2101010  0x100a
 
 #define __DRI_IMAGE_USE_SHARE		0x0001
 #define __DRI_IMAGE_USE_SCANOUT		0x0002
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index 2912291..eadd9a6 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -296,6 +296,12 @@ intel_allocate_image(int dri_format, void *loaderPrivate)
     case __DRI_IMAGE_FORMAT_XRGB8888:
        image->format = MESA_FORMAT_XRGB8888;
        break;
+    case __DRI_IMAGE_FORMAT_ARGB2101010:
+       image->format = MESA_FORMAT_ARGB2101010;
+       break;
+    case __DRI_IMAGE_FORMAT_XRGB2101010:
+       image->format = MESA_FORMAT_XRGB2101010_UNORM;
+       break;
     case __DRI_IMAGE_FORMAT_ARGB8888:
        image->format = MESA_FORMAT_ARGB8888;
        break;
@@ -382,6 +388,10 @@ intel_dri_format(GLuint format)
       return __DRI_IMAGE_FORMAT_R8;
    case MESA_FORMAT_RG88:
       return __DRI_IMAGE_FORMAT_GR88;
+   case MESA_FORMAT_XRGB2101010_UNORM:
+      return __DRI_IMAGE_FORMAT_XRGB2101010;
+   case MESA_FORMAT_ARGB2101010:
+      return __DRI_IMAGE_FORMAT_ARGB2101010;
    }
 
    return MESA_FORMAT_NONE;




More information about the mesa-commit mailing list