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

Vulkan - wrong ELF class: ELFCLASS32

I'm following this Vulkan tutorial, and I'm trying to implement validation layers - here is my code: #define GLFW_INCLUDE_VULKAN #include #include #include #include #include #include…
new Q Open Wid
  • 2,225
  • 2
  • 18
  • 34
0
votes
2 answers

Vulkan validation errors states my images are in the wrong layout, but only the two first times I present images from the swapchain

I have loosely been following this guide to setup some simple rendering in Vulkan using the raii headers in Vulkan-Hpp. I have skipped the Graphics Pipeline Basics section (except for the render pass chapter) just to see if I'm able to only get the…
McFlyboy
  • 23
  • 1
  • 1
  • 9
0
votes
1 answer

Android Vulkan, checking support anisotropics

How to check that device support anisotropics for Vulkan Graphics APi. For example for checking it on OPENGL used String extension = GLES10.glGetString(GLES10.GL_EXTENSIONS); and then check contains string "GL_EXT_texture_filter_anisotropic". How…
Oksana
  • 13,442
  • 10
  • 53
  • 89
0
votes
1 answer

rust gpu_allocator bufferDeviceAddress must be enabbled

I am using ash and gpu_allocator to try to port some C++ code to rust. I am running into a validation error that the C++ code never runs into: "Validation Error: [ VUID-VkMemoryAllocateInfo-flags-03331 ] Object 0: handle = 0x56443b02d140, name =…
Makogan
  • 8,208
  • 7
  • 44
  • 112
0
votes
1 answer

rust ash (vulkan), how can I test the debug name of a struct?

Say I use the DebugUtils object to set the name of a logical device, i.e. a vk::Device. How can I trigger a validation message involving the object to test that the name matches my expectation?
Makogan
  • 8,208
  • 7
  • 44
  • 112
0
votes
0 answers

Undefined behaviour in NVidia's vulkan driver for linux?

I have the VK_LAYER_KHRONOS_validation layer activated and don't get any validation errors, although when I try running my app under Valgrind I get the following messages. ==119404== Conditional jump or move depends on uninitialised…
David Carpenter
  • 1,389
  • 2
  • 16
  • 29
0
votes
1 answer

syntax error, unexpected IDENTIFIER, expecting LEFT_PAREN

struct voxel { vec3 center; vec3 quaternion; vec4 color; float specular; float reflective; }; layout(set = 0, binding = 0) buffer Data { voxel world[]; }; vec2 boxCol(vec3 rc, vec3 rd, vec3 vCord, out vec3 vnorm)…
Arthur.rs
  • 11
  • 3
0
votes
0 answers

My push constants incorrect are passed to the shader

I draw 3 triangles and want to use push constants to pass the matrix and color. Here is the data structure that I want to pass: struct MatrixesPushConstants { glm::mat4 MVPmatrix; glm::vec3 vertexColors[3]; }; MatrixesPushConstants…
0
votes
1 answer

Vulkan extensions is listed by vulkaninfo but not by enumerateInstanceExtensions

I am trying to enable conservative rasterization. To that effect I am calling vk::enumerateExtensionProperties() to see the extensions supported on my system. That gives me this…
Makogan
  • 8,208
  • 7
  • 44
  • 112
0
votes
1 answer

Trying to enable conservative rasterization fails

I am trying to follow Sacha Willems' example on conservative rasterization. To that effect I added tried requesting the extensions when making my device: const std::vector DEVICE_EXTENSIONS = { VK_KHR_SWAPCHAIN_EXTENSION_NAME, …
Makogan
  • 8,208
  • 7
  • 44
  • 112
0
votes
0 answers

how to copy a massive image from disk?

I need to create a very, very large image on the gpu 8kx8k. I need to fill that data with a large amount of data I have locally on my machine. If I try to create a buffer large enough to hold onto the full amount of data, I get this error: Message:…
Makogan
  • 8,208
  • 7
  • 44
  • 112
0
votes
1 answer

VMA how to tell the library to use the bigger of 2 heaps?

In my current system vulkan info returns these device specs: memoryHeaps[0]: size = 8589934592 (0x200000000) (8.00 GiB) budget = 7826571264 (0x1d2800000) (7.29 GiB) usage = 0 (0x00000000) (0.00 B) flags: count…
Makogan
  • 8,208
  • 7
  • 44
  • 112
0
votes
1 answer

When I follow vulkan-tutorial example code, validation layer doesn't work

It's my first time to learnin vulkan. I try to follow https://vulkan-tutorial.com/Drawing_a_triangle/Setup/Validation_layers, but it doesn't work in using validation layer. Copy and paste this…
0
votes
1 answer

Vulkan Payload doesn't update some struct member (RayRracing)

I have a problem with updating some value in a Payload. I generate the payload inside the rgen shader like struct HitPayload { vec3 hitValue; uint32_t depth; vec3 worldPos; uint32_t instanceCustomIndexEXT; uint32_t primitiveID; …
0
votes
1 answer

VkSemaphoreSubmitInfo stageMask field for VkSubmitInfo2

I'm trying to fill out my VkSubmitInfo2 so that I can use VkQueueSubmit2, but I've got a stumbling block and a question: Stumbling Block: What should stageMask be when filling out VkSemaphoreSubmitInfo? Presumably, for the wait semaphore you grab…
1 2 3
99
100