zink: null some descriptor buffer pointers during destruction

this shouldn't actually be needed? and yet...

Fixes: 13c6ad0038 ("zink: use a single descriptor buffer for all non-bindless types")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22827>
(cherry picked from commit 738c2eacf3)
This commit is contained in:
Mike Blumenkrantz 2023-05-03 11:43:53 -04:00 committed by Eric Engestrom
parent 0c6903846f
commit b21db0bb8d
2 changed files with 3 additions and 1 deletions

View file

@ -796,7 +796,7 @@
"description": "zink: null some descriptor buffer pointers during destruction",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "13c6ad0038aa42f1c908ca1adecde9bebf9f2509"
},

View file

@ -1463,8 +1463,10 @@ zink_batch_descriptor_deinit(struct zink_screen *screen, struct zink_batch_state
if (bs->dd.db_xfer)
pipe_buffer_unmap(&bs->ctx->base, bs->dd.db_xfer);
bs->dd.db_xfer = NULL;
if (bs->dd.db)
screen->base.resource_destroy(&screen->base, &bs->dd.db->base.b);
bs->dd.db = NULL;
bs->dd.db_bound = false;
bs->dd.db_offset = 0;
memset(bs->dd.cur_db_offset, 0, sizeof(bs->dd.cur_db_offset));