diff options
| author | magumagu <magumagu9@gmail.com> | 2015-01-27 18:25:35 -0800 |
|---|---|---|
| committer | magumagu <magumagu9@gmail.com> | 2015-01-27 18:25:35 -0800 |
| commit | 0030ad9ecfc356fd11b2a2bfa5565250dadbaed9 (patch) | |
| tree | 9867253186487acd387d7985fd73a31c09a7130d /Source/Core/VideoBackends/D3D/TextureCache.cpp | |
| parent | beaa9905a699694c7a111dbf694c47ece48fd273 (diff) | |
Fix D3D regression from PR1948.
Make sure we don't have a texture bound as both an ShaderResourceView and
a RenderTargetView; this causes rendering glitches.
This isn't really the right place to do this... but I'm not sure
how the code should be structured.
Diffstat (limited to 'Source/Core/VideoBackends/D3D/TextureCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/TextureCache.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/D3D/TextureCache.cpp b/Source/Core/VideoBackends/D3D/TextureCache.cpp index 488bc3ecc0..73d45f9ad2 100644 --- a/Source/Core/VideoBackends/D3D/TextureCache.cpp +++ b/Source/Core/VideoBackends/D3D/TextureCache.cpp @@ -153,6 +153,10 @@ void TextureCache::TCacheEntry::FromRenderTarget(u32 dstAddr, unsigned int dstFo else D3D::SetPointCopySampler(); + // Make sure we don't draw with the texture set as both a source and target. + // (This can happen because we don't unbind textures when we free them.) + D3D::stateman->UnsetTexture(texture->GetSRV()); + D3D::context->OMSetRenderTargets(1, &texture->GetRTV(), nullptr); // Create texture copy |
