summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-10 13:11:31 -0600
committerBrian <[email protected]>2007-08-10 13:11:31 -0600
commitce02b16dac0891a570a3a42f26463ea5c68f1618 (patch)
tree5152721802ad1ec24d530a7a2932092a411acdf5 /src
parent34d535ad2c9ea06c61c6c0e3755ad8177aa30147 (diff)
added st_sizeof_format()
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_format.c9
-rw-r--r--src/mesa/state_tracker/st_format.h4
2 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 4aa5066b8cb..a89dfb10fb4 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -99,6 +99,15 @@ st_get_format_info(GLuint format)
GLuint
+st_sizeof_format(GLuint pipeFormat)
+{
+ const struct pipe_format_info *info = st_get_format_info(pipeFormat);
+ assert(info);
+ return info->size;
+}
+
+
+GLuint
st_mesa_format_to_pipe_format(GLuint mesaFormat)
{
switch (mesaFormat) {
diff --git a/src/mesa/state_tracker/st_format.h b/src/mesa/state_tracker/st_format.h
index dde4731e94d..6b3cba0f631 100644
--- a/src/mesa/state_tracker/st_format.h
+++ b/src/mesa/state_tracker/st_format.h
@@ -51,6 +51,10 @@ st_get_format_info(GLuint format);
extern GLuint
+st_sizeof_format(GLuint pipeFormat);
+
+
+extern GLuint
st_mesa_format_to_pipe_format(GLuint mesaFormat);