diff options
author | José Fonseca <[email protected]> | 2013-11-27 11:43:54 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2013-11-28 12:19:42 +0000 |
commit | fb5f5b81883f360dcbbf407a0f6f5606bc0c0495 (patch) | |
tree | 2029e9403af000749e6bee4056e791361319b3d0 /src/gallium/drivers | |
parent | eb040bd54a22e831367939d0acbacdd256ab9d5b (diff) |
trace: Dump PIPE_QUERY_* enums.
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/trace/tr_context.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_dump_defines.h | 58 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_dump_state.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_dump_state.h | 3 | ||||
-rw-r--r-- | src/gallium/drivers/trace/tr_screen.c | 3 |
5 files changed, 62 insertions, 15 deletions
diff --git a/src/gallium/drivers/trace/tr_context.c b/src/gallium/drivers/trace/tr_context.c index d9afb0aba7c..4ac7d9b50b2 100644 --- a/src/gallium/drivers/trace/tr_context.c +++ b/src/gallium/drivers/trace/tr_context.c @@ -33,6 +33,7 @@ #include "pipe/p_screen.h" #include "tr_dump.h" +#include "tr_dump_defines.h" #include "tr_dump_state.h" #include "tr_public.h" #include "tr_screen.h" @@ -135,7 +136,7 @@ trace_context_create_query(struct pipe_context *_pipe, trace_dump_call_begin("pipe_context", "create_query"); trace_dump_arg(ptr, pipe); - trace_dump_arg(uint, query_type); + trace_dump_arg(query_type, query_type); query = pipe->create_query(pipe, query_type); diff --git a/src/gallium/drivers/trace/tr_dump_defines.h b/src/gallium/drivers/trace/tr_dump_defines.h new file mode 100644 index 00000000000..0c83c2b68f1 --- /dev/null +++ b/src/gallium/drivers/trace/tr_dump_defines.h @@ -0,0 +1,58 @@ +/************************************************************************** + * + * Copyright 2013 VMware, Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + +#ifndef TR_DUMP_DEFINES_H_ +#define TR_DUMP_DEFINES_H_ + +#include "pipe/p_compiler.h" +#include "util/u_format.h" +#include "util/u_dump.h" +#include "tr_dump.h" + + +static INLINE void +trace_dump_format(enum pipe_format format) +{ + if (!trace_dumping_enabled_locked()) + return; + + trace_dump_enum(util_format_name(format)); +} + + +static INLINE void +trace_dump_query_type(unsigned value) +{ + if (!trace_dumping_enabled_locked()) + return; + + trace_dump_enum(util_dump_query_type(value, FALSE)); +} + + + +#endif /* TR_DUMP_DEFINES_H_ */ diff --git a/src/gallium/drivers/trace/tr_dump_state.c b/src/gallium/drivers/trace/tr_dump_state.c index c1e5361254d..8f32e9e2779 100644 --- a/src/gallium/drivers/trace/tr_dump_state.c +++ b/src/gallium/drivers/trace/tr_dump_state.c @@ -32,18 +32,10 @@ #include "tgsi/tgsi_dump.h" #include "tr_dump.h" +#include "tr_dump_defines.h" #include "tr_dump_state.h" -void trace_dump_format(enum pipe_format format) -{ - if (!trace_dumping_enabled_locked()) - return; - - trace_dump_enum(util_format_name(format) ); -} - - void trace_dump_resource_template(const struct pipe_resource *templat) { if (!trace_dumping_enabled_locked()) diff --git a/src/gallium/drivers/trace/tr_dump_state.h b/src/gallium/drivers/trace/tr_dump_state.h index 6151a0a0214..be87f480fe2 100644 --- a/src/gallium/drivers/trace/tr_dump_state.h +++ b/src/gallium/drivers/trace/tr_dump_state.h @@ -28,13 +28,10 @@ #ifndef TR_DUMP_STATE_H_ #define TR_DUMP_STATE_H_ -#include "pipe/p_format.h" #include "pipe/p_state.h" #include "pipe/p_shader_tokens.h" -void trace_dump_format(enum pipe_format format); - void trace_dump_resource_template(const struct pipe_resource *templat); void trace_dump_box(const struct pipe_box *box); diff --git a/src/gallium/drivers/trace/tr_screen.c b/src/gallium/drivers/trace/tr_screen.c index 5281ba8b47b..c6745af09f2 100644 --- a/src/gallium/drivers/trace/tr_screen.c +++ b/src/gallium/drivers/trace/tr_screen.c @@ -30,14 +30,13 @@ #include "util/u_simple_list.h" #include "tr_dump.h" +#include "tr_dump_defines.h" #include "tr_dump_state.h" #include "tr_texture.h" #include "tr_context.h" #include "tr_screen.h" #include "tr_public.h" -#include "pipe/p_format.h" - static boolean trace = FALSE; |