diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-12-07 16:46:30 -0700 |
---|---|---|
committer | Ben Skeggs <skeggsb@gmail.com> | 2007-12-09 12:05:27 +1100 |
commit | 61d1972dd038ba94924a57891408e19d9e5da205 (patch) | |
tree | 6aea1528a8f8e7f348e50395a8b1a7aba7bb2d11 /src/mesa/state_tracker/st_format.h | |
parent | 144b70b0b583892ffa5c96b009ee91b3ccb202a6 (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.h | 18 |
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); |