void r300InitCmdBuf(r300ContextPtr r300)
{
int size, i, mtu;
-
+
r300->hw.max_state_size = 0;
mtu = r300->radeon.glCtx->Const.MaxTextureUnits;
- fprintf(stderr, "Using %d maximum texture units..\n", mtu);
+ if (RADEON_DEBUG & DEBUG_TEXTURE) {
+ fprintf(stderr, "Using %d maximum texture units..\n", mtu);
+ }
/* Initialize state atoms */
ALLOC_STATE( vpt, always, R300_VPT_CMDSIZE, "vpt", 0 );
size = 2*r300->hw.max_state_size+65535;
}
- if (1 || RADEON_DEBUG & DEBUG_IOCTL){
+ if (RADEON_DEBUG & (DEBUG_IOCTL|DEBUG_DMA)) {
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",
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);
r300ContextPtr r300 = (r300ContextPtr) driContextPriv->driverPrivate;
radeonContextPtr current = ctx ? RADEON_CONTEXT(ctx) : NULL;
- fprintf(stderr, "Destroying context !\n");
- sleep(1);
+ if (RADEON_DEBUG & DEBUG_DRI) {
+ fprintf(stderr, "Destroying context !\n");
+ }
+
/* check if we're deleting the currently bound context */
if (&r300->radeon == current) {
radeonFlush(r300->radeon.glCtx);