This commit is contained in:
Matthew 2025-08-16 08:14:18 +10:00
parent bd979e156b
commit 1e49d7fc45

View File

@ -366,6 +366,8 @@ struct Vulkan
BufferView a_buffer_view; BufferView a_buffer_view;
ImageView aux_image; ImageView aux_image;
u8[] convert_shader_bytes;
alias queues this; alias queues this;
} }
@ -390,13 +392,9 @@ struct QueueInfo
bool single_queue; bool single_queue;
} }
u8[] CONVERT_SHADER;
Vulkan Vulkan
Init(PlatformHandles platform_handles, u64 permanent_mem, u64 frame_mem, string convert_shader) Init(PlatformHandles platform_handles, u64 permanent_mem, u64 frame_mem, u8[] conv_shader)
{ {
CONVERT_SHADER = mixin(Embed(convert_shader));
bool success = true; bool success = true;
Vulkan vk = { Vulkan vk = {
@ -406,6 +404,7 @@ Init(PlatformHandles platform_handles, u64 permanent_mem, u64 frame_mem, string
CreateArena(frame_mem), CreateArena(frame_mem),
], ],
platform_handles: platform_handles, platform_handles: platform_handles,
convert_shader_bytes: conv_shader,
}; };
Push(&vk, SI.Renderer); Push(&vk, SI.Renderer);
@ -556,7 +555,7 @@ InitConversionPipeline(Vulkan* vk)
} }
]; ];
CompPipelineInfo conv_info = { CompPipelineInfo conv_info = {
shader: CONVERT_SHADER, shader: vk.convert_shader_bytes,
layout: vk.conv_pipeline_layout, layout: vk.conv_pipeline_layout,
spec: { spec: {
data: &channels, data: &channels,