finalized
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
using System;
|
||||
using System.Interop;
|
||||
using System.Collections;
|
||||
|
||||
namespace Vulkan;
|
||||
|
||||
@@ -17,7 +18,7 @@ static
|
||||
#if BF_PLATFORM_WINDOWS
|
||||
.Stdcall;
|
||||
#else
|
||||
.Cdecl;
|
||||
.Unspecified;
|
||||
#endif
|
||||
|
||||
public const let VK_NULL_HANDLE = 0;
|
||||
@@ -29,11 +30,43 @@ extension VkResult
|
||||
public void ReturnValueDiscarded();
|
||||
}
|
||||
|
||||
extension VkFormat
|
||||
{
|
||||
public struct Component : this(Channel channel, int? bits, NumericFormat numericFormat)
|
||||
{
|
||||
public enum Channel { R, G, B, A, D, S }
|
||||
}
|
||||
|
||||
//public struct ChromaSubsamplingInfo : this(int luma, int chroma1, int chroma2);
|
||||
}
|
||||
|
||||
namespace Vulkan.Metadata;
|
||||
|
||||
extension VulkanExtension
|
||||
{
|
||||
public enum Kind { Instance, Device }
|
||||
|
||||
public struct DependencyIterator : IEnumerator<VulkanExtension>
|
||||
{
|
||||
public VulkanExtension ext;
|
||||
public int index;
|
||||
public int count;
|
||||
|
||||
public this(VulkanExtension ext)
|
||||
{
|
||||
this.ext = ext;
|
||||
this.index = 0;
|
||||
this.count = ext.DependencyCount;
|
||||
}
|
||||
|
||||
public Result<VulkanExtension> GetNext() mut
|
||||
{
|
||||
if (index >= count) return .Err;
|
||||
return .Ok(ext.GetDependency(index++));
|
||||
}
|
||||
}
|
||||
|
||||
public DependencyIterator Dependencies => .(this);
|
||||
}
|
||||
|
||||
namespace Vulkan.External;
|
||||
|
||||
Reference in New Issue
Block a user