From: Olivier G. <gal...@po...> - 2010-03-01 14:25:01
|
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, 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. And if you want to be sure that validate passes implies draw will work, it's often more than a bunch of adds. Allocations can fail even if the apparent free space is enough. See "fragmentation" and "alignment", among others. Morality: reduce the number of operations in the normal (often called fast) path *first*, ask questions later. Trying to predict failures is both unreliable and costly. Xorg/mesa is perceived slow enough as it is. OG. |