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
0 answers

How to have a structure of buffer_reference types in Vulkan GLSL?

I'm using shaderc that comes VulkanSDK-1.3.224.1. Attempting to compile the following when added to any of my shaders: #extension GL_EXT_scalar_block_layout: enable #extension GL_EXT_buffer_reference2 : enable #extension…
Krupip
  • 4,404
  • 2
  • 32
  • 54
0
votes
1 answer

I didn't specify COMBINED_IMAGE_SAMPLER in my descriptorSet and yet was able to allocate?

I made a simple vulkan example that draws a quad with a texture. It worked fine. But after some time I came back to it and noticed a mistake, and I'm not sure how this is supposed to be working. In the descriptorSetLayout I have two sets, with one…
tuket
  • 3,232
  • 1
  • 26
  • 41
0
votes
1 answer

vkFreeMemory memory leaks while the VkDeviceMemory object was allocated with VkExportMemoryAllocateInfo

I am using the VK_KHR_external_memory_win32 extension to share GPU memory with OpenGL on Windows, the shared texture works fine. The memory was allocated by vkAllocateMemory() with VkMemoryAllocateInfo that the pNext contains a…
0
votes
0 answers

Raytracing octree gets wrong intersection with negative directions

I'm trying to implement a GPU raytracer that traverses an octree given it's AABB. I'm using "An Efficient Parametric Algorithm for Octree Traversal" as my basis for this project. During the implementation, I found some problems with negative…
0
votes
0 answers

Vulkan Dynamic Rendering LINK ERROR on vkCmdBeginRenderingKHR and vkCmdEndRenderingKHR

After enabling VUlkan 1.3's DynamicRendering feature via the following tutorial: https://lesleylai.info/en/vk-khr-dynamic-rendering/ I've been getting LINK errors for only the following two functions in VS2022 Preview: 1>------ Build started:…
FatalSleep
  • 307
  • 1
  • 2
  • 15
0
votes
1 answer

Vulkan fails to load layer library

I am using MoltenVK on MacBook Air with Apple Silicon. I have set my environment according to instructions on Vulkan Tutorial website but when I try to run my program in Xcode I get the following two error messages from validation layer: ERROR…
0
votes
0 answers

How to read custom data from framebuffer

for the past few days I've been trying to implement mouse picking in my vulkan game engine and part of that is reading data from framebuffers. Now I can successfully read RGBA data. But what I need is to read specific attachment containing id of the…
ezyn
  • 11
  • 3
0
votes
0 answers

How should I link the DirectXShaderCompiler with mingw-64 and cmake?

I am trying to link the dxcompiler lib generated by 'hctbuild' to my mingw64 project under the Windows environment. But there is no definition of the '__mingw_uuidof' in mingw64, so how should I change the settings of my project?
ShelterRin
  • 183
  • 5
0
votes
0 answers

C++ Vulkan Set push constant values for different shader stages

I want to use different push constants for my vertex and fragment shader stages. For the vertex shader I use this c++ struct struct vertex_push_constant { matrix4x4 model{}; matrix4x4 normal{}; }; And for the fragment shader this struct struct…
Symlink
  • 383
  • 2
  • 12
0
votes
0 answers

How to draw using Vulkan on gtk4 widget?

Is there an example of how to run vulkan commands on a gtk4 widget? There are some explanations that it can be done by using Gtk OpenGL widget and then to draw on GL Texture. However, I am not sure how to do it.
kkemic
  • 59
  • 3
0
votes
1 answer

Using Vulkan memory allocator with Volk

I'm currently trying to use Vulkan memory allocator with the meta loader Volk here is the link of the two: https://github.com/zeux/volk https://gpuopen.com/vulkan-memory-allocator/ But I have trouble with creating the VmaAllocator, here is my…
miyoku
  • 107
  • 1
  • 13
0
votes
0 answers

What is the right way to use Logic operations (VkLogicOp) in vulkan

I have a case where I am writing to integer framebuffers, and I want to use logic operations when writing to pixels in the fragment shader. These are the steps I followed: When creating the logical device, I set the VkPhysicalDeviceFeatures.logicOp…
0
votes
1 answer

writing small floats to FBO in vulkan

I am relatively new to vulkan. I am having this weird issue, where say I write a very small floating point to an FBO, it gets rounded to 0. For example, say I write outFrag = vec4(1.0e-39,0,0,1); this gets stored as (0,0,0,1). I've found this issue…
0
votes
1 answer

Can I load vulkan extension in more "Cpp-binding-like" way

I'm reading Vulkan Tutorial and want to use Vulkan C++ binding instead. But error occured when I load vkCreateDebugUtilsMessengerEXT and vkDestroyDebugUtilsMessengerEXT. Seems like instance.getProcAddr("extension_name") won't really load a function…
0
votes
1 answer

vkMapMemory, returns an "Access is denied." error

I've been working on a Vulkan based graphical engine, and whilst trying to create a buffer, I have encountered an issue with the vkMapMemory() function. In the code shown below, the program returns an "Access is denied" (-1073741819 or C0000005)…
MAKiT
  • 5
  • 1
1 2 3
99
100