summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache/util.cpp
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2021-11-19 03:17:54 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2021-11-19 03:17:54 +0100
commitb130f648d7c629411c487722f864c6bafcd2562c (patch)
tree5feb8b55b918553a0c50782438098174e528fbdc /src/video_core/texture_cache/util.cpp
parentVulkan: implement D24S8 <-> RGBA8 convertions. (diff)
downloadyuzu-b130f648d7c629411c487722f864c6bafcd2562c.tar
yuzu-b130f648d7c629411c487722f864c6bafcd2562c.tar.gz
yuzu-b130f648d7c629411c487722f864c6bafcd2562c.tar.bz2
yuzu-b130f648d7c629411c487722f864c6bafcd2562c.tar.lz
yuzu-b130f648d7c629411c487722f864c6bafcd2562c.tar.xz
yuzu-b130f648d7c629411c487722f864c6bafcd2562c.tar.zst
yuzu-b130f648d7c629411c487722f864c6bafcd2562c.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/texture_cache/util.cpp28
1 files changed, 24 insertions, 4 deletions
diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp
index ddc9fb13a..8f9eb387c 100644
--- a/src/video_core/texture_cache/util.cpp
+++ b/src/video_core/texture_cache/util.cpp
@@ -1151,17 +1151,37 @@ bool IsSubresource(const ImageInfo& candidate, const ImageBase& image, GPUVAddr
void DeduceBlitImages(ImageInfo& dst_info, ImageInfo& src_info, const ImageBase* dst,
const ImageBase* src) {
- if (src && GetFormatType(src->info.format) != SurfaceType::ColorTexture) {
+ if (src) {
src_info.format = src->info.format;
+ src_info.num_samples = src->info.num_samples;
+ src_info.size = src->info.size;
}
- if (dst && GetFormatType(dst->info.format) != SurfaceType::ColorTexture) {
+ if (dst) {
dst_info.format = dst->info.format;
+ dst_info.num_samples = dst->info.num_samples;
+ dst_info.size = dst->info.size;
}
if (src && GetFormatType(src->info.format) != SurfaceType::ColorTexture) {
- dst_info.format = src->info.format;
+ if (dst) {
+ src_info.format = dst_info.format;
+ } else {
+ dst_info.format = src->info.format;
+ }
}
if (dst && GetFormatType(dst->info.format) != SurfaceType::ColorTexture) {
- src_info.format = dst->info.format;
+ if (src) {
+ if (GetFormatType(src->info.format) == SurfaceType::ColorTexture) {
+ dst_info.format = src->info.format;
+ }
+ } else {
+ src_info.format = dst->info.format;
+ }
+ }
+ if (src_info.num_samples > 1) {
+ dst_info.format = src_info.format;
+ }
+ if (dst_info.num_samples > 1) {
+ src_info.format = dst_info.format;
}
}