[d3d9] Don't resolve an image with 1 sample

This commit is contained in:
Robin Kertels 2023-08-09 15:27:16 +02:00 committed by Philip Rebohle
parent 429555a540
commit 0746a3b91a
1 changed files with 6 additions and 3 deletions

View File

@ -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