mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 07:20:10 +01:00
rusticl/mesa: convert pointer to ref without transmute in PipeScreen::from_raw
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38807>
This commit is contained in:
parent
7cae6d997d
commit
5dbfa7f85d
1 changed files with 1 additions and 1 deletions
|
|
@ -189,7 +189,7 @@ impl PipeScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) fn from_raw<'s>(screen: &'s *mut pipe_screen) -> &'s Self {
|
pub(super) fn from_raw<'s>(screen: &'s *mut pipe_screen) -> &'s Self {
|
||||||
unsafe { mem::transmute(*screen) }
|
unsafe { &*(*screen).cast() }
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn caps(&self) -> &pipe_caps {
|
pub fn caps(&self) -> &pipe_caps {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue