diff options
author | Marek Olšák <[email protected]> | 2011-04-26 02:18:24 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-04-29 11:31:55 +0200 |
commit | 9d7698c468f4ea7da8bb4ec00520c98f11cca0fa (patch) | |
tree | da4a82690218f5a3c78f0961e4ca105ff3bc20ed /src/mesa/main/image.c | |
parent | 1d5f16ff8fae936f2e920800b169cf7736a8052a (diff) |
mesa: implement EXT_texture_shared_exponent
swrast support done.
There is no renderbuffer support in swrast, because it's not required
by the extension.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/image.c')
-rw-r--r-- | src/mesa/main/image.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 28841c25102..3e9f99698da 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -82,6 +82,7 @@ _mesa_type_is_packed(GLenum type) case GL_UNSIGNED_SHORT_8_8_MESA: case GL_UNSIGNED_SHORT_8_8_REV_MESA: case GL_UNSIGNED_INT_24_8_EXT: + case GL_UNSIGNED_INT_5_9_9_9_REV: return GL_TRUE; } @@ -222,6 +223,8 @@ _mesa_sizeof_packed_type( GLenum type ) return sizeof(GLushort); case GL_UNSIGNED_INT_24_8_EXT: return sizeof(GLuint); + case GL_UNSIGNED_INT_5_9_9_9_REV: + return sizeof(GLuint); default: return -1; } @@ -363,6 +366,11 @@ _mesa_bytes_per_pixel( GLenum format, GLenum type ) return sizeof(GLuint); else return -1; + case GL_UNSIGNED_INT_5_9_9_9_REV: + if (format == GL_RGB) + return sizeof(GLuint); + else + return -1; default: return -1; } @@ -458,6 +466,8 @@ _mesa_is_legal_format_and_type(const struct gl_context *ctx, return GL_TRUE; case GL_HALF_FLOAT_ARB: return ctx->Extensions.ARB_half_float_pixel; + case GL_UNSIGNED_INT_5_9_9_9_REV: + return ctx->Extensions.EXT_texture_shared_exponent; default: return GL_FALSE; } @@ -821,6 +831,7 @@ _mesa_is_color_format(GLenum format) case GL_INTENSITY_SNORM: case GL_INTENSITY8_SNORM: case GL_INTENSITY16_SNORM: + case GL_RGB9_E5: return GL_TRUE; case GL_YCBCR_MESA: /* not considered to be RGB */ /* fall-through */ |