diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/texture_cache/image_view_base.cpp | 9 |
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 |