Ejemplo n.º 1
0
 public static extern void vkCmdCopyQueryPoolResults(IntPtr commandBuffer, ulong queryPool, uint firstQuery, uint queryCount, ulong dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags);
Ejemplo n.º 2
0
 internal static unsafe extern void vkCmdCopyQueryPoolResults(CommandBuffer commandBuffer, QueryPool queryPool, UInt32 firstQuery, UInt32 queryCount, Buffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags);
Ejemplo n.º 3
0
 public static extern Result vkGetQueryPoolResults(IntPtr device, ulong queryPool, uint firstQuery, uint queryCount, UIntPtr dataSize, IntPtr pData, DeviceSize stride, QueryResultFlags flags);
Ejemplo n.º 4
0
 public void CmdCopyQueryPoolResults(QueryPool queryPool, UInt32 firstQuery, UInt32 queryCount, VulkanBuffer dstBuffer, DeviceSize dstOffset, DeviceSize stride, QueryResultFlags flags = (QueryResultFlags)0)
 {
     unsafe {
         Interop.NativeMethods.vkCmdCopyQueryPoolResults(this.m, queryPool != null ? queryPool.m : default(UInt64), firstQuery, queryCount, dstBuffer != null ? dstBuffer.m : default(UInt64), dstOffset, stride, flags);
     }
 }
Ejemplo n.º 5
0
 internal static unsafe extern Result vkGetQueryPoolResults(Device device, QueryPool queryPool, UInt32 firstQuery, UInt32 queryCount, UIntPtr dataSize, out IntPtr Data, DeviceSize stride, QueryResultFlags flags);
Ejemplo n.º 6
0
 public unsafe void CopyQueryPoolResults(QueryPool queryPool, uint firstQuery, uint queryCount, Buffer destinationBuffer, ulong destinationOffset, ulong stride, QueryResultFlags flags)
 {
     vkCmdCopyQueryPoolResults(this, queryPool, firstQuery, queryCount, destinationBuffer, destinationOffset, stride, flags);
 }
Ejemplo n.º 7
0
 public unsafe void GetQueryPoolResults(QueryPool queryPool, uint firstQuery, uint queryCount, PointerSize dataSize, IntPtr data, ulong stride, QueryResultFlags flags)
 {
     vkGetQueryPoolResults(this, queryPool, firstQuery, queryCount, dataSize, data, stride, flags).CheckError();
 }
Ejemplo n.º 8
0
 internal static unsafe extern void vkCmdCopyQueryPoolResults(CommandBuffer commandBuffer, QueryPool queryPool, uint firstQuery, uint queryCount, Buffer destinationBuffer, ulong destinationOffset, ulong stride, QueryResultFlags flags);
Ejemplo n.º 9
0
 internal static unsafe extern Result vkGetQueryPoolResults(Device device, QueryPool queryPool, uint firstQuery, uint queryCount, PointerSize dataSize, IntPtr data, ulong stride, QueryResultFlags flags);
Ejemplo n.º 10
0
 /// <summary>
 /// Copy results of queries in a query pool to a host memory region.
 /// </summary>
 public Result GetResults(uint firstQuery, uint queryCount, ArrayProxy <byte> data, DeviceSize stride, QueryResultFlags flags)
 {
     unsafe
     {
         try
         {
             Result   result         = default(Result);
             GCHandle dataHandle     = default(GCHandle);
             byte *   marshalledData = null;
             if (data.Contents != ProxyContents.Null)
             {
                 if (data.Contents == ProxyContents.Single)
                 {
                     byte *dataPointer = stackalloc byte[1];
                     *     dataPointer = data.GetSingleValue();
                     marshalledData = dataPointer;
                 }
                 else
                 {
                     var arrayValue = data.GetArrayValue();
                     dataHandle     = GCHandle.Alloc(arrayValue.Array, GCHandleType.Pinned);
                     marshalledData = (byte *)(dataHandle.AddrOfPinnedObject() + (int)(MemUtil.SizeOf <byte>() * arrayValue.Offset)).ToPointer();
                 }
             }
             else
             {
                 marshalledData = null;
             }
             result = Interop.Commands.vkGetQueryPoolResults(this.parent.handle, this.handle, firstQuery, queryCount, (Size)(data.Length), marshalledData, stride, flags);
             if (SharpVkException.IsError(result))
             {
                 throw SharpVkException.Create(result);
             }
             if (dataHandle.IsAllocated)
             {
                 dataHandle.Free();
             }
             return(result);
         }
         finally
         {
             Interop.HeapUtil.FreeLog();
         }
     }
 }