aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/formats.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-30 06:43:04 +0000
committermarha <marha@users.sourceforge.net>2011-03-30 06:43:04 +0000
commit2039567395da75a3ae318fb82738cdcf2caa05a1 (patch)
tree23caaf9e0f6867d85f5cffc284d008c591ae99cb /mesalib/src/mesa/main/formats.c
parent24abc56b37a3ec32a03b7eafccd96607ae13ea89 (diff)
downloadvcxsrv-2039567395da75a3ae318fb82738cdcf2caa05a1.tar.gz
vcxsrv-2039567395da75a3ae318fb82738cdcf2caa05a1.tar.bz2
vcxsrv-2039567395da75a3ae318fb82738cdcf2caa05a1.zip
mesa git update 30 Mar 2011
Diffstat (limited to 'mesalib/src/mesa/main/formats.c')
-rw-r--r--mesalib/src/mesa/main/formats.c100
1 files changed, 91 insertions, 9 deletions
diff --git a/mesalib/src/mesa/main/formats.c b/mesalib/src/mesa/main/formats.c
index db10c9b4c..e62170b71 100644
--- a/mesalib/src/mesa/main/formats.c
+++ b/mesalib/src/mesa/main/formats.c
@@ -809,8 +809,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 1 /* BlockWidth/Height,Bytes */
},
{
- MESA_FORMAT_SIGNED_RG88,
- "MESA_FORMAT_SIGNED_RG88",
+ MESA_FORMAT_SIGNED_RG88_REV,
+ "MESA_FORMAT_SIGNED_RG88_REV",
GL_RG,
GL_SIGNED_NORMALIZED,
8, 8, 0, 0,
@@ -847,8 +847,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
/* Signed 16 bits / channel */
{
- MESA_FORMAT_SIGNED_R_16,
- "MESA_FORMAT_SIGNED_R_16",
+ MESA_FORMAT_SIGNED_R16,
+ "MESA_FORMAT_SIGNED_R16",
GL_RED,
GL_SIGNED_NORMALIZED,
16, 0, 0, 0,
@@ -856,8 +856,8 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
1, 1, 2
},
{
- MESA_FORMAT_SIGNED_RG_16,
- "MESA_FORMAT_SIGNED_RG_16",
+ MESA_FORMAT_SIGNED_GR1616,
+ "MESA_FORMAT_SIGNED_GR1616",
GL_RG,
GL_SIGNED_NORMALIZED,
16, 16, 0, 0,
@@ -963,6 +963,80 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
4, 0, 0, 0, 0,
4, 4, 16 /* 16 bytes per 4x4 block */
},
+
+ /* Signed formats from EXT_texture_snorm that are not in GL3.1 */
+ {
+ MESA_FORMAT_SIGNED_A8,
+ "MESA_FORMAT_SIGNED_A8",
+ GL_ALPHA,
+ GL_SIGNED_NORMALIZED,
+ 0, 0, 0, 8,
+ 0, 0, 0, 0, 0,
+ 1, 1, 1
+ },
+ {
+ MESA_FORMAT_SIGNED_L8,
+ "MESA_FORMAT_SIGNED_L8",
+ GL_LUMINANCE,
+ GL_SIGNED_NORMALIZED,
+ 0, 0, 0, 0,
+ 8, 0, 0, 0, 0,
+ 1, 1, 1
+ },
+ {
+ MESA_FORMAT_SIGNED_AL88,
+ "MESA_FORMAT_SIGNED_AL88",
+ GL_LUMINANCE_ALPHA,
+ GL_SIGNED_NORMALIZED,
+ 0, 0, 0, 8,
+ 8, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_SIGNED_I8,
+ "MESA_FORMAT_SIGNED_I8",
+ GL_INTENSITY,
+ GL_SIGNED_NORMALIZED,
+ 0, 0, 0, 0,
+ 0, 8, 0, 0, 0,
+ 1, 1, 1
+ },
+ {
+ MESA_FORMAT_SIGNED_A16,
+ "MESA_FORMAT_SIGNED_A16",
+ GL_ALPHA,
+ GL_SIGNED_NORMALIZED,
+ 0, 0, 0, 16,
+ 0, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_SIGNED_L16,
+ "MESA_FORMAT_SIGNED_L16",
+ GL_LUMINANCE,
+ GL_SIGNED_NORMALIZED,
+ 0, 0, 0, 0,
+ 16, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_SIGNED_AL1616,
+ "MESA_FORMAT_SIGNED_AL1616",
+ GL_LUMINANCE_ALPHA,
+ GL_SIGNED_NORMALIZED,
+ 0, 0, 0, 16,
+ 16, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_SIGNED_I16,
+ "MESA_FORMAT_SIGNED_I16",
+ GL_INTENSITY,
+ GL_SIGNED_NORMALIZED,
+ 0, 0, 0, 0,
+ 0, 16, 0, 0, 0,
+ 1, 1, 2
+ }
};
@@ -1530,10 +1604,14 @@ _mesa_format_to_type_and_comps(gl_format format,
return;
case MESA_FORMAT_SIGNED_R8:
+ case MESA_FORMAT_SIGNED_A8:
+ case MESA_FORMAT_SIGNED_L8:
+ case MESA_FORMAT_SIGNED_I8:
*datatype = GL_BYTE;
*comps = 1;
return;
- case MESA_FORMAT_SIGNED_RG88:
+ case MESA_FORMAT_SIGNED_RG88_REV:
+ case MESA_FORMAT_SIGNED_AL88:
*datatype = GL_BYTE;
*comps = 2;
return;
@@ -1549,11 +1627,15 @@ _mesa_format_to_type_and_comps(gl_format format,
*comps = 4;
return;
- case MESA_FORMAT_SIGNED_R_16:
+ case MESA_FORMAT_SIGNED_R16:
+ case MESA_FORMAT_SIGNED_A16:
+ case MESA_FORMAT_SIGNED_L16:
+ case MESA_FORMAT_SIGNED_I16:
*datatype = GL_SHORT;
*comps = 1;
return;
- case MESA_FORMAT_SIGNED_RG_16:
+ case MESA_FORMAT_SIGNED_GR1616:
+ case MESA_FORMAT_SIGNED_AL1616:
*datatype = GL_SHORT;
*comps = 2;
return;