Even if so, that means an extra allocation and free by the driver, which is a costly operation.Does the DISCARD flag not give me a new location in memory to use or am I thinking of this wrong?
Even though that might be and I'm sure it is, because it makes tons of sense that the GPU would need to allocate more memory. But isn't that what the DISCARD flag and the use of Dynamic buffer is designed for?
You still need the buffers to be D3D11_USAGE_DYNAMIC and update with D3D11_MAP_WRITE on the buffer that is not being used by the GPU.But what I am a little confused about is, are you saying to only use the DISCARD flag. Does this not defeat the purpose of using a dynamic buffer and reusing buffer slots with NO OVERWRITE?
I assume I need to be at the beginning of my buffer in order to use D3D11_MAP_WRITE correctly, also that this will always no matter what, overwrite the content in the buffers. Right?
If so how does this not create the issue where I'm writing to the buffer, send it to the GPU, and then I start writing to the buffer again before it is ready? Or does calling DrawIndexed send everything off to the GPU and the buffers get "flushed" in the sense that it does not matter if I overwrite the content because the GPU gets a copy or etc to use