summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mesa/drivers/dri/savage/savage_xmesa.c1
-rw-r--r--src/mesa/drivers/dri/savage/savagecontext.h1
-rw-r--r--src/mesa/drivers/dri/savage/savagestate.c4
3 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/savage/savage_xmesa.c b/src/mesa/drivers/dri/savage/savage_xmesa.c
index e269705073..a4000b2a75 100644
--- a/src/mesa/drivers/dri/savage/savage_xmesa.c
+++ b/src/mesa/drivers/dri/savage/savage_xmesa.c
@@ -86,6 +86,7 @@ static const struct dri_debug_control debug_control[] =
{ "lru", DEBUG_VERBOSE_LRU },
{ "verb", DEBUG_VERBOSE_MSG },
{ "dma", DEBUG_DMA },
+ { "state", DEBUG_STATE },
{ NULL, 0 }
};
#ifndef SAVAGE_DEBUG
diff --git a/src/mesa/drivers/dri/savage/savagecontext.h b/src/mesa/drivers/dri/savage/savagecontext.h
index 8d77d1851d..5a66bdfa4e 100644
--- a/src/mesa/drivers/dri/savage/savagecontext.h
+++ b/src/mesa/drivers/dri/savage/savagecontext.h
@@ -311,6 +311,7 @@ extern int SAVAGE_DEBUG;
#define DEBUG_VERBOSE_LRU 0x004
#define DEBUG_VERBOSE_MSG 0x008
#define DEBUG_DMA 0x010
+#define DEBUG_STATE 0x020
#define TARGET_FRONT 0x0
#define TARGET_BACK 0x1
diff --git a/src/mesa/drivers/dri/savage/savagestate.c b/src/mesa/drivers/dri/savage/savagestate.c
index 107344c703..b57fa39dd8 100644
--- a/src/mesa/drivers/dri/savage/savagestate.c
+++ b/src/mesa/drivers/dri/savage/savagestate.c
@@ -1473,6 +1473,8 @@ static void savageEmitContiguousRegs (savageContextPtr imesa,
* this update is done *after* savageAllocCmdBuf. */
for (i = first - SAVAGE_FIRST_REG; i <= last - SAVAGE_FIRST_REG; ++i)
imesa->oldRegs.ui[i] = imesa->regs.ui[i];
+ if (SAVAGE_DEBUG & DEBUG_STATE)
+ fprintf (stderr, "Emitting regs 0x%02x-0x%02x\n", first, last);
}
static void savageEmitChangedRegs (savageContextPtr imesa,
GLuint first, GLuint last) {
@@ -1530,7 +1532,7 @@ static void savageUpdateRegister_s4(savageContextPtr imesa)
/* the savage4 uses the contiguous range of BCI registers 0x1e-0x39
* 0x1e-0x27 are local, no need to check them for global changes */
- savageEmitContiguousRegs (imesa, 0x1e, 0x39);
+ savageEmitChangedRegs (imesa, 0x1e, 0x39);
imesa->dirty=0;
}