From: Nicolai Haehnle Date: Fri, 18 Feb 2005 16:34:14 +0000 (+0000) Subject: Reset nr_released_bufs to 0 after the command buffer has been submitted. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=26d812ae00e0bb5abb23e95a36492ef59d416c16;p=mesa.git Reset nr_released_bufs to 0 after the command buffer has been submitted. Added a more verbose comment about nr_released_bufs in r300_context.h --- diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c index 7f024345663..bdb417932b2 100644 --- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c +++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c @@ -100,6 +100,8 @@ int r300FlushCmdBufLocked(r300ContextPtr r300, const char* caller) fprintf(stderr, "Syncing in %s\n\n", __FUNCTION__); radeonWaitForIdleLocked(&r300->radeon); } + + r300->dma.nr_released_bufs = 0; } else { ret = 0; if (RADEON_DEBUG & DEBUG_IOCTL) diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index 0c72aa06704..48822d326cf 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -128,7 +128,11 @@ struct r300_dma { void (*flush) (r300ContextPtr); char *buf0_address; /* start of buf[0], for index calcs */ - GLuint nr_released_bufs; /* flush after so many buffers released */ + + /* Number of "in-flight" DMA buffers, i.e. the number of buffers + * for which a DISCARD command is currently queued in the command buffer. + */ + GLuint nr_released_bufs; }; /* Texture related */