mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 19:00:13 +01:00
st/nine: Flush the queue at device dtor
Flush the queue to get refcounts right, and properly release the items, instead of throwing away all pending commands. Signed-off-by: Axel Davy <axel.davy@ens.fr>
This commit is contained in:
parent
4e922c81f6
commit
5f4359ea0e
1 changed files with 6 additions and 1 deletions
|
|
@ -535,8 +535,13 @@ NineDevice9_dtor( struct NineDevice9 *This )
|
|||
|
||||
DBG("This=%p\n", This);
|
||||
|
||||
/* Do not call nine_csmt_process here. The device is dead! */
|
||||
/* Flush all pending commands to get refcount right,
|
||||
* and properly release bound objects. It is ok to still
|
||||
* execute commands while we are in device dtor, because
|
||||
* we haven't released anything yet. Note that no pending
|
||||
* command can increase the device refcount. */
|
||||
if (This->csmt_active && This->csmt_ctx) {
|
||||
nine_csmt_process(This);
|
||||
nine_csmt_destroy(This, This->csmt_ctx);
|
||||
This->csmt_active = FALSE;
|
||||
This->csmt_ctx = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue