diff options
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(), |
