mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 02:10:11 +01:00
venus: extend VkPipelineLayout lifetime for batched VkCmdPushConstants()
Signed-off-by: Dawn Han <dawnhan@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18988>
This commit is contained in:
parent
91966f2eff
commit
19f2b9d0bb
2 changed files with 7 additions and 2 deletions
|
|
@ -133,6 +133,8 @@ vn_CreatePipelineLayout(VkDevice device,
|
|||
break;
|
||||
}
|
||||
|
||||
layout->has_push_constant_ranges = pCreateInfo->pPushConstantRanges > 0;
|
||||
|
||||
VkPipelineLayout layout_handle = vn_pipeline_layout_to_handle(layout);
|
||||
vn_async_vkCreatePipelineLayout(dev->instance, device, pCreateInfo, NULL,
|
||||
&layout_handle);
|
||||
|
|
@ -747,7 +749,8 @@ vn_CreateGraphicsPipelines(VkDevice device,
|
|||
struct vn_pipeline *pipeline = vn_pipeline_from_handle(pPipelines[i]);
|
||||
struct vn_pipeline_layout *layout =
|
||||
vn_pipeline_layout_from_handle(pCreateInfos[i].layout);
|
||||
if (layout->push_descriptor_set_layout) {
|
||||
if (layout->push_descriptor_set_layout ||
|
||||
layout->has_push_constant_ranges) {
|
||||
pipeline->layout = vn_pipeline_layout_ref(dev, layout);
|
||||
}
|
||||
if ((pCreateInfos[i].flags & VN_PIPELINE_CREATE_SYNC_MASK))
|
||||
|
|
@ -799,7 +802,8 @@ vn_CreateComputePipelines(VkDevice device,
|
|||
struct vn_pipeline *pipeline = vn_pipeline_from_handle(pPipelines[i]);
|
||||
struct vn_pipeline_layout *layout =
|
||||
vn_pipeline_layout_from_handle(pCreateInfos[i].layout);
|
||||
if (layout->push_descriptor_set_layout) {
|
||||
if (layout->push_descriptor_set_layout ||
|
||||
layout->has_push_constant_ranges) {
|
||||
pipeline->layout = vn_pipeline_layout_ref(dev, layout);
|
||||
}
|
||||
if ((pCreateInfos[i].flags & VN_PIPELINE_CREATE_SYNC_MASK))
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ struct vn_pipeline_layout {
|
|||
struct vn_object_base base;
|
||||
|
||||
struct vn_descriptor_set_layout *push_descriptor_set_layout;
|
||||
bool has_push_constant_ranges;
|
||||
struct vn_refcount refcount;
|
||||
};
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(vn_pipeline_layout,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue