There's a good presentation about this: Don't Throw It All Away: Efficient Buffer Management by John McDonald at NVIDIA. It covers various topics, but on the subject of your question, the general advice is to create buffers with dynamic usage and use Map()
with D3D11_MAP_WRITE_DISCARD
, when the data needs to be updated frequently (like every frame, or multiple times per frame). This would be used for constant buffers, vertex buffers for particle systems, and suchlike.
According to the presentation, default usage / UpdateSubresource()
incurs more CPU overhead than dynamic usage / Map()
. However, he does recommend default usage / UpdateSubresource()
for data that needs to be updated only once in awhile, such as data streamed in from disk in an open-world game.
And yes, in the case where you use UpdateSubresource()
, you would use it by itself, not in combination with Map()
.