From 7a50d38a2bcbecc70e0dd3b49ca717e56c438f21 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Tue, 10 Dec 2013 00:10:28 -0500 Subject: [PATCH] llvmpipe: add a very useful (disabled) debugging output MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Disabled by default, but it's very useful when needed. Signed-off-by: Zack Rusin Reviewed-by: José Fonseca Reviewed-by: Roland Scheidegger --- src/gallium/drivers/llvmpipe/lp_setup_point.c | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c index 4b31495a5c8..c42646ef45b 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_point.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c @@ -302,6 +302,23 @@ subpixel_snap(float a) return util_iround(FIXED_ONE * a); } +/** + * Print point vertex attribs (for debug). + */ +static void +print_point(struct lp_setup_context *setup, + const float (*v0)[4]) +{ + const struct lp_setup_variant_key *key = &setup->setup.variant->key; + uint i; + + debug_printf("llvmpipe point\n"); + for (i = 0; i < 1 + key->num_inputs; i++) { + debug_printf(" v0[%d]: %f %f %f %f\n", i, + v0[i][0], v0[i][1], v0[i][2], v0[i][3]); + } +} + static boolean try_setup_point( struct lp_setup_context *setup, @@ -342,6 +359,9 @@ try_setup_point( struct lp_setup_context *setup, layer = MIN2(layer, scene->fb_max_layer); } + if (0) + print_point(setup, v0); + /* Bounding rectangle (in pixels) */ { /* Yes this is necessary to accurately calculate bounding boxes -- 2.30.2