D3D11: Clear input layouts on shader clear.

When we do clear shaders, make sure to also clear input layouts so we
don't have corrupt keys.
This commit is contained in:
Unknown W. Brackets 2017-11-11 08:11:10 -08:00
parent f93ef92960
commit 9cf17d9288
2 changed files with 4 additions and 2 deletions

View File

@ -146,6 +146,8 @@ public:
void Resized() override;
void ClearInputLayoutMap();
private:
void DecodeVerts();
void DoFlush();
@ -154,8 +156,6 @@ private:
void ApplyDrawStateLate(bool applyStencilRef, uint8_t stencilRef);
void ResetShaderBlending();
void ClearInputLayoutMap();
ID3D11InputLayout *SetupDecFmtForDraw(D3D11VertexShader *vshader, const DecVtxFormat &decFmt, u32 pspFmt);
void MarkUnreliable(VertexArrayInfoD3D11 *vai);

View File

@ -278,6 +278,7 @@ void GPU_D3D11::DeviceLost() {
// Simply drop all caches and textures.
// FBOs appear to survive? Or no?
shaderManagerD3D11_->ClearShaders();
drawEngine_.ClearInputLayoutMap();
textureCacheD3D11_->Clear(false);
framebufferManagerD3D11_->DeviceLost();
}
@ -742,6 +743,7 @@ void GPU_D3D11::ClearCacheNextFrame() {
void GPU_D3D11::ClearShaderCache() {
shaderManagerD3D11_->ClearShaders();
drawEngine_.ClearInputLayoutMap();
}
void GPU_D3D11::DoState(PointerWrap &p) {