Exemple #1
0
        /// <summary>
        /// Combine the data stores of pipeline caches.
        /// </summary>
        /// <param name="sourceCache">Pipeline cache to merge into this.</param>
        public void MergeCache(PipelineCache sourceCache)
        {
            long   handle = sourceCache;
            Result result = vkMergePipelineCaches(Parent, this, 1, &handle);

            VulkanException.ThrowForInvalidResult(result);
        }
Exemple #2
0
 /// <summary>
 /// Create graphics pipelines.
 /// </summary>
 /// <param name="createInfos">
 /// Structures specifying parameters of newly created graphics pipelines.
 /// <para>
 /// If the flags member of any given element contains the <see
 /// cref="PipelineCreateFlags.Derivative"/> flag, and the <see
 /// cref="GraphicsPipelineCreateInfo.BasePipelineIndex"/> member of that same element is not
 /// -1, <see cref="GraphicsPipelineCreateInfo.BasePipelineIndex"/> must be less than the index
 /// into <paramref name="createInfos"/> that corresponds to that element
 /// </para>
 /// </param>
 /// <param name="cache">
 /// Is either <c>null</c>, indicating that pipeline caching is disabled; or the handle of a
 /// valid pipeline cache object, in which case use of that cache is enabled for the duration
 /// of the command.
 /// </param>
 /// <param name="allocator">Controls host memory allocation.</param>
 /// <returns>An array in which the resulting graphics pipeline objects are returned.</returns>
 /// <exception cref="VulkanException">Vulkan returns an error code.</exception>
 public Pipeline[] CreateGraphicsPipelines(GraphicsPipelineCreateInfo[] createInfos,
                                           PipelineCache cache = null, AllocationCallbacks?allocator = null)
 {
     return(Pipeline.CreateGraphicsPipelines(this, cache, createInfos, ref allocator));
 }
Exemple #3
0
 /// <summary>
 /// Create a graphics pipeline.
 /// </summary>
 /// <param name="createInfo">
 /// Structure specifying parameters of a newly created graphics pipeline.
 /// </param>
 /// <param name="cache">
 /// Is either <c>null</c>, indicating that pipeline caching is disabled; or the handle of a
 /// valid pipeline cache object, in which case use of that cache is enabled for the duration
 /// of the command.
 /// </param>
 /// <param name="allocator">Controls host memory allocation.</param>
 /// <returns>The resulting graphics pipeline object.</returns>
 /// <exception cref="VulkanException">Vulkan returns an error code.</exception>
 public Pipeline CreateGraphicsPipeline(GraphicsPipelineCreateInfo createInfo,
                                        PipelineCache cache = null, AllocationCallbacks?allocator = null)
 {
     return(new Pipeline(this, cache, ref createInfo, ref allocator));
 }
Exemple #4
0
 /// <summary>
 /// Create new compute pipeline objects.
 /// </summary>
 /// <param name="createInfos">
 /// Structures specifying parameters of newly created compute pipelines.
 /// <para>
 /// If the flags member of any given element contains the <see
 /// cref="PipelineCreateFlags.Derivative"/> flag, and the <see
 /// cref="ComputePipelineCreateInfo.BasePipelineIndex"/> member of that same element is not
 /// -1, <see cref="ComputePipelineCreateInfo.BasePipelineIndex"/> must be less than the index
 /// into <paramref name="createInfos"/> that corresponds to that element
 /// </para>
 /// </param>
 /// <param name="cache">
 /// Is either <c>null</c>, indicating that pipeline caching is disabled; or the handle of a
 /// valid pipeline cache object, in which case use of that cache is enabled for the duration
 /// of the command.
 /// </param>
 /// <param name="allocator">Controls host memory allocation.</param>
 /// <returns>An array in which the resulting compute pipeline objects are returned.</returns>
 /// <exception cref="VulkanException">Vulkan returns an error code.</exception>
 public Pipeline[] CreateComputePipelines(ComputePipelineCreateInfo[] createInfos,
     PipelineCache cache = null, AllocationCallbacks? allocator = null)
 {
     return Pipeline.CreateComputePipelines(this, cache, createInfos, ref allocator);
 }
Exemple #5
0
 /// <summary>
 /// Creates a new compute pipeline object.
 /// </summary>
 /// <param name="createInfo">
 /// Structure specifying parameters of a newly created compute pipeline.
 /// </param>
 /// <param name="cache">
 /// Is either <c>null</c>, indicating that pipeline caching is disabled; or the handle of a
 /// valid pipeline cache object, in which case use of that cache is enabled for the duration
 /// of the command.
 /// </param>
 /// <param name="allocator">Controls host memory allocation.</param>
 /// <returns>The resulting compute pipeline object.</returns>
 /// <exception cref="VulkanException">Vulkan returns an error code.</exception>
 public Pipeline CreateComputePipeline(ComputePipelineCreateInfo createInfo,
     PipelineCache cache = null, AllocationCallbacks? allocator = null)
 {
     return new Pipeline(this, cache, ref createInfo, ref allocator);
 }