[4/5] WineD3D: Emulate tracking of multiple material properties
Stefan Dösinger
stefandoesinger at gmx.at
Tue Jun 19 07:22:56 CDT 2007
This patch contains some already discussed code which removes vbos from the
strided vertex data to be able to process that data in drawStridedSlow. I
still think that modifying the strided vertex data in a local copy is the
only usable way. The alternatives I could think of have major drawbacks:
*) glMapBuffer the vbo to allow drawstridedslow to read from the vbo: OpenGL
discourages reading from vbos. Our current setup allows us to create write
only vbos, which makes the life easier for the driver. Readback is generally
considered evil.
*) use glArrayElement
This would allow specifcying a vertex from a stream, but it would not be able
to return the data needed to perform the material tracking emulation. The
original problem still remains
*) Have a 2nd pointer in the strided data which points to the system memory
copy: Would fix the problem, but add a lot of extra code to the vertex stream
handling which is not needed for 99.9% of all draws. I want to keep the
regular hardware accelerated path free from software acceleration related
things
*) Make the state management catch the sw fallback and load the sysmem
pointers instead of vbo pointers: Simmilar to the former solution. It would
make the state and strean tracking much more complex and would add a lot of
complexits thats is not needed in the average case.
Replacing vbos in drawprim limits the problem to the software fallback case,
avoids negative side effects, doesn't make hardware draws more complex and
slower and doesn't add needless redundant information to the strided vertex
structure.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-WineD3D-Emulate-tracking-of-multiple-material-prope.patch
Type: text/x-diff
Size: 7468 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070619/8022011f/0004-WineD3D-Emulate-tracking-of-multiple-material-prope.bin
More information about the wine-patches
mailing list