VulkanTutorial | Tutorial for the Vulkan graphics and compute API | Graphics library

 by   Overv C++ Version: vdeleter-latest License: No License

kandi X-RAY | VulkanTutorial Summary

kandi X-RAY | VulkanTutorial Summary

VulkanTutorial is a C++ library typically used in User Interface, Graphics applications. VulkanTutorial has no bugs, it has no vulnerabilities and it has medium support. You can download it from GitHub.

This repository hosts the contents of [vulkan-tutorial.com] The website itself is based on [daux.io] which supports [GitHub flavored Markdown] The actual site runs daux.io with a custom theme and a few modifications (and this is built into a [Docker image] Use issues and pull requests to provide feedback related to the website. If you have a problem with your code, then use the comments section in the related chapter to ask a question. Please provide your operating system, graphics card, driver version, source code, expected behaviour and actual behaviour.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              VulkanTutorial has a medium active ecosystem.
              It has 2613 star(s) with 473 fork(s). There are 152 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 41 open issues and 144 have been closed. On average issues are closed in 91 days. There are 6 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of VulkanTutorial is vdeleter-latest

            kandi-Quality Quality

              VulkanTutorial has 0 bugs and 0 code smells.

            kandi-Security Security

              VulkanTutorial has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              VulkanTutorial code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              VulkanTutorial does not have a standard license declared.
              Check the repository for any license declaration and review the terms closely.
              OutlinedDot
              Without a license, all rights are reserved, and you cannot use the library in your applications.

            kandi-Reuse Reuse

              VulkanTutorial releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.
              It has 65 lines of code, 2 functions and 1 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of VulkanTutorial
            Get all kandi verified functions for this library.

            VulkanTutorial Key Features

            No Key Features are available at this moment for VulkanTutorial.

            VulkanTutorial Examples and Code Snippets

            No Code Snippets are available at this moment for VulkanTutorial.

            Community Discussions

            QUESTION

            CMake trying to link with 'vulkan.lib'
            Asked 2022-Mar-26 at 05:54

            I am following a Vulkan tutorial and I choose CMake as my build system. However, the build fails every time because it is trying to link with a file called 'vulkan.lib' from what I know, there's no such file as vulkan.lib because the actual library file for Vulkan is 'vulkan-1.lib'

            Here is my CMake script:

            ...

            ANSWER

            Answered 2022-Mar-26 at 05:54

            Thanks to @Stephen Newell's comment I solved it by getting rid of the vulkan in the second target_link_libraries call and it worked.

            Source https://stackoverflow.com/questions/71200820

            QUESTION

            What's the difference between Vulkan's descriptor set layouts and `VkWriteDescriptorInfo`?
            Asked 2021-Aug-26 at 15:15

            I'm following the Vulkan tutorial about uniform buffers and I'm confused as to why we need to provide descriptor set layouts where all the informations they provide seem to already be in the VkWriteDescriptorSet structures with pass in to function vkUpdateDescriptorSets.

            Why does Vulkan need both pieces of information and not just what we provide through vkUpdateDescriptorSets?

            From the tutorial's code:

            ...

            ANSWER

            Answered 2021-Aug-26 at 15:15

            You need a descriptor set layout before you write to a descriptor set for the same reason you need a class before you can instantiate it. You can't do A a; for some type A before you define what A is. VkWriteDescriptorSet is like doing a.x = whatever; it doesn't make sense until you know what a is, and that requires having the class definition for A.

            Descriptor set layouts define what a descriptor set looks like. It specifies all of the things that go into one. vkAllocateDescriptorSets is how you create an instance of a descriptor set layout (in our analogy, it's A a;, with the set being a). VkWriteDescriptorSet is how you provide the data that goes into a descriptor set (in our analogy, it's like a.x = whatever;, only potentially for multiple members).

            VkWriteDescrptorSet has a lot of data that is redundantly specified in the descriptor set layout so that the implementation does not have to store the set layout as raw data.

            Let's say that binding 2 in a descriptor set is a UBO of length X. And you want to attack a buffer range to that UBO descriptor. To do that, the implementation may need to know that it is a UBO descriptor and what its length is. If it does need to know that, then it would also need to store that information inside the descriptor set.

            That forces the implementation to store extra data that's only useful for writing to the descriptor. If that descriptor is only set once and never again or otherwise modified infrequently (as descriptors often are), the implementation has to keep a bunch of information around for no reason.

            So Vulkan makes you decide whether to keep the information around or not.

            Source https://stackoverflow.com/questions/68940277

            QUESTION

            Why is my subpass input attachment layout invalid?
            Asked 2021-May-05 at 23:10

            I'm building a headless vulkan renderer and cannot understand this validation error I received:

            ...

            ANSWER

            Answered 2021-May-05 at 22:23
            VkSubpassDescription subpass;
            subpass.colorAttachmentCount = 1;
            subpass.pColorAttachments = &color_ref;
            subpass.pDepthStencilAttachment = &depth_ref;
            subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
            

            Source https://stackoverflow.com/questions/67408486

            QUESTION

            Most generally correct way of updating a vertex buffer in Vulkan
            Asked 2020-Dec-06 at 18:12

            Assume a vertex buffer in device memory and a staging buffer that's host coherent and visible. Also assume a desktop system with a discrete GPU (so separate memories). And lastly, assume correct inter-frame synchronization.

            I see two general possible ways of updating a vertex buffer:

            1. Map + memcpy + unmap into the staging buffer, followed by a transient (single command) command buffer that contains a vkCmdCopyBuffer, submit it to the graphics queue and wait for the queue to idle, then free the transient command buffer. After that submit the regular frame draw queue to the graphics queue as usual. This is the code used on https://vulkan-tutorial.com (for example, this .cpp file).

            2. Similar to above, only instead use additional semaphores to signal after the staging buffer copy submit, and wait in the regular frame draw submit, thus skipping the "wait-for-idle" command.

            #2 sort of makes sense to me, and I've repeatedly read not to do any "wait-for-idle" operations in Vulkan because it synchronizes the CPU with the GPU, but I've never seen it used in any tutorial or example online. What do the pros usually do if the vertex buffer has to be updated relatively often?

            ...

            ANSWER

            Answered 2020-Dec-06 at 18:12

            First, if you allocated coherent memory, then you almost certainly did so in order to access it from the CPU. Which requires mapping it. Vulkan is not OpenGL; there is no requirement that memory be unmapped before it can be used (and OpenGL doesn't even have that requirement anymore).

            Unmapping memory should only ever be done when you are about to delete the memory allocation itself.

            Second, if you think of an idea that involves having the CPU wait for a queue or device to idle before proceeding, then you have come up with a bad idea and should use a different one. The only time you should wait for a device to idle is when you want to destroy the device.

            Tutorial code should not be trusted to give best practices. It is often intended to be simple, to make it easy to understand a concept. Simple Vulkan code often gets in the way of performance (and if you don't care about performance, you shouldn't be using Vulkan).

            In any case, there is no "most generally correct way" to do most things in Vulkan. There are lots of definitely incorrect ways, but no "generally do this" advice. Vulkan is a low-level, explicit API, and the result of that is that you need to apply Vulkan's tools to your specific circumstances. And maybe profile on different hardware.

            For example, if you're generating completely new vertex data every frame, it may be better to see if the implementation can read vertex data directly from coherent memory, so that there's no need for a staging buffer at all. Yes, the reads may be slower, but the overall process may be faster than a transfer followed by a read.

            Then again, it may not. It may be faster on some hardware, and slower on others. And some hardware may not allow you to use coherent memory for any buffer that has the vertex input usage at all. And even if it's allowed, you may be able to do other work during the transfer, and thus the GPU spends minimal time waiting before reading the transferred data. And some hardware has a small pool of device-local memory which you can directly write to from the CPU; this memory is meant for these kinds of streaming applications.

            If you are going to do staging however, then your choices are primarily about which queue you submit the transfer operation on (assuming the hardware has multiple queues). And this primarily relates to how much latency you're willing to endure.

            For example, if you're streaming data for a large terrain system, then it's probably OK if it takes a frame or two for the vertex data to be usable on the GPU. In that case, you should look for an alternative, transfer-only queue on which to perform the copy from the staging buffer to the primary memory. If you do, then you'll need to make sure that later commands which use the eventual results synchronize with that queue, which will need to be done via a semaphore.

            If you're in a low-latency scenario where the data being transferred needs to be used this frame, then it may be better to submit both to the same queue. You could use an event to synchronize them rather than a semaphore. But you should also endeavor to put some kind of unrelated work between the transfer and the rendering operation, so that you can take advantage of some degree of parallelism in operations.

            Source https://stackoverflow.com/questions/62182124

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install VulkanTutorial

            You can download it from GitHub.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/Overv/VulkanTutorial.git

          • CLI

            gh repo clone Overv/VulkanTutorial

          • sshUrl

            git@github.com:Overv/VulkanTutorial.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link