venus: zero out the pipeline handles

We only have to zero out the handles on failure, which is missed. For
pipelines, we can just do it at the beginning for simplicity.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18555>
This commit is contained in:
Yiwei Zhang 2022-09-12 17:46:59 +00:00 committed by Marge Bot
parent d8809b5edc
commit 84a0056033

View file

@ -690,6 +690,8 @@ vn_CreateGraphicsPipelines(VkDevice device,
bool want_sync = false;
VkResult result;
memset(pPipelines, 0, sizeof(*pPipelines) * createInfoCount);
pCreateInfos = vn_fix_graphics_pipeline_create_info(
dev, createInfoCount, pCreateInfos, alloc, &fixes);
if (!pCreateInfos)
@ -741,6 +743,8 @@ vn_CreateComputePipelines(VkDevice device,
bool want_sync = false;
VkResult result;
memset(pPipelines, 0, sizeof(*pPipelines) * createInfoCount);
if (!vn_create_pipeline_handles(dev, createInfoCount, pPipelines, alloc))
return vn_error(dev->instance, VK_ERROR_OUT_OF_HOST_MEMORY);