From 1ebe921228ef896804384002d8a3acd0885afc98 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Wed, 1 Nov 2006 02:48:34 +0000 Subject: Added OUT_RING* debugging macros. Compile with NOUVEAU_RING_DEBUG to use. --- src/mesa/drivers/dri/nouveau/nouveau_fifo.h | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h index bf528a24ca..95c78b5675 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h +++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h @@ -48,9 +48,28 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. * - WAIT_RING waits for size (in uint32_ts) to be available in the fifo */ +/* Enable for ring debugging. Prints out writes to the ring buffer + * but does not actually write to it. + */ +#ifdef NOUVEAU_RING_DEBUG + +#define OUT_RINGp(ptr,sz) do { \ +int i; printf("OUT_RINGp:\n"); for(i=0;ififo.buffer+nmesa->fifo.current,ptr,sz); \ - nmesa->fifo.current+=sz; \ + nmesa->fifo.current+=(sz/sizeof(*ptr)); \ }while(0) #define OUT_RING(n) do { \ @@ -61,6 +80,8 @@ nmesa->fifo.buffer[nmesa->fifo.current++]=n; \ *((float*)(nmesa->fifo.buffer+nmesa->fifo.current++))=n; \ }while(0) +#endif + extern void WAIT_RING(nouveauContextPtr nmesa,u_int32_t size); #define BEGIN_RING_PRIM(subchannel,tag,size) do { \ -- cgit v1.2.3