mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 07:28:11 +02:00
zink: wait on program cache fences before destroying programs
if these still have outstanding cache jobs, deleting the object now
will cause a crash
maybe fixes some cts flakiness?
cc: mesa-stable
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15226>
(cherry picked from commit c5f585f45a)
This commit is contained in:
parent
eadc089854
commit
4f1a3be5f6
2 changed files with 3 additions and 1 deletions
|
|
@ -481,7 +481,7 @@
|
|||
"description": "zink: wait on program cache fences before destroying programs",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null
|
||||
},
|
||||
|
|
|
|||
|
|
@ -643,6 +643,7 @@ zink_destroy_gfx_program(struct zink_context *ctx,
|
|||
struct zink_gfx_program *prog)
|
||||
{
|
||||
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||
util_queue_fence_wait(&prog->base.cache_fence);
|
||||
if (prog->base.layout)
|
||||
VKSCR(DestroyPipelineLayout)(screen->dev, prog->base.layout, NULL);
|
||||
|
||||
|
|
@ -688,6 +689,7 @@ zink_destroy_compute_program(struct zink_context *ctx,
|
|||
struct zink_compute_program *comp)
|
||||
{
|
||||
struct zink_screen *screen = zink_screen(ctx->base.screen);
|
||||
util_queue_fence_wait(&comp->base.cache_fence);
|
||||
if (comp->base.layout)
|
||||
VKSCR(DestroyPipelineLayout)(screen->dev, comp->base.layout, NULL);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue