diff options
author | Robin Kertels <robin.kertels@gmail.com> | 2023-08-09 16:27:16 +0300 |
---|---|---|
committer | Philip Rebohle <25567304+doitsujin@users.noreply.github.com> | 2023-08-10 14:45:40 +0300 |
commit | 0746a3b91afa5ef0ae53fbd1fb707483b4d76844 (patch) | |
tree | ee9a1965e96c3516f58816e90b6a95e7b0a2e6e0 | |
parent | 429555a540761bd5201a391e62452c0e6448fb28 (diff) |
[d3d9] Don't resolve an image with 1 sample
-rw-r--r-- | src/d3d9/d3d9_device.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 6c0f802a..91b61a39 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -4536,9 +4536,12 @@ namespace dxvk { if (pResource->GetImage() != nullptr) { Rc<DxvkImage> resourceImage = pResource->GetImage(); - Rc<DxvkImage> mappedImage = resourceImage->info().sampleCount != 1 - ? pResource->GetResolveImage() - : std::move(resourceImage); + Rc<DxvkImage> mappedImage; + if (resourceImage->info().sampleCount != 1) { + mappedImage = pResource->GetResolveImage(); + } else { + mappedImage = std::move(resourceImage); + } // When using any map mode which requires the image contents // to be preserved, and if the GPU has write access to the |