mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-21 22:34:43 +00:00
Make compute shaders work
This commit is contained in:
parent
56a27e6390
commit
106664c156
@ -257,7 +257,8 @@ fn write_entry_point(doc: &parse::Spirv, instruction: &parse::Instruction) -> St
|
||||
},
|
||||
|
||||
enums::ExecutionModel::ExecutionModelGLCompute => {
|
||||
(format!("::vulkano::shader::ComputeShaderEntryPoint"), format!("compute_shader_entry_point"))
|
||||
(format!("::vulkano::shader::ComputeShaderEntryPoint<Layout>"),
|
||||
format!("compute_shader_entry_point(::std::ffi::CStr::from_ptr(NAME.as_ptr() as *const _), Layout)"))
|
||||
},
|
||||
|
||||
enums::ExecutionModel::ExecutionModelKernel => panic!("Kernels are not supported"),
|
||||
|
@ -102,6 +102,17 @@ impl ShaderModule {
|
||||
marker: PhantomData,
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub unsafe fn compute_shader_entry_point<'a, L>(&'a self, name: &'a CStr, layout: L)
|
||||
-> ComputeShaderEntryPoint<'a, L>
|
||||
{
|
||||
ComputeShaderEntryPoint {
|
||||
module: self,
|
||||
name: name,
|
||||
layout: layout,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
unsafe impl VulkanObject for ShaderModule {
|
||||
|
Loading…
Reference in New Issue
Block a user