mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
video_core: Only apply AF to 2D (array) image types
This commit is contained in:
parent
c309a1c69b
commit
3e47ebe2e9
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue