Skip to content

Commit

Permalink
Dx12 HAL texture: expose raw resource (#6502)
Browse files Browse the repository at this point in the history
Co-authored-by: Adam Winiarczuk <[email protected]>
  • Loading branch information
Tsuguri and Adam Winiarczuk authored Nov 8, 2024
1 parent 47d20d9 commit b89a57f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions wgpu-hal/src/dx12/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,12 @@ pub struct Texture {
allocation: Option<suballocation::AllocationWrapper>,
}

impl Texture {
pub unsafe fn raw_resource(&self) -> &Direct3D12::ID3D12Resource {
&self.resource
}
}

impl crate::DynTexture for Texture {}
impl crate::DynSurfaceTexture for Texture {}

Expand Down

0 comments on commit b89a57f

Please sign in to comment.