diff options
author | Corbin Simpson <[email protected]> | 2010-05-12 10:10:54 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2010-05-12 10:16:19 -0700 |
commit | 3bb1724f3796ad799a93c319e03eae48c0114f1e (patch) | |
tree | 51bfc534969f2fb5a0cc0ffc4cc78312045f9cce /src/gallium | |
parent | 505bea835501d834b0c999700d06280aa57cb6b1 (diff) |
r300g: Add VBO dumper for SW TCL.
Commented out, not easily enabled. *Very* noisy.
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r300/r300_render.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_render.c b/src/gallium/drivers/r300/r300_render.c index db71960e7ec..8795410efde 100644 --- a/src/gallium/drivers/r300/r300_render.c +++ b/src/gallium/drivers/r300/r300_render.c @@ -926,6 +926,8 @@ static void r500_render_draw_arrays(struct vbuf_render* render, { struct r300_render* r300render = r300_render(render); struct r300_context* r300 = r300render->r300; + uint8_t* ptr; + unsigned i; CS_LOCALS(r300); @@ -933,6 +935,23 @@ static void r500_render_draw_arrays(struct vbuf_render* render, DBG(r300, DBG_DRAW, "r300: Doing vbuf render, count %d\n", count); + /* Uncomment to dump all VBOs rendered through this interface. + * Slow and noisy! + ptr = pipe_buffer_map(&r300render->r300->context, + r300render->vbo, PIPE_TRANSFER_READ, + &r300render->vbo_transfer); + + for (i = 0; i < count; i++) { + printf("r300: Vertex %d\n", i); + draw_dump_emitted_vertex(&r300->vertex_info, ptr); + ptr += r300->vertex_info.size * 4; + printf("\n"); + } + + pipe_buffer_unmap(&r300render->r300->context, r300render->vbo, + r300render->vbo_transfer); + */ + BEGIN_CS(2); OUT_CS_PKT3(R300_PACKET3_3D_DRAW_VBUF_2, 0); OUT_CS(R300_VAP_VF_CNTL__PRIM_WALK_VERTEX_LIST | (count << 16) | |