SpiecsEngine
 
Loading...
Searching...
No Matches

◆ IsHostCopyable() [2/2]

bool Spices::VulkanImage::IsHostCopyable ( VulkanState & state,
VkFormat format )
static

Check if this image format can copy from host to gpu directly.

Parameters
[in]stateVulkanState.
[in]formatVkFormat.
Returns
Returns true if can do that.

Instance a VkFormatProperties3.

Properties3 need to be chained into Properties2.

Get format properties for the select image format.

Instance a VkFormatProperties3.

Properties3 need to be chained into Properties2.

Get format properties for the select image format.

Definition at line 1024 of file VulkanImage.cpp.

1025 {
1027
1031 VkFormatProperties3 formatProperties3{};
1032 formatProperties3.sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3_KHR;
1033
1037 VkFormatProperties2 formatProperties2{};
1038 formatProperties2.sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2;
1039 formatProperties2.pNext = &formatProperties3;
1040
1044 vkGetPhysicalDeviceFormatProperties2(state.m_PhysicalDevice, format, &formatProperties2);
1045
1046 return formatProperties3.optimalTilingFeatures & VK_FORMAT_FEATURE_2_HOST_IMAGE_TRANSFER_BIT_EXT && VKImageHostOperation;
1047 }
#define SPICES_PROFILE_ZONE
#define VKImageHostOperation
Disable Host Image copy for host memory heap is too smaller.
Definition VulkanUtils.h:32