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

@@ -287,6 +287,8 @@ void gs_shader::UploadParams()
void gs_shader_destroy(gs_shader_t *shader)
{
if (shader && shader->device->lastVertexShader == shader)
shader->device->lastVertexShader = nullptr;
delete shader;
}