Click or drag to resize
Ab4d.SharpEngine logo

PhysicalDeviceDetailsFindMemoryTypeIndex Method

Returns index of the specified memory type index from the MemoryTypes array. When requireExactMemoryType is false (by default) and when the exact memory type is not found, then another search is done without a memory type without HostCached and LazilyAllocated types. When throwExceptionWhenNotFound is true (by default), then an exception is thrown when the specified memory type is not found. When throwExceptionWhenNotFound is false, then -1 is returned when the memory type is not found.

Namespace: Ab4d.SharpEngine.Vulkan
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.1.9680+a1b1e43de1ad9a7e35472c33948d688d7b40ef79
Syntax
C#
public int FindMemoryTypeIndex(
	uint typeFilter,
	MemoryPropertyFlags flags,
	bool requireExactMemoryType = false,
	bool throwExceptionWhenNotFound = true
)

Parameters

typeFilter  UInt32
typeFilter that is returned from the vkGetImageMemoryRequirements
flags  MemoryPropertyFlags
MemoryPropertyFlags
requireExactMemoryType  Boolean  (Optional)
When requireExactMemoryType is false (by default) and when the exact memory type is not found, then another search is done without a memory type without HostCached and LazilyAllocated types.
throwExceptionWhenNotFound  Boolean  (Optional)
When throwExceptionWhenNotFound is true (by default), then an exception is thrown when the specified memory type is not found.When throwExceptionWhenNotFound is false, then -1 is returned when the memory type is not found.

Return Value

Int32
index of the specified memory type from the MemoryTypes array or -1 when type if not found and throwExceptionWhenNotFound is false
See Also