zink: allow programs to solely manage descriptor deinit
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Thu, 11 Aug 2022 20:45:23 +0000 (16:45 -0400)
committerMarge Bot <emma+marge@anholt.net>
Tue, 30 Aug 2022 04:11:16 +0000 (04:11 +0000)
now that there's no context access, this is perfectly safe and also much simpler

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18197>

src/gallium/drivers/zink/zink_context.c

index 1832a34..54a8561 100644 (file)
@@ -100,13 +100,11 @@ zink_context_destroy(struct pipe_context *pctx)
       hash_table_foreach(&ctx->program_cache[i], entry) {
          struct zink_program *pg = entry->data;
          pg->removed = true;
-         zink_descriptor_program_deinit(screen, pg);
       }
    }
    hash_table_foreach(&ctx->compute_program_cache, entry) {
       struct zink_program *pg = entry->data;
       pg->removed = true;
-      zink_descriptor_program_deinit(screen, pg);
    }
 
    if (ctx->blitter)