Beispiel #1
0
 /// <summary>
 /// Bind device memory to a buffer object.
 /// </summary>
 public void BindMemory(DeviceMemory memory, DeviceSize memoryOffset)
 {
     unsafe
     {
         try
         {
             Result commandResult;
             Interop.DeviceMemory marshalledMemory = default(Interop.DeviceMemory);
             memory?.MarshalTo(&marshalledMemory);
             commandResult = Interop.Commands.vkBindBufferMemory(this.parent.handle, this.handle, marshalledMemory, memoryOffset);
             if (SharpVkException.IsError(commandResult))
             {
                 throw SharpVkException.Create(commandResult);
             }
         }
         finally
         {
             Interop.HeapUtil.FreeLog();
         }
     }
 }
Beispiel #2
0
 internal DeviceMemory(Interop.DeviceMemory handle, Device parent, CommandCache commandCache)
 {
     this.handle       = handle;
     this.parent       = parent;
     this.commandCache = commandCache;
 }