From: Jerome G. <gl...@fr...> - 2010-03-01 14:03:32
|
On Mon, Mar 01, 2010 at 01:40:37PM +0100, Olivier Galibert wrote: > On Mon, Mar 01, 2010 at 12:55:09PM +0100, Jerome Glisse wrote: > > So you don't like the pipe_context::validate() of Jose ? My > > taste goes to the pipe_context::validate() and having state > > tracker setting the proper flag according to the API they > > support (GL_OUT_OF_MEMORY for GL), this means just drop > > rendering command that we can't do. > > validate-then-do is a race condition waiting to happen. Validate is > also a somewhat costly operation to do, and 99.999% of the time for > nothing. You don't want to optimize for the error case, and that's > what validate *is*. > > OG. > validate function i have in mind as virtualy a zero cost (it will boil down to a bunch of add followed by a test) and what validate would do would be done by draw operation anyway. Cheers, Jerome |