summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMiguel Casas <[email protected]>2018-05-07 11:45:20 -0400
committerChad Versace <[email protected]>2018-05-23 10:17:45 -0700
commit432df741e0b85c021da0ac027aa25cd4dc1454c6 (patch)
tree6de4f21587b643494c0ff171b33817413f2a1c17 /src/mesa
parentc8acfd5ab28e8134c9da6ce781180fa3df5967ca (diff)
dri_util: Add R10G10B10{A,X}2 translation between DRI and mesa_format.
Add R10G10B10{A,X}2 translation between mesa_format and DRI format to driGLFormatToImageFormat() and driImageFormatToGLFormat(). Bug: https://crbug.com/776093 Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Tapani Pälli <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 75d124097b9..c58650491df 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -878,6 +878,10 @@ driGLFormatToImageFormat(mesa_format format)
return __DRI_IMAGE_FORMAT_ARGB2101010;
case MESA_FORMAT_B10G10R10X2_UNORM:
return __DRI_IMAGE_FORMAT_XRGB2101010;
+ case MESA_FORMAT_R10G10B10A2_UNORM:
+ return __DRI_IMAGE_FORMAT_ABGR2101010;
+ case MESA_FORMAT_R10G10B10X2_UNORM:
+ return __DRI_IMAGE_FORMAT_XBGR2101010;
case MESA_FORMAT_B8G8R8A8_UNORM:
return __DRI_IMAGE_FORMAT_ARGB8888;
case MESA_FORMAT_R8G8B8A8_UNORM:
@@ -915,6 +919,10 @@ driImageFormatToGLFormat(uint32_t image_format)
return MESA_FORMAT_B10G10R10A2_UNORM;
case __DRI_IMAGE_FORMAT_XRGB2101010:
return MESA_FORMAT_B10G10R10X2_UNORM;
+ case __DRI_IMAGE_FORMAT_ABGR2101010:
+ return MESA_FORMAT_R10G10B10A2_UNORM;
+ case __DRI_IMAGE_FORMAT_XBGR2101010:
+ return MESA_FORMAT_R10G10B10X2_UNORM;
case __DRI_IMAGE_FORMAT_ARGB8888:
return MESA_FORMAT_B8G8R8A8_UNORM;
case __DRI_IMAGE_FORMAT_ABGR8888: