summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/ilo/ilo_3d.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2013-07-29 13:51:56 +0800
committerChia-I Wu <[email protected]>2013-08-20 13:54:38 +0800
commit216a576e111b85662eabd8d4c398149818adbf39 (patch)
tree0796c6c485f1d5c4a8ef1770e1131072a906f7a4 /src/gallium/drivers/ilo/ilo_3d.c
parentff3cb378ad8674ee10aab5052181d2f87969161f (diff)
ilo: add ILO_DEBUG=draw
It can print out pipe_draw_info and the dirty bits set, useful for debugging.
Diffstat (limited to 'src/gallium/drivers/ilo/ilo_3d.c')
-rw-r--r--src/gallium/drivers/ilo/ilo_3d.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/ilo/ilo_3d.c b/src/gallium/drivers/ilo/ilo_3d.c
index 5b120e77d09..3a810adf6f6 100644
--- a/src/gallium/drivers/ilo/ilo_3d.c
+++ b/src/gallium/drivers/ilo/ilo_3d.c
@@ -25,6 +25,7 @@
* Chia-I Wu <[email protected]>
*/
+#include "util/u_prim.h"
#include "intel_winsys.h"
#include "ilo_3d_pipeline.h"
@@ -701,6 +702,21 @@ ilo_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
struct ilo_3d *hw3d = ilo->hw3d;
int prim_generated, prim_emitted;
+ if (ilo_debug & ILO_DEBUG_DRAW) {
+ if (info->indexed) {
+ ilo_printf("indexed draw %s: "
+ "index start %d, count %d, vertex range [%d, %d]\n",
+ u_prim_name(info->mode), info->start, info->count,
+ info->min_index, info->max_index);
+ }
+ else {
+ ilo_printf("draw %s: vertex start %d, count %d\n",
+ u_prim_name(info->mode), info->start, info->count);
+ }
+
+ ilo_dump_dirty_flags(ilo->dirty);
+ }
+
if (!ilo_3d_pass_render_condition(ilo))
return;