comp/main: Deal with MSVC not liking static array sizes being non-constant.

This commit is contained in:
Ryan Pavlik 2021-03-25 11:59:36 -05:00
parent 0140ea34b6
commit bd00c7ffd3

View file

@ -589,7 +589,7 @@ comp_target_swapchain_update_timings(struct comp_target *ct)
return VK_SUCCESS;
}
VkPastPresentationTimingGOOGLE timings[count];
VkPastPresentationTimingGOOGLE *timings = U_TYPED_ARRAY_CALLOC(VkPastPresentationTimingGOOGLE, count);
c->vk.vkGetPastPresentationTimingGOOGLE( //
vk->device, //
cts->swapchain.handle, //
@ -604,7 +604,7 @@ comp_target_swapchain_update_timings(struct comp_target *ct)
timings[i].earliestPresentTime, //
timings[i].presentMargin); //
}
free(timings);
return VK_SUCCESS;
}