Mesa (master): vbo: If MapBufferRange fails, try MapBuffer instead.

Corbin Simpson csimpson at kemper.freedesktop.org
Thu Jul 2 23:35:06 UTC 2009


Module: Mesa
Branch: master
Commit: 9a0b570ab64169cee66f848d97d65f22c43d13ec
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9a0b570ab64169cee66f848d97d65f22c43d13ec

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Thu Jul  2 16:31:24 2009 -0700

vbo: If MapBufferRange fails, try MapBuffer instead.

Fixes segfaults with radeon winsys.
(Probably libdrm_radeon doing something that it shouldn't.)

---

 src/mesa/vbo/vbo_exec_draw.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 5442a40..bfe9ef0 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -327,9 +327,10 @@ vbo_exec_vtx_map( struct vbo_exec_context *exec )
                                                   0, VBO_VERT_BUFFER_SIZE,
                                                   accessRange,
                                                   exec->vtx.bufferobj);
-      else
+      if (!exec->vtx.buffer_map)
          exec->vtx.buffer_map =
             (GLfloat *)ctx->Driver.MapBuffer(ctx, target, access, exec->vtx.bufferobj);
+      assert(exec->vtx.buffer_map);
       exec->vtx.buffer_ptr = exec->vtx.buffer_map;
    }
 




More information about the mesa-commit mailing list