Skip to content

Commit b89a57f

Browse files
TsuguriAdam Winiarczuk
and
Adam Winiarczuk
authored
Dx12 HAL texture: expose raw resource (#6502)
Co-authored-by: Adam Winiarczuk <[email protected]>
1 parent 47d20d9 commit b89a57f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

wgpu-hal/src/dx12/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,12 @@ pub struct Texture {
777777
allocation: Option<suballocation::AllocationWrapper>,
778778
}
779779

780+
impl Texture {
781+
pub unsafe fn raw_resource(&self) -> &Direct3D12::ID3D12Resource {
782+
&self.resource
783+
}
784+
}
785+
780786
impl crate::DynTexture for Texture {}
781787
impl crate::DynSurfaceTexture for Texture {}
782788

0 commit comments

Comments
 (0)