summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texfetch_tmp.h
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-04-26 02:18:24 +0200
committerMarek Olšák <[email protected]>2011-04-29 11:31:55 +0200
commit9d7698c468f4ea7da8bb4ec00520c98f11cca0fa (patch)
treeda4a82690218f5a3c78f0961e4ca105ff3bc20ed /src/mesa/main/texfetch_tmp.h
parent1d5f16ff8fae936f2e920800b169cf7736a8052a (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/texfetch_tmp.h')
-rw-r--r--src/mesa/main/texfetch_tmp.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/main/texfetch_tmp.h b/src/mesa/main/texfetch_tmp.h
index 0b9d5da07e8..106b812130b 100644
--- a/src/mesa/main/texfetch_tmp.h
+++ b/src/mesa/main/texfetch_tmp.h
@@ -2332,6 +2332,27 @@ static void store_texel_s8_z24(struct gl_texture_image *texImage,
#endif
+/* MESA_FORMAT_RGB9_E5 ******************************************************/
+
+static void FETCH(rgb9_e5)( 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);
+ rgb9e5_to_float3(*src, texel);
+ texel[ACOMP] = 1.0F;
+}
+
+#if DIM == 3
+static void store_texel_rgb9_e5(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_rgb9e5(src);
+}
+#endif
+
+
#undef TEXEL_ADDR
#undef DIM
#undef FETCH