From 4edaade185c1b73aa03459a3dae960be9f2b9396 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Mon, 9 Aug 2021 02:37:34 +0100 Subject: [PATCH] [dxvk] Avoid needless refcount in copyImageFb --- src/dxvk/dxvk_context.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 53b19e08..d55b3529 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -3360,7 +3360,7 @@ namespace dxvk { && (dstImage->info().usage & tgtUsage); // If needed, create a temporary render target for the copy - Rc tgtImage = dstImage; + Rc tgtImage; VkImageSubresourceLayers tgtSubresource = dstSubresource; VkOffset3D tgtOffset = dstOffset; @@ -3385,6 +3385,8 @@ namespace dxvk { tgtSubresource.baseArrayLayer = 0; tgtOffset = { 0, 0, 0 }; + } else { + tgtImage = dstImage; } // Create source and destination image views