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:
parent
045f324e97
commit
59bfbd3295
@ -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
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user