rusticl/mesa/context: flush context before destruction

Drivers might still be busy doing things and not properly clean things up.

Fixes a rare crash on applicatione exits with some drivers.

Fixes: 50e981a050 ("rusticl/mesa: add fencing support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29223>
This commit is contained in:
Karol Herbst 2024-05-15 13:47:42 +02:00 committed by Marge Bot
parent ec06911b3d
commit f1662e9bc9
1 changed files with 1 additions and 0 deletions

View File

@ -659,6 +659,7 @@ impl PipeContext {
impl Drop for PipeContext {
fn drop(&mut self) {
self.flush().wait();
unsafe {
self.pipe.as_ref().destroy.unwrap()(self.pipe.as_ptr());
}