SpiecsEngine
 
Loading...
Searching...
No Matches

◆ FormatSupported()

bool Spices::Transcoder::FormatSupported ( VkFormat format)
staticprivate

Check if the device supports sampling and transfers for the selected image.

Parameters
[in]format.
Returns
Returns true if succeed.

Definition at line 221 of file Transcoder.cpp.

222 {
224
225 VkFormatProperties properties{};
226
227 VulkanState& state = VulkanRenderBackend::GetState();
228 vkGetPhysicalDeviceFormatProperties(state.m_PhysicalDevice, format, &properties);
229
230
231 VkFormatFeatureFlags neededFeatures
232 = VK_FORMAT_FEATURE_BLIT_DST_BIT | VK_FORMAT_FEATURE_BLIT_SRC_BIT;
233
234
235 return ((properties.optimalTilingFeatures & VK_FORMAT_FEATURE_TRANSFER_DST_BIT) &&
236 (properties.optimalTilingFeatures & VK_FORMAT_FEATURE_SAMPLED_IMAGE_BIT));
237 }
#define SPICES_PROFILE_ZONE
static VulkanState & GetState()
Get VulkanState in use.

References Spices::VulkanRenderBackend::GetState().