Skip to main content

create_shader_module

Function create_shader_module 

Source
pub unsafe fn create_shader_module(
    device: &Device,
    create_info: &ShaderModuleCreateInfo<'_>,
    allocator: Option<&AllocationCallbacks>,
) -> Result<ShaderModule, CallError>
Expand description

Call vkCreateShaderModule using this context’s cached function pointer.

§Errors

Reports a missing command, invalid slice lengths/counts or a native error.

§Safety

The context and all handles must be live and belong to the same Vulkan implementation/device. Meet vkCreateShaderModule valid usage, enabled API/extension/feature, pointer-chain lifetime, callback compatibility and host/GPU synchronization requirements. Native resources require explicit destruction after completion.

Khronos reference: vkCreateShaderModule