[Mesa-dev] mesa draw-instance topic v. point-only rendering in VTK tests

Brad King brad.king at kitware.com
Mon Jan 17 08:33:47 PST 2011


On 01/17/2011 11:18 AM, Brian Paul wrote:
> On Mon, Jan 17, 2011 at 8:58 AM, Brad King <brad.king at kitware.com> wrote:
>> I think a63486ac is the first commit that exhibits the behavior.
> 
> Have you tried reversing that change?

I started at ef3b8042 and ran "git revert a63486ac".  I resolved one
conflict (machine v. &machine) and compiled.  The issue disappeared.

> Perhaps prim[i].num_instances is zero.  Could you try debugging that?
> Maybe add an assertion that prim[i].num_instances > 0 then check the
> stack trace if it fails.

I started at ef3b8042 and added the assertion as shown below [1].  I get:

vtk: tnl/t_draw.c:474: _tnl_draw_prims: Assertion `prim[i].num_instances > 0' failed.

Using gdb I get the backtrace below [2].

Thanks,
-Brad


[1] assert:

diff --git a/src/mesa/tnl/t_draw.c b/src/mesa/tnl/t_draw.c
index bdb893e..616ee88 100644
--- a/src/mesa/tnl/t_draw.c
+++ b/src/mesa/tnl/t_draw.c
@@ -471,6 +471,7 @@ void _tnl_draw_prims( struct gl_context *ctx,
 	 /* Binding inputs may imply mapping some vertex buffer objects.
 	  * They will need to be unmapped below.
 	  */
+	 assert(prim[i].num_instances > 0);
          for (inst = 0; inst < prim[i].num_instances; inst++) {

             bind_prims(ctx, &prim[i], this_nr_prims);

[2] backtrace:

#0  0x00007fffed636165 in *__GI_raise (sig=<value optimized out>) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#1  0x00007fffed638f70 in *__GI_abort () at abort.c:92
#2  0x00007fffed62f2b1 in *__GI___assert_fail (assertion=0x7fffec3fcbf5 "prim[i].num_instances > 0", file=<value optimized out>, line=474,
    function=0x7fffec3fcca0 "_tnl_draw_prims") at assert.c:81
#3  0x00007fffec2833dc in _tnl_draw_prims (ctx=<value optimized out>, arrays=<value optimized out>, prim=0x0, nr_prims=<value optimized out>,
    ib=<value optimized out>, min_index=0, max_index=2999) at tnl/t_draw.c:474
#4  0x00007fffec2834b6 in _tnl_vbo_draw_prims (ctx=0x9ebbf0, arrays=0xa400d8, prim=0x7fffffffb7d4, nr_prims=1, ib=0x0, index_bounds_valid=<value optimized out>,
    min_index=0, max_index=2999) at tnl/t_draw.c:384
#5  0x00007fffec39fb6b in flush_vertex (ctx=<value optimized out>, arrays=<value optimized out>, prim=<value optimized out>, nr_prims=<value optimized out>,
    ib=<value optimized out>, min_index=<value optimized out>, max_index=5460, draw=0x7fffec283450 <_tnl_vbo_draw_prims>, limits=0x7fffffffbbe0)
    at vbo/vbo_split_inplace.c:85
#6  split_prims (ctx=<value optimized out>, arrays=<value optimized out>, prim=<value optimized out>, nr_prims=<value optimized out>, ib=<value optimized out>,
    min_index=<value optimized out>, max_index=5460, draw=0x7fffec283450 <_tnl_vbo_draw_prims>, limits=0x7fffffffbbe0) at vbo/vbo_split_inplace.c:193
#7  vbo_split_inplace (ctx=<value optimized out>, arrays=<value optimized out>, prim=<value optimized out>, nr_prims=<value optimized out>,
    ib=<value optimized out>, min_index=<value optimized out>, max_index=5460, draw=0x7fffec283450 <_tnl_vbo_draw_prims>, limits=0x7fffffffbbe0)
    at vbo/vbo_split_inplace.c:280
#8  0x00007fffec283215 in _tnl_draw_prims (ctx=<value optimized out>, arrays=<value optimized out>, prim=<value optimized out>, nr_prims=<value optimized out>,
    ib=<value optimized out>, min_index=0, max_index=5460) at tnl/t_draw.c:445
#9  0x00007fffec2834b6 in _tnl_vbo_draw_prims (ctx=0x9ebbf0, arrays=0xa400d8, prim=0xa3e6f4, nr_prims=1, ib=0x0, index_bounds_valid=<value optimized out>,
    min_index=0, max_index=5460) at tnl/t_draw.c:384
#10 0x00007fffec270a8e in vbo_exec_vtx_flush (exec=0xa3e410, unmap=0 '\000') at vbo/vbo_exec_draw.c:382
#11 0x00007fffec2642a2 in vbo_exec_wrap_buffers (exec=0xa3e410) at vbo/vbo_exec_api.c:88
#12 vbo_exec_vtx_wrap (exec=0xa3e410) at vbo/vbo_exec_api.c:123
#13 0x00007ffff1099be6 in [VTK]



More information about the mesa-dev mailing list