summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2010-04-15 16:24:31 -0600
committerBrian Paul <[email protected]>2010-04-16 09:27:58 -0600
commit8ba14fab9a8fb4b7e7224062693ab4d487a138b8 (patch)
treeb25cfdcd276d2f0458a60bcf5d470d056d1341f4 /src/gallium/drivers/llvmpipe
parente960dd7b30ea30dc1eeecb45fb87c6964c79abfc (diff)
llvmpipe: print_triangle() func (disabled)
Diffstat (limited to 'src/gallium/drivers/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_tri.c29
1 files changed, 29 insertions, 0 deletions
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