"description": "lavapipe: fix descriptor set layout reference counting in layout merge",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "d4d5a7abba7a17fc31921a63c135561f74b87254"
},
/* no layout created yet: copy onto ralloc ctx allocation for auto-free */
dst->layout = ralloc(dst->mem_ctx, struct lvp_pipeline_layout);
memcpy(dst->layout, src, sizeof(struct lvp_pipeline_layout));
+ for (unsigned i = 0; i < dst->layout->vk.set_count; i++) {
+ if (dst->layout->vk.set_layouts[i])
+ vk_descriptor_set_layout_ref(dst->layout->vk.set_layouts[i]);
+ }
return;
}
#ifndef NDEBUG
}
#endif
for (unsigned i = 0; i < src->vk.set_count; i++) {
- if (!dst->layout->vk.set_layouts[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]);
+ }
}
dst->layout->vk.set_count = MAX2(dst->layout->vk.set_count,
src->vk.set_count);