You are absolutly right. I followed the way specification illustrate implementation for simplicity reasons but had always in mind that this was not the way to get any performance benefit and hoped that I are somebody else could improve this later. That's a great thing you already did this and don't be sorry about that, there's still lot of work in Mesa I could focus on instead :)
2014/1/7 Fredrik Höglund <fred...@kde.org>: > Maxence, while I think it's great that you're interested in working > on this extension, I'm afraid I have another implementation in > a branch in my mesa tree: > > http://cgit.freedesktop.org/~fredrik/mesa/log/?h=arb-multi-bind > > I've looked at your patches, and noticed you've implemented the > functions by calling the _mesa_Bind*() functions in a loop. I know > that the specification uses examples that look very much like this > to illustrate the intended effect of calling each function. But when > actually implemented in this this way you don't get the performance > benefit you would get by writing a specialized implementation of > each function. > > For example you can avoid locking the mutex that protects the hash > table more than once when you look up the pointers to the objects. > There is also some state validation that doesn't need to be repeated > for each object. > > Another downside is that when an error occurs, the _mesa_Bind*() > functions will report the wrong entry point in the error message. > The quality of those messages is important now that we support > KHR_debug, because they are reported to the client. > > While your implementation is simpler than mine, I think my approach > is better in the long term. But I think others should chime in on this. > > Fredrik > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev