summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-08-07 13:30:49 -0600
committerBrian Paul <[email protected]>2008-08-07 13:32:43 -0600
commitb1ff7dac537947d412bf423a73e7eacd76f90d84 (patch)
tree253b8b5abfdf2cbcbeeede746e6dd89937466e3f
parent600aa7501f95c520ad97ac894cfd1a639562f94c (diff)
gallium: new/better debug code (disabled)
-rw-r--r--src/gallium/drivers/softpipe/sp_setup.c4
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_sample.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/drivers/softpipe/sp_setup.c b/src/gallium/drivers/softpipe/sp_setup.c
index 4321ca46f42..b48eec730b2 100644
--- a/src/gallium/drivers/softpipe/sp_setup.c
+++ b/src/gallium/drivers/softpipe/sp_setup.c
@@ -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]);
}
}
diff --git a/src/gallium/drivers/softpipe/sp_tex_sample.c b/src/gallium/drivers/softpipe/sp_tex_sample.c
index 8e392695336..5d7a8cc61a4 100644
--- a/src/gallium/drivers/softpipe/sp_tex_sample.c
+++ b/src/gallium/drivers/softpipe/sp_tex_sample.c
@@ -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);
+ }
}
}