diff options
author | Vladimir Dergachev <volodya@freedesktop.org> | 2005-02-10 07:39:11 +0000 |
---|---|---|
committer | Vladimir Dergachev <volodya@freedesktop.org> | 2005-02-10 07:39:11 +0000 |
commit | d1907348757938295dbebbe5667bd34ce8b2089c (patch) | |
tree | a62fa80d8c66a6f52ce6d11c553ca3d5bba03105 /src/mesa/drivers/dri/r300/r300_cmdbuf.c | |
parent | 4afa1d7abbf4bdd368ebfbc5e18dc02f8b8ec21a (diff) |
Fix copy'n'paste errors.
Print command buffer sizes during startup (TODO: remove 1 || when the driver is more mature).
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_cmdbuf.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_cmdbuf.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c index 04a47bb8bf..ae0f9fb6b4 100644 --- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c +++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c @@ -554,13 +554,19 @@ void r300InitCmdBuf(r300ContextPtr r300) /* Initialize command buffer */ size = 256 * driQueryOptioni(&r300->radeon.optionCache, "command_buffer_size"); - if (size < 2*r300->hw.max_state_size) - size = 2*r300->hw.max_state_size; + if (size < 2*r300->hw.max_state_size){ + size = 2*r300->hw.max_state_size+65535; + } - if (RADEON_DEBUG & DEBUG_IOCTL) + if (1 || RADEON_DEBUG & DEBUG_IOCTL){ + fprintf(stderr, "sizeof(drm_r300_cmd_header_t)=%d\n", + sizeof(drm_r300_cmd_header_t)); + fprintf(stderr, "sizeof(drm_radeon_cmd_buffer_t)=%d\n", + sizeof(drm_radeon_cmd_buffer_t)); fprintf(stderr, "Allocating %d bytes command buffer (max state is %d bytes)\n", size*4, r300->hw.max_state_size*4); + } r300->cmdbuf.size = size; r300->cmdbuf.cmd_buf = (uint32_t*)CALLOC(size*4); |