Mesa (master): llvmpipe: print_triangle() func (disabled)

Brian Paul brianp at kemper.freedesktop.org
Fri Apr 16 08:28:25 PDT 2010


Module: Mesa
Branch: master
Commit: 8ba14fab9a8fb4b7e7224062693ab4d487a138b8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8ba14fab9a8fb4b7e7224062693ab4d487a138b8

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Apr 15 16:24:31 2010 -0600

llvmpipe: print_triangle() func (disabled)

---

 src/gallium/drivers/llvmpipe/lp_setup_tri.c |   29 +++++++++++++++++++++++++++
 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 ce689d3..25e6b3e 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



More information about the mesa-commit mailing list