From aa0523e53558beab92a0c184bf6496b509204ef5 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Wed, 27 May 2020 19:56:01 +0100 Subject: [PATCH] c/main: Only allocate one image for static swapchains --- src/xrt/compositor/main/comp_swapchain.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xrt/compositor/main/comp_swapchain.c b/src/xrt/compositor/main/comp_swapchain.c index f866165f9..22875b4fd 100644 --- a/src/xrt/compositor/main/comp_swapchain.c +++ b/src/xrt/compositor/main/comp_swapchain.c @@ -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;