libobs-d3d11: Only load vertex buffer before drawing

Fixes a bug where loading vertex shaders could cause error messages
about mismatching vertex buffer data to appear because the vertex shader
would try to reload the previously used vertex buffer.
This commit is contained in:
jp9000
2017-05-15 23:35:50 -07:00
parent 6e1c4caf99
commit ea6efc9514
3 changed files with 29 additions and 15 deletions

View File

@@ -789,6 +789,9 @@ struct gs_device {
gs_pixel_shader *curPixelShader = nullptr;
gs_swap_chain *curSwapChain = nullptr;
gs_vertex_buffer *lastVertexBuffer = nullptr;
gs_vertex_shader *lastVertexShader = nullptr;
bool zstencilStateChanged = true;
bool rasterStateChanged = true;
bool blendStateChanged = true;
@@ -829,6 +832,8 @@ struct gs_device {
void UpdateRasterState();
void UpdateBlendState();
void LoadVertexBufferData();
inline void CopyTex(ID3D11Texture2D *dst,
uint32_t dst_x, uint32_t dst_y,
gs_texture_t *src, uint32_t src_x, uint32_t src_y,