Vulkan-Docs | The Vulkan API Specification and related tools | REST library

 by   KhronosGroup JavaScript Version: v1.3.252 License: Non-SPDX

kandi X-RAY | Vulkan-Docs Summary

kandi X-RAY | Vulkan-Docs Summary

Vulkan-Docs is a JavaScript library typically used in Web Services, REST applications. Vulkan-Docs has no bugs, it has no vulnerabilities and it has medium support. However Vulkan-Docs has a Non-SPDX License. You can download it from GitHub.

This repository contains sources for the formal documentation of the Vulkan API. This includes:. The authoritative public repository is located at Vulkan-Docs. It hosts a public Issue tracker, and outside developers can file proposed changes (Pull Requests) against the Specification, subject to approval by Khronos. If in doubt where to submit your Issue, consult the Vulkan-Projects list on the Vulkan-Web-Registry repository.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              Vulkan-Docs has a medium active ecosystem.
              It has 2483 star(s) with 433 fork(s). There are 226 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              There are 279 open issues and 1250 have been closed. On average issues are closed in 216 days. There are 16 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of Vulkan-Docs is v1.3.252

            kandi-Quality Quality

              Vulkan-Docs has 0 bugs and 0 code smells.

            kandi-Security Security

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

            kandi-License License

              Vulkan-Docs has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              Vulkan-Docs 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.

            Top functions reviewed by kandi - BETA

            kandi has reviewed Vulkan-Docs and discovered the below as its top functions. This is intended to give you an instant insight into Vulkan-Docs implemented functionality, and help decide if they suit your requirements.
            • Build svg span box .
            • Parse an array .
            • Build HTML markup
            • Build math builder
            • Returns the character metrics for a given character .
            • Creates a new symbol node .
            • Search for search
            • Define a function
            • Defines an Environment
            • Constructs a new Settings object .
            Get all kandi verified functions for this library.

            Vulkan-Docs Key Features

            No Key Features are available at this moment for Vulkan-Docs.

            Vulkan-Docs Examples and Code Snippets

            No Code Snippets are available at this moment for Vulkan-Docs.

            Community Discussions

            QUESTION

            What is the best way to clear a `VkImage` to a single color?
            Asked 2021-Nov-11 at 12:33

            I'm learning vulkan, and as a (very) simple project I want to simply clear a single swapchain image to a single color (red). My code works, but I get two validation errors. I would like to know:

            1. How can I fix the validation errors in my code
            2. Is there a better way to simply clear swapchain images

            Regarding (2): I specifically don't want to use a graphics pipeline: in the future I would like to use a compute shader to draw directly to the screen.

            My current approach

            My project uses vk-bootstrap to set up, and then I try to render a single frame as follows:

            1. Acquire an image from the swapchain
            2. Record a command buffer with the following commands:
              • vkCmdPipelineBarrier
              • vkCmdClearColorImage
              • vkEndCommandBuffer
            3. Submit the command buffer to the graphics queue
            4. present the previously acquired swapchain image using vkQueuePresentKHR

            The relevant code can be found below, but it seems that the validation errors arise from the calls to vkCmdClearColorImage and vkQueuePresentKHR.

            Error messages

            The first validation error is from the vkCmdClearColorImage call, and seems to be triggered by my choice of layout:

            ...

            ANSWER

            Answered 2021-Nov-11 at 12:33

            I found a solution which works but seems kinda gross. Basically I modify step (2) to the following:

            1. Record a command buffer with the following commands:
              • vkCmdPipelineBarrier
              • vkCmdClearColorImage
              • vkCmdPipelineBarrier
              • vkEndCommandBuffer

            Essentially the logical flow of this pipeline is:

            1. Using a barrier, convert image from VK_IMAGE_LAYOUT_UNDEFINED to VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL
            2. Clear image using vkCmdClearColorImage
            3. Using a barrier, convert the image to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR so it can be presented

            This works because:

            • vkCmdClearColorImage requires the image to have layout VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, but
            • vkQueuePresent requires the image to have layout VK_IMAGE_LAYOUT_PRESENT_SRC_KHR

            Since this seems a little hacky / gross, I will leave this question open for a while to see if anyone has a better solution. For completeness, here is the new code for step (2)

            Modified code for step (2)

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

            QUESTION

            Vulkan: Image error when recreating the swapchain after a window resize
            Asked 2021-Jun-23 at 19:18

            So I'm trying to handle window resizing by recreating the swapchain and its image views and all that. This is the method that I'm using:

            ...

            ANSWER

            Answered 2021-Jun-23 at 19:18

            You need to transfer your image from the undefined layout in which it starts to a presentable image format, depending on what exactly you're doing with it. For example, if you're using it as a texture in a shader, it needs to be in SHADER_READ_ONLY_OPTIMAL layout.

            You can do this in multiple ways, one of them being an image memory barrier that you can submit to a transient queue. And you absolutely need to do this after recreating your swap chain, because your entire context is invalidated by the window resize operation.

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

            QUESTION

            Can acquire and write to swap chain image be synchronized without a semaphore or fence?
            Asked 2020-Jun-27 at 20:10

            Typically, a VkRenderPass that uses a swap chain image waits for a semaphore from vkAcquireNextImageKHR before executing VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT. The same VkRenderPass also defines a subpass dependency to transition the image at the beginning of the same pipeline stage:

            ...

            ANSWER

            Answered 2020-Jun-27 at 20:07

            Vulkan 7.1.

            If srcSubpass is equal to VK_SUBPASS_EXTERNAL, the first synchronization scope includes commands that occur earlier in submission order than the vkCmdBeginRenderPass used to begin the render pass instance.

            vkAcquireNextImageKHR is not in the first synchronization scope of the subpass dependency, because it's not a command submitted to a queue.

            The semaphore synchronizes the stages. As the image transition happens at the beginning of the color output stage, it comes after the semaphore is signaled. As both wait for the VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, operations from this stage before the semaphore are chained to the transition dependencies. Only by this chain the subpass dependency can know when the image was acquired to perform the transition. The writes in the output stage actually depend on the transition then, not directly on the semaphore.

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

            QUESTION

            WSI synchronization subpass dependency and link to color attachment output
            Asked 2020-Apr-20 at 13:40

            I think I do understand how Vulkan synchronization works, but I do have a problem of understanding the synchronization with the WSI.

            The the Synchronization Examples, we can find this code

            ...

            ANSWER

            Answered 2020-Apr-20 at 13:40

            Indeed, since we are going to WRITE into the attachment, there is no need to use a WRITE_BIT (meaning make writes available) in the dstAccessMask.

            I am not exactly sure of your logic here. It should be WRITE exactly because we are going to write to the attachment.

            It would perhaps help describe what is happening here (from krOoze/Hello_Triangle/doc):

            The VkSubpassDependency chains of the the semaphore (via pWaitDstStageMask). Then it performs its layout transition. Then it syncs with the Load Op. (Then Load Op happens in the subpass. And subpass vkDraws some stuff into the swapchain image.)

            Now assumably (as is typical for first use of the swapchain image) our Load Op is VK_ATTACHMENT_LOAD_OP_CLEAR. That means VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT + VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT access.

            So:

            1. Presentation is gonna read the swapchain image, and submit a semaphore signal.

            2. We chain our VkSubpassDependency to the signal (via pWaitDstStageMask). Semaphore signal already covers all memory accesses, therefore our srcAccessMask = 0.

            3. The Dependency performs its implicit dependency to the Layout Transition (takes your src, and invents some internal dst), then Layout Transition happens, which reads the image and writes it back, then the dependency performs another implicit Dependency (invents some src that covers the layout transition, and uses your dst).

            4. The Load Op happens in the subpass, and you have to make sure explicitly it happens-after everything above. So your dst in your Dependency must be VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT + VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT to cover the Load Op.

            Now, there are three types of memory hazards: read→write, write→write, and write→read (and read→read is a non-hazard). In WWH something writes a resource, while some other write also writes it. It is not clear which write happens last, so the memory contents becomes garbage. In RWH and WRH read and write may happen at the same time. It is not clear if the read sees the unmodified memory, or the written one (i.e. it reads garbage).

            Without an explicit dependency, the Layout Transition and the subsequent Load Op form a write→write hazard. Therefore dstAccessMask must not be 0 to resolve the hazard and make sure one write happens-before the second one.

            (It is perhaps worth noting we introduce the VkSubpassDependency solely for the sake of the layout transition. Otherwise the semaphore wait would already be all that is needed. The default is srcStageMask = TOP_OF_PIPE, which means without explicit Dependency the layout transition could happen before the semaphore wait, i.e. before presentation finishes reading it; that would be a read→write hazard).

            To me, the layout transition must appear at the end of the presentation, and just before the beginning of the COLOR_ATTACHMENT_OUTPUT stage. And the end of presentation, for me, should be represented by BOTTOM_OF_PIPE and not COLOR_ATTACHMENT_OUTPUT

            We have little bit of choice here: pWaitDstStageMask = dependency.srcStageMask = ?

            Now our situation is this:

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

            QUESTION

            Graphics to graphics depth dependency, depth buffer is being corrupted
            Asked 2020-Mar-13 at 15:21

            I am trying to do the following: Take render pass 1, render to attachment set S.

            Take render pass 2, render to attachment set S again.

            There is a one to one explanation on how to do this in the official Khronos github:

            Under Graphics to Graphics dependency. However, trying to implement the same code as in the example isn't working.

            This is what I see:

            This is what I should see:

            What I think is currently happening is that the depth buffer is not being synchronized properly and so depth testing isn't working correctly. I create both of my render passes like this:

            ...

            ANSWER

            Answered 2020-Mar-13 at 15:21

            The problem was being caused because when i created the attachment descriptors, I set the storeOp and loadOp enums of the renderpass to eDontCare so the depth buffer was UB for me.

            As suggested in the comments by @solidpixel. The solution is to make the first eStore and the second 'eLoad'.

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

            QUESTION

            "Synchronizing" a render pass layout transition with a semaphore in Acquire-Present scenario in Vulkan
            Asked 2020-Feb-22 at 16:48

            ANSWER

            Answered 2020-Feb-21 at 18:02

            I go over this a bit at krOoze/Hello_Triangle/doc. What is supposed to happen in this scenario is:

            Particularly I can't find how to interpret this "dependency from that same stage to itself".

            Now, lets first take care of this issue. This is what I like to call cart-before-horse intuition of the synchronization system.

            You do not "synchronize stages" or something like that. That is intuition that will only cause you confusion. You synchronize scopes.

            People also confuse a pipeline with a flow-chart. There is a huge intuition difference. In flow-chart, you start at a start, then you go over all the stages in order, then you are finished and forever done. That is not what pipeline is. It never starts, and never finishes. Pipeline just is. It is like a desktop game board. You stuff commands through the pipeline, and they go through the stages like pegs on the board.

            A synchronization command is something that introduces a dependency between two things: between the source synchronization scope and destination synchronization scope. It guarantees the src scope happens-before the dst scope.

            A scope is some subset of queue operations, and at what stage they currently their execution can be at.

            So, with this better intuition,

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

            QUESTION

            Do I need to transfer ownership *back* to the transfer queue on next transfer?
            Asked 2020-Feb-20 at 01:26

            I'm planning on using one of the vulkan synchronization examples as reference for how to handle infrequently updated uniform buffers. Specifically I was looking at this one:

            ...

            ANSWER

            Answered 2020-Feb-20 at 01:26

            You can use a Resource on any queue family (without a transfer) as long as you do not mind that the data becomes undefined. You still need a Semaphore to make sure there is no memory hazard.

            Ye olde spec:

            NOTE

            If an application does not need the contents of a resource to remain valid when transferring from one queue family to another, then the ownership transfer should be skipped.

            Examples do not mention it, because they are only examples.

            As for synchronization (which is a separate problem from QFOT), a semaphore signal which is part of vkQueueSubmit covers everything previously in submission order. So when you submit the copy you would let it wait on the Semaphore that the last draw submitted has signaled. That means that draw and any previous draw on that queue is finished, before the copy can start on the other queue.

            Then you signal a semaphore by the copy, and wait on it on the first next draw you submit. That means the copy finished writing, before the draw (and any subsequent draw) reads it on the graphics queue.

            e.g.:

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install Vulkan-Docs

            You can download it from GitHub.

            Support

            Khronos welcomes feedback in Github Issues, and proposed changes in Github Pull Requests (PRs), but will not necessarily accept all such changes. Please keep your issues and pull requests focused on solving a single problem. Broader feedback that tries to solve multiple problems, or touches many parts of the Specification at once, is difficult for the Vulkan Working Group to review in a timely fashion.
            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/KhronosGroup/Vulkan-Docs.git

          • CLI

            gh repo clone KhronosGroup/Vulkan-Docs

          • sshUrl

            git@github.com:KhronosGroup/Vulkan-Docs.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

            Explore Related Topics

            Consider Popular REST Libraries

            public-apis

            by public-apis

            json-server

            by typicode

            iptv

            by iptv-org

            fastapi

            by tiangolo

            beego

            by beego

            Try Top Libraries by KhronosGroup

            glTF

            by KhronosGroupHTML

            Vulkan-Samples

            by KhronosGroupC++

            Vulkan-Hpp

            by KhronosGroupC++

            glslang

            by KhronosGroupC++

            WebGL

            by KhronosGroupHTML