video_core: Only apply AF to 2D (array) image types
This commit is contained in:
parent
c309a1c69b
commit
3e47ebe2e9
@ -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 New Issue
Block a user