summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/p_state.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/pipe/p_state.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/pipe/p_state.h')
-rw-r--r--src/mesa/pipe/p_state.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/pipe/p_state.h b/src/mesa/pipe/p_state.h
index 44dec9b773..6db9bbc953 100644
--- a/src/mesa/pipe/p_state.h
+++ b/src/mesa/pipe/p_state.h
@@ -39,6 +39,7 @@
#define PIPE_STATE_H
#include "p_compiler.h"
+#include "p_format.h"
/**
* Implementation limits
@@ -265,7 +266,7 @@ struct pipe_surface
struct pipe_buffer_handle *buffer; /**< driver private buffer handle */
ubyte *map; /**< only non-NULL when surface is actually mapped */
unsigned map_refcount; /**< Reference count for mapping */
- unsigned format; /**< PIPE_FORMAT_x */
+ enum pipe_format format; /**< PIPE_FORMAT_x */
unsigned cpp; /**< bytes per pixel */
unsigned width, height;
unsigned pitch; /**< in pixels */
@@ -286,7 +287,7 @@ struct pipe_texture
unsigned target; /* XXX convert to PIPE_TEXTURE_x */
unsigned internal_format; /* XXX convert to PIPE_FORMAT_x */
- unsigned format; /**< PIPE_FORMAT_x */
+ enum pipe_format format; /**< PIPE_FORMAT_x */
unsigned first_level;
unsigned last_level;
@@ -331,7 +332,7 @@ struct pipe_vertex_element
unsigned vertex_buffer_index:5;
unsigned dst_offset:8;
- unsigned src_format; /**< PIPE_FORMAT_* */
+ enum pipe_format src_format; /**< PIPE_FORMAT_* */
};