diff options
author | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2023-10-11 18:15:35 +0200 |
---|---|---|
committer | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2023-10-11 18:15:35 +0200 |
commit | 98cac9410c2351ceab2833ee4ec216f4bcc6bdde (patch) | |
tree | e29b61b644f96b2fad55deae49a77589ebfccc68 /src/video_core/texture_cache/formatter.cpp | |
parent | Merge pull request #11743 from Squall-Leonhart/IFREMOVED (diff) | |
download | yuzu-98cac9410c2351ceab2833ee4ec216f4bcc6bdde.tar yuzu-98cac9410c2351ceab2833ee4ec216f4bcc6bdde.tar.gz yuzu-98cac9410c2351ceab2833ee4ec216f4bcc6bdde.tar.bz2 yuzu-98cac9410c2351ceab2833ee4ec216f4bcc6bdde.tar.lz yuzu-98cac9410c2351ceab2833ee4ec216f4bcc6bdde.tar.xz yuzu-98cac9410c2351ceab2833ee4ec216f4bcc6bdde.tar.zst yuzu-98cac9410c2351ceab2833ee4ec216f4bcc6bdde.zip |
Diffstat (limited to 'src/video_core/texture_cache/formatter.cpp')
-rw-r--r-- | src/video_core/texture_cache/formatter.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/formatter.cpp b/src/video_core/texture_cache/formatter.cpp index 6279d8e9e..2b7e0df72 100644 --- a/src/video_core/texture_cache/formatter.cpp +++ b/src/video_core/texture_cache/formatter.cpp @@ -10,19 +10,23 @@ #include "video_core/texture_cache/image_info.h" #include "video_core/texture_cache/image_view_base.h" #include "video_core/texture_cache/render_targets.h" +#include "video_core/texture_cache/samples_helper.h" namespace VideoCommon { std::string Name(const ImageBase& image) { const GPUVAddr gpu_addr = image.gpu_addr; const ImageInfo& info = image.info; - const u32 width = info.size.width; - const u32 height = info.size.height; + u32 width = info.size.width; + u32 height = info.size.height; const u32 depth = info.size.depth; const u32 num_layers = image.info.resources.layers; const u32 num_levels = image.info.resources.levels; std::string resource; if (image.info.num_samples > 1) { + const auto [samples_x, samples_y] = VideoCommon::SamplesLog2(image.info.num_samples); + width >>= samples_x; + height >>= samples_y; resource += fmt::format(":{}xMSAA", image.info.num_samples); } if (num_layers > 1) { |