summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorNicolai Haehnle <[email protected]>2005-05-14 09:17:28 +0000
committerNicolai Haehnle <[email protected]>2005-05-14 09:17:28 +0000
commit686e9b9f571cc9b6f2acd09be309af26f43890a3 (patch)
treef9b13e91082d36cfe795fd454f30d5948c6e1e81 /src/mesa/drivers/dri
parentaecc05627afc471cf75e55d444254d34bbf06ccd (diff)
Don't print debug messages unless the user explicitly requested them
using the RADEON_DEBUG environment variable.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c10
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c6
2 files changed, 10 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index df825ba3b43..73ef69c2f62 100644
--- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c
+++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
@@ -286,11 +286,13 @@ CHECK( vpu, vpucount(atom->cmd) ? (1 + vpucount(atom->cmd)*4) : 0 )
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 );
@@ -545,7 +547,7 @@ void r300InitCmdBuf(r300ContextPtr r300)
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",
@@ -553,7 +555,7 @@ void r300InitCmdBuf(r300ContextPtr r300)
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);
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index bcfbe2b6c8d..fd8aaa1ceab 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -373,8 +373,10 @@ void r300DestroyContext(__DRIcontextPrivate * driContextPriv)
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);