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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user