Click or drag to resize
Ab4d.SharpEngine logo

VulkanDeviceGetOrCreateDescriptorSetsCache Method

GetOrCreateDescriptorSetsCache returns an existing DescriptorSetsCache that has the same descriptorTypes, stageFlags and startBinding. If no DescriptorSetsCache exist with that properties, then a new DescriptorSetsCache is created an returned. The new DescriptorSetsCache is returned in subsequent calls to GetOrCreateDescriptorSetsCache with the same properties. DescriptorSetsCache can be used to cache the DescriptorSets so that the same storage buffer and texture image with sampler use the same DescriptorSet. The created DescriptorSetsCache will be disposed when this VulkanDevice is disposed.

Namespace: Ab4d.SharpEngine.Vulkan
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.2.9386+3a404a3e1ebfa4efd231da7fe6f10dfb23b95dc4
Syntax
C#
public DescriptorSetsCache GetOrCreateDescriptorSetsCache(
	DescriptorType[] descriptorTypes,
	ShaderStageFlags stageFlags,
	int startBinding = 0,
	int initialPoolCapacity = 16,
	int maxPoolCapacity = 512,
	string? name = null
)

Parameters

descriptorTypes  DescriptorType
array of DescriptorType, for example: new[] {DescriptorType.StorageBuffer, DescriptorType.CombinedImageSampler}
stageFlags  ShaderStageFlags
shader stage flags, for example: ShaderStageFlags.Fragment
startBinding  Int32  (Optional)
start binding index (0 by default)>
initialPoolCapacity  Int32  (Optional)
initial pool capacity (16 by default). This value is used only when creating a new DescriptorSetsCache
maxPoolCapacity  Int32  (Optional)
maximal pool capacity (512 by default). This value is used only when creating a new DescriptorSetsCache
name  String  (Optional)
optional name of newly created DescriptorSetsCache

Return Value

DescriptorSetsCache
DescriptorSetsCache
Remarks

[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Vulkan.VulkanDevice.GetOrCreateDescriptorSetsCache(Ab4d.Vulkan.DescriptorType[],Ab4d.Vulkan.ShaderStageFlags,System.Int32,System.Int32,System.Int32,System.String)"]

See Also