ID3D11Device::Map, or how to make fast updates of vertex buffers

Started by
10 comments, last by PLCrashy 11 years, 8 months ago

english is not my native language

Your post’s English was better than most native speakers’ English.
The only problem was, “an usage”, which should be, “a usage”.




You can also check the ID3D11DeviceContext::CopySubresourceRegion function and check how it performs.

Related to previous quote.
[/quote]
I don’t see how the previous quote (a reminder to the audience: It was about updating the whole buffer at once) has any relevance.

ID3D11DeviceContext::CopySubresourceRegion() was the correct answer. It allows you to update a portion of the buffer, which by default means that it is also possible to update the entire buffer all at once.

Use it and check the performance. It should be fine.
And if not, use double-buffering. It requires double the vertex storage but avoids the stall when the resource you want to modify is in the command buffer waiting to be used by the GPU.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Advertisement
Sorry for the long delays, a lot of other problems to resolve :)

CopySubresourceRegion is already used to copy from one buffer to another in Ogre D3D11 implementation. However, when the size to copy is equal to the size of the destination buffer, CopySubresource is used.
I think that CopyResource is as fast as CopySubresourceRegion when copying the whole buffer, isn't it? It would be really weird if it wasn't.

This topic is closed to new replies.

Advertisement