diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-06-28 08:55:02 +0200 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2021-06-28 15:21:42 +0200 |
commit | d3d6613d33d6ca695732ccbdbd3e749053d22d0a (patch) | |
tree | f60dfab785157d35dd4110f7cf42b52c7180fee0 /src | |
parent | Merge pull request #6535 from ameerj/insert-fancy-name (diff) | |
download | yuzu-d3d6613d33d6ca695732ccbdbd3e749053d22d0a.tar yuzu-d3d6613d33d6ca695732ccbdbd3e749053d22d0a.tar.gz yuzu-d3d6613d33d6ca695732ccbdbd3e749053d22d0a.tar.bz2 yuzu-d3d6613d33d6ca695732ccbdbd3e749053d22d0a.tar.lz yuzu-d3d6613d33d6ca695732ccbdbd3e749053d22d0a.tar.xz yuzu-d3d6613d33d6ca695732ccbdbd3e749053d22d0a.tar.zst yuzu-d3d6613d33d6ca695732ccbdbd3e749053d22d0a.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.cpp | 3 | ||||
-rw-r--r-- | src/video_core/texture_cache/image_base.cpp | 2 | ||||
-rw-r--r-- | src/video_core/texture_cache/util.cpp | 2 | ||||
-rw-r--r-- | src/video_core/textures/astc.cpp | 4 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 23948feed..e892bd9ba 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp @@ -327,7 +327,8 @@ void ApplySwizzle(GLuint handle, PixelFormat format, std::array<SwizzleSource, 4 if (format_info.is_compressed) { return false; } - if (std::ranges::find(ACCELERATED_FORMATS, internal_format) == ACCELERATED_FORMATS.end()) { + if (std::ranges::find(ACCELERATED_FORMATS, static_cast<int>(internal_format)) == + ACCELERATED_FORMATS.end()) { return false; } if (format_info.compatibility_by_size) { 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 if (info.type != ImageType::e3D) { const auto [layer, mip_offset] = LayerMipOffset(diff, info.layer_stride); const auto end = mip_level_offsets.begin() + info.resources.levels; - const auto it = std::find(mip_level_offsets.begin(), end, mip_offset); + const auto it = std::find(mip_level_offsets.begin(), end, static_cast<u32>(mip_offset)); if (layer > info.resources.layers || it == end) { return std::nullopt; } 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> const s32 mip_offset = diff % layer_stride; const std::array offsets = CalculateMipLevelOffsets(new_info); const auto end = offsets.begin() + new_info.resources.levels; - const auto it = std::find(offsets.begin(), end, mip_offset); + const auto it = std::find(offsets.begin(), end, static_cast<u32>(mip_offset)); if (it == end) { // Mipmap is not aligned to any valid size return std::nullopt; diff --git a/src/video_core/textures/astc.cpp b/src/video_core/textures/astc.cpp index 7b756ba41..3ab500760 100644 --- a/src/video_core/textures/astc.cpp +++ b/src/video_core/textures/astc.cpp @@ -1365,8 +1365,8 @@ static void DecompressBlock(std::span<const u8, 16> inBuf, const u32 blockWidth, // each partition. // Determine partitions, partition index, and color endpoint modes - s32 planeIdx = -1; - u32 partitionIndex; + u32 planeIdx{UINT32_MAX}; + u32 partitionIndex{}; u32 colorEndpointMode[4] = {0, 0, 0, 0}; // Define color data. |