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:
Karol Herbst 2025-07-18 22:39:15 +02:00 committed by Marge Bot
parent ff1c146453
commit a245ed462a

View file

@ -350,8 +350,7 @@ impl<'c, 'r> PipeSamplerView<'c, 'r> {
impl Drop for PipeSamplerView<'_, '_> {
fn drop(&mut self) {
unsafe {
let ctx = self.view.as_ref().context;
(*ctx).sampler_view_release.unwrap()(ctx, self.view.as_ptr())
pipe_sampler_view_reference(&mut self.view.as_ptr(), ptr::null_mut());
}
}
}