Permalink
Browse files

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.
  • Loading branch information...
unknownbrackets committed Nov 11, 2017
1 parent f93ef92 commit 9cf17d92880bc81fc5b1b3b8939e537c8f98d64a
Showing with 4 additions and 2 deletions.
  1. +2 −2 GPU/D3D11/DrawEngineD3D11.h
  2. +2 −0 GPU/D3D11/GPU_D3D11.cpp
@@ -146,6 +146,8 @@ class DrawEngineD3D11 : public DrawEngineCommon {
void Resized() override;
void ClearInputLayoutMap();
private:
void DecodeVerts();
void DoFlush();
@@ -154,8 +156,6 @@ class DrawEngineD3D11 : public DrawEngineCommon {
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
@@ -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) {

0 comments on commit 9cf17d9

Please sign in to comment.