diff options
author | Marek Olšák <[email protected]> | 2011-01-09 22:40:50 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-01-10 05:45:10 +0100 |
commit | 9d33e4e16c8d2271ef2a965d7210a9aee40680d2 (patch) | |
tree | 6426c52871f515664e80befda16a6807f909194d | |
parent | 97e9a0e23f0e06d020883c37b9d065e8978a47f4 (diff) |
r300g: add debug option for buffer upload logging
-rw-r--r-- | src/gallium/drivers/r300/r300_debug.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_screen.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_screen_buffer.c | 7 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_debug.c b/src/gallium/drivers/r300/r300_debug.c index 52031dd97b5..d6aa90bd053 100644 --- a/src/gallium/drivers/r300/r300_debug.c +++ b/src/gallium/drivers/r300/r300_debug.c @@ -41,6 +41,7 @@ static const struct debug_named_value debug_options[] = { { "fb", DBG_FB, "Log framebuffer" }, { "cbzb", DBG_CBZB, "Log fast color clear info" }, { "hyperz", DBG_HYPERZ, "Log HyperZ info" }, + { "upload", DBG_UPLOAD, "Log user buffer upload info" }, { "scissor", DBG_SCISSOR, "Log scissor info" }, { "fakeocc", DBG_FAKE_OCC, "Use fake occlusion queries" }, { "anisohq", DBG_ANISOHQ, "Use high quality anisotropic filtering" }, diff --git a/src/gallium/drivers/r300/r300_screen.h b/src/gallium/drivers/r300/r300_screen.h index 5847fe1ffc8..752f53b7579 100644 --- a/src/gallium/drivers/r300/r300_screen.h +++ b/src/gallium/drivers/r300/r300_screen.h @@ -93,6 +93,7 @@ r300_winsys_screen(struct pipe_screen *screen) { #define DBG_CBZB (1 << 11) #define DBG_HYPERZ (1 << 12) #define DBG_SCISSOR (1 << 13) +#define DBG_UPLOAD (1 << 14) /* Features. */ #define DBG_ANISOHQ (1 << 16) #define DBG_NO_TILING (1 << 17) diff --git a/src/gallium/drivers/r300/r300_screen_buffer.c b/src/gallium/drivers/r300/r300_screen_buffer.c index b349849cf37..cc3c1d7687e 100644 --- a/src/gallium/drivers/r300/r300_screen_buffer.c +++ b/src/gallium/drivers/r300/r300_screen_buffer.c @@ -105,6 +105,12 @@ void r300_upload_user_buffers(struct r300_context *r300, size = r300->velems->hw_format_size[i]; } + DBG(r300, DBG_UPLOAD, + "Uploading %i bytes, index: %i, buffer: %p, userptr: %p " + "offset: %i, stride: %i.\n", + size, index, userbuf, userbuf->user_buffer, + vb->buffer_offset, vb->stride); + u_upload_data(r300->upload_vb, first, size, userbuf->user_buffer + first, &vb->buffer_offset, @@ -124,6 +130,7 @@ void r300_upload_user_buffers(struct r300_context *r300, assert(r300->valid_vertex_buffer[index]); } } + DBG(r300, DBG_UPLOAD, "-------\n"); } static void r300_buffer_destroy(struct pipe_screen *screen, |