Java 类org.lwjgl.vulkan.VkCommandPoolCreateInfo 实例源码

项目:autostack    文件:ClearScreenDemoUseNewStack.java   
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;
}
项目:autostack    文件:ClearScreenDemoUseCallerStack.java   
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;
}
项目:oreon-engine    文件:VKRenderEngine.java   
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;
}
项目:lwjgl3-swt    文件:ClearScreenDemo.java   
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;
}