diff options
author | marha <marha@users.sourceforge.net> | 2012-12-05 09:14:52 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-12-05 09:14:52 +0100 |
commit | e82692e521240c5f8592f9ce56c9d5b3d68870ec (patch) | |
tree | 3293b7fa02b1f5aa58b74f1fe02444085be2281e /mesalib/src/gallium/auxiliary/util/u_draw.c | |
parent | b8da71ffb17d3d16706db04115e9ba1dd8bc49b9 (diff) | |
download | vcxsrv-e82692e521240c5f8592f9ce56c9d5b3d68870ec.tar.gz vcxsrv-e82692e521240c5f8592f9ce56c9d5b3d68870ec.tar.bz2 vcxsrv-e82692e521240c5f8592f9ce56c9d5b3d68870ec.zip |
mesa git update 5 dec 2012
mesa: 484a8dcfa8c8b91b8e99174b5e4953264f32789e
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_draw.c')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_draw.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_draw.c b/mesalib/src/gallium/auxiliary/util/u_draw.c index 5b3c41231..83d9284b8 100644 --- a/mesalib/src/gallium/auxiliary/util/u_draw.c +++ b/mesalib/src/gallium/auxiliary/util/u_draw.c @@ -108,8 +108,15 @@ util_draw_max_index( else { /* Per-instance data. Simply make sure the state tracker didn't * request more instances than those that fit in the buffer */ - assert((info->start_instance + info->instance_count)/element->instance_divisor - <= (buffer_max_index + 1)); + if ((info->start_instance + info->instance_count)/element->instance_divisor + > (buffer_max_index + 1)) { + /* FIXME: We really should stop thinking in terms of maximum + * indices/instances and simply start clamping against buffer + * size. */ + debug_printf("%s: too many instances for vertex buffer\n", + __FUNCTION__); + return 0; + } } } } |