aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_format.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-02-07 23:46:30 +0100
committermarha <marha@users.sourceforge.net>2014-02-07 23:46:30 +0100
commit6daf40f6b1138efad98dbb579cd35520cbc349bb (patch)
tree7f45dbb347f5e1a73b18a720633b9d801c968490 /mesalib/src/mesa/state_tracker/st_format.c
parent5c64f94cf4cf8457a5616fe20b9a27174895f1a8 (diff)
parent982ac918afe6a1c02d5cf735d7b6c56443a048cc (diff)
downloadvcxsrv-6daf40f6b1138efad98dbb579cd35520cbc349bb.tar.gz
vcxsrv-6daf40f6b1138efad98dbb579cd35520cbc349bb.tar.bz2
vcxsrv-6daf40f6b1138efad98dbb579cd35520cbc349bb.zip
Merge remote-tracking branch 'origin/released'
* origin/released: xkbcomp xkeyboard-config libxcb libxtrans fontconfig libX11 libxcb mesa xserver git update 7 Feb 2014 Conflicts: mesalib/src/glsl/glcpp/glcpp.c openssl/Makefile
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_format.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_format.c514
1 files changed, 259 insertions, 255 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_format.c b/mesalib/src/mesa/state_tracker/st_format.c
index b0158f300..90e9f2f78 100644
--- a/mesalib/src/mesa/state_tracker/st_format.c
+++ b/mesalib/src/mesa/state_tracker/st_format.c
@@ -54,70 +54,70 @@
* Translate Mesa format to Gallium format.
*/
enum pipe_format
-st_mesa_format_to_pipe_format(gl_format mesaFormat)
+st_mesa_format_to_pipe_format(mesa_format mesaFormat)
{
switch (mesaFormat) {
- case MESA_FORMAT_RGBA8888:
+ case MESA_FORMAT_A8B8G8R8_UNORM:
return PIPE_FORMAT_ABGR8888_UNORM;
- case MESA_FORMAT_RGBA8888_REV:
+ case MESA_FORMAT_R8G8B8A8_UNORM:
return PIPE_FORMAT_RGBA8888_UNORM;
- case MESA_FORMAT_ARGB8888:
+ case MESA_FORMAT_B8G8R8A8_UNORM:
return PIPE_FORMAT_BGRA8888_UNORM;
- case MESA_FORMAT_ARGB8888_REV:
+ case MESA_FORMAT_A8R8G8B8_UNORM:
return PIPE_FORMAT_ARGB8888_UNORM;
- case MESA_FORMAT_RGBX8888:
+ case MESA_FORMAT_X8B8G8R8_UNORM:
return PIPE_FORMAT_XBGR8888_UNORM;
- case MESA_FORMAT_RGBX8888_REV:
+ case MESA_FORMAT_R8G8B8X8_UNORM:
return PIPE_FORMAT_RGBX8888_UNORM;
- case MESA_FORMAT_XRGB8888:
+ case MESA_FORMAT_B8G8R8X8_UNORM:
return PIPE_FORMAT_BGRX8888_UNORM;
- case MESA_FORMAT_XRGB8888_REV:
+ case MESA_FORMAT_X8R8G8B8_UNORM:
return PIPE_FORMAT_XRGB8888_UNORM;
- case MESA_FORMAT_ARGB1555:
+ case MESA_FORMAT_B5G5R5A1_UNORM:
return PIPE_FORMAT_B5G5R5A1_UNORM;
- case MESA_FORMAT_ARGB4444:
+ case MESA_FORMAT_B4G4R4A4_UNORM:
return PIPE_FORMAT_B4G4R4A4_UNORM;
- case MESA_FORMAT_RGB565:
+ case MESA_FORMAT_B5G6R5_UNORM:
return PIPE_FORMAT_B5G6R5_UNORM;
- case MESA_FORMAT_RGB332:
+ case MESA_FORMAT_B2G3R3_UNORM:
return PIPE_FORMAT_B2G3R3_UNORM;
- case MESA_FORMAT_ARGB2101010:
+ case MESA_FORMAT_B10G10R10A2_UNORM:
return PIPE_FORMAT_B10G10R10A2_UNORM;
- case MESA_FORMAT_AL44:
+ case MESA_FORMAT_L4A4_UNORM:
return PIPE_FORMAT_L4A4_UNORM;
- case MESA_FORMAT_AL88:
+ case MESA_FORMAT_L8A8_UNORM:
return PIPE_FORMAT_L8A8_UNORM;
- case MESA_FORMAT_AL1616:
+ case MESA_FORMAT_L16A16_UNORM:
return PIPE_FORMAT_L16A16_UNORM;
- case MESA_FORMAT_A8:
+ case MESA_FORMAT_A_UNORM8:
return PIPE_FORMAT_A8_UNORM;
- case MESA_FORMAT_A16:
+ case MESA_FORMAT_A_UNORM16:
return PIPE_FORMAT_A16_UNORM;
- case MESA_FORMAT_L8:
+ case MESA_FORMAT_L_UNORM8:
return PIPE_FORMAT_L8_UNORM;
- case MESA_FORMAT_L16:
+ case MESA_FORMAT_L_UNORM16:
return PIPE_FORMAT_L16_UNORM;
- case MESA_FORMAT_I8:
+ case MESA_FORMAT_I_UNORM8:
return PIPE_FORMAT_I8_UNORM;
- case MESA_FORMAT_I16:
+ case MESA_FORMAT_I_UNORM16:
return PIPE_FORMAT_I16_UNORM;
- case MESA_FORMAT_Z16:
+ case MESA_FORMAT_Z_UNORM16:
return PIPE_FORMAT_Z16_UNORM;
- case MESA_FORMAT_Z32:
+ case MESA_FORMAT_Z_UNORM32:
return PIPE_FORMAT_Z32_UNORM;
- case MESA_FORMAT_Z24_S8:
+ case MESA_FORMAT_S8_UINT_Z24_UNORM:
return PIPE_FORMAT_S8_UINT_Z24_UNORM;
- case MESA_FORMAT_S8_Z24:
+ case MESA_FORMAT_Z24_UNORM_X8_UINT:
return PIPE_FORMAT_Z24_UNORM_S8_UINT;
- case MESA_FORMAT_Z24_X8:
+ case MESA_FORMAT_X8Z24_UNORM:
return PIPE_FORMAT_X8Z24_UNORM;
- case MESA_FORMAT_X8_Z24:
+ case MESA_FORMAT_Z24_UNORM_S8_UINT:
return PIPE_FORMAT_Z24X8_UNORM;
- case MESA_FORMAT_S8:
+ case MESA_FORMAT_S_UINT8:
return PIPE_FORMAT_S8_UINT;
- case MESA_FORMAT_Z32_FLOAT:
+ case MESA_FORMAT_Z_FLOAT32:
return PIPE_FORMAT_Z32_FLOAT;
- case MESA_FORMAT_Z32_FLOAT_X24S8:
+ case MESA_FORMAT_Z32_FLOAT_S8X24_UINT:
return PIPE_FORMAT_Z32_FLOAT_S8X24_UINT;
case MESA_FORMAT_YCBCR:
return PIPE_FORMAT_UYVY;
@@ -137,15 +137,15 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
return PIPE_FORMAT_DXT3_SRGBA;
case MESA_FORMAT_SRGBA_DXT5:
return PIPE_FORMAT_DXT5_SRGBA;
- case MESA_FORMAT_SLA8:
+ case MESA_FORMAT_L8A8_SRGB:
return PIPE_FORMAT_L8A8_SRGB;
- case MESA_FORMAT_SL8:
+ case MESA_FORMAT_L_SRGB8:
return PIPE_FORMAT_L8_SRGB;
- case MESA_FORMAT_SRGB8:
+ case MESA_FORMAT_BGR_SRGB8:
return PIPE_FORMAT_R8G8B8_SRGB;
- case MESA_FORMAT_SRGBA8:
+ case MESA_FORMAT_A8B8G8R8_SRGB:
return PIPE_FORMAT_A8B8G8R8_SRGB;
- case MESA_FORMAT_SARGB8:
+ case MESA_FORMAT_B8G8R8A8_SRGB:
return PIPE_FORMAT_B8G8R8A8_SRGB;
case MESA_FORMAT_RGBA_FLOAT32:
return PIPE_FORMAT_R32G32B32A32_FLOAT;
@@ -155,21 +155,21 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
return PIPE_FORMAT_R32G32B32_FLOAT;
case MESA_FORMAT_RGB_FLOAT16:
return PIPE_FORMAT_R16G16B16_FLOAT;
- case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32:
+ case MESA_FORMAT_LA_FLOAT32:
return PIPE_FORMAT_L32A32_FLOAT;
- case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16:
+ case MESA_FORMAT_LA_FLOAT16:
return PIPE_FORMAT_L16A16_FLOAT;
- case MESA_FORMAT_LUMINANCE_FLOAT32:
+ case MESA_FORMAT_L_FLOAT32:
return PIPE_FORMAT_L32_FLOAT;
- case MESA_FORMAT_LUMINANCE_FLOAT16:
+ case MESA_FORMAT_L_FLOAT16:
return PIPE_FORMAT_L16_FLOAT;
- case MESA_FORMAT_ALPHA_FLOAT32:
+ case MESA_FORMAT_A_FLOAT32:
return PIPE_FORMAT_A32_FLOAT;
- case MESA_FORMAT_ALPHA_FLOAT16:
+ case MESA_FORMAT_A_FLOAT16:
return PIPE_FORMAT_A16_FLOAT;
- case MESA_FORMAT_INTENSITY_FLOAT32:
+ case MESA_FORMAT_I_FLOAT32:
return PIPE_FORMAT_I32_FLOAT;
- case MESA_FORMAT_INTENSITY_FLOAT16:
+ case MESA_FORMAT_I_FLOAT16:
return PIPE_FORMAT_I16_FLOAT;
case MESA_FORMAT_R_FLOAT32:
return PIPE_FORMAT_R32_FLOAT;
@@ -180,97 +180,97 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
case MESA_FORMAT_RG_FLOAT16:
return PIPE_FORMAT_R16G16_FLOAT;
- case MESA_FORMAT_R8:
+ case MESA_FORMAT_R_UNORM8:
return PIPE_FORMAT_R8_UNORM;
- case MESA_FORMAT_R16:
+ case MESA_FORMAT_R_UNORM16:
return PIPE_FORMAT_R16_UNORM;
- case MESA_FORMAT_GR88:
+ case MESA_FORMAT_R8G8_UNORM:
return PIPE_FORMAT_R8G8_UNORM;
- case MESA_FORMAT_GR1616:
+ case MESA_FORMAT_R16G16_UNORM:
return PIPE_FORMAT_R16G16_UNORM;
- case MESA_FORMAT_RGBA_16:
+ case MESA_FORMAT_RGBA_UNORM16:
return PIPE_FORMAT_R16G16B16A16_UNORM;
/* signed int formats */
- case MESA_FORMAT_ALPHA_UINT8:
+ case MESA_FORMAT_A_UINT8:
return PIPE_FORMAT_A8_UINT;
- case MESA_FORMAT_ALPHA_UINT16:
+ case MESA_FORMAT_A_UINT16:
return PIPE_FORMAT_A16_UINT;
- case MESA_FORMAT_ALPHA_UINT32:
+ case MESA_FORMAT_A_UINT32:
return PIPE_FORMAT_A32_UINT;
- case MESA_FORMAT_ALPHA_INT8:
+ case MESA_FORMAT_A_SINT8:
return PIPE_FORMAT_A8_SINT;
- case MESA_FORMAT_ALPHA_INT16:
+ case MESA_FORMAT_A_SINT16:
return PIPE_FORMAT_A16_SINT;
- case MESA_FORMAT_ALPHA_INT32:
+ case MESA_FORMAT_A_SINT32:
return PIPE_FORMAT_A32_SINT;
- case MESA_FORMAT_INTENSITY_UINT8:
+ case MESA_FORMAT_I_UINT8:
return PIPE_FORMAT_I8_UINT;
- case MESA_FORMAT_INTENSITY_UINT16:
+ case MESA_FORMAT_I_UINT16:
return PIPE_FORMAT_I16_UINT;
- case MESA_FORMAT_INTENSITY_UINT32:
+ case MESA_FORMAT_I_UINT32:
return PIPE_FORMAT_I32_UINT;
- case MESA_FORMAT_INTENSITY_INT8:
+ case MESA_FORMAT_I_SINT8:
return PIPE_FORMAT_I8_SINT;
- case MESA_FORMAT_INTENSITY_INT16:
+ case MESA_FORMAT_I_SINT16:
return PIPE_FORMAT_I16_SINT;
- case MESA_FORMAT_INTENSITY_INT32:
+ case MESA_FORMAT_I_SINT32:
return PIPE_FORMAT_I32_SINT;
- case MESA_FORMAT_LUMINANCE_UINT8:
+ case MESA_FORMAT_L_UINT8:
return PIPE_FORMAT_L8_UINT;
- case MESA_FORMAT_LUMINANCE_UINT16:
+ case MESA_FORMAT_L_UINT16:
return PIPE_FORMAT_L16_UINT;
- case MESA_FORMAT_LUMINANCE_UINT32:
+ case MESA_FORMAT_L_UINT32:
return PIPE_FORMAT_L32_UINT;
- case MESA_FORMAT_LUMINANCE_INT8:
+ case MESA_FORMAT_L_SINT8:
return PIPE_FORMAT_L8_SINT;
- case MESA_FORMAT_LUMINANCE_INT16:
+ case MESA_FORMAT_L_SINT16:
return PIPE_FORMAT_L16_SINT;
- case MESA_FORMAT_LUMINANCE_INT32:
+ case MESA_FORMAT_L_SINT32:
return PIPE_FORMAT_L32_SINT;
- case MESA_FORMAT_LUMINANCE_ALPHA_UINT8:
+ case MESA_FORMAT_LA_UINT8:
return PIPE_FORMAT_L8A8_UINT;
- case MESA_FORMAT_LUMINANCE_ALPHA_UINT16:
+ case MESA_FORMAT_LA_UINT16:
return PIPE_FORMAT_L16A16_UINT;
- case MESA_FORMAT_LUMINANCE_ALPHA_UINT32:
+ case MESA_FORMAT_LA_UINT32:
return PIPE_FORMAT_L32A32_UINT;
- case MESA_FORMAT_LUMINANCE_ALPHA_INT8:
+ case MESA_FORMAT_LA_SINT8:
return PIPE_FORMAT_L8A8_SINT;
- case MESA_FORMAT_LUMINANCE_ALPHA_INT16:
+ case MESA_FORMAT_LA_SINT16:
return PIPE_FORMAT_L16A16_SINT;
- case MESA_FORMAT_LUMINANCE_ALPHA_INT32:
+ case MESA_FORMAT_LA_SINT32:
return PIPE_FORMAT_L32A32_SINT;
- case MESA_FORMAT_R_INT8:
+ case MESA_FORMAT_R_SINT8:
return PIPE_FORMAT_R8_SINT;
- case MESA_FORMAT_RG_INT8:
+ case MESA_FORMAT_RG_SINT8:
return PIPE_FORMAT_R8G8_SINT;
- case MESA_FORMAT_RGB_INT8:
+ case MESA_FORMAT_RGB_SINT8:
return PIPE_FORMAT_R8G8B8_SINT;
- case MESA_FORMAT_RGBA_INT8:
+ case MESA_FORMAT_RGBA_SINT8:
return PIPE_FORMAT_R8G8B8A8_SINT;
- case MESA_FORMAT_R_INT16:
+ case MESA_FORMAT_R_SINT16:
return PIPE_FORMAT_R16_SINT;
- case MESA_FORMAT_RG_INT16:
+ case MESA_FORMAT_RG_SINT16:
return PIPE_FORMAT_R16G16_SINT;
- case MESA_FORMAT_RGB_INT16:
+ case MESA_FORMAT_RGB_SINT16:
return PIPE_FORMAT_R16G16B16_SINT;
- case MESA_FORMAT_RGBA_INT16:
+ case MESA_FORMAT_RGBA_SINT16:
return PIPE_FORMAT_R16G16B16A16_SINT;
- case MESA_FORMAT_R_INT32:
+ case MESA_FORMAT_R_SINT32:
return PIPE_FORMAT_R32_SINT;
- case MESA_FORMAT_RG_INT32:
+ case MESA_FORMAT_RG_SINT32:
return PIPE_FORMAT_R32G32_SINT;
- case MESA_FORMAT_RGB_INT32:
+ case MESA_FORMAT_RGB_SINT32:
return PIPE_FORMAT_R32G32B32_SINT;
- case MESA_FORMAT_RGBA_INT32:
+ case MESA_FORMAT_RGBA_SINT32:
return PIPE_FORMAT_R32G32B32A32_SINT;
/* unsigned int formats */
@@ -299,96 +299,98 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
case MESA_FORMAT_RGBA_UINT32:
return PIPE_FORMAT_R32G32B32A32_UINT;
- case MESA_FORMAT_RED_RGTC1:
+ case MESA_FORMAT_R_RGTC1_UNORM:
return PIPE_FORMAT_RGTC1_UNORM;
- case MESA_FORMAT_SIGNED_RED_RGTC1:
+ case MESA_FORMAT_R_RGTC1_SNORM:
return PIPE_FORMAT_RGTC1_SNORM;
- case MESA_FORMAT_RG_RGTC2:
+ case MESA_FORMAT_RG_RGTC2_UNORM:
return PIPE_FORMAT_RGTC2_UNORM;
- case MESA_FORMAT_SIGNED_RG_RGTC2:
+ case MESA_FORMAT_RG_RGTC2_SNORM:
return PIPE_FORMAT_RGTC2_SNORM;
- case MESA_FORMAT_L_LATC1:
+ case MESA_FORMAT_L_LATC1_UNORM:
return PIPE_FORMAT_LATC1_UNORM;
- case MESA_FORMAT_SIGNED_L_LATC1:
+ case MESA_FORMAT_L_LATC1_SNORM:
return PIPE_FORMAT_LATC1_SNORM;
- case MESA_FORMAT_LA_LATC2:
+ case MESA_FORMAT_LA_LATC2_UNORM:
return PIPE_FORMAT_LATC2_UNORM;
- case MESA_FORMAT_SIGNED_LA_LATC2:
+ case MESA_FORMAT_LA_LATC2_SNORM:
return PIPE_FORMAT_LATC2_SNORM;
case MESA_FORMAT_ETC1_RGB8:
return PIPE_FORMAT_ETC1_RGB8;
/* signed normalized formats */
- case MESA_FORMAT_SIGNED_R8:
+ case MESA_FORMAT_R_SNORM8:
return PIPE_FORMAT_R8_SNORM;
- case MESA_FORMAT_SIGNED_RG88_REV:
+ case MESA_FORMAT_R8G8_SNORM:
return PIPE_FORMAT_R8G8_SNORM;
- case MESA_FORMAT_SIGNED_RGBA8888_REV:
+ case MESA_FORMAT_R8G8B8A8_SNORM:
return PIPE_FORMAT_R8G8B8A8_SNORM;
- case MESA_FORMAT_SIGNED_A8:
+ case MESA_FORMAT_A_SNORM8:
return PIPE_FORMAT_A8_SNORM;
- case MESA_FORMAT_SIGNED_L8:
+ case MESA_FORMAT_L_SNORM8:
return PIPE_FORMAT_L8_SNORM;
- case MESA_FORMAT_SIGNED_AL88:
+ case MESA_FORMAT_L8A8_SNORM:
return PIPE_FORMAT_L8A8_SNORM;
- case MESA_FORMAT_SIGNED_I8:
+ case MESA_FORMAT_I_SNORM8:
return PIPE_FORMAT_I8_SNORM;
- case MESA_FORMAT_SIGNED_R16:
+ case MESA_FORMAT_R_SNORM16:
return PIPE_FORMAT_R16_SNORM;
- case MESA_FORMAT_SIGNED_GR1616:
+ case MESA_FORMAT_R16G16_SNORM:
return PIPE_FORMAT_R16G16_SNORM;
- case MESA_FORMAT_SIGNED_RGBA_16:
+ case MESA_FORMAT_RGBA_SNORM16:
return PIPE_FORMAT_R16G16B16A16_SNORM;
- case MESA_FORMAT_SIGNED_A16:
+ case MESA_FORMAT_A_SNORM16:
return PIPE_FORMAT_A16_SNORM;
- case MESA_FORMAT_SIGNED_L16:
+ case MESA_FORMAT_L_SNORM16:
return PIPE_FORMAT_L16_SNORM;
- case MESA_FORMAT_SIGNED_AL1616:
+ case MESA_FORMAT_LA_SNORM16:
return PIPE_FORMAT_L16A16_SNORM;
- case MESA_FORMAT_SIGNED_I16:
+ case MESA_FORMAT_I_SNORM16:
return PIPE_FORMAT_I16_SNORM;
- case MESA_FORMAT_RGB9_E5_FLOAT:
+ case MESA_FORMAT_R9G9B9E5_FLOAT:
return PIPE_FORMAT_R9G9B9E5_FLOAT;
- case MESA_FORMAT_R11_G11_B10_FLOAT:
+ case MESA_FORMAT_R11G11B10_FLOAT:
return PIPE_FORMAT_R11G11B10_FLOAT;
- case MESA_FORMAT_ARGB2101010_UINT:
+ case MESA_FORMAT_B10G10R10A2_UINT:
return PIPE_FORMAT_B10G10R10A2_UINT;
+ case MESA_FORMAT_R10G10B10A2_UINT:
+ return PIPE_FORMAT_R10G10B10A2_UINT;
- case MESA_FORMAT_XRGB4444_UNORM:
+ case MESA_FORMAT_B4G4R4X4_UNORM:
return PIPE_FORMAT_B4G4R4X4_UNORM;
- case MESA_FORMAT_XRGB1555_UNORM:
+ case MESA_FORMAT_B5G5R5X1_UNORM:
return PIPE_FORMAT_B5G5R5X1_UNORM;
- case MESA_FORMAT_XBGR8888_SNORM:
+ case MESA_FORMAT_R8G8B8X8_SNORM:
return PIPE_FORMAT_R8G8B8X8_SNORM;
- case MESA_FORMAT_XBGR8888_SRGB:
+ case MESA_FORMAT_R8G8B8X8_SRGB:
return PIPE_FORMAT_R8G8B8X8_SRGB;
- case MESA_FORMAT_XBGR8888_UINT:
+ case MESA_FORMAT_RGBX_UINT8:
return PIPE_FORMAT_R8G8B8X8_UINT;
- case MESA_FORMAT_XBGR8888_SINT:
+ case MESA_FORMAT_RGBX_SINT8:
return PIPE_FORMAT_R8G8B8X8_SINT;
- case MESA_FORMAT_XRGB2101010_UNORM:
+ case MESA_FORMAT_B10G10R10X2_UNORM:
return PIPE_FORMAT_B10G10R10X2_UNORM;
- case MESA_FORMAT_XBGR16161616_UNORM:
+ case MESA_FORMAT_RGBX_UNORM16:
return PIPE_FORMAT_R16G16B16X16_UNORM;
- case MESA_FORMAT_XBGR16161616_SNORM:
+ case MESA_FORMAT_RGBX_SNORM16:
return PIPE_FORMAT_R16G16B16X16_SNORM;
- case MESA_FORMAT_XBGR16161616_FLOAT:
+ case MESA_FORMAT_RGBX_FLOAT16:
return PIPE_FORMAT_R16G16B16X16_FLOAT;
- case MESA_FORMAT_XBGR16161616_UINT:
+ case MESA_FORMAT_RGBX_UINT16:
return PIPE_FORMAT_R16G16B16X16_UINT;
- case MESA_FORMAT_XBGR16161616_SINT:
+ case MESA_FORMAT_RGBX_SINT16:
return PIPE_FORMAT_R16G16B16X16_SINT;
- case MESA_FORMAT_XBGR32323232_FLOAT:
+ case MESA_FORMAT_RGBX_FLOAT32:
return PIPE_FORMAT_R32G32B32X32_FLOAT;
- case MESA_FORMAT_XBGR32323232_UINT:
+ case MESA_FORMAT_RGBX_UINT32:
return PIPE_FORMAT_R32G32B32X32_UINT;
- case MESA_FORMAT_XBGR32323232_SINT:
+ case MESA_FORMAT_RGBX_SINT32:
return PIPE_FORMAT_R32G32B32X32_SINT;
default:
@@ -400,76 +402,76 @@ st_mesa_format_to_pipe_format(gl_format mesaFormat)
/**
* Translate Gallium format to Mesa format.
*/
-gl_format
+mesa_format
st_pipe_format_to_mesa_format(enum pipe_format format)
{
switch (format) {
case PIPE_FORMAT_ABGR8888_UNORM:
- return MESA_FORMAT_RGBA8888;
+ return MESA_FORMAT_A8B8G8R8_UNORM;
case PIPE_FORMAT_RGBA8888_UNORM:
- return MESA_FORMAT_RGBA8888_REV;
+ return MESA_FORMAT_R8G8B8A8_UNORM;
case PIPE_FORMAT_BGRA8888_UNORM:
- return MESA_FORMAT_ARGB8888;
+ return MESA_FORMAT_B8G8R8A8_UNORM;
case PIPE_FORMAT_ARGB8888_UNORM:
- return MESA_FORMAT_ARGB8888_REV;
+ return MESA_FORMAT_A8R8G8B8_UNORM;
case PIPE_FORMAT_XBGR8888_UNORM:
- return MESA_FORMAT_RGBX8888;
+ return MESA_FORMAT_X8B8G8R8_UNORM;
case PIPE_FORMAT_RGBX8888_UNORM:
- return MESA_FORMAT_RGBX8888_REV;
+ return MESA_FORMAT_R8G8B8X8_UNORM;
case PIPE_FORMAT_BGRX8888_UNORM:
- return MESA_FORMAT_XRGB8888;
+ return MESA_FORMAT_B8G8R8X8_UNORM;
case PIPE_FORMAT_XRGB8888_UNORM:
- return MESA_FORMAT_XRGB8888_REV;
+ return MESA_FORMAT_X8R8G8B8_UNORM;
case PIPE_FORMAT_B5G5R5A1_UNORM:
- return MESA_FORMAT_ARGB1555;
+ return MESA_FORMAT_B5G5R5A1_UNORM;
case PIPE_FORMAT_B4G4R4A4_UNORM:
- return MESA_FORMAT_ARGB4444;
+ return MESA_FORMAT_B4G4R4A4_UNORM;
case PIPE_FORMAT_B5G6R5_UNORM:
- return MESA_FORMAT_RGB565;
+ return MESA_FORMAT_B5G6R5_UNORM;
case PIPE_FORMAT_B2G3R3_UNORM:
- return MESA_FORMAT_RGB332;
+ return MESA_FORMAT_B2G3R3_UNORM;
case PIPE_FORMAT_B10G10R10A2_UNORM:
- return MESA_FORMAT_ARGB2101010;
+ return MESA_FORMAT_B10G10R10A2_UNORM;
case PIPE_FORMAT_L4A4_UNORM:
- return MESA_FORMAT_AL44;
+ return MESA_FORMAT_L4A4_UNORM;
case PIPE_FORMAT_L8A8_UNORM:
- return MESA_FORMAT_AL88;
+ return MESA_FORMAT_L8A8_UNORM;
case PIPE_FORMAT_L16A16_UNORM:
- return MESA_FORMAT_AL1616;
+ return MESA_FORMAT_L16A16_UNORM;
case PIPE_FORMAT_A8_UNORM:
- return MESA_FORMAT_A8;
+ return MESA_FORMAT_A_UNORM8;
case PIPE_FORMAT_A16_UNORM:
- return MESA_FORMAT_A16;
+ return MESA_FORMAT_A_UNORM16;
case PIPE_FORMAT_L8_UNORM:
- return MESA_FORMAT_L8;
+ return MESA_FORMAT_L_UNORM8;
case PIPE_FORMAT_L16_UNORM:
- return MESA_FORMAT_L16;
+ return MESA_FORMAT_L_UNORM16;
case PIPE_FORMAT_I8_UNORM:
- return MESA_FORMAT_I8;
+ return MESA_FORMAT_I_UNORM8;
case PIPE_FORMAT_I16_UNORM:
- return MESA_FORMAT_I16;
+ return MESA_FORMAT_I_UNORM16;
case PIPE_FORMAT_S8_UINT:
- return MESA_FORMAT_S8;
+ return MESA_FORMAT_S_UINT8;
case PIPE_FORMAT_R16G16B16A16_UNORM:
- return MESA_FORMAT_RGBA_16;
+ return MESA_FORMAT_RGBA_UNORM16;
case PIPE_FORMAT_Z16_UNORM:
- return MESA_FORMAT_Z16;
+ return MESA_FORMAT_Z_UNORM16;
case PIPE_FORMAT_Z32_UNORM:
- return MESA_FORMAT_Z32;
+ return MESA_FORMAT_Z_UNORM32;
case PIPE_FORMAT_S8_UINT_Z24_UNORM:
- return MESA_FORMAT_Z24_S8;
+ return MESA_FORMAT_S8_UINT_Z24_UNORM;
case PIPE_FORMAT_X8Z24_UNORM:
- return MESA_FORMAT_Z24_X8;
+ return MESA_FORMAT_X8Z24_UNORM;
case PIPE_FORMAT_Z24X8_UNORM:
- return MESA_FORMAT_X8_Z24;
+ return MESA_FORMAT_Z24_UNORM_S8_UINT;
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
- return MESA_FORMAT_S8_Z24;
+ return MESA_FORMAT_Z24_UNORM_X8_UINT;
case PIPE_FORMAT_Z32_FLOAT:
- return MESA_FORMAT_Z32_FLOAT;
+ return MESA_FORMAT_Z_FLOAT32;
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
- return MESA_FORMAT_Z32_FLOAT_X24S8;
+ return MESA_FORMAT_Z32_FLOAT_S8X24_UINT;
case PIPE_FORMAT_UYVY:
return MESA_FORMAT_YCBCR;
@@ -493,15 +495,15 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_DXT5_SRGBA:
return MESA_FORMAT_SRGBA_DXT5;
case PIPE_FORMAT_L8A8_SRGB:
- return MESA_FORMAT_SLA8;
+ return MESA_FORMAT_L8A8_SRGB;
case PIPE_FORMAT_L8_SRGB:
- return MESA_FORMAT_SL8;
+ return MESA_FORMAT_L_SRGB8;
case PIPE_FORMAT_R8G8B8_SRGB:
- return MESA_FORMAT_SRGB8;
+ return MESA_FORMAT_BGR_SRGB8;
case PIPE_FORMAT_A8B8G8R8_SRGB:
- return MESA_FORMAT_SRGBA8;
+ return MESA_FORMAT_A8B8G8R8_SRGB;
case PIPE_FORMAT_B8G8R8A8_SRGB:
- return MESA_FORMAT_SARGB8;
+ return MESA_FORMAT_B8G8R8A8_SRGB;
case PIPE_FORMAT_R32G32B32A32_FLOAT:
return MESA_FORMAT_RGBA_FLOAT32;
case PIPE_FORMAT_R16G16B16A16_FLOAT:
@@ -511,21 +513,21 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_R16G16B16_FLOAT:
return MESA_FORMAT_RGB_FLOAT16;
case PIPE_FORMAT_L32A32_FLOAT:
- return MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32;
+ return MESA_FORMAT_LA_FLOAT32;
case PIPE_FORMAT_L16A16_FLOAT:
- return MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16;
+ return MESA_FORMAT_LA_FLOAT16;
case PIPE_FORMAT_L32_FLOAT:
- return MESA_FORMAT_LUMINANCE_FLOAT32;
+ return MESA_FORMAT_L_FLOAT32;
case PIPE_FORMAT_L16_FLOAT:
- return MESA_FORMAT_LUMINANCE_FLOAT16;
+ return MESA_FORMAT_L_FLOAT16;
case PIPE_FORMAT_A32_FLOAT:
- return MESA_FORMAT_ALPHA_FLOAT32;
+ return MESA_FORMAT_A_FLOAT32;
case PIPE_FORMAT_A16_FLOAT:
- return MESA_FORMAT_ALPHA_FLOAT16;
+ return MESA_FORMAT_A_FLOAT16;
case PIPE_FORMAT_I32_FLOAT:
- return MESA_FORMAT_INTENSITY_FLOAT32;
+ return MESA_FORMAT_I_FLOAT32;
case PIPE_FORMAT_I16_FLOAT:
- return MESA_FORMAT_INTENSITY_FLOAT16;
+ return MESA_FORMAT_I_FLOAT16;
case PIPE_FORMAT_R32_FLOAT:
return MESA_FORMAT_R_FLOAT32;
case PIPE_FORMAT_R16_FLOAT:
@@ -536,92 +538,92 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_RG_FLOAT16;
case PIPE_FORMAT_R8_UNORM:
- return MESA_FORMAT_R8;
+ return MESA_FORMAT_R_UNORM8;
case PIPE_FORMAT_R16_UNORM:
- return MESA_FORMAT_R16;
+ return MESA_FORMAT_R_UNORM16;
case PIPE_FORMAT_R8G8_UNORM:
- return MESA_FORMAT_GR88;
+ return MESA_FORMAT_R8G8_UNORM;
case PIPE_FORMAT_R16G16_UNORM:
- return MESA_FORMAT_GR1616;
+ return MESA_FORMAT_R16G16_UNORM;
case PIPE_FORMAT_A8_UINT:
- return MESA_FORMAT_ALPHA_UINT8;
+ return MESA_FORMAT_A_UINT8;
case PIPE_FORMAT_A16_UINT:
- return MESA_FORMAT_ALPHA_UINT16;
+ return MESA_FORMAT_A_UINT16;
case PIPE_FORMAT_A32_UINT:
- return MESA_FORMAT_ALPHA_UINT32;
+ return MESA_FORMAT_A_UINT32;
case PIPE_FORMAT_A8_SINT:
- return MESA_FORMAT_ALPHA_INT8;
+ return MESA_FORMAT_A_SINT8;
case PIPE_FORMAT_A16_SINT:
- return MESA_FORMAT_ALPHA_INT16;
+ return MESA_FORMAT_A_SINT16;
case PIPE_FORMAT_A32_SINT:
- return MESA_FORMAT_ALPHA_INT32;
+ return MESA_FORMAT_A_SINT32;
case PIPE_FORMAT_I8_UINT:
- return MESA_FORMAT_INTENSITY_UINT8;
+ return MESA_FORMAT_I_UINT8;
case PIPE_FORMAT_I16_UINT:
- return MESA_FORMAT_INTENSITY_UINT16;
+ return MESA_FORMAT_I_UINT16;
case PIPE_FORMAT_I32_UINT:
- return MESA_FORMAT_INTENSITY_UINT32;
+ return MESA_FORMAT_I_UINT32;
case PIPE_FORMAT_I8_SINT:
- return MESA_FORMAT_INTENSITY_INT8;
+ return MESA_FORMAT_I_SINT8;
case PIPE_FORMAT_I16_SINT:
- return MESA_FORMAT_INTENSITY_INT16;
+ return MESA_FORMAT_I_SINT16;
case PIPE_FORMAT_I32_SINT:
- return MESA_FORMAT_INTENSITY_INT32;
+ return MESA_FORMAT_I_SINT32;
case PIPE_FORMAT_L8_UINT:
- return MESA_FORMAT_LUMINANCE_UINT8;
+ return MESA_FORMAT_L_UINT8;
case PIPE_FORMAT_L16_UINT:
- return MESA_FORMAT_LUMINANCE_UINT16;
+ return MESA_FORMAT_L_UINT16;
case PIPE_FORMAT_L32_UINT:
- return MESA_FORMAT_LUMINANCE_UINT32;
+ return MESA_FORMAT_L_UINT32;
case PIPE_FORMAT_L8_SINT:
- return MESA_FORMAT_LUMINANCE_INT8;
+ return MESA_FORMAT_L_SINT8;
case PIPE_FORMAT_L16_SINT:
- return MESA_FORMAT_LUMINANCE_INT16;
+ return MESA_FORMAT_L_SINT16;
case PIPE_FORMAT_L32_SINT:
- return MESA_FORMAT_LUMINANCE_INT32;
+ return MESA_FORMAT_L_SINT32;
case PIPE_FORMAT_L8A8_UINT:
- return MESA_FORMAT_LUMINANCE_ALPHA_UINT8;
+ return MESA_FORMAT_LA_UINT8;
case PIPE_FORMAT_L16A16_UINT:
- return MESA_FORMAT_LUMINANCE_ALPHA_UINT16;
+ return MESA_FORMAT_LA_UINT16;
case PIPE_FORMAT_L32A32_UINT:
- return MESA_FORMAT_LUMINANCE_ALPHA_UINT32;
+ return MESA_FORMAT_LA_UINT32;
case PIPE_FORMAT_L8A8_SINT:
- return MESA_FORMAT_LUMINANCE_ALPHA_INT8;
+ return MESA_FORMAT_LA_SINT8;
case PIPE_FORMAT_L16A16_SINT:
- return MESA_FORMAT_LUMINANCE_ALPHA_INT16;
+ return MESA_FORMAT_LA_SINT16;
case PIPE_FORMAT_L32A32_SINT:
- return MESA_FORMAT_LUMINANCE_ALPHA_INT32;
+ return MESA_FORMAT_LA_SINT32;
case PIPE_FORMAT_R8_SINT:
- return MESA_FORMAT_R_INT8;
+ return MESA_FORMAT_R_SINT8;
case PIPE_FORMAT_R8G8_SINT:
- return MESA_FORMAT_RG_INT8;
+ return MESA_FORMAT_RG_SINT8;
case PIPE_FORMAT_R8G8B8_SINT:
- return MESA_FORMAT_RGB_INT8;
+ return MESA_FORMAT_RGB_SINT8;
case PIPE_FORMAT_R8G8B8A8_SINT:
- return MESA_FORMAT_RGBA_INT8;
+ return MESA_FORMAT_RGBA_SINT8;
case PIPE_FORMAT_R16_SINT:
- return MESA_FORMAT_R_INT16;
+ return MESA_FORMAT_R_SINT16;
case PIPE_FORMAT_R16G16_SINT:
- return MESA_FORMAT_RG_INT16;
+ return MESA_FORMAT_RG_SINT16;
case PIPE_FORMAT_R16G16B16_SINT:
- return MESA_FORMAT_RGB_INT16;
+ return MESA_FORMAT_RGB_SINT16;
case PIPE_FORMAT_R16G16B16A16_SINT:
- return MESA_FORMAT_RGBA_INT16;
+ return MESA_FORMAT_RGBA_SINT16;
case PIPE_FORMAT_R32_SINT:
- return MESA_FORMAT_R_INT32;
+ return MESA_FORMAT_R_SINT32;
case PIPE_FORMAT_R32G32_SINT:
- return MESA_FORMAT_RG_INT32;
+ return MESA_FORMAT_RG_SINT32;
case PIPE_FORMAT_R32G32B32_SINT:
- return MESA_FORMAT_RGB_INT32;
+ return MESA_FORMAT_RGB_SINT32;
case PIPE_FORMAT_R32G32B32A32_SINT:
- return MESA_FORMAT_RGBA_INT32;
+ return MESA_FORMAT_RGBA_SINT32;
/* unsigned int formats */
case PIPE_FORMAT_R8_UINT:
@@ -652,97 +654,99 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_RGBA_UINT32;
case PIPE_FORMAT_RGTC1_UNORM:
- return MESA_FORMAT_RED_RGTC1;
+ return MESA_FORMAT_R_RGTC1_UNORM;
case PIPE_FORMAT_RGTC1_SNORM:
- return MESA_FORMAT_SIGNED_RED_RGTC1;
+ return MESA_FORMAT_R_RGTC1_SNORM;
case PIPE_FORMAT_RGTC2_UNORM:
- return MESA_FORMAT_RG_RGTC2;
+ return MESA_FORMAT_RG_RGTC2_UNORM;
case PIPE_FORMAT_RGTC2_SNORM:
- return MESA_FORMAT_SIGNED_RG_RGTC2;
+ return MESA_FORMAT_RG_RGTC2_SNORM;
case PIPE_FORMAT_LATC1_UNORM:
- return MESA_FORMAT_L_LATC1;
+ return MESA_FORMAT_L_LATC1_UNORM;
case PIPE_FORMAT_LATC1_SNORM:
- return MESA_FORMAT_SIGNED_L_LATC1;
+ return MESA_FORMAT_L_LATC1_SNORM;
case PIPE_FORMAT_LATC2_UNORM:
- return MESA_FORMAT_LA_LATC2;
+ return MESA_FORMAT_LA_LATC2_UNORM;
case PIPE_FORMAT_LATC2_SNORM:
- return MESA_FORMAT_SIGNED_LA_LATC2;
+ return MESA_FORMAT_LA_LATC2_SNORM;
case PIPE_FORMAT_ETC1_RGB8:
return MESA_FORMAT_ETC1_RGB8;
/* signed normalized formats */
case PIPE_FORMAT_R8_SNORM:
- return MESA_FORMAT_SIGNED_R8;
+ return MESA_FORMAT_R_SNORM8;
case PIPE_FORMAT_R8G8_SNORM:
- return MESA_FORMAT_SIGNED_RG88_REV;
+ return MESA_FORMAT_R8G8_SNORM;
case PIPE_FORMAT_R8G8B8A8_SNORM:
- return MESA_FORMAT_SIGNED_RGBA8888_REV;
+ return MESA_FORMAT_R8G8B8A8_SNORM;
case PIPE_FORMAT_A8_SNORM:
- return MESA_FORMAT_SIGNED_A8;
+ return MESA_FORMAT_A_SNORM8;
case PIPE_FORMAT_L8_SNORM:
- return MESA_FORMAT_SIGNED_L8;
+ return MESA_FORMAT_L_SNORM8;
case PIPE_FORMAT_L8A8_SNORM:
- return MESA_FORMAT_SIGNED_AL88;
+ return MESA_FORMAT_L8A8_SNORM;
case PIPE_FORMAT_I8_SNORM:
- return MESA_FORMAT_SIGNED_I8;
+ return MESA_FORMAT_I_SNORM8;
case PIPE_FORMAT_R16_SNORM:
- return MESA_FORMAT_SIGNED_R16;
+ return MESA_FORMAT_R_SNORM16;
case PIPE_FORMAT_R16G16_SNORM:
- return MESA_FORMAT_SIGNED_GR1616;
+ return MESA_FORMAT_R16G16_SNORM;
case PIPE_FORMAT_R16G16B16A16_SNORM:
- return MESA_FORMAT_SIGNED_RGBA_16;
+ return MESA_FORMAT_RGBA_SNORM16;
case PIPE_FORMAT_A16_SNORM:
- return MESA_FORMAT_SIGNED_A16;
+ return MESA_FORMAT_A_SNORM16;
case PIPE_FORMAT_L16_SNORM:
- return MESA_FORMAT_SIGNED_L16;
+ return MESA_FORMAT_L_SNORM16;
case PIPE_FORMAT_L16A16_SNORM:
- return MESA_FORMAT_SIGNED_AL1616;
+ return MESA_FORMAT_LA_SNORM16;
case PIPE_FORMAT_I16_SNORM:
- return MESA_FORMAT_SIGNED_I16;
+ return MESA_FORMAT_I_SNORM16;
case PIPE_FORMAT_R9G9B9E5_FLOAT:
- return MESA_FORMAT_RGB9_E5_FLOAT;
+ return MESA_FORMAT_R9G9B9E5_FLOAT;
case PIPE_FORMAT_R11G11B10_FLOAT:
- return MESA_FORMAT_R11_G11_B10_FLOAT;
+ return MESA_FORMAT_R11G11B10_FLOAT;
case PIPE_FORMAT_B10G10R10A2_UINT:
- return MESA_FORMAT_ARGB2101010_UINT;
+ return MESA_FORMAT_B10G10R10A2_UINT;
+ case PIPE_FORMAT_R10G10B10A2_UINT:
+ return MESA_FORMAT_R10G10B10A2_UINT;
case PIPE_FORMAT_B4G4R4X4_UNORM:
- return MESA_FORMAT_XRGB4444_UNORM;
+ return MESA_FORMAT_B4G4R4X4_UNORM;
case PIPE_FORMAT_B5G5R5X1_UNORM:
- return MESA_FORMAT_XRGB1555_UNORM;
+ return MESA_FORMAT_B5G5R5X1_UNORM;
case PIPE_FORMAT_R8G8B8X8_SNORM:
- return MESA_FORMAT_XBGR8888_SNORM;
+ return MESA_FORMAT_R8G8B8X8_SNORM;
case PIPE_FORMAT_R8G8B8X8_SRGB:
- return MESA_FORMAT_XBGR8888_SRGB;
+ return MESA_FORMAT_R8G8B8X8_SRGB;
case PIPE_FORMAT_R8G8B8X8_UINT:
- return MESA_FORMAT_XBGR8888_UINT;
+ return MESA_FORMAT_RGBX_UINT8;
case PIPE_FORMAT_R8G8B8X8_SINT:
- return MESA_FORMAT_XBGR8888_SINT;
+ return MESA_FORMAT_RGBX_SINT8;
case PIPE_FORMAT_B10G10R10X2_UNORM:
- return MESA_FORMAT_XRGB2101010_UNORM;
+ return MESA_FORMAT_B10G10R10X2_UNORM;
case PIPE_FORMAT_R16G16B16X16_UNORM:
- return MESA_FORMAT_XBGR16161616_UNORM;
+ return MESA_FORMAT_RGBX_UNORM16;
case PIPE_FORMAT_R16G16B16X16_SNORM:
- return MESA_FORMAT_XBGR16161616_SNORM;
+ return MESA_FORMAT_RGBX_SNORM16;
case PIPE_FORMAT_R16G16B16X16_FLOAT:
- return MESA_FORMAT_XBGR16161616_FLOAT;
+ return MESA_FORMAT_RGBX_FLOAT16;
case PIPE_FORMAT_R16G16B16X16_UINT:
- return MESA_FORMAT_XBGR16161616_UINT;
+ return MESA_FORMAT_RGBX_UINT16;
case PIPE_FORMAT_R16G16B16X16_SINT:
- return MESA_FORMAT_XBGR16161616_SINT;
+ return MESA_FORMAT_RGBX_SINT16;
case PIPE_FORMAT_R32G32B32X32_FLOAT:
- return MESA_FORMAT_XBGR32323232_FLOAT;
+ return MESA_FORMAT_RGBX_FLOAT32;
case PIPE_FORMAT_R32G32B32X32_UINT:
- return MESA_FORMAT_XBGR32323232_UINT;
+ return MESA_FORMAT_RGBX_UINT32;
case PIPE_FORMAT_R32G32B32X32_SINT:
- return MESA_FORMAT_XBGR32323232_SINT;
+ return MESA_FORMAT_RGBX_SINT32;
default:
assert(0);
@@ -1483,7 +1487,7 @@ static const struct format_mapping format_map[] = {
},
{
{ GL_RGB10_A2UI, 0 },
- { PIPE_FORMAT_B10G10R10A2_UINT, 0 }
+ { PIPE_FORMAT_R10G10B10A2_UINT, PIPE_FORMAT_B10G10R10A2_UINT, 0 }
},
};
@@ -1687,7 +1691,7 @@ enum pipe_format
st_choose_matching_format(struct pipe_screen *screen, unsigned bind,
GLenum format, GLenum type, GLboolean swapBytes)
{
- gl_format mesa_format;
+ mesa_format mesa_format;
for (mesa_format = 1; mesa_format < MESA_FORMAT_COUNT; mesa_format++) {
if (_mesa_get_format_color_encoding(mesa_format) == GL_SRGB) {
@@ -1714,7 +1718,7 @@ st_choose_matching_format(struct pipe_screen *screen, unsigned bind,
/**
* Called via ctx->Driver.ChooseTextureFormat().
*/
-gl_format
+mesa_format
st_ChooseTextureFormat(struct gl_context *ctx, GLenum target,
GLint internalFormat,
GLenum format, GLenum type)