Hi all.
I came across an issue today with the D3D11DeviceContext->Draw method. In a nutshell, after hours of pulling out what little hair I have left... I was able to find out the that if I did the following:
- set the vertex buffer
- map the vertex buffer
- update the vertex buffer contents
- unmap the vertex buffer
- use the context->Draw method to draw some lines
- repeat 2 to 5 multiple times
then the gpu didn't actually calculate the output vertices correctly. In RenderDoc I can see that the map update did succeed as the vertex buffer contents are changing, however the output vertex positions would all be the same values as if the gpu was only using just the first piece of mapped data. Rather strange for a state machine. So I tried this order:
- map the vertex buffer
- update the vertex buffer
- unmap the vertex buffer
- set the vertex buffer
- context->Draw
- repeat 1 to 5 multiple times
and everything is drawing as expected.
Is this normal/expected or could this some kind of bug?