aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/formats.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-04-15 15:08:38 +0000
committermarha <marha@users.sourceforge.net>2011-04-15 15:08:38 +0000
commit205a4bdae76f287126db9f45a4f0ba631e3efca1 (patch)
tree6327d3e449dfe53ad6ee6125290581aae6f5ed35 /mesalib/src/mesa/main/formats.c
parent898081f31f99dc35a1602a607a07d1aaff49ac40 (diff)
parent71372d36e1a3f0230b88808f70d35446fda12260 (diff)
downloadvcxsrv-205a4bdae76f287126db9f45a4f0ba631e3efca1.tar.gz
vcxsrv-205a4bdae76f287126db9f45a4f0ba631e3efca1.tar.bz2
vcxsrv-205a4bdae76f287126db9f45a4f0ba631e3efca1.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/formats.c')
-rw-r--r--mesalib/src/mesa/main/formats.c44
1 files changed, 42 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/formats.c b/mesalib/src/mesa/main/formats.c
index 8d2d4bfc1..5ae8e2e29 100644
--- a/mesalib/src/mesa/main/formats.c
+++ b/mesalib/src/mesa/main/formats.c
@@ -677,7 +677,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
{
MESA_FORMAT_LUMINANCE_FLOAT32,
"MESA_FORMAT_LUMINANCE_FLOAT32",
- GL_ALPHA,
+ GL_LUMINANCE,
GL_FLOAT,
0, 0, 0, 0,
32, 0, 0, 0, 0,
@@ -686,7 +686,7 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
{
MESA_FORMAT_LUMINANCE_FLOAT16,
"MESA_FORMAT_LUMINANCE_FLOAT16",
- GL_ALPHA,
+ GL_LUMINANCE,
GL_FLOAT,
0, 0, 0, 0,
16, 0, 0, 0, 0,
@@ -728,6 +728,42 @@ static struct gl_format_info format_info[MESA_FORMAT_COUNT] =
0, 16, 0, 0, 0,
1, 1, 2
},
+ {
+ MESA_FORMAT_R_FLOAT32,
+ "MESA_FORMAT_R_FLOAT32",
+ GL_RED,
+ GL_FLOAT,
+ 32, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
+ {
+ MESA_FORMAT_R_FLOAT16,
+ "MESA_FORMAT_R_FLOAT16",
+ GL_RED,
+ GL_FLOAT,
+ 16, 0, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 2
+ },
+ {
+ MESA_FORMAT_RG_FLOAT32,
+ "MESA_FORMAT_RG_FLOAT32",
+ GL_RG,
+ GL_FLOAT,
+ 32, 32, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 8
+ },
+ {
+ MESA_FORMAT_RG_FLOAT16,
+ "MESA_FORMAT_RG_FLOAT16",
+ GL_RG,
+ GL_FLOAT,
+ 16, 16, 0, 0,
+ 0, 0, 0, 0, 0,
+ 1, 1, 4
+ },
/* unnormalized signed int formats */
{
@@ -1714,22 +1750,26 @@ _mesa_format_to_type_and_comps(gl_format format,
*comps = 3;
return;
case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT32:
+ case MESA_FORMAT_RG_FLOAT32:
*datatype = GL_FLOAT;
*comps = 2;
return;
case MESA_FORMAT_LUMINANCE_ALPHA_FLOAT16:
+ case MESA_FORMAT_RG_FLOAT16:
*datatype = GL_HALF_FLOAT_ARB;
*comps = 2;
return;
case MESA_FORMAT_ALPHA_FLOAT32:
case MESA_FORMAT_LUMINANCE_FLOAT32:
case MESA_FORMAT_INTENSITY_FLOAT32:
+ case MESA_FORMAT_R_FLOAT32:
*datatype = GL_FLOAT;
*comps = 1;
return;
case MESA_FORMAT_ALPHA_FLOAT16:
case MESA_FORMAT_LUMINANCE_FLOAT16:
case MESA_FORMAT_INTENSITY_FLOAT16:
+ case MESA_FORMAT_R_FLOAT16:
*datatype = GL_HALF_FLOAT_ARB;
*comps = 1;
return;