Add Deref implementation for ComputePipeline (#2759)

# Objective

Fixes a usability problem where the user is unable to use their reference to a ComputePipeline in their compute pass.

## Solution

Implements Deref, allowing the user to obtain the reference to the underlying wgpu::ComputePipeline
This commit is contained in:
Loch Wansbrough 2021-08-31 20:33:21 +00:00
parent 045f324e97
commit 59bfbd3295

View file

@ -59,3 +59,12 @@ impl From<wgpu::ComputePipeline> for ComputePipeline {
}
}
}
impl Deref for ComputePipeline {
type Target = wgpu::ComputePipeline;
#[inline]
fn deref(&self) -> &Self::Target {
&self.value
}
}