summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2007-06-21 12:57:15 -0700
committerEric Anholt <[email protected]>2007-06-21 12:57:15 -0700
commit5d9dc02cbecd94f822f853fd01878784596f4eba (patch)
treef048a28ac185fac8940a1d84c38044328be93670 /src/mesa
parentf3f29d632e8a51914b87e087d6ab4d1d6f47b7d7 (diff)
Reset saved state for disasm when we've lost the context.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i915tex/i915_disasm.c7
-rw-r--r--src/mesa/drivers/dri/i915tex/i915_disasm.h1
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_context.c3
3 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915tex/i915_disasm.c b/src/mesa/drivers/dri/i915tex/i915_disasm.c
index ebb634654fb..6ac34a14804 100644
--- a/src/mesa/drivers/dri/i915tex/i915_disasm.c
+++ b/src/mesa/drivers/dri/i915tex/i915_disasm.c
@@ -731,3 +731,10 @@ i915_disasm(uint32_t *data, int count, uint32_t hw_offset)
return failures;
}
+
+void i915_disasm_context_reset()
+{
+ saved_s2_set = 0;
+ saved_s4_set = 1;
+}
+
diff --git a/src/mesa/drivers/dri/i915tex/i915_disasm.h b/src/mesa/drivers/dri/i915tex/i915_disasm.h
index c74b0360683..5eb620f9a4e 100644
--- a/src/mesa/drivers/dri/i915tex/i915_disasm.h
+++ b/src/mesa/drivers/dri/i915tex/i915_disasm.h
@@ -26,3 +26,4 @@
*/
int i915_disasm(uint32_t *data, int count, uint32_t hw_offset);
+void i915_disasm_context_reset();
diff --git a/src/mesa/drivers/dri/i915tex/intel_context.c b/src/mesa/drivers/dri/i915tex/intel_context.c
index 696845a7fc9..9d3f9468301 100644
--- a/src/mesa/drivers/dri/i915tex/intel_context.c
+++ b/src/mesa/drivers/dri/i915tex/intel_context.c
@@ -59,6 +59,7 @@
#include "intel_regions.h"
#include "intel_buffer_objects.h"
#include "intel_fbo.h"
+#include "i915_disasm.h"
#include "drirenderbuffer.h"
#include "vblank.h"
@@ -646,6 +647,8 @@ intelContendedLock(struct intel_context *intel, GLuint flags)
if (!intel->intelScreen->ttm && sarea->texAge != intel->hHWContext) {
sarea->texAge = intel->hHWContext;
dri_bufmgr_fake_contended_lock_take(intel->intelScreen->bufmgr);
+ if (INTEL_DEBUG & DEBUG_BATCH)
+ i915_disasm_context_reset();
}
if (sarea->width != intelScreen->width ||