SOURCE DUMP v1

This commit is contained in:
Rian Drake 2026-10-15 14:09:11 +13:00
commit fb20299e9d
8 changed files with 768360 additions and 0 deletions

View file

@ -0,0 +1,9 @@
namespace Brutal.VulkanApi;
public static partial class VK
{
public const string LAYER_KHRONOS_VALIDATION = "VK_LAYER_KHRONOS_validation";
// UTF-8 spelling of the same layer name for allocation-free byte comparisons
public static ReadOnlySpan<byte> LAYER_KHRONOS_VALIDATION_UTF8 => "VK_LAYER_KHRONOS_validation"u8;
}

View file

@ -0,0 +1,9 @@
namespace Brutal.VulkanApi;
public partial struct VkClearValue
{
public static implicit operator VkClearValue(VkClearColorValue color) => new VkClearValue { Color = color };
public static implicit operator VkClearValue(VkClearDepthStencilValue depthStencil) =>
new VkClearValue { DepthStencil = depthStencil };
}

View file

@ -0,0 +1,11 @@
namespace Brutal.VulkanApi;
public partial struct VkExtent2D
{
public VkExtent2D(int width, int height)
: this()
{
Width = width;
Height = height;
}
}

View file

@ -0,0 +1,12 @@
namespace Brutal.VulkanApi;
public partial struct VkExtent3D
{
public VkExtent3D(int width, int height, int depth)
: this()
{
Width = width;
Height = height;
Depth = depth;
}
}

View file

@ -0,0 +1,11 @@
namespace Brutal.VulkanApi;
public partial struct VkOffset2D
{
public VkOffset2D(int x, int y)
: this()
{
X = x;
Y = y;
}
}

View file

@ -0,0 +1,12 @@
namespace Brutal.VulkanApi;
public partial struct VkOffset3D
{
public VkOffset3D(int x, int y, int z)
: this()
{
X = x;
Y = y;
Z = z;
}
}

View file

@ -0,0 +1,18 @@
namespace Brutal.VulkanApi;
public partial struct VkRect2D
{
public VkRect2D(VkExtent2D extent)
: this()
{
Offset = new VkOffset2D(0, 0);
Extent = extent;
}
public VkRect2D(int width, int height)
: this()
{
Offset = new VkOffset2D(0, 0);
Extent = new VkExtent2D(width, height);
}
}

View file

@ -0,0 +1,14 @@
namespace Brutal.VulkanApi;
public static partial class Vulkan
{
public static LogCategory Log = LogCategory.Make("Vulkan");
/// <summary>
/// Assembles the input parameters into a VkInstanceCreateInfo struct and uses it to create an instance
/// </summary>
public static Instance CreateInstance(Instance.CreateInfo createInfo)
{
return new Instance(createInfo);
}
}