summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolai Haehnle <prefect_@gmx.net>2005-02-18 16:34:14 +0000
committerNicolai Haehnle <prefect_@gmx.net>2005-02-18 16:34:14 +0000
commit26d812ae00e0bb5abb23e95a36492ef59d416c16 (patch)
tree626f8d33b638d7262606362df17eddd310382112
parentf448e632b60c3bb81cc3a01d92430f5e4a110327 (diff)
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
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c2
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.h6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c
index 7f02434566..bdb417932b 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 0c72aa0670..48822d326c 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 */