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 7f024345663e0dfa614782fc9d589b9df63dd317..bdb417932b2589075f6854be2ec5ba2df75eb74a 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 0c72aa067043a5abf7c32a215b08246907f4db54..48822d326cf297f9429d12d8808984477430cd68 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 */