mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Merge pull request #3355 from mimimi085181/partial-texture-updates-check-dimensions
Partial texture updates: Check the dimensions of the efb copy
This commit is contained in:
@ -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(),
|
||||
|
@ -168,7 +168,7 @@ void TextureCache::TCacheEntry::CopyRectangleFromTexture(
|
||||
0,
|
||||
dstrect.GetWidth(),
|
||||
dstrect.GetHeight(),
|
||||
1);
|
||||
srcentry->config.layers);
|
||||
return;
|
||||
}
|
||||
else if (!framebuffer)
|
||||
|
Reference in New Issue
Block a user