summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache
diff options
context:
space:
mode:
authorWollnashorn <Wollnashorn@users.noreply.github.com>2023-06-17 14:20:44 +0200
committerWollnashorn <Wollnashorn@users.noreply.github.com>2023-06-17 14:20:44 +0200
commit3e47ebe2e90d0272ed516b09a0f527489daaf047 (patch)
treece6408ad295be6bff50a4ff5ae0bcc38d8386a41 /src/video_core/texture_cache
parentvideo_core: Removed AF for all mip modes option as it's default now (diff)
downloadyuzu-3e47ebe2e90d0272ed516b09a0f527489daaf047.tar
yuzu-3e47ebe2e90d0272ed516b09a0f527489daaf047.tar.gz
yuzu-3e47ebe2e90d0272ed516b09a0f527489daaf047.tar.bz2
yuzu-3e47ebe2e90d0272ed516b09a0f527489daaf047.tar.lz
yuzu-3e47ebe2e90d0272ed516b09a0f527489daaf047.tar.xz
yuzu-3e47ebe2e90d0272ed516b09a0f527489daaf047.tar.zst
yuzu-3e47ebe2e90d0272ed516b09a0f527489daaf047.zip
Diffstat (limited to 'src/video_core/texture_cache')
-rw-r--r--src/video_core/texture_cache/image_view_base.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/image_view_base.cpp b/src/video_core/texture_cache/image_view_base.cpp
index 000eec869..0c5f4450d 100644
--- a/src/video_core/texture_cache/image_view_base.cpp
+++ b/src/video_core/texture_cache/image_view_base.cpp
@@ -46,6 +46,12 @@ ImageViewBase::ImageViewBase(const ImageInfo& info, const ImageViewInfo& view_in
ImageViewBase::ImageViewBase(const NullImageViewParams&) : image_id{NULL_IMAGE_ID} {}
bool ImageViewBase::SupportsAnisotropy() const noexcept {
+ const bool has_mips = range.extent.levels > 1;
+ const bool is_2d = type == ImageViewType::e2D || type == ImageViewType::e2DArray;
+ if (!has_mips || !is_2d) {
+ return false;
+ }
+
switch (format) {
case PixelFormat::R8_UNORM:
case PixelFormat::R8_SNORM:
@@ -87,9 +93,8 @@ bool ImageViewBase::SupportsAnisotropy() const noexcept {
case PixelFormat::D32_FLOAT_S8_UINT:
return false;
default:
- break;
+ return true;
}
- return range.extent.levels > 1;
}
} // namespace VideoCommon