by mh » Tue Feb 21, 2017 2:16 pm
I believe that compiled vertex arrays existed purely as an optimization for software T&L cards doing multipass rendering.
The idea is that by locking the arrays you tell your driver that you're not going to be modifying them until you unlock; at that point the driver can run vertex transforms, optimize them (whatever that means), and transfer them to GPU memory (if it determines there is an advantage to doing so, which would be very implementation-dependent behaviour). From there you can run your multiple passes, and the key thing is that no matter how many passes you run, the vertex arrays are only transformed and otherwise processed once.
The CVA spec also contains a statement that "If the vertex array data is locked while the DrawElements commands are executed, then OpenGL may be able to transform each of these shared vertexes just once" - however, this is behaviour that you don't actually need CVA for any more. In fact it's just the , which happens automatically anyway.
That's a danger in relying on 1998 specs and other documents when it comes to OpenGL.