mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 06:00:20 +00:00
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
1 changed files with 9 additions and 0 deletions
|
@ -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 a new issue