mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-17 04:15:44 +00:00
c/renderer: Don't wait for device idle every frame.
Do wait on device idle when destroying the swap chain. Don't wait on device idle multiple times in resize. Validation on NVIDA and AMD is happy when only keeping the two idles when resizing and destroying the swapchain.
This commit is contained in:
parent
e477452ac6
commit
916d7708c2
|
@ -165,7 +165,6 @@ comp_renderer_frame(struct comp_renderer *r,
|
|||
renderer_set_swapchain_image(r, 0, left, left_layer);
|
||||
renderer_set_swapchain_image(r, 1, right, right_layer);
|
||||
renderer_render(r);
|
||||
r->c->vk.vkDeviceWaitIdle(r->c->vk.device);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -805,7 +804,6 @@ renderer_resize(struct comp_renderer *r)
|
|||
renderer_create_frame_buffers(r);
|
||||
renderer_allocate_command_buffers(r);
|
||||
renderer_build_command_buffers(r);
|
||||
vk->vkDeviceWaitIdle(vk->device);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -303,6 +303,8 @@ comp_swapchain_image_cleanup(struct vk_bundle *vk,
|
|||
uint32_t array_size,
|
||||
struct comp_swapchain_image *image)
|
||||
{
|
||||
vk->vkDeviceWaitIdle(vk->device);
|
||||
|
||||
if (image->views != NULL) {
|
||||
for (uint32_t i = 0; i < array_size; ++i) {
|
||||
if (image->views[i] == VK_NULL_HANDLE) {
|
||||
|
|
Loading…
Reference in a new issue