summaryrefslogtreecommitdiff
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorGravatar bunnei2021-07-05 17:09:23 -0700
committerGravatar GitHub2021-07-05 17:09:23 -0700
commitbf50345d4c13e34e69af0070632400b3472a1a11 (patch)
tree1af5586d2d416c1a347ea0bfabed30a3a56d51e0 /src/video_core/texture_cache
parentMerge pull request #6556 from Morph1984/default-mii (diff)
parentCMakeLists: Disable all warnings for external headers (diff)
downloadyuzu-bf50345d4c13e34e69af0070632400b3472a1a11.tar.gz
yuzu-bf50345d4c13e34e69af0070632400b3472a1a11.tar.xz
yuzu-bf50345d4c13e34e69af0070632400b3472a1a11.zip
Merge pull request #6537 from Morph1984/warnings
general: Enforce multiple warnings in MSVC
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/image_base.cpp2
-rw-r--r--src/video_core/texture_cache/util.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/image_base.cpp b/src/video_core/texture_cache/image_base.cpp
index ad69d32d1..f22358c90 100644
--- a/src/video_core/texture_cache/image_base.cpp
+++ b/src/video_core/texture_cache/image_base.cpp
@@ -82,7 +82,7 @@ std::optional<SubresourceBase> ImageBase::TryFindBase(GPUVAddr other_addr) const
82 if (info.type != ImageType::e3D) { 82 if (info.type != ImageType::e3D) {
83 const auto [layer, mip_offset] = LayerMipOffset(diff, info.layer_stride); 83 const auto [layer, mip_offset] = LayerMipOffset(diff, info.layer_stride);
84 const auto end = mip_level_offsets.begin() + info.resources.levels; 84 const auto end = mip_level_offsets.begin() + info.resources.levels;
85 const auto it = std::find(mip_level_offsets.begin(), end, mip_offset); 85 const auto it = std::find(mip_level_offsets.begin(), end, static_cast<u32>(mip_offset));
86 if (layer > info.resources.layers || it == end) { 86 if (layer > info.resources.layers || it == end) {
87 return std::nullopt; 87 return std::nullopt;
88 } 88 }
diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp
index 4efe042b6..20794fa32 100644
--- a/src/video_core/texture_cache/util.cpp
+++ b/src/video_core/texture_cache/util.cpp
@@ -394,7 +394,7 @@ template <u32 GOB_EXTENT>
394 const s32 mip_offset = diff % layer_stride; 394 const s32 mip_offset = diff % layer_stride;
395 const std::array offsets = CalculateMipLevelOffsets(new_info); 395 const std::array offsets = CalculateMipLevelOffsets(new_info);
396 const auto end = offsets.begin() + new_info.resources.levels; 396 const auto end = offsets.begin() + new_info.resources.levels;
397 const auto it = std::find(offsets.begin(), end, mip_offset); 397 const auto it = std::find(offsets.begin(), end, static_cast<u32>(mip_offset));
398 if (it == end) { 398 if (it == end) {
399 // Mipmap is not aligned to any valid size 399 // Mipmap is not aligned to any valid size
400 return std::nullopt; 400 return std::nullopt;