Roland Scheidegger wrote: > Jose Rodriguez wrote: >> On 30/10/2007, *Roland Scheidegger* <[EMAIL PROTECTED] >> <mailto:[EMAIL PROTECTED]>> wrote: >> >> Hmm, so max_index is -1. Apparently gtkradiant has called drawArrays >> with a count of 0 (which is legal though pretty much a no-op), it seems >> we don't handle that correctly. (calculating start + count - 1 is a >> problem there...). I'd guess the solution for that is checking for count >> == 0 and returning early in vbo_exec_DrawArrays in this case. Maybe the >> same problem can be found in other places, haven't really looked at it >> (e.g. the drawelements functions). >> >> Roland >> >> >> >> Should I open a bug report about this? Would building DRI from git make >> any difference? Is there anything else I could do in terms of a) >> providing information and b) solving my inability to run this software? > > git master still would have the same problem as far as I can see. > The attached simple patch might fix the problem, if it really is what I > think it is :-). > I'm a bit unsure if DrawElements might have a similar problem, the same > problem shouldn't happen but maybe others later... > > Roland > > > ------------------------------------------------------------------------ > > diff --git a/configs/linux-debug b/configs/linux-debug > diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c > index 1e4c310..abe5741 100644 > --- a/src/mesa/vbo/vbo_exec_array.c > +++ b/src/mesa/vbo/vbo_exec_array.c > @@ -240,6 +240,9 @@ vbo_exec_DrawArrays(GLenum mode, GLint s > if (!_mesa_validate_DrawArrays( ctx, mode, start, count )) > return; > > + if (!count) > + return; > + > FLUSH_CURRENT( ctx, 0 ); > > if (ctx->NewState)
The proper fix is to do the check in _mesa_validate_DrawArrays() as is done for DrawElements and DrawRangeElements. I'll take care of it. -Brian ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel