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
6
votes
1 answer

How to correctly use decriptor sets for multiple interleaving buffers?

I have a uniform buffer which should be updated every frame. In order to avoid big stalls I want to create 3 buffers (by the number of my frame buffers) which should be interleaved every frame (0-1-2-0-1-2-...). But I can't understand how to create…
nikitablack
  • 4,359
  • 2
  • 35
  • 68
6
votes
1 answer

GLFW - Vulkan not supported

I've been following the Vulkan tutorial at https://vulkan-tutorial.com/ and I've been having issues with the section on setting up the window surface. Upon completing the section and testing nothing had broken, I found I was getting an error on the…
6
votes
2 answers

Can we use Vulkan with Java Activity on Android platform

Currently, it seems all the Vulkan tutorials and samples use NativeActivity on Android platform. I would like to know whether we can use Vulkan with Java Activity on Android?
Lei Guo
  • 2,550
  • 1
  • 17
  • 22
6
votes
1 answer

Can multiple subpass be used with single pipeline in vulkan

VkGraphicsPipelineCreateInfo has integer member subpass. My use case is creating a single pipeline object and use it with multiple subpasses. Each subpass has different color attachment.
s007
  • 728
  • 6
  • 12
6
votes
1 answer

Is there a Vulkan equivalent to OpenGL's pixel buffer object?

I did some Googling and it does not appear that Vulkan has a Pixel Buffer Object. Is there something analogous to it in the Vulkan API?
Alessandro Power
  • 2,395
  • 2
  • 19
  • 39
6
votes
3 answers

In what situations is VkFence better than vkQueueWaitIdle for vkQueueSubmit?

As described here vkQueueWaitIdle is equivalent of vkFence. So in which situation to use either of them.
abhijit jagdale
  • 609
  • 2
  • 8
  • 21
6
votes
0 answers

Is it possible to render to a UWP App using Vulkan?

I'm working on C# bindings for Vulkan, and these include a set of sample projects that render simple shapes to demonstrate the API calls. These projects run as WinForms applications, passing the HWND of the Forms to Vulkan to attach the Surface…
FacticiusVir
  • 2,037
  • 15
  • 28
6
votes
2 answers

Compiling GLSL to SPIR-V using Premake 5 and Visual Studio 2015

Instead of manually compiling my GLSL shaders to SPIR-V, I want Visual Studio to automatically detect changes to shader files and run glslangValidator as a build step. I am using Premake to generate the Visual Studio solution/project. One solution…
Petwoip
  • 1,365
  • 2
  • 17
  • 25
6
votes
2 answers

Compiling GLSL written for OpenGL ES versions to Vulkan

My question is similar to this one but part of the (useful) given answer isn't compatible with compiling GLSL for vulkan based on OpenGL ES ESSL 3.10. In order to use a separate section of the push constant memory in the vertex shader and the…
Columbo
  • 6,648
  • 4
  • 19
  • 30
6
votes
1 answer

Generating mipmaps in Vulkan

I'm trying to generate mipmaps runtime (implement glGenerateMipmap() functionality) using vkCmdBlitImage but don't understand the process. Here's my code so far: VkImageCreateInfo imageCreateInfo = {}; imageCreateInfo.sType =…
SurvivalMachine
  • 7,946
  • 15
  • 57
  • 87
6
votes
2 answers

How to deal with the layouts of presentable images?

A presentable image starts out in VK_IMAGE_LAYOUT_UNDEFINED but will be VK_IMAGE_LAYOUT_PRESENT_SRC_KHR after they have been presented once. A lot of examples do a transition of all vkImages to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR immediately after…
ratchet freak
  • 47,288
  • 5
  • 68
  • 106
6
votes
1 answer

Why in vulkan.h non dispatchable objects are always typedefed to 64bit?

Looking into the vulkan.h i see this: #if defined(__LP64__) || defined(_WIN64) || defined(__x86_64__) || ..... #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object; #else #define…
hiddenbit
  • 333
  • 1
  • 2
  • 11
6
votes
1 answer

DirectX 12/Mantle/Vulkan and HSA

With the rise of lower-level graphics APIs such as DirectX 12, Mantle and Vulkan, I'm wondering how these interact (if at all) with a Heterogeneous System Architecture (HSA)? As I understand it, supporting HSA has required some developer…
Haravikk
  • 3,109
  • 1
  • 33
  • 46
5
votes
2 answers

Validation error on device extension on M1 mac

So I am attempting to follow the Vulkan tutorial on a mac with an M1 processor, and I am running into an issue with device creation. So as per the tutorial I am setting the device enabled extensions like so: const std::vector
sak
  • 2,612
  • 24
  • 55
5
votes
1 answer

Is there any reason to use descriptor instead of device buffer address?

I really like the idea of device buffer address, and it seems like in the future it'll become more common, and is a required feature for ray-tracing. If I have a buffer/array of object draw information, usually I would bind it to a descriptor and…
Zebrafish
  • 11,682
  • 3
  • 43
  • 119