summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_format.h
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-02-21 16:54:23 -0700
committerBrian Paul <brianp@vmware.com>2011-02-21 16:58:42 -0700
commite2d108ec828bdbebdc7e8f9df30c86f0b521aa8d (patch)
tree4fb4356845c47e48a681ecbfaab58a412ccfd683 /src/mesa/state_tracker/st_format.h
parentc966c6980c2a4a1e50b238f7607a9ce111f6c0b4 (diff)
st/mesa: need to translate clear color according to surface's base format
When clearing a GL_LUMINANCE_ALPHA buffer, for example, we need to convert the clear color (R,G,B,A) to (R,R,R,A). We were doing this for texture border colors but not renderbuffers. Move the translation function to st_format.c and share it. This fixes the piglit fbo-clear-formats test. NOTE: This is a candidate for the 7.9 and 7.10 branches.
Diffstat (limited to 'src/mesa/state_tracker/st_format.h')
-rw-r--r--src/mesa/state_tracker/st_format.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_format.h b/src/mesa/state_tracker/st_format.h
index fe195c1069..0fb570f6ee 100644
--- a/src/mesa/state_tracker/st_format.h
+++ b/src/mesa/state_tracker/st_format.h
@@ -77,4 +77,10 @@ st_equal_formats(enum pipe_format pFormat, GLenum format, GLenum type);
extern GLboolean
st_sampler_compat_formats(enum pipe_format format1, enum pipe_format format2);
+
+extern void
+st_translate_color(const GLfloat colorIn[4], GLenum baseFormat,
+ GLfloat colorOut[4]);
+
+
#endif /* ST_FORMAT_H */