From eaa4e81ea20038ac45c18ddd5d5613edf082f0aa Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 12 Jan 2023 13:12:17 +1000 Subject: [PATCH] lavapipe: fix one more descriptor set reference issue I thought I'd fixed this already, must have gotten lost in a rebase. fixes dEQP-VK.pipeline.pipeline_library.graphics_library.misc.bind_null_descriptor_set.1010 Fixes: 20902d1ed685 ("lavapipe: fix descriptor set layout reference counting in layout merge") Reviewed-by: Mike Blumenkrantz Part-of: (cherry picked from commit 417c51a511b23492b74d17b4d387bd814e850c15) --- .pick_status.json | 2 +- src/gallium/frontends/lavapipe/lvp_pipeline.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index ae081039d20..b64a2f7f03b 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -6169,7 +6169,7 @@ "description": "lavapipe: fix one more descriptor set reference issue", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "20902d1ed685e97e135f4a16531793ddb7b4db69" }, diff --git a/src/gallium/frontends/lavapipe/lvp_pipeline.c b/src/gallium/frontends/lavapipe/lvp_pipeline.c index 91426707167..ededb4be13f 100644 --- a/src/gallium/frontends/lavapipe/lvp_pipeline.c +++ b/src/gallium/frontends/lavapipe/lvp_pipeline.c @@ -716,7 +716,8 @@ merge_layouts(struct vk_device *device, struct lvp_pipeline *dst, struct lvp_pip for (unsigned i = 0; i < src->vk.set_count; i++) { if (!dst->layout->vk.set_layouts[i]) { dst->layout->vk.set_layouts[i] = src->vk.set_layouts[i]; - vk_descriptor_set_layout_ref(src->vk.set_layouts[i]); + if (dst->layout->vk.set_layouts[i]) + vk_descriptor_set_layout_ref(src->vk.set_layouts[i]); } } dst->layout->vk.set_count = MAX2(dst->layout->vk.set_count,