mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 12:38:24 +01:00
12 lines
411 B
C#
12 lines
411 B
C#
namespace Brutal.VulkanApi.Abstractions;
|
|
|
|
public static class ShaderModuleExtensions
|
|
{
|
|
public static unsafe VkShaderModule FromSpirv(Device device, ReadOnlySpan<byte> bytes, VkAllocator? allocator)
|
|
{
|
|
return device.CreateShaderModule(
|
|
new VkShaderModuleCreateInfo { Code = bytes.Cast<byte, int>().AsPointer(), CodeSize = ByteSize.Of(bytes) },
|
|
allocator
|
|
);
|
|
}
|
|
}
|