summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/i915simple
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-12-07 16:46:30 -0700
committerBrian <[email protected]>2007-12-07 16:46:30 -0700
commit54fc80ab31f89520d3119196bfa9c6332b35fe2f (patch)
tree5ee522b13e1819884e214b12a555a8ed2ad1727d /src/mesa/pipe/i915simple
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/i915simple')
-rw-r--r--src/mesa/pipe/i915simple/i915_context.c5
-rw-r--r--src/mesa/pipe/i915simple/i915_state_emit.c4
-rw-r--r--src/mesa/pipe/i915simple/i915_state_sampler.c2
3 files changed, 6 insertions, 5 deletions
diff --git a/src/mesa/pipe/i915simple/i915_context.c b/src/mesa/pipe/i915simple/i915_context.c
index cfce116920d..b915a677908 100644
--- a/src/mesa/pipe/i915simple/i915_context.c
+++ b/src/mesa/pipe/i915simple/i915_context.c
@@ -45,7 +45,7 @@
*/
static boolean
i915_is_format_supported( struct pipe_context *pipe,
- uint format )
+ enum pipe_format format )
{
#if 0
/* XXX: This is broken -- rewrite if still needed. */
@@ -101,8 +101,9 @@ i915_is_format_supported( struct pipe_context *pipe,
case PIPE_FORMAT_R5G6B5_UNORM:
case PIPE_FORMAT_S8Z24_UNORM:
return TRUE;
+ default:
+ return FALSE;
};
- return FALSE;
#endif
}
diff --git a/src/mesa/pipe/i915simple/i915_state_emit.c b/src/mesa/pipe/i915simple/i915_state_emit.c
index 1e0db91024d..09bf1fa2d68 100644
--- a/src/mesa/pipe/i915simple/i915_state_emit.c
+++ b/src/mesa/pipe/i915simple/i915_state_emit.c
@@ -35,7 +35,7 @@
#include "pipe/p_context.h"
#include "pipe/p_defines.h"
-static unsigned translate_format( unsigned format )
+static unsigned translate_format( enum pipe_format format )
{
switch (format) {
case PIPE_FORMAT_A8R8G8B8_UNORM:
@@ -48,7 +48,7 @@ static unsigned translate_format( unsigned format )
}
}
-static unsigned translate_depth_format( unsigned zformat )
+static unsigned translate_depth_format( enum pipe_format zformat )
{
switch (zformat) {
case PIPE_FORMAT_S8Z24_UNORM:
diff --git a/src/mesa/pipe/i915simple/i915_state_sampler.c b/src/mesa/pipe/i915simple/i915_state_sampler.c
index dd2d51d9f60..59408b6ba06 100644
--- a/src/mesa/pipe/i915simple/i915_state_sampler.c
+++ b/src/mesa/pipe/i915simple/i915_state_sampler.c
@@ -127,7 +127,7 @@ void i915_update_samplers( struct i915_context *i915 )
static uint
-translate_texture_format(uint pipeFormat)
+translate_texture_format(enum pipe_format pipeFormat)
{
switch (pipeFormat) {
case PIPE_FORMAT_U_L8: