Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

[video_core] Remove redundant check on image_view and image_view_info (#2891)

MaranBr06275885f189
diff --git a/src/video_core/texture_cache/image_info.cpp b/src/video_core/texture_cache/image_info.cpp
index a0d8d5d94c..ef02972209 100644
--- a/src/video_core/texture_cache/image_info.cpp
+++ b/src/video_core/texture_cache/image_info.cpp
@@ -52,7 +52,7 @@ ImageInfo::ImageInfo(const TICEntry& config) noexcept {
ASSERT(!config.IsPitchLinear());
}
TextureType tex_type = config.texture_type;
- if ((config.Depth() > 1 || config.BaseLayer() != 0) && config.BaseLayer() < config.Depth()) {
+ if (config.Depth() > 1 || config.BaseLayer() != 0) {
switch (tex_type) {
case TextureType::Texture1D:
tex_type = TextureType::Texture1DArray;
diff --git a/src/video_core/texture_cache/image_view_info.cpp b/src/video_core/texture_cache/image_view_info.cpp
index c53cd0e413..2aa05dab30 100644
--- a/src/video_core/texture_cache/image_view_info.cpp
+++ b/src/video_core/texture_cache/image_view_info.cpp
@@ -41,7 +41,7 @@ ImageViewInfo::ImageViewInfo(const TICEntry& config, s32 base_layer) noexcept
};
range.extent.levels = config.res_max_mip_level - config.res_min_mip_level + 1;
TextureType tex_type = config.texture_type;
- if ((config.Depth() > 1 || base_layer != 0) && static_cast<u32>(base_layer) < config.Depth()) {
+ if (config.Depth() > 1 || base_layer != 0) {
switch (tex_type) {
case TextureType::Texture1D:
tex_type = TextureType::Texture1DArray;