venus: fix pipeline layout lifetime

Should check the count instead of random ptr addr.

Fixes: 19f2b9d0bb ("venus: extend VkPipelineLayout lifetime for ...")
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27054>
(cherry picked from commit b551b6e48a)
This commit is contained in:
Yiwei Zhang 2024-01-11 19:27:57 -08:00 committed by Eric Engestrom
parent 535cef74b0
commit 725541c326
2 changed files with 2 additions and 2 deletions

View file

@ -114,7 +114,7 @@
"description": "venus: fix pipeline layout lifetime",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "19f2b9d0bbd71ba218962a26434507e70f6cde98",
"notes": null

View file

@ -320,7 +320,7 @@ vn_CreatePipelineLayout(VkDevice device,
}
}
layout->has_push_constant_ranges = pCreateInfo->pPushConstantRanges > 0;
layout->has_push_constant_ranges = pCreateInfo->pushConstantRangeCount > 0;
VkPipelineLayout layout_handle = vn_pipeline_layout_to_handle(layout);
vn_async_vkCreatePipelineLayout(dev->instance, device, pCreateInfo, NULL,