mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 18:10:11 +01:00
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:
parent
ec06911b3d
commit
f1662e9bc9
1 changed files with 1 additions and 0 deletions
|
|
@ -659,6 +659,7 @@ impl PipeContext {
|
||||||
|
|
||||||
impl Drop for PipeContext {
|
impl Drop for PipeContext {
|
||||||
fn drop(&mut self) {
|
fn drop(&mut self) {
|
||||||
|
self.flush().wait();
|
||||||
unsafe {
|
unsafe {
|
||||||
self.pipe.as_ref().destroy.unwrap()(self.pipe.as_ptr());
|
self.pipe.as_ref().destroy.unwrap()(self.pipe.as_ptr());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue