diff --git a/src/command_list.rs b/src/command_list.rs index 3209d6948a..c426d95490 100644 --- a/src/command_list.rs +++ b/src/command_list.rs @@ -335,6 +335,17 @@ impl GraphicsCommandList { } } + pub fn set_compute_root_constant( + &self, + root_index: RootIndex, + value: u32, + dest_offset_words: u32, + ) { + unsafe { + self.SetComputeRoot32BitConstant(root_index, value, dest_offset_words); + } + } + pub fn set_graphics_root_descriptor_table( &self, root_index: RootIndex, @@ -375,6 +386,17 @@ impl GraphicsCommandList { } } + pub fn set_graphics_root_constant( + &self, + root_index: RootIndex, + value: u32, + dest_offset_words: u32, + ) { + unsafe { + self.SetGraphicsRoot32BitConstant(root_index, value, dest_offset_words); + } + } + pub fn resource_barrier(&self, barriers: &[ResourceBarrier]) { unsafe { self.ResourceBarrier(barriers.len() as _, barriers.as_ptr() as _) // matches representation diff --git a/src/descriptor.rs b/src/descriptor.rs index 393f943918..bfa0204127 100644 --- a/src/descriptor.rs +++ b/src/descriptor.rs @@ -120,7 +120,8 @@ impl RootParameter { RootParameter(param) } - fn descriptor( + //TODO: should this be unsafe? + pub fn descriptor( ty: d3d12::D3D12_ROOT_PARAMETER_TYPE, visibility: ShaderVisibility, binding: Binding,