Mesa (master): i965/gen7: Fix segfault in transform feedback to DYNAMIC_DRAW buffers.

Eric Anholt anholt at kemper.freedesktop.org
Wed Jan 11 12:06:48 PST 2012


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

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jan  2 14:03:59 2012 -0800

i965/gen7: Fix segfault in transform feedback to DYNAMIC_DRAW buffers.

Fixes piglit EXT_transform_feedback/buffer-usage.

---

 src/mesa/drivers/dri/i965/gen7_sol_state.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/gen7_sol_state.c b/src/mesa/drivers/dri/i965/gen7_sol_state.c
index 04783ec..110c166 100644
--- a/src/mesa/drivers/dri/i965/gen7_sol_state.c
+++ b/src/mesa/drivers/dri/i965/gen7_sol_state.c
@@ -53,7 +53,8 @@ upload_3dstate_so_buffers(struct brw_context *brw)
     * gl_transform_feedback_object.
     */
    for (i = 0; i < 4; i++) {
-      struct gl_buffer_object *bufferobj = xfb_obj->Buffers[i];
+      struct intel_buffer_object *bufferobj =
+	 intel_buffer_object(xfb_obj->Buffers[i]);
       drm_intel_bo *bo;
       uint32_t start, end;
       uint32_t stride;
@@ -72,7 +73,7 @@ upload_3dstate_so_buffers(struct brw_context *brw)
 	 continue;
       }
 
-      bo = intel_buffer_object(bufferobj)->buffer;
+      bo = intel_bufferobj_buffer(intel, bufferobj, INTEL_WRITE_PART);
       stride = linked_xfb_info->BufferStride[i] * 4;
 
       start = xfb_obj->Offset[i];



More information about the mesa-commit mailing list