/// <summary> /// Initializes a new instance of the <see cref="CmdReserveSpaceForCommandsInfoNvx"/> structure. /// </summary> /// <param name="objectTable"> /// The <see cref="ObjectTableNvx"/> to be used for the generation process. Only registered /// objects at the time <see cref="CommandBufferExtensions.CmdReserveSpaceForCommandsNvx"/> /// is called, will be taken into account for the reservation. /// </param> /// <param name="indirectCommandsLayout"> /// The <see cref="IndirectCommandsLayoutNvx"/> that must also be used at generation time. /// </param> /// <param name="maxSequencesCount"> /// The maximum number of sequences for which command buffer space will be reserved. /// </param> public CmdReserveSpaceForCommandsInfoNvx(ObjectTableNvx objectTable, IndirectCommandsLayoutNvx indirectCommandsLayout, int maxSequencesCount) { Type = StructureType.CmdReserveSpaceForCommandsInfoNvx; Next = IntPtr.Zero; ObjectTable = objectTable; IndirectCommandsLayout = indirectCommandsLayout; MaxSequencesCount = maxSequencesCount; }
/// <summary> /// Initializes a new instance of the <see cref="CmdProcessCommandsInfoNvx"/> structure. /// </summary> /// <param name="objectTable"> /// The <see cref="ObjectTableNvx"/> to be used for the generation process. Only registered /// objects at the time <see cref="CommandBufferExtensions.CmdReserveSpaceForCommandsNvx"/> /// is called, will be taken into account for the reservation. /// </param> /// <param name="indirectCommandsLayout"> /// The <see cref="IndirectCommandsLayoutNvx"/> that provides the command sequence to generate. /// </param> /// <param name="indirectCommandsTokens"> /// Provides an array of <see cref="IndirectCommandsTokenNvx"/> that reference the input data /// for each token command. /// </param> /// <param name="maxSequencesCount"> /// The maximum number of sequences for which command buffer space will be reserved. If <see /// cref="SequencesCountBuffer"/> is 0, this is also the actual number of sequences generated. /// </param> /// <param name="targetCommandBuffer"> /// Can be the secondary <see cref="CommandBuffer"/> in which the commands should be /// recorded. If <c>null</c> an implicit reservation as well as execution takes place on the /// processing <see cref="CommandBuffer"/>. /// </param> /// <param name="sequencesCountBuffer"> /// Can be <see cref="Buffer"/> from which the actual amount of sequences is sourced from as /// <see cref="int"/> value. /// </param> /// <param name="sequencesCountOffset"> /// The byte offset into <see cref="SequencesCountBuffer"/> where the count value is stored. /// </param> /// <param name="sequencesIndexBuffer"> /// Must be set if <see cref="IndirectCommandsLayout"/>'s <see /// cref="IndirectCommandsLayoutUsagesNvx.IndexedSequences"/> bit is set and provides the /// used sequence indices as <see cref="int"/> array. Otherwise it must be 0. /// </param> /// <param name="sequencesIndexOffset"> /// The byte offset into <see cref="SequencesIndexBuffer"/> where the index values start. /// </param> public CmdProcessCommandsInfoNvx(ObjectTableNvx objectTable, IndirectCommandsLayoutNvx indirectCommandsLayout, IndirectCommandsTokenNvx[] indirectCommandsTokens, int maxSequencesCount = 0, CommandBuffer targetCommandBuffer = null, Buffer sequencesCountBuffer = null, long sequencesCountOffset = 0, Buffer sequencesIndexBuffer = null, long sequencesIndexOffset = 0) { ObjectTable = objectTable; IndirectCommandsLayout = indirectCommandsLayout; IndirectCommandsTokens = indirectCommandsTokens; MaxSequencesCount = maxSequencesCount; TargetCommandBuffer = targetCommandBuffer; SequencesCountBuffer = sequencesCountBuffer; SequencesCountOffset = sequencesCountOffset; SequencesIndexBuffer = sequencesIndexBuffer; SequencesIndexOffset = sequencesIndexOffset; }
private static TDelegate GetProc <TDelegate>(ObjectTableNvx objectTable, string name) where TDelegate : class => objectTable.Parent.GetProc <TDelegate>(name);
private static vkUnregisterObjectsNVXDelegate vkUnregisterObjectsNVX(ObjectTableNvx objectTable) => GetProc <vkUnregisterObjectsNVXDelegate>(objectTable, nameof(vkUnregisterObjectsNVX));
private static vkDestroyObjectTableNVXDelegate vkDestroyObjectTableNVX(ObjectTableNvx objectTable) => GetProc <vkDestroyObjectTableNVXDelegate>(objectTable, nameof(vkDestroyObjectTableNVX));