From: Roland S. <sr...@tu...> - 2007-10-31 15:57:47
|
Brian Paul wrote: > Roland Scheidegger wrote: >> 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. Ah right. Thought it's only used for checking if the arguments are legal (due to the function name), not if they are legal but lead to no-op. Apparently that's not the case... Roland |