diff options
Diffstat (limited to 'src/mesa/pipe/draw')
-rw-r--r-- | src/mesa/pipe/draw/draw_prim.c | 18 | ||||
-rw-r--r-- | src/mesa/pipe/draw/draw_vbuf.c | 63 | ||||
-rw-r--r-- | src/mesa/pipe/draw/draw_vertex_fetch.c | 8 | ||||
-rw-r--r-- | src/mesa/pipe/draw/draw_vertex_shader.c | 6 | ||||
-rw-r--r-- | src/mesa/pipe/draw/draw_vertex_shader_llvm.c | 4 | ||||
-rw-r--r-- | src/mesa/pipe/draw/draw_vf.c | 4 | ||||
-rw-r--r-- | src/mesa/pipe/draw/draw_vf_generic.c | 3 | ||||
-rw-r--r-- | src/mesa/pipe/draw/draw_vf_sse.c | 6 |
8 files changed, 56 insertions, 56 deletions
diff --git a/src/mesa/pipe/draw/draw_prim.c b/src/mesa/pipe/draw/draw_prim.c index 58400213d7..51e2242719 100644 --- a/src/mesa/pipe/draw/draw_prim.c +++ b/src/mesa/pipe/draw/draw_prim.c @@ -30,6 +30,8 @@ * Keith Whitwell <keith@tungstengraphics.com> */ +#include "pipe/p_debug.h" + #include "draw_private.h" #include "draw_context.h" @@ -60,8 +62,8 @@ static void draw_prim_queue_flush( struct draw_context *draw ) unsigned i; if (0) - fprintf(stdout,"Flushing with %d prims, %d verts\n", - draw->pq.queue_nr, draw->vs.queue_nr); + debug_printf("Flushing with %d prims, %d verts\n", + draw->pq.queue_nr, draw->vs.queue_nr); assert (draw->pq.queue_nr != 0); @@ -120,9 +122,9 @@ static void draw_prim_queue_flush( struct draw_context *draw ) void draw_do_flush( struct draw_context *draw, unsigned flags ) { if (0) - fprintf(stdout,"Flushing with %d verts, %d prims\n", - draw->vs.queue_nr, - draw->pq.queue_nr ); + debug_printf("Flushing with %d verts, %d prims\n", + draw->vs.queue_nr, + draw->pq.queue_nr ); if (flags >= DRAW_FLUSH_SHADER_QUEUE) { @@ -157,11 +159,11 @@ static struct prim_header *get_queued_prim( struct draw_context *draw, unsigned nr_verts ) { if (!draw_vertex_cache_check_space( draw, nr_verts )) { -// fprintf(stderr, "v"); +// debug_printf("v"); draw_do_flush( draw, DRAW_FLUSH_VERTEX_CACHE ); } else if (draw->pq.queue_nr == PRIM_QUEUE_LENGTH) { -// fprintf(stderr, "p"); +// debug_printf("p"); draw_do_flush( draw, DRAW_FLUSH_PRIM_QUEUE ); } @@ -283,7 +285,7 @@ draw_prim( struct draw_context *draw, boolean unfilled = (draw->rasterizer->fill_cw != PIPE_POLYGON_MODE_FILL || draw->rasterizer->fill_ccw != PIPE_POLYGON_MODE_FILL); -// _mesa_printf("%s (%d) %d/%d\n", __FUNCTION__, draw->prim, start, count ); +// debug_printf("%s (%d) %d/%d\n", __FUNCTION__, draw->prim, start, count ); switch (prim) { case PIPE_PRIM_POINTS: diff --git a/src/mesa/pipe/draw/draw_vbuf.c b/src/mesa/pipe/draw/draw_vbuf.c index ac03001d8f..be96c8fdeb 100644 --- a/src/mesa/pipe/draw/draw_vbuf.c +++ b/src/mesa/pipe/draw/draw_vbuf.c @@ -34,8 +34,7 @@ */ -#include <assert.h> - +#include "pipe/p_debug.h" #include "pipe/p_util.h" #include "draw_vbuf.h" @@ -125,55 +124,55 @@ dump_emitted_vertex(const struct vertex_info *vinfo, const uint8_t *data) j = vinfo->src_index[i]; switch (vinfo->emit[i]) { case EMIT_OMIT: - fprintf(stderr, "EMIT_OMIT:"); + debug_printf("EMIT_OMIT:"); break; case EMIT_ALL: assert(i == 0); assert(j == 0); - fprintf(stderr, "EMIT_ALL:\t"); + debug_printf("EMIT_ALL:\t"); for(k = 0; k < vinfo->size*4; ++k) - fprintf(stderr, "%02x ", *data++); + debug_printf("%02x ", *data++); break; case EMIT_1F: - fprintf(stderr, "EMIT_1F:\t"); - fprintf(stderr, "%f ", *(float *)data); data += sizeof(float); + debug_printf("EMIT_1F:\t"); + debug_printf("%f ", *(float *)data); data += sizeof(float); break; case EMIT_1F_PSIZE: - fprintf(stderr, "EMIT_1F_PSIZE:\t"); - fprintf(stderr, "%f ", *(float *)data); data += sizeof(float); + debug_printf("EMIT_1F_PSIZE:\t"); + debug_printf("%f ", *(float *)data); data += sizeof(float); break; case EMIT_2F: - fprintf(stderr, "EMIT_2F:\t"); - fprintf(stderr, "%f ", *(float *)data); data += sizeof(float); - fprintf(stderr, "%f ", *(float *)data); data += sizeof(float); + debug_printf("EMIT_2F:\t"); + debug_printf("%f ", *(float *)data); data += sizeof(float); + debug_printf("%f ", *(float *)data); data += sizeof(float); break; case EMIT_3F: - fprintf(stderr, "EMIT_3F:\t"); - fprintf(stderr, "%f ", *(float *)data); data += sizeof(float); - fprintf(stderr, "%f ", *(float *)data); data += sizeof(float); - fprintf(stderr, "%f ", *(float *)data); data += sizeof(float); + debug_printf("EMIT_3F:\t"); + debug_printf("%f ", *(float *)data); data += sizeof(float); + debug_printf("%f ", *(float *)data); data += sizeof(float); + debug_printf("%f ", *(float *)data); data += sizeof(float); data += sizeof(float); break; case EMIT_4F: - fprintf(stderr, "EMIT_4F:\t"); - fprintf(stderr, "%f ", *(float *)data); data += sizeof(float); - fprintf(stderr, "%f ", *(float *)data); data += sizeof(float); - fprintf(stderr, "%f ", *(float *)data); data += sizeof(float); - fprintf(stderr, "%f ", *(float *)data); data += sizeof(float); + debug_printf("EMIT_4F:\t"); + debug_printf("%f ", *(float *)data); data += sizeof(float); + debug_printf("%f ", *(float *)data); data += sizeof(float); + debug_printf("%f ", *(float *)data); data += sizeof(float); + debug_printf("%f ", *(float *)data); data += sizeof(float); break; case EMIT_4UB: - fprintf(stderr, "EMIT_4UB:\t"); - fprintf(stderr, "%u ", *data++); - fprintf(stderr, "%u ", *data++); - fprintf(stderr, "%u ", *data++); - fprintf(stderr, "%u ", *data++); + debug_printf("EMIT_4UB:\t"); + debug_printf("%u ", *data++); + debug_printf("%u ", *data++); + debug_printf("%u ", *data++); + debug_printf("%u ", *data++); break; default: assert(0); } - fprintf(stderr, "\n"); + debug_printf("\n"); } - fprintf(stderr, "\n"); + debug_printf("\n"); } #endif @@ -190,7 +189,7 @@ emit_vertex( struct vbuf_stage *vbuf, struct vertex_header *vertex ) { #if 0 - fprintf(stderr, "emit vertex %d to %p\n", + debug_printf("emit vertex %d to %p\n", vbuf->nr_vertices, vbuf->vertex_ptr); #endif @@ -198,7 +197,7 @@ emit_vertex( struct vbuf_stage *vbuf, if(vertex->vertex_id < vbuf->nr_vertices) return; else - fprintf(stderr, "Bad vertex id 0x%04x (>= 0x%04x)\n", + debug_printf("Bad vertex id 0x%04x (>= 0x%04x)\n", vertex->vertex_id, vbuf->nr_vertices); return; } @@ -269,9 +268,9 @@ emit_vertex( struct vbuf_stage *vbuf, static float data[256]; draw_vf_emit_vertex(vbuf->vf, vertex, data); if(memcmp((uint8_t *)vbuf->vertex_ptr - vbuf->vertex_size, data, vbuf->vertex_size)) { - fprintf(stderr, "With VF:\n"); + debug_printf("With VF:\n"); dump_emitted_vertex(vbuf->vinfo, (uint8_t *)data); - fprintf(stderr, "Without VF:\n"); + debug_printf("Without VF:\n"); dump_emitted_vertex(vbuf->vinfo, (uint8_t *)vbuf->vertex_ptr - vbuf->vertex_size); assert(0); } diff --git a/src/mesa/pipe/draw/draw_vertex_fetch.c b/src/mesa/pipe/draw/draw_vertex_fetch.c index b23f487e74..e13df04605 100644 --- a/src/mesa/pipe/draw/draw_vertex_fetch.c +++ b/src/mesa/pipe/draw/draw_vertex_fetch.c @@ -162,7 +162,7 @@ static fetch_func get_fetch_func( enum pipe_format format ) { char tmp[80]; pf_sprint_name(tmp, format); - _mesa_printf("%s: %s\n", __FUNCTION__, tmp); + debug_printf("%s: %s\n", __FUNCTION__, tmp); } #endif @@ -332,7 +332,7 @@ static void fetch_xyz_rgb( struct draw_context *draw, assert(count <= 4); -// _mesa_printf("%s\n", __FUNCTION__); +// debug_printf("%s\n", __FUNCTION__); /* loop over vertex attributes (vertex shader inputs) */ @@ -421,7 +421,7 @@ static void generic_vertex_fetch( struct draw_context *draw, assert(count <= 4); -// _mesa_printf("%s %d\n", __FUNCTION__, count); +// debug_printf("%s %d\n", __FUNCTION__, count); /* loop over vertex attributes (vertex shader inputs) */ @@ -467,7 +467,7 @@ void draw_update_vertex_fetch( struct draw_context *draw ) { unsigned nr_attrs, i; -// _mesa_printf("%s\n", __FUNCTION__); +// debug_printf("%s\n", __FUNCTION__); /* this may happend during context init */ if (!draw->vertex_shader) diff --git a/src/mesa/pipe/draw/draw_vertex_shader.c b/src/mesa/pipe/draw/draw_vertex_shader.c index b851da845f..e6590eafcc 100644 --- a/src/mesa/pipe/draw/draw_vertex_shader.c +++ b/src/mesa/pipe/draw/draw_vertex_shader.c @@ -166,7 +166,7 @@ run_vertex_program(struct draw_context *draw, vOut[j]->data[0][3] = w; #if DBG_VS - printf("output[%d]win: %f %f %f %f\n", j, + debug_printf("output[%d]win: %f %f %f %f\n", j, vOut[j]->data[0][0], vOut[j]->data[0][1], vOut[j]->data[0][2], @@ -181,7 +181,7 @@ run_vertex_program(struct draw_context *draw, vOut[j]->data[slot][2] = machine->Outputs[slot].xyzw[2].f[j]; vOut[j]->data[slot][3] = machine->Outputs[slot].xyzw[3].f[j]; #if DBG_VS - printf("output[%d][%d]: %f %f %f %f\n", j, slot, + debug_printf("output[%d][%d]: %f %f %f %f\n", j, slot, vOut[j]->data[slot][0], vOut[j]->data[slot][1], vOut[j]->data[slot][2], @@ -207,7 +207,7 @@ draw_vertex_shader_queue_flush(struct draw_context *draw) */ draw_update_vertex_fetch( draw ); -// fprintf(stderr, " q(%d) ", draw->vs.queue_nr ); +// debug_printf( " q(%d) ", draw->vs.queue_nr ); #ifdef MESA_LLVM if (draw->vertex_shader->llvm_prog) { draw_vertex_shader_queue_flush_llvm(draw); diff --git a/src/mesa/pipe/draw/draw_vertex_shader_llvm.c b/src/mesa/pipe/draw/draw_vertex_shader_llvm.c index 4228c4f388..63551c993e 100644 --- a/src/mesa/pipe/draw/draw_vertex_shader_llvm.c +++ b/src/mesa/pipe/draw/draw_vertex_shader_llvm.c @@ -152,7 +152,7 @@ void draw_vertex_shader_queue_flush_llvm(struct draw_context *draw) z = vOut->clip[2] = dests[0][2]; w = vOut->clip[3] = dests[0][3]; #if DBG - printf("output %d: %f %f %f %f\n", 0, x, y, z, w); + debug_printf("output %d: %f %f %f %f\n", 0, x, y, z, w); #endif vOut->clipmask = compute_clipmask(vOut->clip, draw->plane, draw->nr_planes); @@ -179,7 +179,7 @@ void draw_vertex_shader_queue_flush_llvm(struct draw_context *draw) vOut->data[slot][3] = dests[slot][3]; #if DBG - printf("output %d: %f %f %f %f\n", slot, + debug_printf("output %d: %f %f %f %f\n", slot, vOut->data[slot][0], vOut->data[slot][1], vOut->data[slot][2], diff --git a/src/mesa/pipe/draw/draw_vf.c b/src/mesa/pipe/draw/draw_vf.c index 0da8e59ad6..f23d7fcec5 100644 --- a/src/mesa/pipe/draw/draw_vf.c +++ b/src/mesa/pipe/draw/draw_vf.c @@ -168,7 +168,7 @@ draw_vf_set_vertex_attributes( struct draw_vertex_fetch *vf, const unsigned format = map[i].format; if (format == DRAW_EMIT_PAD) { #if (DRAW_VF_DBG) - _mesa_printf("%d: pad %d, offset %d\n", i, + debug_printf("%d: pad %d, offset %d\n", i, map[i].offset, offset); #endif @@ -186,7 +186,7 @@ draw_vf_set_vertex_attributes( struct draw_vertex_fetch *vf, memcpy(vf->attr[j].data, &map[i].data, vf->attr[j].vertattrsize); #if (DRAW_VF_DBG) - _mesa_printf("%d: %s, offset %d\n", i, + debug_printf("%d: %s, offset %d\n", i, draw_vf_format_info[format].name, vf->attr[j].vertoffset); #endif diff --git a/src/mesa/pipe/draw/draw_vf_generic.c b/src/mesa/pipe/draw/draw_vf_generic.c index 7f5f56ef9c..7a60a9db9c 100644 --- a/src/mesa/pipe/draw/draw_vf_generic.c +++ b/src/mesa/pipe/draw/draw_vf_generic.c @@ -27,9 +27,8 @@ */ -#include <assert.h> - #include "pipe/p_compiler.h" +#include "pipe/p_debug.h" #include "pipe/p_util.h" #include "draw_vf.h" diff --git a/src/mesa/pipe/draw/draw_vf_sse.c b/src/mesa/pipe/draw/draw_vf_sse.c index 1389e6cfb9..1ad2ae756d 100644 --- a/src/mesa/pipe/draw/draw_vf_sse.c +++ b/src/mesa/pipe/draw/draw_vf_sse.c @@ -453,7 +453,7 @@ static boolean build_vertex_emit( struct x86_program *p ) update_src_ptr(p, srcECX, vfESI, a); } else { - fprintf(stderr, "Can't emit 1ub %x %x %d\n", + debug_printf("Can't emit 1ub %x %x %d\n", a->vertoffset, a[-1].vertoffset, a[-1].vertattrsize ); return FALSE; } @@ -499,7 +499,7 @@ static boolean build_vertex_emit( struct x86_program *p ) j++; /* NOTE: two attrs consumed */ } else { - fprintf(stderr, "Can't emit 3ub\n"); + debug_printf("Can't emit 3ub\n"); } return FALSE; /* add this later */ break; @@ -532,7 +532,7 @@ static boolean build_vertex_emit( struct x86_program *p ) update_src_ptr(p, srcECX, vfESI, a); break; default: - fprintf(stderr, "unknown a[%d].format %d\n", j, a->format); + debug_printf("unknown a[%d].format %d\n", j, a->format); return FALSE; /* catch any new opcodes */ } |