Ejemplo n.º 1
0
        public void CmdClearDepthStencilImage(IVkImage image, VkImageLayout imageLayout, VkClearDepthStencilValue depthStencil, IReadOnlyList <VkImageSubresourceRange> ranges)
        {
            var unmanagedSize =
                ranges.SizeOfMarshalDirect();
            var unmanagedArray = new byte[unmanagedSize];

            fixed(byte *unmanagedStart = unmanagedArray)
            {
                var unmanaged      = unmanagedStart;
                var _commandBuffer = Handle;
                var _image         = image?.Handle ?? VkImage.HandleType.Null;
                var _imageLayout   = imageLayout;
                var _pDepthStencil = &depthStencil;
                var _rangeCount    = ranges?.Count ?? 0;
                var _pRanges       = ranges.MarshalDirect(ref unmanaged);

                Direct.CmdClearDepthStencilImage(_commandBuffer, _image, _imageLayout, _pDepthStencil, _rangeCount, _pRanges);
            }
        }
Ejemplo n.º 2
0
 public VkClearValue(VkClearDepthStencilValue depthStencil)
 {
     raw          = default(VkBlob16);
     DepthStencil = depthStencil;
 }