From: John Tsiombikas Date: Fri, 19 Aug 2022 09:38:47 +0000 (+0300) Subject: command buffer allocation X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=vktest3;a=commitdiff_plain;h=3bc7e16ecdfef770faf3a2914234bd1f20f5fda1 command buffer allocation --- diff --git a/src/vk.c b/src/vk.c index 6887460..5480fc1 100644 --- a/src/vk.c +++ b/src/vk.c @@ -66,6 +66,8 @@ static int initflags; static struct { unsigned int flags; int count; + int qfam; + VkCommandPool cmdpool; } initq[MAX_INIT_QUEUE]; static int num_initq; @@ -101,6 +103,15 @@ void vk_init_xwin(Display *d, Window w) void vk_init_queue(unsigned int qflags, int count) { + int i; + + for(i=0; i= MAX_INIT_QUEUE) { fprintf(stderr, "vk_init_queue: too many queues\n"); return; @@ -238,9 +249,69 @@ VkQueue vk_getq_fam(int fam, int n) return q; } -VkQueue vk_getq(unsigned int flags) +VkQueue vk_getq(unsigned int flags, int n) +{ + return vk_getq_fam(vk_find_qfamily(flags), n); +} + +static VkCommandPool find_cmdpool(int qfam) +{ + int i; + VkCommandPoolCreateInfo pinf; + + for(i=0; i