diff options
author | Chad Versace <[email protected]> | 2016-12-22 14:44:47 -0800 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2017-01-24 01:13:23 +0000 |
commit | ca81a9f9df0d032106d099b7d538fd16f1926cf4 (patch) | |
tree | 3c10db86da153f1d19c5b073e3b7322085f74ae0 | |
parent | e8a2e40260acabd9ce94d6ed860b6c0e62e061c4 (diff) |
dri: Add __DRI_IMAGE_FORMAT_ARGB1555
This allows eglCreateImage() to accept textures of said format.
Patch 1/2 to fix
dEQP-EGL.functional.image.modify.tex_rgb5_a1_tex_subimage_rgba8
on Intel.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99185
Cc: Haixia Shi <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
Cc: "13.0" <[email protected]>
(cherry picked from commit 9aa6ab074876dfa853863a74edad0b5b017fb8c7)
-rw-r--r-- | include/GL/internal/dri_interface.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/common/dri_util.c | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h index d0b1bc66835..0e40d4a9c54 100644 --- a/include/GL/internal/dri_interface.h +++ b/include/GL/internal/dri_interface.h @@ -1121,6 +1121,7 @@ struct __DRIdri2ExtensionRec { #define __DRI_IMAGE_FORMAT_XRGB2101010 0x1009 #define __DRI_IMAGE_FORMAT_ARGB2101010 0x100a #define __DRI_IMAGE_FORMAT_SARGB8 0x100b +#define __DRI_IMAGE_FORMAT_ARGB1555 0x100c #define __DRI_IMAGE_USE_SHARE 0x0001 #define __DRI_IMAGE_USE_SCANOUT 0x0002 @@ -1148,6 +1149,7 @@ struct __DRIdri2ExtensionRec { #define __DRI_IMAGE_FOURCC_R8 0x20203852 #define __DRI_IMAGE_FOURCC_GR88 0x38385247 +#define __DRI_IMAGE_FOURCC_ARGB1555 0x35315241 #define __DRI_IMAGE_FOURCC_RGB565 0x36314752 #define __DRI_IMAGE_FOURCC_ARGB8888 0x34325241 #define __DRI_IMAGE_FOURCC_XRGB8888 0x34325258 diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 79cb0506dd8..fca071c51ce 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -830,6 +830,8 @@ driGLFormatToImageFormat(mesa_format format) switch (format) { case MESA_FORMAT_B5G6R5_UNORM: return __DRI_IMAGE_FORMAT_RGB565; + case MESA_FORMAT_B5G5R5A1_UNORM: + return __DRI_IMAGE_FORMAT_ARGB1555; case MESA_FORMAT_B8G8R8X8_UNORM: return __DRI_IMAGE_FORMAT_XRGB8888; case MESA_FORMAT_B10G10R10A2_UNORM: @@ -861,6 +863,8 @@ driImageFormatToGLFormat(uint32_t image_format) switch (image_format) { case __DRI_IMAGE_FORMAT_RGB565: return MESA_FORMAT_B5G6R5_UNORM; + case __DRI_IMAGE_FORMAT_ARGB1555: + return MESA_FORMAT_B5G5R5A1_UNORM; case __DRI_IMAGE_FORMAT_XRGB8888: return MESA_FORMAT_B8G8R8X8_UNORM; case __DRI_IMAGE_FORMAT_ARGB2101010: |