mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-29 08:00:12 +01:00
turnip: replace a memset(0) with zalloc in CreateRenderPass
Signed-off-by: Jonathan Marek <jonathan@marek.ca> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5451>
This commit is contained in:
parent
70046145d1
commit
e4099201bc
1 changed files with 1 additions and 2 deletions
|
|
@ -561,12 +561,11 @@ tu_CreateRenderPass2(VkDevice _device,
|
|||
attachments_offset = size;
|
||||
size += pCreateInfo->attachmentCount * sizeof(pass->attachments[0]);
|
||||
|
||||
pass = vk_alloc2(&device->alloc, pAllocator, size, 8,
|
||||
pass = vk_zalloc2(&device->alloc, pAllocator, size, 8,
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
|
||||
if (pass == NULL)
|
||||
return vk_error(device->instance, VK_ERROR_OUT_OF_HOST_MEMORY);
|
||||
|
||||
memset(pass, 0, size);
|
||||
pass->attachment_count = pCreateInfo->attachmentCount;
|
||||
pass->subpass_count = pCreateInfo->subpassCount;
|
||||
pass->attachments = (void *) pass + attachments_offset;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue