c/main: Only allocate one image for static swapchains

This commit is contained in:
Jakob Bornecrantz 2020-05-27 19:56:01 +01:00
parent e8e7493679
commit aa0523e535

View file

@ -224,6 +224,10 @@ comp_swapchain_create(struct xrt_compositor *xc,
VkResult ret;
if ((create & XRT_SWAPCHAIN_CREATE_STATIC_IMAGE) != 0) {
num_images = 1;
}
struct comp_swapchain *sc = U_TYPED_CALLOC(struct comp_swapchain);
sc->base.base.destroy = swapchain_destroy;
sc->base.base.acquire_image = swapchain_acquire_image;