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

项目:oreon-engine    文件:VKRenderEngine.java   
private static void submitCommandBuffer(VkQueue queue, VkCommandBuffer commandBuffer) {
    if (commandBuffer == null || commandBuffer.address() == 0)
        return;
    VkSubmitInfo submitInfo = VkSubmitInfo.calloc()
            .sType(VK_STRUCTURE_TYPE_SUBMIT_INFO);
    PointerBuffer pCommandBuffers = memAllocPointer(1)
            .put(commandBuffer)
            .flip();
    submitInfo.pCommandBuffers(pCommandBuffers);
    int err = vkQueueSubmit(queue, submitInfo, VK_NULL_HANDLE);
    memFree(pCommandBuffers);
    submitInfo.free();
    if (err != VK_SUCCESS) {
        throw new AssertionError("Failed to submit command buffer: " + VKUtil.translateVulkanResult(err));
    }
}
项目:lwjgl3-swt    文件:ClearScreenDemo.java   
private static void submitCommandBuffer(VkQueue queue, VkCommandBuffer commandBuffer) {
    if (commandBuffer == null || commandBuffer.address() == NULL)
        return;
    VkSubmitInfo submitInfo = VkSubmitInfo.calloc()
            .sType(VK_STRUCTURE_TYPE_SUBMIT_INFO);
    PointerBuffer pCommandBuffers = memAllocPointer(1)
            .put(commandBuffer)
            .flip();
    submitInfo.pCommandBuffers(pCommandBuffers);
    int err = vkQueueSubmit(queue, submitInfo, VK_NULL_HANDLE);
    memFree(pCommandBuffers);
    submitInfo.free();
    if (err != VK_SUCCESS) {
        throw new AssertionError("Failed to submit command buffer: " + translateVulkanResult(err));
    }
}
项目:autostack    文件:ClearScreenDemoUseNewStack.java   
private static void submitCommandBuffer(VkQueue queue, VkCommandBuffer commandBuffer) {
    if (commandBuffer == null || commandBuffer.address() == NULL)
        return;
    VkSubmitInfo submitInfo = VkSubmitInfo.callocStack()
            .sType(VK_STRUCTURE_TYPE_SUBMIT_INFO);
    PointerBuffer pCommandBuffers = stackMallocPointer(1)
            .put(commandBuffer)
            .flip();
    submitInfo.pCommandBuffers(pCommandBuffers);
    int err = vkQueueSubmit(queue, submitInfo, VK_NULL_HANDLE);
    if (err != VK_SUCCESS) {
        throw new AssertionError("Failed to submit command buffer: " + translateVulkanResult(err));
    }
}
项目:autostack    文件:ClearScreenDemoUseCallerStack.java   
private static void submitCommandBuffer(VkQueue queue, VkCommandBuffer commandBuffer) {
    if (commandBuffer == null || commandBuffer.address() == NULL)
        return;
    VkSubmitInfo submitInfo = VkSubmitInfo.callocStack()
            .sType(VK_STRUCTURE_TYPE_SUBMIT_INFO);
    PointerBuffer pCommandBuffers = stackMallocPointer(1)
            .put(commandBuffer)
            .flip();
    submitInfo.pCommandBuffers(pCommandBuffers);
    int err = vkQueueSubmit(queue, submitInfo, VK_NULL_HANDLE);
    if (err != VK_SUCCESS) {
        throw new AssertionError("Failed to submit command buffer: " + translateVulkanResult(err));
    }
}