aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texformat.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/texformat.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/texformat.c')
-rw-r--r--mesalib/src/mesa/main/texformat.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/mesalib/src/mesa/main/texformat.c b/mesalib/src/mesa/main/texformat.c
index e22e90693..99513a222 100644
--- a/mesalib/src/mesa/main/texformat.c
+++ b/mesalib/src/mesa/main/texformat.c
@@ -628,6 +628,22 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
}
}
+ if (ctx->Extensions.ARB_texture_rg && ctx->Extensions.ARB_texture_float) {
+ switch (internalFormat) {
+ case GL_R16F:
+ return MESA_FORMAT_R_FLOAT16;
+ case GL_R32F:
+ return MESA_FORMAT_R_FLOAT32;
+ case GL_RG16F:
+ return MESA_FORMAT_RG_FLOAT16;
+ case GL_RG32F:
+ return MESA_FORMAT_RG_FLOAT32;
+
+ default:
+ ; /* fallthrough */
+ }
+ }
+
if (ctx->Extensions.EXT_texture_format_BGRA8888) {
switch (internalFormat) {
case GL_BGRA: