Questions tagged [vulkan]

Vulkan is a low-overhead, cross-platform graphics API from the Khronos Group.

Vulkan, once known as Next Generation OpenGL or just GLnext, is designed to be a low-overhead API that facilitates multithreaded 3D development, enabling different CPU threads to simultaneously prepare batches of commands to send to the GPU. It gives developers greater control of generating commands, putting tasks such as memory and thread management in their hands rather than relying on video drivers to handle these responsibilities. In so doing, it greatly reduces the amount of work and validation that the driver must perform, thus drastically reducing driver complexity. Conversely it increases the responsibilities of the application / developer to ensure that operations are valid and properly synchronized with each other.

Vulkan uses SPIR-V bytecode as its standard representation for graphics and compute shaders. The Khronos reference GLSL compiler compiles a form of GLSL (which implements a special extension to support Vulkan features) into SPIR-V, but users can use whatever compilers they wish which have a SPIR-V backend. The SPIR-V ecosystem also includes support for compiling from other languages such as HLSL, and for cross compiling SPIR-V bytecode back into various languages, including GLSL, HLSL and C++.

Vulkan enjoys wide native platform support on Windows, Linux, & Android. Additionally, a large subset of Vulkan is supported on the iOS and MacOS platforms through MoltenVk, part of the Vulkan Portability Initiative. Additional work is being done to develop a similar implementation of Vulkan over D3D12 to allow it to be used on UWP platforms that might not have native Vulkan drivers.

2248 questions
4
votes
0 answers

Using Vulkan output in electron

I want to use Electron as a debug overlay for a Vulkan Render Engine im building. Since i have a lot of requirements on this debug tool writing one in engine myself would take way too long. I would like to use electron instead of Qt or similar since…
CodingRays
  • 99
  • 6
4
votes
0 answers

Why does VK_PRESENT_MODE_FIFO_KHR cause catastrophic performance issues in Ubuntu MATE?

I am implementing a simple Vulkan renderer according to a popular Vulkan tutorial (https://vulkan-tutorial.com/Introduction), and I've run into an interesting issue with the presentation mode and the desktop environment performance. I wrote the…
Zee2
  • 163
  • 8
4
votes
1 answer

Vulkan vkCreateInstance - Access violation writing location 0x0000000000000000

I am trying to write a basic program using Vulkan, but I keep getting a runtime error. Exception thrown at 0x00007FFDC27A8DBE (vulkan-1.dll) in VulkanTest.exe: 0xC0000005: Access violation writing location 0x0000000000000000. This seems to be a…
4
votes
1 answer

Do I need to transfer ownership *back* to the transfer queue on next transfer?

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: vkBeginCommandBuffer(...); // Submission guarantees the host write being…
Krupip
  • 4,404
  • 2
  • 32
  • 54
4
votes
1 answer

Underlying hardware mapping of Vulkan queues

Vulkan is intended to be thin and explicit to user, but queues are a big exception to this rule: queues may be multiplexed by driver and it's not always obvious if using multiple queues from a family will improve performance or not. After one of…
YaaZ
  • 380
  • 2
  • 11
4
votes
4 answers

VK_ERROR_INCOMPATIBLE_DRIVER with Mac OS and Vulkan MoltenVK

I am trying to use Vulkan API on my mac OS (with my Intel HD Graphics 5000 1536 Mo). But when I create an Instance With a VkCreateInstance(...) the result of VkCreateInstance(...) is VK_ERROR_INCOMPATIBLE_DRIVER. Here my code for initialize my…
Benzait Sofiane
  • 107
  • 1
  • 12
4
votes
1 answer

Is synchronization needed between multiple draw calls with transparency in Vulkan?

I'm in the processing of learning Vulkan, and I have just integrated ImGui into my code using the Vulkan-GLFW example in the original ImGui repo, and it works fine. Now I want to render both the GUI and my 3D model on the screen at the same time,…
Chlorie
  • 829
  • 4
  • 10
4
votes
1 answer

How to copy a depth image to a color image?

I try to blit a depth image to a smaller image (the objective is to blur the image). The problem is that when I execute vkCmdBlitImage with VK_FILTER_LINEAR, I have this message : If the format of srcImage is a depth, stencil, or depth stencil then…
Arthur Monteiro
  • 179
  • 1
  • 11
4
votes
2 answers

Vulkan: why both primary command buffer and secondary command buffers need to set framebuffer and renderpass?

// Contains the list of secondary command buffers to be submitted std::vector secondaryCommandBuffers; // Inheritance info for the secondary command buffers VkCommandBufferInheritanceInfo inheritanceInfo =…
Javin Yang
  • 215
  • 3
  • 11
4
votes
1 answer

What are the use cases of sparsed VkDescriptorSetLayoutBinding?

I have troubles figuring out any use case for VkDescriptorSetLayoutBinding::binding, here is the struct : struct VkDescriptorSetLayoutBinding { uint32_t binding; VkDescriptorType descriptorType; uint32_t …
Nowine
  • 166
  • 8
4
votes
1 answer

Correct way to use compiled spirv shaders in vulkan

TL;DR: Compiled spirv shaders crash where inline runtime-compiled spirvs work, tested with modified sample. Crash happens deep in vulkan code. What gives? Details: I am having trouble using compiled spirv shaders. I took the "draw-textured-cube"…
memtha
  • 797
  • 5
  • 24
4
votes
1 answer

How to pass a texture between OpenGL ES and Vulkan?

I need to pass a texture generated in OpenGL ES to Vulkan, render some thing on it, then pass back to OpenGL ES. Is there a fast way to do this? Reading to cpu and pass to gpu every frame sounds too slow for a realtime Android app.
heLomaN
  • 1,634
  • 2
  • 22
  • 33
4
votes
1 answer

OpenGL GLSL atomic counter in Vulkan

When I tried to migrate my OpenGL implementation to Vulkan, I found that 'uniform atomic_uint' is not supported in Vulkan. My use case is simple: incrementing an integer across all fragments. I tried to search the solution but did not find any…
user3677630
  • 635
  • 6
  • 14
4
votes
2 answers

Vulkan: upload 3 channel image to device

Suppose there is a 3-channel image on the host side (either float or uint8), which needs to be transferred to a device image. vkCmdCopyBufferToImage is used for it. For the format of the device image I see two options: Use…
4
votes
2 answers

Is there any way to use vulkan internal allocation callbacks without overwriting real allocations?

When specifying a VkAllocationCallbacks struct to vkCreate* functions, I would like to use only the vulkan notification without overwriting the real allocators, but I can't find how. From…
Nowine
  • 166
  • 8