Skip to content

Commit

Permalink
style: use two newlines b/w wgpu_hal::Device trait items
Browse files Browse the repository at this point in the history
  • Loading branch information
ErichDonGubler committed May 22, 2024
1 parent 4602b31 commit ba5b6a4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wgpu-hal/src/dx12/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ impl crate::Device for super::Device {
}

unsafe fn flush_mapped_ranges<I>(&self, _buffer: &super::Buffer, _ranges: I) {}

unsafe fn invalidate_mapped_ranges<I>(&self, _buffer: &super::Buffer, _ranges: I) {}

unsafe fn create_texture(
Expand Down Expand Up @@ -1643,6 +1644,7 @@ impl crate::Device for super::Device {
) -> Result<crate::FenceValue, DeviceError> {
Ok(unsafe { fence.raw.GetCompletedValue() })
}

unsafe fn wait(
&self,
fence: &super::Fence,
Expand Down
4 changes: 4 additions & 0 deletions wgpu-hal/src/metal/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ impl crate::Device for super::Device {
unsafe fn unmap_buffer(&self, _buffer: &super::Buffer) -> DeviceResult<()> {
Ok(())
}

unsafe fn flush_mapped_ranges<I>(&self, _buffer: &super::Buffer, _ranges: I) {}

unsafe fn invalidate_mapped_ranges<I>(&self, _buffer: &super::Buffer, _ranges: I) {}

unsafe fn create_texture(
Expand Down Expand Up @@ -1252,6 +1254,7 @@ impl crate::Device for super::Device {
}
Ok(max_value)
}

unsafe fn wait(
&self,
fence: &super::Fence,
Expand Down Expand Up @@ -1298,6 +1301,7 @@ impl crate::Device for super::Device {
default_capture_scope.begin_scope();
true
}

unsafe fn stop_capture(&self) {
let shared_capture_manager = metal::CaptureManager::shared();
if let Some(default_capture_scope) = shared_capture_manager.default_capture_scope() {
Expand Down
7 changes: 7 additions & 0 deletions wgpu-hal/src/vulkan/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -975,6 +975,7 @@ impl crate::Device for super::Device {
.unwrap();
}
}

unsafe fn invalidate_mapped_ranges<I>(&self, buffer: &super::Buffer, ranges: I)
where
I: Iterator<Item = crate::MemoryRange>,
Expand Down Expand Up @@ -1447,6 +1448,7 @@ impl crate::Device for super::Device {
binding_arrays,
})
}

unsafe fn destroy_pipeline_layout(&self, pipeline_layout: super::PipelineLayout) {
unsafe {
self.shared
Expand Down Expand Up @@ -1956,6 +1958,7 @@ impl crate::Device for super::Device {

Ok(super::RenderPipeline { raw })
}

unsafe fn destroy_render_pipeline(&self, pipeline: super::RenderPipeline) {
unsafe { self.shared.raw.destroy_pipeline(pipeline.raw, None) };

Expand Down Expand Up @@ -2091,6 +2094,7 @@ impl crate::Device for super::Device {
}
})
}

unsafe fn destroy_fence(&self, fence: super::Fence) {
match fence {
super::Fence::TimelineSemaphore(raw) => {
Expand All @@ -2112,6 +2116,7 @@ impl crate::Device for super::Device {

self.counters.fences.sub(1);
}

unsafe fn get_fence_value(
&self,
fence: &super::Fence,
Expand All @@ -2121,6 +2126,7 @@ impl crate::Device for super::Device {
self.shared.extension_fns.timeline_semaphore.as_ref(),
)
}

unsafe fn wait(
&self,
fence: &super::Fence,
Expand Down Expand Up @@ -2193,6 +2199,7 @@ impl crate::Device for super::Device {
#[cfg(not(feature = "renderdoc"))]
false
}

unsafe fn stop_capture(&self) {
#[cfg(feature = "renderdoc")]
{
Expand Down

0 comments on commit ba5b6a4

Please sign in to comment.