示例#1
0
 /// <summary>
 ///
 /// </summary>
 public unsafe void MergePipelineCaches(SharpVk.PipelineCache[] sourceCaches)
 {
     try
     {
         SharpVk.Interop.PipelineCache *marshalledSourceCaches = default(SharpVk.Interop.PipelineCache *);
         if (sourceCaches != null)
         {
             var fieldPointer = (SharpVk.Interop.PipelineCache *)(Interop.HeapUtil.AllocateAndClear <SharpVk.Interop.PipelineCache>(sourceCaches.Length).ToPointer());
             for (int index = 0; index < (uint)(sourceCaches.Length); index++)
             {
                 fieldPointer[index] = sourceCaches[index]?.handle ?? default(SharpVk.Interop.PipelineCache);
             }
             marshalledSourceCaches = fieldPointer;
         }
         else
         {
             marshalledSourceCaches = null;
         }
         Result methodResult = Interop.Commands.vkMergePipelineCaches(this.parent.handle, this.handle, (uint)(sourceCaches?.Length ?? 0), marshalledSourceCaches);
         if (SharpVkException.IsError(methodResult))
         {
             throw SharpVkException.Create(methodResult);
         }
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
示例#2
0
 /// <summary>
 /// Combine the data stores of pipeline caches.
 /// </summary>
 /// <param name="sourceCaches">
 /// </param>
 public unsafe void MergePipelineCaches(ArrayProxy <SharpVk.PipelineCache>?sourceCaches)
 {
     try
     {
         SharpVk.Interop.PipelineCache *marshalledSourceCaches = default(SharpVk.Interop.PipelineCache *);
         if (sourceCaches.IsNull())
         {
             marshalledSourceCaches = null;
         }
         else
         {
             if (sourceCaches.Value.Contents == ProxyContents.Single)
             {
                 marshalledSourceCaches = (SharpVk.Interop.PipelineCache *)(Interop.HeapUtil.Allocate <SharpVk.Interop.PipelineCache>());
                 *(SharpVk.Interop.PipelineCache *)(marshalledSourceCaches) = sourceCaches.Value.GetSingleValue()?.handle ?? default(SharpVk.Interop.PipelineCache);
             }
             else
             {
                 var fieldPointer = (SharpVk.Interop.PipelineCache *)(Interop.HeapUtil.AllocateAndClear <SharpVk.Interop.PipelineCache>(Interop.HeapUtil.GetLength(sourceCaches.Value)).ToPointer());
                 for (int index = 0; index < (uint)(Interop.HeapUtil.GetLength(sourceCaches.Value)); index++)
                 {
                     fieldPointer[index] = sourceCaches.Value[index]?.handle ?? default(SharpVk.Interop.PipelineCache);
                 }
                 marshalledSourceCaches = fieldPointer;
             }
         }
         SharpVk.Interop.VkPipelineCacheMergePipelineCachesDelegate commandDelegate = commandCache.GetCommandDelegate <SharpVk.Interop.VkPipelineCacheMergePipelineCachesDelegate>("vkMergePipelineCaches", "");
         Result methodResult = commandDelegate(this.parent.handle, this.handle, (uint)(Interop.HeapUtil.GetLength(sourceCaches)), marshalledSourceCaches);
         if (SharpVkException.IsError(methodResult))
         {
             throw SharpVkException.Create(methodResult);
         }
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
示例#3
0
 public static extern SharpVk.Result vkMergePipelineCaches(SharpVk.Interop.Device device, SharpVk.Interop.PipelineCache destinationCache, uint sourceCacheCount, SharpVk.Interop.PipelineCache *sourceCaches);
示例#4
0
 public static extern SharpVk.Result vkCreatePipelineCache(SharpVk.Interop.Device device, SharpVk.Interop.PipelineCacheCreateInfo *createInfo, SharpVk.Interop.AllocationCallbacks *allocator, SharpVk.Interop.PipelineCache *pipelineCache);