From b9b57a24df975cf6d46a3954773eca36b96e7407 Mon Sep 17 00:00:00 2001 From: AlphaModder Date: Fri, 3 Nov 2017 23:13:06 -0700 Subject: [PATCH] Add cmd_push_constants to Device. --- ash/src/device.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ash/src/device.rs b/ash/src/device.rs index 66fc81f..ca152e3 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -649,6 +649,24 @@ pub trait DeviceV1_0 { ) } + unsafe fn cmd_push_constants( + &self, + command_buffer: vk::CommandBuffer, + layout: vk::PipelineLayout, + stage_flags: vk::ShaderStageFlags, + offset: vk::uint32_t, + constants: &[u32] + ) { + self.fp_v1_0().cmd_push_constants( + command_buffer, + layout, + stage_flags, + offset, + constants.len() as vk::uint32_t, + constants.as_ptr() as _, + ); + } + unsafe fn cmd_begin_render_pass( &self, command_buffer: vk::CommandBuffer,