summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe
diff options
context:
space:
mode:
authorJosé Fonseca <jrfonseca@tungstengraphics.com>2008-02-06 14:37:49 +0900
committerJosé Fonseca <jrfonseca@tungstengraphics.com>2008-02-06 14:37:49 +0900
commit9791d7f64c5a58b9c1bf32d00c71e0e031f54f70 (patch)
tree8b942442af70cfe2a786aee35f250b46b9bb13f9 /src/mesa/pipe/softpipe
parent78bce9c2dcd45d1d8706bb9bab3b3a73943de990 (diff)
gallium: Use p_debug.h instead of non-portable stdio.h/assert.h functions.
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r--src/mesa/pipe/softpipe/sp_prim_setup.c24
-rw-r--r--src/mesa/pipe/softpipe/sp_quad_fs.c10
-rw-r--r--src/mesa/pipe/softpipe/sp_tile_cache.c4
3 files changed, 19 insertions, 19 deletions
diff --git a/src/mesa/pipe/softpipe/sp_prim_setup.c b/src/mesa/pipe/softpipe/sp_prim_setup.c
index b17801d13d..7478b2336b 100644
--- a/src/mesa/pipe/softpipe/sp_prim_setup.c
+++ b/src/mesa/pipe/softpipe/sp_prim_setup.c
@@ -251,9 +251,9 @@ static void print_vertex(const struct setup_stage *setup,
const struct vertex_header *v)
{
int i;
- fprintf(stderr, "Vertex: (%p)\n", v);
+ debug_printf("Vertex: (%p)\n", v);
for (i = 0; i < setup->quad.nr_attrs; i++) {
- fprintf(stderr, " %d: %f %f %f %f\n", i,
+ debug_printf(" %d: %f %f %f %f\n", i,
v->data[i][0], v->data[i][1], v->data[i][2], v->data[i][3]);
}
}
@@ -267,7 +267,7 @@ static boolean setup_sort_vertices( struct setup_stage *setup,
const struct vertex_header *v2 = prim->v[2];
#if DEBUG_VERTS
- fprintf(stderr, "Triangle:\n");
+ debug_printf("Triangle:\n");
print_vertex(setup, v0);
print_vertex(setup, v1);
print_vertex(setup, v2);
@@ -345,7 +345,7 @@ static boolean setup_sort_vertices( struct setup_stage *setup,
setup->oneoverarea = 1.0f / area;
/*
- _mesa_printf("%s one-over-area %f area %f det %f\n",
+ debug_printf("%s one-over-area %f area %f det %f\n",
__FUNCTION__, setup->oneoverarea, area, prim->det );
*/
}
@@ -419,7 +419,7 @@ static void tri_linear_coeff( struct setup_stage *setup,
dady * (setup->vmin->data[0][1] - 0.5f)));
/*
- _mesa_printf("attr[%d].%c: %f dx:%f dy:%f\n",
+ debug_printf("attr[%d].%c: %f dx:%f dy:%f\n",
slot, "xyzw"[i],
setup->coef[slot].a0[i],
setup->coef[slot].dadx[i],
@@ -453,10 +453,10 @@ static void tri_persp_coeff( struct setup_stage *setup,
float dady = b * setup->oneoverarea;
/*
- printf("tri persp %d,%d: %f %f %f\n", vertSlot, i,
- setup->vmin->data[vertSlot][i],
- setup->vmid->data[vertSlot][i],
- setup->vmax->data[vertSlot][i]
+ debug_printf("tri persp %d,%d: %f %f %f\n", vertSlot, i,
+ setup->vmin->data[vertSlot][i],
+ setup->vmid->data[vertSlot][i],
+ setup->vmax->data[vertSlot][i]
);
*/
assert(i <= 3);
@@ -619,7 +619,7 @@ static void subtriangle( struct setup_stage *setup,
finish_y -= sy;
/*
- _mesa_printf("%s %d %d\n", __FUNCTION__, start_y, finish_y);
+ debug_printf("%s %d %d\n", __FUNCTION__, start_y, finish_y);
*/
for (y = start_y; y < finish_y; y++) {
@@ -671,7 +671,7 @@ static void setup_tri( struct draw_stage *stage,
struct setup_stage *setup = setup_stage( stage );
/*
- _mesa_printf("%s\n", __FUNCTION__ );
+ debug_printf("%s\n", __FUNCTION__ );
*/
setup_sort_vertices( setup, prim );
@@ -1124,7 +1124,7 @@ setup_point(struct draw_stage *stage, struct prim_header *prim)
int ix, iy;
/*
- printf("(%f, %f) -> X:%d..%d Y:%d..%d\n", x, y, xmin, xmax,ymin,ymax);
+ debug_printf("(%f, %f) -> X:%d..%d Y:%d..%d\n", x, y, xmin, xmax,ymin,ymax);
*/
for (iy = iymin; iy <= iymax; iy += 2) {
uint rowMask = 0xf;
diff --git a/src/mesa/pipe/softpipe/sp_quad_fs.c b/src/mesa/pipe/softpipe/sp_quad_fs.c
index 90691c6065..b5d7dfca1c 100644
--- a/src/mesa/pipe/softpipe/sp_quad_fs.c
+++ b/src/mesa/pipe/softpipe/sp_quad_fs.c
@@ -223,13 +223,13 @@ shade_quad_llvm(struct quad_stage *qs,
inputs[2][0][1] = fy + 1.0f;
inputs[3][0][1] = fy + 1.0f;
#if DLLVM
- printf("MASK = %d\n", quad->mask);
+ debug_printf("MASK = %d\n", quad->mask);
#endif
gallivm_prog_inputs_interpolate(llvm, inputs, quad->coef);
#if DLLVM
for (int i = 0; i < 4; ++i) {
for (int j = 0; j < 2; ++j) {
- printf("IN(%d,%d) [%f %f %f %f]\n", i, j,
+ debug_printf("IN(%d,%d) [%f %f %f %f]\n", i, j,
inputs[i][j][0], inputs[i][j][1], inputs[i][j][2], inputs[i][j][3]);
}
}
@@ -240,7 +240,7 @@ shade_quad_llvm(struct quad_stage *qs,
softpipe->mapped_constants[PIPE_SHADER_FRAGMENT],
qss->samplers);
#if DLLVM
- printf("OUT LLVM = 1[%f %f %f %f], 2[%f %f %f %f]\n",
+ debug_printf("OUT LLVM = 1[%f %f %f %f], 2[%f %f %f %f]\n",
dests[0][0][0], dests[0][0][1], dests[0][0][2], dests[0][0][3],
dests[0][1][0], dests[0][1][1], dests[0][1][2], dests[0][1][3]);
#endif
@@ -260,7 +260,7 @@ shade_quad_llvm(struct quad_stage *qs,
}
#if DLLVM
for (int i = 0; i < QUAD_SIZE; ++i) {
- printf("QLLVM%d(%d) [%f, %f, %f, %f]\n", i, qss->colorOutSlot,
+ debug_printf("QLLVM%d(%d) [%f, %f, %f, %f]\n", i, qss->colorOutSlot,
quad->outputs.color[0][i],
quad->outputs.color[1][i],
quad->outputs.color[2][i],
@@ -284,7 +284,7 @@ shade_quad_llvm(struct quad_stage *qs,
}
}
#if DLLVM
- printf("D [%f, %f, %f, %f] mask = %d\n",
+ debug_printf("D [%f, %f, %f, %f] mask = %d\n",
quad->outputs.depth[0],
quad->outputs.depth[1],
quad->outputs.depth[2],
diff --git a/src/mesa/pipe/softpipe/sp_tile_cache.c b/src/mesa/pipe/softpipe/sp_tile_cache.c
index ccf367a5e4..1597361b82 100644
--- a/src/mesa/pipe/softpipe/sp_tile_cache.c
+++ b/src/mesa/pipe/softpipe/sp_tile_cache.c
@@ -341,7 +341,7 @@ sp_tile_cache_flush_clear(struct pipe_context *pipe,
}
}
#if 0
- printf("num cleared: %u\n", numCleared);
+ debug_printf("num cleared: %u\n", numCleared);
#endif
}
@@ -384,7 +384,7 @@ sp_flush_tile_cache(struct softpipe_context *softpipe,
#endif
#if 0
- printf("flushed tiles in use: %d\n", inuse);
+ debug_printf("flushed tiles in use: %d\n", inuse);
#endif
}