Originally posted by iive
View Post
Originally posted by iive
View Post
Originally posted by iive
View Post
https://www.khronos.org/registry/Ope...ate_access.txt
Even that the API documentation on khronos will lead you to a false point of view. You need to read the specifications for each opengl extension and find the extension the function comes from and read the operational requirements.
The difference between glMapBufferRange and glMapNamedBufferRange. Turns out that glMapNamedBufferRange is from the ARB_direct_state_access of 4.5.
Due to glMapBufferRange being from opengl 3.0 Its the horrible using the old opengl `bind-to-edit'. So using glMapBufferRange before modification object has to be bound to a opengl context and has to be checked that its bound to a opengl context(and not bound to multi contexts hello thread lock).
When you see Named in the new 4.5 function names this is saying direct state access function none of this old bind-to-edit requirement just check the buffer if I can get operational lock on that go for it..
Other than the fact that glMapBufferRange could lock multi parts like the context while attempting to get approve and go a gpu sync due to bind-to-edit there is no other difference to glMapNamedBufferRange function. Of course glMapBufferRange is going to eat more cpu time and have higher latency than glMapNamedBufferRange if both functions are implemented to extension specifications.
ARB_direct_state_access for 4.5 opengl adds a lot of functions most with the word Named in that can be swapped one for one for functions without the Named in name removing heck load of locking. Yes ARB_direct_state_access over 50 new functions in one hit.
Yes current wined3d uses glMapBufferRange in all cases no use glMapNamedBufferRange even if it available. So there is a lot of low hanging fruit for optimisation like this one. But a lot of it requires pushing opengl version up.
Originally posted by iive
View Post
QUOTE=iive;n1011416]Once again, your arguments are making the point I've been trying to make, that Gallium Nine is better approach than OpenGL.
It also explains why it was able to achieve consistently better results in much shorter time and with less effort.[/QUOTE]
But Gallium Nine has not address the problem of how to use FBO from opengl in direct x or how to use direct x buffers in opengl. Galluim nine has avoided lot of the multi version DX problems and DX with opengl problems. Those are hard problems in their own rights.
When you understand the effects of opengl "bind to edit" feature on ability to thread of course being able to sit on Gallium and avoid that gave you a huge speed advantage and still gives you a huge speed advantage due to wined3d still not using the faster newer paths. Some of the reason is that people see that in khronos API documentation that they newer functions read identical to the old ones so totally not aware there is a performance difference of quite a few orders of magnitude and you work that out when you read the extension where the function was declared .
Bind to edit also causes lot higher cpu usage when you cannot order you operations how opengl likes due to having binding conflicts.
I am really not sure if Gallium Nine is a better approach if you had wined3d using newer better performing opengl functions that are arguement identical to the old ones. I do know that the performance difference between Gallium Nine and wined3d should not be as large as it currently is if we can get to using 4.3-4.6 opengl functions where possible. Yes this makes OS X a nightmare sticking on 4.1 that means you have the "bind to edit" crap.
The "bind to edit" is at least in the top 10 of the worst design mistakes of early opengl. In that top 10 was not being thread safe as well.
This is one of the things I find highly stupid. Lower down stuff like Galluim added a lot of threading then the opengl layer on top using "bind to edit" and other evil like it effectively made that lower threading work not accessible to opengl programs these evils only start being properly addressed in the 2012 and latter versions of opengl.
Vulkan starts off with multi thread and min locking in the base design. But it still leaves us with the problem we need to support opengl dx hybrid applications.
Comment