memset(chain, 0x00, sizeof(vk_swapchain_t));
- chain->allocator = *allocator;
+ chain->allocator = allocator;
chain->surface = info->surface;
format = get_tbm_format(info->imageFormat, info->compositeAlpha);
error = chain->get_buffers(device, chain, &buffers, &chain->buffer_count);
VK_CHECK(error == VK_SUCCESS, goto done, "swapchain backend get buffers failed.\n");
- chain->buffers = vk_alloc(&chain->allocator, chain->buffer_count * sizeof(vk_buffer_t),
+ chain->buffers = vk_alloc(chain->allocator, chain->buffer_count * sizeof(vk_buffer_t),
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
VK_CHECK(chain->buffers, goto error_mem_alloc, "vk_alloc() failed.\n");
chain->buffers[i].tbm = buffers[i];
icd->create_presentable_image(device, chain->buffers[i].tbm, &image_info,
- &chain->allocator, &chain->buffers[i].image);
+ chain->allocator, &chain->buffers[i].image);
}
goto done;
uint32_t i;
for (i = 0; i < chain->buffer_count; i++)
- destroy_image(device, chain->buffers[i].image, &chain->allocator);
+ destroy_image(device, chain->buffers[i].image, chain->allocator);
}
}
chain->deinit(device, chain);
- vk_free(&chain->allocator, chain->buffers);
- vk_free(&chain->allocator, chain);
+ vk_free(chain->allocator, chain->buffers);
+ vk_free(chain->allocator, chain);
}
}
if (swapchain_tpl->buffers)
free(swapchain_tpl->buffers);
- vk_free(&chain->allocator, swapchain_tpl);
+ vk_free(chain->allocator, swapchain_tpl);
}
}
VkResult error = VK_ERROR_DEVICE_LOST;
- swapchain_tpl = vk_alloc(&chain->allocator, sizeof(vk_swapchain_tpl_t),
+ swapchain_tpl = vk_alloc(chain->allocator, sizeof(vk_swapchain_tpl_t),
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
VK_CHECK(swapchain_tpl, return VK_ERROR_OUT_OF_HOST_MEMORY, "vk_alloc() failed.\n");
memset(swapchain_tpl, 0x00, sizeof(*swapchain_tpl));