rusticl/mesa: use pipe_sampler_view_reference
pipe_sampler_views are reference counted, so we shouldn't delete them directly. Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36243>
This commit is contained in:
@@ -350,8 +350,7 @@ impl<'c, 'r> PipeSamplerView<'c, 'r> {
|
|||||||
impl Drop for PipeSamplerView<'_, '_> {
|
impl Drop for PipeSamplerView<'_, '_> {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
unsafe {
|
unsafe {
|
||||||
let ctx = self.view.as_ref().context;
|
pipe_sampler_view_reference(&mut self.view.as_ptr(), ptr::null_mut());
|
||||||
(*ctx).sampler_view_release.unwrap()(ctx, self.view.as_ptr())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user