Ejemplo n.º 1
0
 public void CmdBindVertexBuffers(
     [FromProperty("this")] GenCommandBuffer commandBuffer,
     int firstBinding,
     [FromProperty("Math.Min(buffers?.Count ?? 0, offsets?.Count ?? 0)")] int bindingCount,
     [IsArray] GenBuffer *pBuffers,
     [IsArray] DeviceSize *pOffsets)
 {
 }
 /// <summary>
 ///
 /// </summary>
 /// <param name="extendedHandle">
 /// The CommandBuffer handle to extend.
 /// </param>
 /// <param name="counterBuffers">
 /// </param>
 /// <param name="counterBufferOffsets">
 /// </param>
 public static unsafe void EndTransformFeedback(this SharpVk.CommandBuffer extendedHandle, uint firstCounterBuffer, ArrayProxy <SharpVk.Buffer>?counterBuffers = null, ArrayProxy <DeviceSize>?counterBufferOffsets = null)
 {
     try
     {
         CommandCache            commandCache                   = default(CommandCache);
         SharpVk.Interop.Buffer *marshalledCounterBuffers       = default(SharpVk.Interop.Buffer *);
         DeviceSize *            marshalledCounterBufferOffsets = default(DeviceSize *);
         commandCache = extendedHandle.commandCache;
         if (counterBuffers.IsNull())
         {
             marshalledCounterBuffers = null;
         }
         else
         {
             if (counterBuffers.Value.Contents == ProxyContents.Single)
             {
                 marshalledCounterBuffers = (SharpVk.Interop.Buffer *)(Interop.HeapUtil.Allocate <SharpVk.Interop.Buffer>());
                 *(SharpVk.Interop.Buffer *)(marshalledCounterBuffers) = counterBuffers.Value.GetSingleValue()?.handle ?? default(SharpVk.Interop.Buffer);
             }
             else
             {
                 var fieldPointer = (SharpVk.Interop.Buffer *)(Interop.HeapUtil.AllocateAndClear <SharpVk.Interop.Buffer>(Interop.HeapUtil.GetLength(counterBuffers.Value)).ToPointer());
                 for (int index = 0; index < (uint)(Interop.HeapUtil.GetLength(counterBuffers.Value)); index++)
                 {
                     fieldPointer[index] = counterBuffers.Value[index]?.handle ?? default(SharpVk.Interop.Buffer);
                 }
                 marshalledCounterBuffers = fieldPointer;
             }
         }
         if (counterBufferOffsets.IsNull())
         {
             marshalledCounterBufferOffsets = null;
         }
         else
         {
             if (counterBufferOffsets.Value.Contents == ProxyContents.Single)
             {
                 marshalledCounterBufferOffsets = (DeviceSize *)(Interop.HeapUtil.Allocate <DeviceSize>());
                 *(DeviceSize *)(marshalledCounterBufferOffsets) = counterBufferOffsets.Value.GetSingleValue();
             }
             else
             {
                 var fieldPointer = (DeviceSize *)(Interop.HeapUtil.AllocateAndClear <DeviceSize>(Interop.HeapUtil.GetLength(counterBufferOffsets.Value)).ToPointer());
                 for (int index = 0; index < (uint)(Interop.HeapUtil.GetLength(counterBufferOffsets.Value)); index++)
                 {
                     fieldPointer[index] = counterBufferOffsets.Value[index];
                 }
                 marshalledCounterBufferOffsets = fieldPointer;
             }
         }
         SharpVk.Interop.Multivendor.VkCommandBufferEndTransformFeedbackDelegate commandDelegate = commandCache.Cache.vkCmdEndTransformFeedbackEXT;
         commandDelegate(extendedHandle.handle, firstCounterBuffer, (uint)(Interop.HeapUtil.GetLength(counterBuffers)), marshalledCounterBuffers, marshalledCounterBufferOffsets);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 ///
 /// </summary>
 public unsafe void BindVertexBuffers(uint firstBinding, SharpVk.Buffer[] buffers, DeviceSize[] offsets)
 {
     try
     {
         SharpVk.Interop.Buffer *marshalledBuffers = default(SharpVk.Interop.Buffer *);
         DeviceSize *            marshalledOffsets = default(DeviceSize *);
         if (buffers != null)
         {
             var fieldPointer = (SharpVk.Interop.Buffer *)(Interop.HeapUtil.AllocateAndClear <SharpVk.Interop.Buffer>(buffers.Length).ToPointer());
             for (int index = 0; index < (uint)(buffers.Length); index++)
             {
                 fieldPointer[index] = buffers[index]?.handle ?? default(SharpVk.Interop.Buffer);
             }
             marshalledBuffers = fieldPointer;
         }
         else
         {
             marshalledBuffers = null;
         }
         if (offsets != null)
         {
             var fieldPointer = (DeviceSize *)(Interop.HeapUtil.AllocateAndClear <DeviceSize>(offsets.Length).ToPointer());
             for (int index = 0; index < (uint)(offsets.Length); index++)
             {
                 fieldPointer[index] = offsets[index];
             }
             marshalledOffsets = fieldPointer;
         }
         else
         {
             marshalledOffsets = null;
         }
         Interop.Commands.vkCmdBindVertexBuffers(this.handle, firstBinding, (uint)(buffers?.Length ?? 0), marshalledBuffers, marshalledOffsets);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
Ejemplo n.º 4
0
 public static extern unsafe void vkGetDeviceMemoryCommitment(IntPtr device, ulong memory, DeviceSize *pCommittedMemoryInBytes);
Ejemplo n.º 5
0
 public static extern unsafe void vkCmdBindVertexBuffers(IntPtr commandBuffer, uint firstBinding, uint bindingCount, ulong *pBuffers, DeviceSize *pOffsets);
Ejemplo n.º 6
0
 internal static unsafe extern void vkGetDeviceMemoryCommitment(Device device, DeviceMemory memory, out DeviceSize *CommittedMemoryInBytes);
Ejemplo n.º 7
0
 internal static unsafe extern void vkCmdBindVertexBuffers(CommandBuffer commandBuffer, UInt32 firstBinding, UInt32 bindingCount, IntPtr pBuffers, DeviceSize *Offsets);
Ejemplo n.º 8
0
 internal static unsafe extern void vkGetDeviceMemoryCommitment(IntPtr device, UInt64 memory, DeviceSize *pCommittedMemoryInBytes);
Ejemplo n.º 9
0
 public static extern void vkCmdBindVertexBuffers(SharpVk.Interop.CommandBuffer commandBuffer, uint firstBinding, uint bindingCount, SharpVk.Interop.Buffer *buffers, DeviceSize *offsets);
Ejemplo n.º 10
0
 public static extern void vkGetDeviceMemoryCommitment(SharpVk.Interop.Device device, SharpVk.Interop.DeviceMemory memory, DeviceSize *committedMemoryInBytes);