Question about unloadVertexData

H. Verbeet hverbeet at gmail.com
Wed Nov 22 10:24:41 CST 2006


On 22/11/06, Stefan Dösinger <stefandoesinger at gmx.at> wrote:
> I noticed that loadVertexData already disables stream sources that aren't
> available in the current draws, while loadNumberedArrays doesn't. Do we need
> unloadVertexData at all? Or are non-drawing operations or drawStridedSlow
> affected by arrays?
Well, the issue is when you switch between fixed function and shader
based drawing. Eg, if an array from a previous fixed function draw
primitive call is still active while drawing with a shader, you can
potentially access the fixed function array beyond its bounds. That
was the actual issue that prompted me to write the patch, and it
turned out to also fix the 3DMark03 VBO performance regression.

Another issue which you might run into with you state management work
is that at least on nVidia hardware the fixed function and shader
arrays are aliases for eachother.

> Background is that I'm atm working on using dirtification to manage stream
> sources. So far the state management is progressing nicely, what is missing
> atm are Shaders, re-enabling register combiners and fixing regressions which
> slipped in(hl2 and bf1942). Then optimizations :-)
Something that occured to me yesterday after we talked on IRC is that
we should probably use glPushClientAttrib / glPopClientAttrib to do
the disabling after we're done drawing.



More information about the wine-devel mailing list