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

How can the list of available extensions and layers change?

If an enabled layer or extension is not available at instance creation, vkCreateInstance returns VK_ERROR_EXTENSION_NOT_PRESENT or VK_ERROR_LAYER_NOT_PRESENT. I would like to identify which layer or extension is not supported, to provide better…
Debaug
  • 452
  • 4
  • 14
0
votes
1 answer

Vulkan Memory usage constantly increasing while recording the command buffer

I've been trying to learn Vulkan for 1 week now and I managed to draw a triangle on the screen following the turoial on https://vulkan-tutorial.com. The memory usage increases and doesn't stop and while doing some debuging I figured out it is the…
0
votes
0 answers

Flickering frames in Imediate mode

I am using vulkan (ash) to render a scene. The rendering algorithm first does a raytracing pass (using the traditional pipeline not the NV extensions) then it renders a few frames normally. On Nvidia it renders fine, on AMD I am experiencing a…
Makogan
  • 8,208
  • 7
  • 44
  • 112
0
votes
0 answers

Can't install the Vulkan SDK from tarball on Fedora Linux

I tried to install the Vulkan SDK from the tarball from the LunarG website (version 1.3.224.1) on Fedora 37 beta (I also tried it on Nobara Linux 36) and kept getting these errors. In function ‘std::_Require >,…
sako-is
  • 31
  • 5
0
votes
0 answers

How to share a buffer between compute shader and vertex shader in Vulkan?

I am trying to learn Vulkan, coming from OpenGL/OpenCL. I am studying this example: https://vulkan-tutorial.com/Drawing_a_triangle/Setup/Base_code and this one: https://cppdig.com/c/minimal-example-of-using-vulkan-for-compute-operations-only-loc . I…
ezor
  • 1
  • 1
0
votes
1 answer

glsl conditionally assigning out_color

I'm trying to achieve blending by using a shader to conditionally assign the fragment color. Full shader code... #version 450 #pragma shader_stage(fragment) layout(binding = 1) uniform sampler2D texture_sampler; layout(location = 0) in vec2…
David Carpenter
  • 1,389
  • 2
  • 16
  • 29
0
votes
1 answer

Is the Vulkan subpass dependency per framebuffer?

I am following Overvoorde's Vulkan tutorial. When we wait for the acquired image we wait before the color output stage and we don't want to transition the layout of that image before it is available, so we do this: srcSubpass =…
Patrik T
  • 47
  • 1
  • 7
0
votes
0 answers

How do descriptor sets work with multiple compute pipelines

I am working on rendering some things with compute pipelines in Vulkan. Everything is working except some misunderstanding with command buffers vk::CommandBufferBeginInfo beginInfo{}; commandBuffers_[i].begin(beginInfo); …
0
votes
1 answer

Vulkan swap chain, can we reuse the same render pass for every frame?

My question is in the title. The swap chain need multiple images and I understand why, so it seems logical to have the same image views amount because they are like a pointer to these. And finally, I understand why it needs multiple framebuffers,…
0
votes
0 answers

In a 2d application where you're drawing a lot of individual sprites, will the rasterization stage inevitably become a bottleneck?

I've been making a simple Space Invaders clone that uses Vulkan to draw sprites to the screen. Pushing up the number of invaders, I end up with a lot of sprites. Reflecting on what (I think) I know about GPUs, if these sprites where all batched…
CromfCromf
  • 49
  • 3
0
votes
1 answer

Clarification on what exactly constitutes as a continue target in Vulkan SPIR-V

I'm trying to understand the SPIR-V spec, understanding for loops for example. In the beginning of the 1.6 revision 2 spec, the following example (taking only part of it for consisveness) for (int i = 0; i < 4; ++i) color *= multiplier; turns…
Krupip
  • 4,404
  • 2
  • 32
  • 54
0
votes
1 answer

Why does Vulkan forbid uniforms that are not uniform blocks?

According to Vulkan Specification, The following features are removed: default uniforms (uniform variables not inside a uniform block) For example, the following is forbidden in GLSL: layout(set = 0, binding = 0) uniform mat4…
OLEGSHA
  • 388
  • 3
  • 13
0
votes
0 answers

Convert Vulkan nvpro app to vulkan headless

I am trying to convert vk_raytrace to headless so that I can run it via commandline and dump rendered image. I am new to vulkan and saw that vulkan supports headless surface. My first approach was to replace the surface created using glfw window to…
midi
  • 460
  • 3
  • 17
0
votes
1 answer

Is this memory access barrier flag not sufficient?

In a Vulkan example the author dstStageMask as VK_PIPELINE_STAGE_BOTTOM_OF_PIPE and the dstAccessMask as VK_ACCESS_MEMORY_READ_BIT. Now, from my previous questions asked here, the access mask flags only apply specifically and explicitly to each…
Zebrafish
  • 11,682
  • 3
  • 43
  • 119
0
votes
1 answer

Lutris can't find Vulkan after brew install shared-mime-info

Everything was working fine until I ran brew install shared-mime-info now Lutris responds with the following when I try to launch it along with a prompt to install drivers even though I've already completed the steps here 2022-09-16 00:20:09,461:…
dan178
  • 335
  • 2
  • 16