Commit a3804ba1daf929a7299bd7e7a6eb855bc447598e

Ryan C. Gordon 2019-09-01T22:41:44

d3d11: Fixed VB state, avoiding unnecessary recreation (Thanks, Alex!). Fixes Bugzilla #4779.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c
index ef5db84..d75da71 100644
--- a/src/render/direct3d11/SDL_render_d3d11.c
+++ b/src/render/direct3d11/SDL_render_d3d11.c
@@ -1862,6 +1862,8 @@ D3D11_UpdateVertexBuffer(SDL_Renderer *renderer,
             return -1;
         }
 
+        rendererData->vertexBufferSizes[vbidx] = dataSizeInBytes;
+
         ID3D11DeviceContext_IASetVertexBuffers(rendererData->d3dContext,
             0,
             1,