[PATCH 2/4] wined3d: Do not use double-buffered dynamic buffers

Stefan Dösinger stefan at codeweavers.com
Tue Feb 28 06:46:29 CST 2012


Am Dienstag, 28. Februar 2012, 13:05:36 schrieb Henri Verbeet:
> I don't find this all that convincing either. My impression is that
> the reason we have these kinds of problems is mostly that the buffer
> conversion code is broken. I don't think there are legitimate cases
> where not creating a VBO should improve performance.
There's no conversion involved. 30019 uses double-buffered buffers because it 
falls back to drawStridedSlow for material source tracking. 29897 and 29079 
also have double-buffered buffers without conversion too, I assume because of 
instanced draws.

buffer_direct_upload is working correctly and the gl buffer is mapped with 
GL_MAP_UNSYNCHRONIZED_BIT or GL_MAP_INVALIDATE_BUFFER_BIT, depending on the 
lock flags the buffer used. The performance hit comes from the memcpy, not the 
buffer map. This is particularly bad in 30019 because d3d7 forces us to memcpy 
the entire buffer. I added some dummy writes to the start and the end of the 
buffer instead of the memcpy to make sure the driver is forced to upload data.

It's not a minor performance difference. In 30019 it's 65 fps vs 0.67 fps. The 
d3d9 bugs are less severe, but in Serious Sam HD the framerate is still cut in 
half.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20120228/4d084078/attachment.pgp>


More information about the wine-devel mailing list