[Mesa-dev] mesa draw-instance topic v. point-only rendering in VTK tests
Brad King
brad.king at kitware.com
Mon Jan 17 08:55:18 PST 2011
On 01/17/2011 11:46 AM, Brian Paul wrote:
> Does the attached patch help?
Yes, that fixes it. The assertion no longer fails and the test passes.
Total resulting patch on top of ef3b8042 appears below.
Thanks,
-Brad
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);
diff --git a/src/mesa/vbo/vbo_split_inplace.c b/src/mesa/vbo/vbo_split_inplace.c
index 789cf31..fd5044f 100644
--- a/src/mesa/vbo/vbo_split_inplace.c
+++ b/src/mesa/vbo/vbo_split_inplace.c
@@ -178,6 +178,7 @@ static void split_prims( struct split_context *split)
outprim->end = (nr == remaining && prim->end);
outprim->start = prim->start + j;
outprim->count = nr;
+ outprim->num_instances = prim->num_instances;
update_index_bounds(split, outprim);
More information about the mesa-dev
mailing list