summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_format.h
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2007-12-07 16:46:30 -0700
committerBrian <brian.paul@tungstengraphics.com>2007-12-07 16:46:30 -0700
commit54fc80ab31f89520d3119196bfa9c6332b35fe2f (patch)
tree5ee522b13e1819884e214b12a555a8ed2ad1727d /src/mesa/state_tracker/st_format.h
parent6070a0eb2ba9ba29b861153a10e91c5b463a2ffc (diff)
Define PIPE_FORMAT_ tokens as an enum set, rather than #defines.
This makes debugging a _lot_ easier. In gdb, "print format" used to display 613570600, now you see PIPE_FORMAT_A8R8G8B8_UNORM.
Diffstat (limited to 'src/mesa/state_tracker/st_format.h')
-rw-r--r--src/mesa/state_tracker/st_format.h18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_format.h b/src/mesa/state_tracker/st_format.h
index 23abc36edf..6ccf5536f9 100644
--- a/src/mesa/state_tracker/st_format.h
+++ b/src/mesa/state_tracker/st_format.h
@@ -26,13 +26,13 @@
**************************************************************************/
-#ifndef ST_CB_TEXIMAGE_H
-#define ST_CB_TEXIMAGE_H
+#ifndef ST_FORMAT_H
+#define ST_FORMAT_H
struct pipe_format_info
{
- GLuint format;
+ enum pipe_format format;
GLenum base_format;
GLenum datatype;
GLubyte red_bits;
@@ -47,21 +47,19 @@ struct pipe_format_info
};
-extern GLboolean
-st_get_format_info(
- GLuint format,
- struct pipe_format_info *pinfo );
+GLboolean
+st_get_format_info(enum pipe_format format, struct pipe_format_info *pinfo);
extern GLuint
-st_sizeof_format(GLuint pipeFormat);
+st_sizeof_format(enum pipe_format format);
extern GLenum
-st_format_datatype(GLuint pipeFormat);
+st_format_datatype(enum pipe_format format);
-extern GLuint
+extern enum pipe_format
st_mesa_format_to_pipe_format(GLuint mesaFormat);