On Mon, 2010-03-01 at 06:24 -0800, Olivier Galibert wrote: > On Mon, Mar 01, 2010 at 02:57:08PM +0100, Jerome Glisse wrote: > > 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. > > Not "would", "will". You have no way to be sure nothing changed > between validate and draw,
pipe_contexts are not re-entrant. > unless you're happy with an interface that > will always be unusable for multithreading. So you'll do it twice for > something that will always tell "yes" except once in a blue moon. The current procedure is: pipe->bind_this_state(); pipe->bind_that_state(); pipe->set_this_state(); pipe->set_that_state(); pipe->draw(); Making it pipe->bind_this_state(); pipe->bind_that_state(); pipe->set_this_state(); pipe->set_that_state(); if(pipe->validate() == PIPE_OUT_OF_MEMORY) return GL_OUT_OF_MEMORY; pipe->draw(); Makes it no better, no worse in terms of race conditions. Jose ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Mesa3d-dev mailing list Mesa3d-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mesa3d-dev