static void
i830_destroy_context(struct intel_context *intel)
{
- driBOUnReference(i830->state.tex_buffer[i]);
+ GLuint i;
+ struct i830_context *i830 = i830_context(&intel->ctx);
+
+ for (i = 0; i < I830_TEX_UNITS; i++) {
+ if (i830->state.tex_buffer[i] != NULL) {
++ dri_bo_unreference(i830->state.tex_buffer[i]);
+ i830->state.tex_buffer[i] = NULL;
+ }
+ }
+
_tnl_free_vertices(&intel->ctx);
}
static void
i915_destroy_context(struct intel_context *intel)
{
- driBOUnReference(i915->state.tex_buffer[i]);
+ GLuint i;
+ struct i915_context *i915 = i915_context(&intel->ctx);
+
+ for (i = 0; i < I915_TEX_UNITS; i++) {
+ if (i915->state.tex_buffer[i] != NULL) {
++ dri_bo_unreference(i915->state.tex_buffer[i]);
+ i915->state.tex_buffer[i] = NULL;
+ }
+ }
+
_tnl_free_vertices(&intel->ctx);
}
}
intel->vtbl.lost_hardware(intel);
}
- i915_disasm(ptr, used / 4, batch->buf->offset);
+
+ if (INTEL_DEBUG & DEBUG_BATCH) {
+ dri_bo_map(batch->buf, GL_FALSE);
++ intel_decode(ptr, used / 4, batch->buf->offset);
+ dri_bo_unmap(batch->buf);
+ }
}
#include "intel_regions.h"
#include "intel_buffer_objects.h"
#include "intel_fbo.h"
- #include "i915_disasm.h"
++#include "intel_decode.h"
#include "drirenderbuffer.h"
#include "vblank.h"
if (dPriv)
DRI_VALIDATE_DRAWABLE_INFO(sPriv, dPriv);
- i915_disasm_context_reset();
+ /* If the last consumer of the texture memory wasn't us, notify the fake
+ * bufmgr and record the new owner. We should have the memory shared
+ * between contexts of a single fake bufmgr, but this will at least make
+ * things correct for now.
+ */
+ 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)
++ intel_decode_context_reset();
+ }
+
if (sarea->width != intelScreen->width ||
sarea->height != intelScreen->height ||
sarea->rotation != intelScreen->current_rotation) {
return failures;
}
- void i915_disasm_context_reset()
-void intel_disasm_context_reset()
++void intel_decode_context_reset()
{
saved_s2_set = 0;
saved_s4_set = 1;