Program received signal SIGSEGV, Segmentation fault. 0x00007ffff3227964 in _mesa_compute_max_transform_feedback_vertices (obj=0x6c5dd0, info=0x50) at ../../src/mesa/main/transformfeedback.c:357 357 for (i = 0; i < info->NumBuffers; ++i) { (gdb) bt #0 0x00007ffff3227964 in _mesa_compute_max_transform_feedback_vertices (obj=0x6c5dd0, info=0x50) at ../../src/mesa/main/transformfeedback.c:357 #1 0x00007ffff3532d31 in brw_begin_transform_feedback (ctx=0x7ffff7fa4040, mode=0, obj=0x6c5dd0) at gen6_sol.c:258 #2 0x00007ffff3227cd2 in _mesa_BeginTransformFeedback (mode=0) at ../../src/mesa/main/transformfeedback.c:483 #3 0x00007ffff7985410 in glBeginTransformFeedback (mode=0) at ../../src/mapi/glapi/glapi_mapi_tmp.h:7072 #4 0x0000000000401709 in display () at main.c:157 #5 0x00007ffff76b9244 in ?? () from /usr/lib/x86_64-linux-gnu/libglut.so.3 #6 0x00007ffff76bcaa9 in fgEnumWindows () from /usr/lib/x86_64-linux-gnu/libglut.so.3 #7 0x00007ffff76b97fd in glutMainLoopEvent () from /usr/lib/x86_64-linux-gnu/libglut.so.3 #8 0x00007ffff76ba065 in glutMainLoop () from /usr/lib/x86_64-linux-gnu/libglut.so.3 #9 0x00000000004017bb in main (nargs=1, args=0x7fffffffe208) at main.c:177 (gdb) f 0 #0 0x00007ffff3227964 in _mesa_compute_max_transform_feedback_vertices (obj=0x6c5dd0, info=0x50) at ../../src/mesa/main/transformfeedback.c:357 357 for (i = 0; i < info->NumBuffers; ++i) { (gdb) info args obj = 0x6c5dd0 info = 0x50 (gdb) f 1 #1 0x00007ffff3532d31 in brw_begin_transform_feedback (ctx=0x7ffff7fa4040, mode=0, obj=0x6c5dd0) at gen6_sol.c:258 258 unsigned max_index (gdb) info args ctx = 0x7ffff7fa4040 mode = 0 obj = 0x6c5dd0 (gdb) info locals brw = 0x7ffff7fa4040 shaderprog = 0x0 linked_xfb_info = 0x50 xfb_obj = 0x6c5dd0 __PRETTY_FUNCTION__ = "brw_begin_transform_feedback" max_index = 4 (gdb) list -20 228 229 free(brw_obj); 230 } 231 232 void 233 brw_begin_transform_feedback(struct gl_context *ctx, GLenum mode, 234 struct gl_transform_feedback_object *obj) 235 { 236 struct brw_context *brw = brw_context(ctx); 237 const struct gl_shader_program *shaderprog; (gdb) list 238 const struct gl_transform_feedback_info *linked_xfb_info; 239 struct gl_transform_feedback_object *xfb_obj = 240 ctx->TransformFeedback.CurrentObject; 241 242 assert(brw->gen == 6); 243 244 if (brw->geometry_program) { 245 /* BRW_NEW_GEOMETRY_PROGRAM */ 246 shaderprog = 247 ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]; (gdb) list 248 } else { 249 /* BRW_NEW_VERTEX_PROGRAM */ 250 shaderprog = 251 ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX]; 252 } 253 linked_xfb_info = &shaderprog->LinkedTransformFeedback; 254 255 /* Compute the maximum number of vertices that we can write without 256 * overflowing any of the buffers currently being used for feedback. 257 */ (gdb) print brw->geometry_program $1 = (const struct gl_geometry_program *) 0xaa74b0 (gdb) print ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY] $2 = (struct gl_shader_program *) 0x0 (gdb) print linked_xfb_info $3 = (const struct gl_transform_feedback_info *) 0x50 (gdb) l 258 unsigned max_index 259 = _mesa_compute_max_transform_feedback_vertices(xfb_obj, 260 linked_xfb_info); 261 262 /* 3DSTATE_GS_SVB_INDEX is non-pipelined. */ 263 intel_emit_post_sync_nonzero_flush(brw); 264 265 /* Initialize the SVBI 0 register to zero and set the maximum index. */ 266 BEGIN_BATCH(4); 267 OUT_BATCH(_3DSTATE_GS_SVB_INDEX << 16 | (4 - 2)); (gdb) print xfb_obj $4 = (struct gl_transform_feedback_object *) 0x6c5dd0 (gdb) print xfb_obj[0] $5 = {Name = 0, Label = 0x0, RefCount = 2, Active = 1 '\001', Paused = 0 '\000', EndedAnytime = 0 '\000', EverBound = 1 '\001', shader_program = 0x767650, GlesRemainingPrims = 0, BufferNames = {2, 0, 0, 0}, Buffers = {0x72ba30, 0x0, 0x0, 0x0}, Offset = {0, 0, 0, 0}, Size = {16, 0, 0, 0}, RequestedSize = {0, 0, 0, 0}}