comp: Remove some vkDeviceWaitIdle calls and document other

This commit is contained in:
Jakob Bornecrantz authored and Jakob Bornecrantz committed 2020-07-24 09:12:22 +00:00
1 parent b70d14f6b0
commit 080fdacc70
3 files changed
+18 -3

No files matched your search

@@ -224,6 +224,12 @@ comp_distortion_destroy(struct comp_distortion *d)
{
struct vk_bundle *vk = d->vk;
/*
* This makes sure that any pending command buffer has completed and all
* resources referred by it can now be manipulated. This make sure that
* validation doesn't complain. This is done during destroy so isn't
* time critical.
*/
vk->vkDeviceWaitIdle(vk->device);
vk->vkDestroyDescriptorSetLayout(vk->device, d->descriptor_set_layout,
+6 -3
View File
@@ -513,8 +513,6 @@ comp_renderer_set_quad_layer(struct comp_renderer *r,
l->transformation[i].offset = data->quad.sub.rect.offset;
l->transformation[i].extent = data->quad.sub.rect.extent;
}
r->c->vk.vkDeviceWaitIdle(r->c->vk.device);
}
void
@@ -550,7 +548,6 @@ comp_renderer_draw(struct comp_renderer *r)
{
_get_view_projection(r);
comp_layer_renderer_draw(r->lr);
r->c->vk.vkDeviceWaitIdle(r->c->vk.device);
r->c->window->flush(r->c->window);
renderer_acquire_swapchain_image(r);
@@ -683,6 +680,12 @@ renderer_resize(struct comp_renderer *r)
{
struct vk_bundle *vk = &r->c->vk;
/*
* This makes sure that any pending command buffer has completed and all
* resources referred by it can now be manipulated. This make sure that
* validation doesn't complain. This is done during resize so isn't time
* critical.
*/
vk->vkDeviceWaitIdle(vk->device);
vk_swapchain_create(&r->c->window->swapchain, r->c->current.width,
+6
View File
@@ -211,6 +211,12 @@ clean_image_views(struct vk_bundle *vk,
static void
image_cleanup(struct vk_bundle *vk, struct comp_swapchain_image *image)
{
/*
* This makes sure that any pending command buffer has completed and all
* resources referred by it can now be manipulated. This make sure that
* validation doesn't complain. This is done during image destruction so
* isn't time critical.
*/
vk->vkDeviceWaitIdle(vk->device);
clean_image_views(vk, image->array_size, &image->views.alpha);