summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common
diff options
context:
space:
mode:
authorMark Mueller <[email protected]>2014-01-20 14:21:43 -0800
committerMark Mueller <[email protected]>2014-01-27 14:29:13 -0800
commitef145ba4ded6aafb28e3bda02fb348e6b8bff12a (patch)
tree055904f1dd870171e87e792c878e9712ae50c722 /src/mesa/drivers/dri/common
parent71fe9437169cfdafda8814aa814bb85429fb6cfc (diff)
mesa: Rename 4 color component unsigned byte MESA_FORMATs
Change all 4 color component unsigned byte formats to meet spec for P Type formats: s/MESA_FORMAT_RGBA8888\b/MESA_FORMAT_A8B8G8R8_UNORM/g s/MESA_FORMAT_RGBA8888_REV\b/MESA_FORMAT_R8G8B8A8_UNORM/g s/MESA_FORMAT_ARGB8888\b/MESA_FORMAT_B8G8R8A8_UNORM/g s/MESA_FORMAT_ARGB8888_REV\b/MESA_FORMAT_A8R8G8B8_UNORM/g s/MESA_FORMAT_RGBX8888\b/MESA_FORMAT_X8B8G8R8_UNORM/g s/MESA_FORMAT_RGBX8888_REV\b/MESA_FORMAT_R8G8B8X8_UNORM/g s/MESA_FORMAT_XRGB8888\b/MESA_FORMAT_B8G8R8X8_UNORM/g s/MESA_FORMAT_XRGB8888_REV\b/MESA_FORMAT_X8R8G8B8_UNORM/g
Diffstat (limited to 'src/mesa/drivers/dri/common')
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c16
-rw-r--r--src/mesa/drivers/dri/common/utils.c8
2 files changed, 12 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index e8c0d91e264..5320ec06d1e 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -811,17 +811,17 @@ driGLFormatToImageFormat(mesa_format format)
switch (format) {
case MESA_FORMAT_RGB565:
return __DRI_IMAGE_FORMAT_RGB565;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_B8G8R8X8_UNORM:
return __DRI_IMAGE_FORMAT_XRGB8888;
case MESA_FORMAT_ARGB2101010:
return __DRI_IMAGE_FORMAT_ARGB2101010;
case MESA_FORMAT_XRGB2101010_UNORM:
return __DRI_IMAGE_FORMAT_XRGB2101010;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_B8G8R8A8_UNORM:
return __DRI_IMAGE_FORMAT_ARGB8888;
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_R8G8B8A8_UNORM:
return __DRI_IMAGE_FORMAT_ABGR8888;
- case MESA_FORMAT_RGBX8888_REV:
+ case MESA_FORMAT_R8G8B8X8_UNORM:
return __DRI_IMAGE_FORMAT_XBGR8888;
case MESA_FORMAT_R8:
return __DRI_IMAGE_FORMAT_R8;
@@ -843,17 +843,17 @@ driImageFormatToGLFormat(uint32_t image_format)
case __DRI_IMAGE_FORMAT_RGB565:
return MESA_FORMAT_RGB565;
case __DRI_IMAGE_FORMAT_XRGB8888:
- return MESA_FORMAT_XRGB8888;
+ return MESA_FORMAT_B8G8R8X8_UNORM;
case __DRI_IMAGE_FORMAT_ARGB2101010:
return MESA_FORMAT_ARGB2101010;
case __DRI_IMAGE_FORMAT_XRGB2101010:
return MESA_FORMAT_XRGB2101010_UNORM;
case __DRI_IMAGE_FORMAT_ARGB8888:
- return MESA_FORMAT_ARGB8888;
+ return MESA_FORMAT_B8G8R8A8_UNORM;
case __DRI_IMAGE_FORMAT_ABGR8888:
- return MESA_FORMAT_RGBA8888_REV;
+ return MESA_FORMAT_R8G8B8A8_UNORM;
case __DRI_IMAGE_FORMAT_XBGR8888:
- return MESA_FORMAT_RGBX8888_REV;
+ return MESA_FORMAT_R8G8B8X8_UNORM;
case __DRI_IMAGE_FORMAT_R8:
return MESA_FORMAT_R8;
case __DRI_IMAGE_FORMAT_GR88:
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 06981c20bc8..b18256e355d 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -186,9 +186,9 @@ driCreateConfigs(mesa_format format,
static const uint32_t masks_table[][4] = {
/* MESA_FORMAT_RGB565 */
{ 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 },
- /* MESA_FORMAT_XRGB8888 */
+ /* MESA_FORMAT_B8G8R8X8_UNORM */
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 },
- /* MESA_FORMAT_ARGB8888 */
+ /* MESA_FORMAT_B8G8R8A8_UNORM */
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 },
/* MESA_FORMAT_XRGB2101010_UNORM */
{ 0x3FF00000, 0x000FFC00, 0x000003FF, 0x00000000 },
@@ -212,10 +212,10 @@ driCreateConfigs(mesa_format format,
case MESA_FORMAT_RGB565:
masks = masks_table[0];
break;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_B8G8R8X8_UNORM:
masks = masks_table[1];
break;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_B8G8R8A8_UNORM:
case MESA_FORMAT_SARGB8:
masks = masks_table[2];
break;