1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-11 19:24:11 +01:00

[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

View File

@ -4536,9 +4536,12 @@ namespace dxvk {
if (pResource->GetImage() != nullptr) { if (pResource->GetImage() != nullptr) {
Rc<DxvkImage> resourceImage = pResource->GetImage(); Rc<DxvkImage> resourceImage = pResource->GetImage();
Rc<DxvkImage> mappedImage = resourceImage->info().sampleCount != 1 Rc<DxvkImage> mappedImage;
? pResource->GetResolveImage() if (resourceImage->info().sampleCount != 1) {
: std::move(resourceImage); mappedImage = pResource->GetResolveImage();
} else {
mappedImage = std::move(resourceImage);
}
// When using any map mode which requires the image contents // When using any map mode which requires the image contents
// to be preserved, and if the GPU has write access to the // to be preserved, and if the GPU has write access to the