aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/formats.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-03-30 07:22:44 +0000
committermarha <marha@users.sourceforge.net>2011-03-30 07:22:44 +0000
commit4e1588b6805ee5c7cd34e733cd1eff098d063b95 (patch)
tree763d6761b0131ecd36be7b0d48d2e644b8a25c95 /mesalib/src/mesa/main/formats.c
parenta69f20daead874a20fad57a4fadd99df393f28d6 (diff)
parentaee5cfef9a419ee2845d66b0c31e476880bea663 (diff)
downloadvcxsrv-4e1588b6805ee5c7cd34e733cd1eff098d063b95.tar.gz
vcxsrv-4e1588b6805ee5c7cd34e733cd1eff098d063b95.tar.bz2
vcxsrv-4e1588b6805ee5c7cd34e733cd1eff098d063b95.zip
svn merge ^/branches/released .
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 e2541bdf6..8d2d4bfc1 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;