コード例 #1
0
 /// <summary>
 /// Get the data store from a pipeline cache.
 /// </summary>
 public unsafe byte[] GetData()
 {
     try
     {
         byte[]   result         = default(byte[]);
         HostSize dataSize       = default(HostSize);
         byte *   marshalledData = default(byte *);
         SharpVk.Interop.VkPipelineCacheGetDataDelegate commandDelegate = commandCache.GetCommandDelegate <SharpVk.Interop.VkPipelineCacheGetDataDelegate>("vkGetPipelineCacheData", "");
         Result methodResult = commandDelegate(this.parent.handle, this.handle, &dataSize, marshalledData);
         if (SharpVkException.IsError(methodResult))
         {
             throw SharpVkException.Create(methodResult);
         }
         marshalledData = (byte *)(Interop.HeapUtil.Allocate <byte>((uint)(dataSize)));
         commandDelegate(this.parent.handle, this.handle, &dataSize, marshalledData);
         if (marshalledData != null)
         {
             var fieldPointer = new byte[(uint)(dataSize)];
             for (int index = 0; index < (uint)(dataSize); index++)
             {
                 fieldPointer[index] = marshalledData[index];
             }
             result = fieldPointer;
         }
         else
         {
             result = null;
         }
         return(result);
     }
     finally
     {
         Interop.HeapUtil.FreeAll();
     }
 }
コード例 #2
0
 /// <summary>
 ///
 /// </summary>
 public DescriptorUpdateTemplateEntry(uint destinationBinding, uint destinationArrayElement, uint descriptorCount, SharpVk.DescriptorType descriptorType, HostSize offset, HostSize stride)
 {
     this.DestinationBinding      = destinationBinding;
     this.DestinationArrayElement = destinationArrayElement;
     this.DescriptorCount         = descriptorCount;
     this.DescriptorType          = descriptorType;
     this.Offset = offset;
     this.Stride = stride;
 }
コード例 #3
0
 /// <summary>
 ///
 /// </summary>
 public SpecializationMapEntry(uint constantID, uint offset, HostSize size)
 {
     this.ConstantID = constantID;
     this.Offset     = offset;
     this.Size       = size;
 }
コード例 #4
0
        private Bool32 DebugReport(DebugReportFlags flags, DebugReportObjectType objectType, ulong @object, Size location, int messageCode, string layerPrefix, string message, IntPtr userData)
        {
            System.Diagnostics.Debug.WriteLine($"{flags}: {message}");

            return(true);
        }