diff options
author | Marek Olšák <[email protected]> | 2011-04-26 02:27:25 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-04-29 11:31:55 +0200 |
commit | 631d23daa91c569bf268a2191bd466df73a64263 (patch) | |
tree | 84bffa5944f0c6b745cc31942dfb75a4f9db128b /src/mesa/main/texfetch_tmp.h | |
parent | b48359184e36ecd11510e9c87e3db535935c99e2 (diff) |
mesa: implement EXT_packed_float
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/texfetch_tmp.h')
-rw-r--r-- | src/mesa/main/texfetch_tmp.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/main/texfetch_tmp.h b/src/mesa/main/texfetch_tmp.h index 106b812130b..e6fd81d4d57 100644 --- a/src/mesa/main/texfetch_tmp.h +++ b/src/mesa/main/texfetch_tmp.h @@ -2353,6 +2353,27 @@ static void store_texel_rgb9_e5(struct gl_texture_image *texImage, #endif +/* MESA_FORMAT_R11_G11_B10_FLOAT *********************************************/ + +static void FETCH(r11_g11_b10f)( const struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, GLfloat *texel ) +{ + const GLuint *src = TEXEL_ADDR(GLuint, texImage, i, j, k, 1); + r11g11b10f_to_float3(*src, texel); + texel[ACOMP] = 1.0F; +} + +#if DIM == 3 +static void store_texel_r11_g11_b10f(struct gl_texture_image *texImage, + GLint i, GLint j, GLint k, const void *texel) +{ + const GLfloat *src = (const GLfloat *) texel; + GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1); + *dst = float3_to_r11g11b10f(src); +} +#endif + + #undef TEXEL_ADDR #undef DIM #undef FETCH |