MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ supports_blit()

bool MayaFlux::Core::BackendResourceManager::supports_blit ( vk::Format  src_format,
vk::Format  dst_format,
vk::Filter  filter = vk::Filter::eNearest 
) const

Whether a blit between two formats is supported with a filter.

Checks optimal tiling blit source and destination features, and linear sampling on the source for a linear filter.

Definition at line 1124 of file BackendResoureManager.cpp.

1126{
1127 const auto physical = m_context.get_physical_device();
1128 const auto src_features = physical.getFormatProperties(src_format).optimalTilingFeatures;
1129 const auto dst_features = physical.getFormatProperties(dst_format).optimalTilingFeatures;
1130
1131 if (!(src_features & vk::FormatFeatureFlagBits::eBlitSrc)
1132 || !(dst_features & vk::FormatFeatureFlagBits::eBlitDst)) {
1133 return false;
1134 }
1135
1136 return filter != vk::Filter::eLinear
1137 || static_cast<bool>(src_features & vk::FormatFeatureFlagBits::eSampledImageFilterLinear);
1138}
vk::PhysicalDevice get_physical_device() const
Get physical device.
Definition VKContext.hpp:44

References MayaFlux::Core::VKContext::get_physical_device(), and m_context.

Referenced by blit_image(), and MayaFlux::Portal::Graphics::TextureLoom::can_blit().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: