summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texformat_tmp.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/texformat_tmp.h')
-rw-r--r--src/mesa/main/texformat_tmp.h23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/mesa/main/texformat_tmp.h b/src/mesa/main/texformat_tmp.h
index 604b1a744cb..ae57baf9222 100644
--- a/src/mesa/main/texformat_tmp.h
+++ b/src/mesa/main/texformat_tmp.h
@@ -1321,7 +1321,7 @@ static void FETCH(dudv8)(const struct gl_texture_image *texImage,
texel[ACOMP] = 0;
}
-/* MESA_FORMAT_SIGNED_ARGB8888 ***********************************************/
+/* MESA_FORMAT_SIGNED_RGBA8888 ***********************************************/
static void FETCH(signed_rgba8888)( const struct gl_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel )
@@ -1343,6 +1343,27 @@ static void store_texel_signed_rgba8888(struct gl_texture_image *texImage,
}
#endif
+static void FETCH(signed_rgba8888_rev)( const struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, GLfloat *texel )
+{
+ const GLuint s = *TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ texel[RCOMP] = BYTE_TO_FLOAT_TEX( (s ) & 0xff );
+ texel[GCOMP] = BYTE_TO_FLOAT_TEX( (s >> 8) & 0xff );
+ texel[BCOMP] = BYTE_TO_FLOAT_TEX( (s >> 16) & 0xff );
+ texel[ACOMP] = BYTE_TO_FLOAT_TEX( (s >> 24) );
+}
+
+#if DIM == 3
+static void store_texel_signed_rgba8888_rev(struct gl_texture_image *texImage,
+ GLint i, GLint j, GLint k, const void *texel)
+{
+ const GLubyte *rgba = (const GLubyte *) texel;
+ GLuint *dst = TEXEL_ADDR(GLuint, texImage, i, j, k, 1);
+ *dst = PACK_COLOR_8888_REV(rgba[RCOMP], rgba[GCOMP], rgba[BCOMP], rgba[ACOMP]);
+}
+#endif
+
+
/* MESA_FORMAT_YCBCR *********************************************************/