mesa: Branch 'master' - 2 commits

matthieu castet matc at kemper.freedesktop.org
Mon Jan 29 22:27:08 UTC 2007


 src/mesa/drivers/dri/nouveau/nouveau_fifo.h |   25 ++++++++++++++++++++++++-
 src/mesa/drivers/dri/nouveau/nv10_state.c   |    2 +-
 2 files changed, 25 insertions(+), 2 deletions(-)

New commits:
diff-tree aa397fe47212d7686efe423aedd10f2c57f2c2b9 (from c97540065c6dce20dd6ace9a15d9872a3a66f71c)
Author: Matthieu Castet <castet.matthieu at free.fr>
Date:   Mon Jan 29 23:26:35 2007 +0100

    nouveau : NOUVEAU_RING_TRACE
    
    allow to print what we are really sending to the fifo.

diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h
index 9056bfb..490089f 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_fifo.h
+++ b/src/mesa/drivers/dri/nouveau/nouveau_fifo.h
@@ -33,15 +33,30 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "nouveau_ctrlreg.h"
 #include "nouveau_state_cache.h"
 
+//#define NOUVEAU_RING_TRACE
 //#define NOUVEAU_RING_DEBUG
 //#define NOUVEAU_STATE_CACHE_DISABLE
 
+#ifndef NOUVEAU_RING_TRACE
+#define NOUVEAU_RING_TRACE 0
+#else
+#undef NOUVEAU_RING_TRACE
+#define NOUVEAU_RING_TRACE 1
+#endif
+
 #define NV_READ(reg) *(volatile u_int32_t *)(nmesa->mmio + (reg))
 
 #define NV_FIFO_READ(reg) *(volatile u_int32_t *)(nmesa->fifo.mmio + (reg/4))
 #define NV_FIFO_WRITE(reg,value) *(volatile u_int32_t *)(nmesa->fifo.mmio + (reg/4)) = value;
 #define NV_FIFO_READ_GET() ((NV_FIFO_READ(NV03_FIFO_REGS_DMAGET) - nmesa->fifo.put_base) >> 2)
-#define NV_FIFO_WRITE_PUT(val) NV_FIFO_WRITE(NV03_FIFO_REGS_DMAPUT, ((val)<<2) + nmesa->fifo.put_base)
+#define NV_FIFO_WRITE_PUT(val) do { \
+	if (NOUVEAU_RING_TRACE) {\
+		printf("FIRE_RING : 0x%08x\n", nmesa->fifo.current << 2); \
+		fflush(stdout); \
+		sleep(1); \
+	} \
+	NV_FIFO_WRITE(NV03_FIFO_REGS_DMAPUT, ((val)<<2) + nmesa->fifo.put_base); \
+} while(0)
 
 /* 
  * Ring/fifo interface
@@ -75,15 +90,23 @@ int i; printf("OUT_RINGp: (size 0x%x dwo
 #else
 
 #define OUT_RINGp(ptr,sz) do{							\
+	if (NOUVEAU_RING_TRACE) { \
+		uint32_t* p=(uint32_t*)(ptr);							\
+		int i; printf("OUT_RINGp: (size 0x%x dwords) (%s)\n",sz, __func__); for(i=0;i<sz;i++) printf(" [0x%08x] 0x%08x   %f\n", (nmesa->fifo.current+i) << 2, *(p+i), *((float*)(p+i))); 	\
+	} \
 	memcpy(nmesa->fifo.buffer+nmesa->fifo.current,ptr,(sz)*4);		\
 	nmesa->fifo.current+=(sz);						\
 }while(0)
 
 #define OUT_RING(n) do {							\
+if (NOUVEAU_RING_TRACE) \
+    printf("OUT_RINGn: [0x%08x] 0x%08x (%s)\n", nmesa->fifo.current << 2, n, __func__);        \
 nmesa->fifo.buffer[nmesa->fifo.current++]=(n);					\
 }while(0)
 
 #define OUT_RINGf(n) do {							\
+if (NOUVEAU_RING_TRACE) \
+    printf("OUT_RINGf: [0x%08x] %.04f (%s)\n", nmesa->fifo.current << 2, n, __func__);        \
 *((float*)(nmesa->fifo.buffer+nmesa->fifo.current++))=(n);			\
 }while(0)
 
diff-tree c97540065c6dce20dd6ace9a15d9872a3a66f71c (from c7c0a6ddcddc8d91fde0a7cb5a2bce85c708d438)
Author: Matthieu Castet <castet.matthieu at free.fr>
Date:   Mon Jan 29 23:19:12 2007 +0100

    nouveau : nv10 comment icomplete command

diff --git a/src/mesa/drivers/dri/nouveau/nv10_state.c b/src/mesa/drivers/dri/nouveau/nv10_state.c
index 4e9bccb..f6e47b7 100644
--- a/src/mesa/drivers/dri/nouveau/nv10_state.c
+++ b/src/mesa/drivers/dri/nouveau/nv10_state.c
@@ -322,7 +322,7 @@ static void nv10Fogfv(GLcontext *ctx, GL
     switch(pname)
     {
         case GL_FOG_MODE:
-            BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FOG_MODE, 1);
+            //BEGIN_RING_CACHE(NvSub3D, NV10_TCL_PRIMITIVE_3D_FOG_MODE, 1);
             //OUT_RING_CACHE (params);
             break;
             /* TODO: unsure about the rest.*/



More information about the mesa-commit mailing list