[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mesa3d-dev
Subject:    Re: [Mesa-dev] [PATCH 1/7] mesa: implement glBindBuffersBase() and gl BindBuffersRange()
From:       Fredrik =?iso-8859-1?q?H=F6glund?= <fredrik () kde ! org>
Date:       2014-01-07 7:49:50
Message-ID: 201401070849.50643.fredrik () kde ! org
[Download RAW message or body]

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic