mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
|
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue