Reset nr_released_bufs to 0 after the command buffer has been submitted.
authorNicolai Haehnle <prefect_@gmx.net>
Fri, 18 Feb 2005 16:34:14 +0000 (16:34 +0000)
committerNicolai Haehnle <prefect_@gmx.net>
Fri, 18 Feb 2005 16:34:14 +0000 (16:34 +0000)
Added a more verbose comment about nr_released_bufs in r300_context.h

src/mesa/drivers/dri/r300/r300_cmdbuf.c
src/mesa/drivers/dri/r300/r300_context.h

index 7f02434..bdb4179 100644 (file)
@@ -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)
index 0c72aa0..48822d3 100644 (file)
@@ -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 */