Module: Mesa
Branch: staging/23.2
Commit: 82836d18d51476a8dfc67953dea8af96af2ea972
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=82836d18d51476a8dfc67953dea8af96af2ea972

Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Jul 18 14:05:29 2023 -0400

zink: fix the fix for separate shader program refcounting

the previous fix fixed the initial refcount but then left a dangling
ref when doing the optimized program replacement

Fixes: 4e380616430 ("zink: fix separate shader program refcounting")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24255>
(cherry picked from commit 318d0316ddfbfcab2fe76518a1ea1b19a4557bac)

---

 .pick_status.json                       | 2 +-
 src/gallium/drivers/zink/zink_program.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index e107558e24e..dfc599d747a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -23104,7 +23104,7 @@
         "description": "zink: fix the fix for separate shader program 
refcounting",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "4e380616430ce000bc4454f137265ec6e65b6afb",
         "notes": null
diff --git a/src/gallium/drivers/zink/zink_program.c 
b/src/gallium/drivers/zink/zink_program.c
index f24a438d051..b8de224ba4b 100644
--- a/src/gallium/drivers/zink/zink_program.c
+++ b/src/gallium/drivers/zink/zink_program.c
@@ -703,7 +703,7 @@ replace_separable_prog(struct zink_screen *screen, struct 
hash_entry *entry, str
    entry->data = real;
    entry->key = real->shaders;
    real->base.removed = false;
-   prog->full_prog = NULL;
+   zink_gfx_program_reference(screen, &prog->full_prog, NULL);
    prog->base.removed = true;
    return real;
 }

Reply via email to