mirror of
https://github.com/italicsjenga/portability.git
synced 2024-11-22 23:11:30 +11:00
Merge #59
59: Implement push constant command r=kvark a=msiglreith With this and a small change to spirv cross for combined image sampler support we can start tracking support for the Vulkan samples from SaschaWillems. Co-authored-by: msiglreith <m.siglreith@gmail.com>
This commit is contained in:
commit
b46ade6360
|
@ -3004,14 +3004,34 @@ pub extern "C" fn gfxCmdCopyQueryPoolResults(
|
|||
}
|
||||
#[inline]
|
||||
pub extern "C" fn gfxCmdPushConstants(
|
||||
commandBuffer: VkCommandBuffer,
|
||||
mut commandBuffer: VkCommandBuffer,
|
||||
layout: VkPipelineLayout,
|
||||
stageFlags: VkShaderStageFlags,
|
||||
offset: u32,
|
||||
size: u32,
|
||||
pValues: *const ::std::os::raw::c_void,
|
||||
) {
|
||||
unimplemented!()
|
||||
assert_eq!(size % 4, 0);
|
||||
|
||||
let values = unsafe {
|
||||
slice::from_raw_parts(pValues as *const u32, size as usize / 4)
|
||||
};
|
||||
|
||||
if stageFlags & VkShaderStageFlagBits::VK_SHADER_STAGE_COMPUTE_BIT as u32 != 0 {
|
||||
commandBuffer.push_compute_constants(
|
||||
&*layout,
|
||||
offset,
|
||||
values,
|
||||
);
|
||||
}
|
||||
if stageFlags & VkShaderStageFlagBits::VK_SHADER_STAGE_ALL_GRAPHICS as u32 != 0 {
|
||||
commandBuffer.push_graphics_constants(
|
||||
&*layout,
|
||||
conv::map_stage_flags(stageFlags),
|
||||
offset,
|
||||
values,
|
||||
);
|
||||
}
|
||||
}
|
||||
#[inline]
|
||||
pub extern "C" fn gfxCmdBeginRenderPass(
|
||||
|
|
Loading…
Reference in a new issue