private static long createCommandPool(VkDevice device, int queueNodeIndex) { VkCommandPoolCreateInfo cmdPoolInfo = VkCommandPoolCreateInfo.callocStack() .sType(VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) .queueFamilyIndex(queueNodeIndex) .flags(VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT); LongBuffer pCmdPool = stackMallocLong(1); int err = vkCreateCommandPool(device, cmdPoolInfo, null, pCmdPool); long commandPool = pCmdPool.get(0); if (err != VK_SUCCESS) { throw new AssertionError("Failed to create command pool: " + translateVulkanResult(err)); } return commandPool; }
private long createCommandPool(VkDevice device, int queueNodeIndex) { VkCommandPoolCreateInfo cmdPoolInfo = VkCommandPoolCreateInfo.calloc() .sType(VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) .queueFamilyIndex(queueNodeIndex) .flags(VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT); LongBuffer pCmdPool = memAllocLong(1); int err = vkCreateCommandPool(device, cmdPoolInfo, null, pCmdPool); long commandPool = pCmdPool.get(0); cmdPoolInfo.free(); memFree(pCmdPool); if (err != VK_SUCCESS) { throw new AssertionError("Failed to create command pool: " + VKUtil.translateVulkanResult(err)); } return commandPool; }
private static long createCommandPool(VkDevice device, int queueNodeIndex) { VkCommandPoolCreateInfo cmdPoolInfo = VkCommandPoolCreateInfo.calloc() .sType(VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO) .queueFamilyIndex(queueNodeIndex) .flags(VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT); LongBuffer pCmdPool = memAllocLong(1); int err = vkCreateCommandPool(device, cmdPoolInfo, null, pCmdPool); long commandPool = pCmdPool.get(0); cmdPoolInfo.free(); memFree(pCmdPool); if (err != VK_SUCCESS) { throw new AssertionError("Failed to create command pool: " + translateVulkanResult(err)); } return commandPool; }