From 8ba14fab9a8fb4b7e7224062693ab4d487a138b8 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 15 Apr 2010 16:24:31 -0600 Subject: [PATCH] llvmpipe: print_triangle() func (disabled) --- src/gallium/drivers/llvmpipe/lp_setup_tri.c | 29 +++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index ce689d3d568..25e6b3edfb3 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -272,6 +272,32 @@ alloc_triangle(struct lp_scene *scene, unsigned nr_inputs, unsigned *tri_size) } +/** + * Print triangle vertex attribs (for debug). + */ +static void +print_triangle(struct lp_setup_context *setup, + const float (*v1)[4], + const float (*v2)[4], + const float (*v3)[4]) +{ + uint i; + + debug_printf("llvmpipe triangle\n"); + for (i = 0; i < setup->fs.nr_inputs; i++) { + debug_printf(" v1[%d]: %f %f %f %f\n", i, + v1[i][0], v1[i][1], v1[i][2], v1[i][3]); + } + for (i = 0; i < setup->fs.nr_inputs; i++) { + debug_printf(" v2[%d]: %f %f %f %f\n", i, + v2[i][0], v2[i][1], v2[i][2], v2[i][3]); + } + for (i = 0; i < setup->fs.nr_inputs; i++) { + debug_printf(" v3[%d]: %f %f %f %f\n", i, + v3[i][0], v3[i][1], v3[i][2], v3[i][3]); + } +} + /** * Do basic setup for triangle rasterization and determine which @@ -300,6 +326,9 @@ do_triangle_ccw(struct lp_setup_context *setup, int minx, maxx, miny, maxy; unsigned tri_bytes; + if (0) + print_triangle(setup, v1, v2, v3); + tri = alloc_triangle(scene, setup->fs.nr_inputs, &tri_bytes); #ifdef DEBUG -- 2.30.2