mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-01 05:19:09 +00: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} {}
|
ImageViewBase::ImageViewBase(const NullImageViewParams&) : image_id{NULL_IMAGE_ID} {}
|
||||||
|
|
||||||
bool ImageViewBase::SupportsAnisotropy() const noexcept {
|
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) {
|
switch (format) {
|
||||||
case PixelFormat::R8_UNORM:
|
case PixelFormat::R8_UNORM:
|
||||||
case PixelFormat::R8_SNORM:
|
case PixelFormat::R8_SNORM:
|
||||||
|
@ -87,9 +93,8 @@ bool ImageViewBase::SupportsAnisotropy() const noexcept {
|
||||||
case PixelFormat::D32_FLOAT_S8_UINT:
|
case PixelFormat::D32_FLOAT_S8_UINT:
|
||||||
return false;
|
return false;
|
||||||
default:
|
default:
|
||||||
break;
|
return true;
|
||||||
}
|
}
|
||||||
return range.extent.levels > 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace VideoCommon
|
} // namespace VideoCommon
|
||||||
|
|
Loading…
Reference in a new issue