summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/image.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-04-26 02:27:25 +0200
committerMarek Olšák <[email protected]>2011-04-29 11:31:55 +0200
commit631d23daa91c569bf268a2191bd466df73a64263 (patch)
tree84bffa5944f0c6b745cc31942dfb75a4f9db128b /src/mesa/main/image.c
parentb48359184e36ecd11510e9c87e3db535935c99e2 (diff)
mesa: implement EXT_packed_float
Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/image.c')
-rw-r--r--src/mesa/main/image.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index 3e9f99698da..6d7bc735887 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -83,6 +83,7 @@ _mesa_type_is_packed(GLenum type)
case GL_UNSIGNED_SHORT_8_8_REV_MESA:
case GL_UNSIGNED_INT_24_8_EXT:
case GL_UNSIGNED_INT_5_9_9_9_REV:
+ case GL_UNSIGNED_INT_10F_11F_11F_REV:
return GL_TRUE;
}
@@ -225,6 +226,8 @@ _mesa_sizeof_packed_type( GLenum type )
return sizeof(GLuint);
case GL_UNSIGNED_INT_5_9_9_9_REV:
return sizeof(GLuint);
+ case GL_UNSIGNED_INT_10F_11F_11F_REV:
+ return sizeof(GLuint);
default:
return -1;
}
@@ -371,6 +374,11 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type )
return sizeof(GLuint);
else
return -1;
+ case GL_UNSIGNED_INT_10F_11F_11F_REV:
+ if (format == GL_RGB)
+ return sizeof(GLuint);
+ else
+ return -1;
default:
return -1;
}
@@ -468,6 +476,8 @@ _mesa_is_legal_format_and_type(const struct gl_context *ctx,
return ctx->Extensions.ARB_half_float_pixel;
case GL_UNSIGNED_INT_5_9_9_9_REV:
return ctx->Extensions.EXT_texture_shared_exponent;
+ case GL_UNSIGNED_INT_10F_11F_11F_REV:
+ return ctx->Extensions.EXT_packed_float;
default:
return GL_FALSE;
}
@@ -832,6 +842,7 @@ _mesa_is_color_format(GLenum format)
case GL_INTENSITY8_SNORM:
case GL_INTENSITY16_SNORM:
case GL_RGB9_E5:
+ case GL_R11F_G11F_B10F:
return GL_TRUE;
case GL_YCBCR_MESA: /* not considered to be RGB */
/* fall-through */