From 216a576e111b85662eabd8d4c398149818adbf39 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Mon, 29 Jul 2013 13:51:56 +0800 Subject: ilo: add ILO_DEBUG=draw It can print out pipe_draw_info and the dirty bits set, useful for debugging. --- src/gallium/drivers/ilo/ilo_3d.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/gallium/drivers/ilo/ilo_3d.c') 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 */ +#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; -- cgit v1.2.3