Mesa (mesa_7_5_branch): i915: Fix assertion failure on remapping a non-BO-backed VBO.

Eric Anholt anholt at kemper.freedesktop.org
Tue Jun 30 20:29:50 UTC 2009


Module: Mesa
Branch: mesa_7_5_branch
Commit: c72261f2a886e1f53025c2cf4b38b33ccfd62857
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c72261f2a886e1f53025c2cf4b38b33ccfd62857

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jun 29 18:48:27 2009 -0700

i915: Fix assertion failure on remapping a non-BO-backed VBO.

Failure to set the obj->Pointer back to null tripped up the assertion.
Bug #22428.
(cherry picked from commit 57a06d3a48c9af1067ec05e3ad96c58f4b9b99be)

---

 src/mesa/drivers/dri/intel/intel_buffer_objects.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_buffer_objects.c b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
index c31fe91..2e6b778 100644
--- a/src/mesa/drivers/dri/intel/intel_buffer_objects.c
+++ b/src/mesa/drivers/dri/intel/intel_buffer_objects.c
@@ -265,7 +265,10 @@ intel_bufferobj_unmap(GLcontext * ctx,
    struct intel_buffer_object *intel_obj = intel_buffer_object(obj);
 
    assert(intel_obj);
-   if (intel_obj->buffer != NULL) {
+   if (intel_obj->sys_buffer != NULL) {
+      assert(obj->Pointer);
+      obj->Pointer = NULL;
+   } else if (intel_obj->buffer != NULL) {
       assert(obj->Pointer);
       if (intel_obj->mapped_gtt) {
 	 drm_intel_gem_bo_unmap_gtt(intel_obj->buffer);




More information about the mesa-commit mailing list