PIPE_FORMAT_S8_UINT_Z24_UNORM, \
0
+#define DEFAULT_SNORM8_RGBA_FORMATS \
+ PIPE_FORMAT_R8G8B8A8_SNORM, \
+ 0
+
+#define DEFAULT_UNORM16_RGBA_FORMATS \
+ PIPE_FORMAT_R16G16B16A16_UNORM, \
+ DEFAULT_RGBA_FORMATS
+
+
/**
* This table maps OpenGL texture format enums to Gallium pipe_format enums.
* Multiple GL enums might map to multiple pipe_formats.
/* R, RG formats */
{
{ GL_RED, GL_R8, 0 },
- { PIPE_FORMAT_R8_UNORM, 0 }
+ { PIPE_FORMAT_R8_UNORM, PIPE_FORMAT_R8G8_UNORM, DEFAULT_RGBA_FORMATS }
},
{
{ GL_RG, GL_RG8, 0 },
- { PIPE_FORMAT_R8G8_UNORM, 0 }
+ { PIPE_FORMAT_R8G8_UNORM, DEFAULT_RGBA_FORMATS }
},
{
{ GL_R16, 0 },
- { PIPE_FORMAT_R16_UNORM, 0 }
+ { PIPE_FORMAT_R16_UNORM, PIPE_FORMAT_R16G16_UNORM,
+ DEFAULT_UNORM16_RGBA_FORMATS }
},
{
{ GL_RG16, 0 },
- { PIPE_FORMAT_R16G16_UNORM, 0 }
+ { PIPE_FORMAT_R16G16_UNORM, DEFAULT_UNORM16_RGBA_FORMATS }
},
/* compressed R, RG formats */
{
{ GL_COMPRESSED_RED, GL_COMPRESSED_RED_RGTC1, 0 },
- { PIPE_FORMAT_RGTC1_UNORM, PIPE_FORMAT_R8_UNORM, 0 }
+ { PIPE_FORMAT_RGTC1_UNORM, PIPE_FORMAT_R8_UNORM, DEFAULT_RGBA_FORMATS }
},
{
{ GL_COMPRESSED_SIGNED_RED_RGTC1, 0 },
- { PIPE_FORMAT_RGTC1_SNORM, 0 }
+ { PIPE_FORMAT_RGTC1_SNORM, DEFAULT_SNORM8_RGBA_FORMATS }
},
{
{ GL_COMPRESSED_RG, GL_COMPRESSED_RG_RGTC2, 0 },
- { PIPE_FORMAT_RGTC2_UNORM, PIPE_FORMAT_R8G8_UNORM, 0 }
+ { PIPE_FORMAT_RGTC2_UNORM, PIPE_FORMAT_R8G8_UNORM, DEFAULT_RGBA_FORMATS }
},
{
{ GL_COMPRESSED_SIGNED_RG_RGTC2, 0 },
- { PIPE_FORMAT_RGTC2_SNORM, 0 }
+ { PIPE_FORMAT_RGTC2_SNORM, DEFAULT_SNORM8_RGBA_FORMATS }
},
{
{ GL_COMPRESSED_LUMINANCE, GL_COMPRESSED_LUMINANCE_LATC1_EXT, 0 },
- { PIPE_FORMAT_LATC1_UNORM, PIPE_FORMAT_L8_UNORM, 0 }
+ { PIPE_FORMAT_LATC1_UNORM, PIPE_FORMAT_L8_UNORM, DEFAULT_RGBA_FORMATS }
},
{
{ GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT, 0 },
- { PIPE_FORMAT_LATC1_SNORM, 0 }
+ { PIPE_FORMAT_LATC1_SNORM, DEFAULT_SNORM8_RGBA_FORMATS }
},
{
{ GL_COMPRESSED_LUMINANCE_ALPHA, GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT,
GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI, 0 },
- { PIPE_FORMAT_LATC2_UNORM, PIPE_FORMAT_L8A8_UNORM, 0 }
+ { PIPE_FORMAT_LATC2_UNORM, PIPE_FORMAT_L8A8_UNORM, DEFAULT_RGBA_FORMATS }
},
{
{ GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT, 0 },
- { PIPE_FORMAT_LATC2_SNORM, 0 }
+ { PIPE_FORMAT_LATC2_SNORM, DEFAULT_SNORM8_RGBA_FORMATS }
},
/* ETC1 */