gallium: new/better debug code (disabled)
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 7 Aug 2008 19:30:49 +0000 (13:30 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 7 Aug 2008 19:32:43 +0000 (13:32 -0600)
src/gallium/drivers/softpipe/sp_setup.c
src/gallium/drivers/softpipe/sp_tex_sample.c

index 4321ca46f42471098d81e6901300bb2ac7bd6e01..b48eec730b268a3fdf8114a5b9f3c8f655626c3c 100644 (file)
@@ -284,9 +284,9 @@ static void print_vertex(const struct setup_context *setup,
                          const float (*v)[4])
 {
    int i;
-   debug_printf("Vertex: (%p)\n", v);
+   debug_printf("   Vertex: (%p)\n", v);
    for (i = 0; i < setup->quad.nr_attrs; i++) {
-      debug_printf("  %d: %f %f %f %f\n",  i,
+      debug_printf("     %d: %f %f %f %f\n",  i,
               v[i][0], v[i][1], v[i][2], v[i][3]);
    }
 }
index 8e3926953369cde360f0a10cb529ca1fc28cd091..5d7a8cc61a452a6f50cb2ece9e386bcb92e8b7b9 100644 (file)
@@ -619,6 +619,13 @@ get_texel(struct tgsi_sampler *sampler,
       rgba[1][j] = tile->data.color[ty][tx][1];
       rgba[2][j] = tile->data.color[ty][tx][2];
       rgba[3][j] = tile->data.color[ty][tx][3];
+      if (0)
+      {
+         char fmt[100];
+         pf_sprint_name( fmt, sampler->texture->format);
+         printf("Get texel %f %f %f %f from %s\n",
+                rgba[0][j], rgba[1][j], rgba[2][j], rgba[3][j], fmt);
+      }
    }
 }