From: Eric Anholt Date: Thu, 21 Jun 2007 19:57:15 +0000 (-0700) Subject: Reset saved state for disasm when we've lost the context. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5d9dc02cbecd94f822f853fd01878784596f4eba;p=mesa.git Reset saved state for disasm when we've lost the context. --- 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 ||