namespace Brutal.VulkanApi.Abstractions; public static class ShaderModuleExtensions { public static unsafe VkShaderModule FromSpirv(Device device, ReadOnlySpan bytes, VkAllocator? allocator) { return device.CreateShaderModule( new VkShaderModuleCreateInfo { Code = bytes.Cast().AsPointer(), CodeSize = ByteSize.Of(bytes) }, allocator ); } }