diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2016-02-29 00:49:48 +0100 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2016-02-29 00:49:48 +0100 |
| commit | 961901daaec87de966ee3eb259060a9c2b651497 (patch) | |
| tree | 3bf09809abf8606ecb4ca76780e3d0dabd823e88 /Source/Core/VideoBackends/D3D/TextureCache.cpp | |
| parent | 9212f35b4c38a30c25a55428192ba7cfbc55a769 (diff) | |
| parent | bb4d636f34ab26c4c964cf83383d0694be6beb8c (diff) | |
Merge pull request #3355 from mimimi085181/partial-texture-updates-check-dimensions
Partial texture updates: Check the dimensions of the efb copy
Diffstat (limited to 'Source/Core/VideoBackends/D3D/TextureCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/TextureCache.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/Source/Core/VideoBackends/D3D/TextureCache.cpp b/Source/Core/VideoBackends/D3D/TextureCache.cpp index ef0158653d..ac8271fbb5 100644 --- a/Source/Core/VideoBackends/D3D/TextureCache.cpp +++ b/Source/Core/VideoBackends/D3D/TextureCache.cpp @@ -87,16 +87,14 @@ void TextureCache::TCacheEntry::CopyRectangleFromTexture( if (srcrect.GetWidth() == dstrect.GetWidth() && srcrect.GetHeight() == dstrect.GetHeight()) { - const D3D11_BOX *psrcbox = nullptr; D3D11_BOX srcbox; - if (srcrect.left != 0 || srcrect.top != 0) - { - srcbox.left = srcrect.left; - srcbox.top = srcrect.top; - srcbox.right = srcrect.right; - srcbox.bottom = srcrect.bottom; - psrcbox = &srcbox; - } + srcbox.left = srcrect.left; + srcbox.top = srcrect.top; + srcbox.right = srcrect.right; + srcbox.bottom = srcrect.bottom; + srcbox.front = 0; + srcbox.back = srcentry->config.layers; + D3D::context->CopySubresourceRegion( texture->GetTex(), 0, @@ -105,7 +103,7 @@ void TextureCache::TCacheEntry::CopyRectangleFromTexture( 0, srcentry->texture->GetTex(), 0, - psrcbox); + &srcbox); return; } else if (!config.rendertarget) @@ -132,7 +130,7 @@ void TextureCache::TCacheEntry::CopyRectangleFromTexture( srcentry->config.width, srcentry->config.height, PixelShaderCache::GetColorCopyProgram(false), VertexShaderCache::GetSimpleVertexShader(), - VertexShaderCache::GetSimpleInputLayout(), nullptr, 1.0, 0); + VertexShaderCache::GetSimpleInputLayout(), GeometryShaderCache::GetCopyGeometryShader(), 1.0, 0); D3D::context->OMSetRenderTargets(1, &FramebufferManager::GetEFBColorTexture()->GetRTV(), |
