Questions tagged [vulkan]

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

Filter by
Sorted by
Tagged with
3 votes
1 answer
22 views

What is the difference between sampler2Drect and sampler2d?

as the glsl spec said gvec4 texture( gsampler2D sampler, vec2 P, [float bias]); gvec4 texture( gsampler2DRect sampler, vec2 P); and i tested this two condition in vulkan. I bind the ...
Lucas's user avatar
  • 65
0 votes
0 answers
48 views

Complete newbie with a Vulkan Error Code 2: vk_acquire_next_image_khr in Fortran [closed]

Here's a simultaneous thank you and apology in advance to whoever tries to help, haha. I have basically zero experience with Fortran and Vulkan, and I am working with a code that was given to me. It ...
WTM's user avatar
  • 1
0 votes
0 answers
28 views

Is it needed to maintain multiple resources in the vulkantextureimport Qt example for the swap chain?

I am trying to integrate Vulkan with QML, and to do that I looked at one of the examples provided by Qt for rendering a texture as underlay in Vulkan. In the example, a custom render pass along with a ...
iexav's user avatar
  • 1
0 votes
1 answer
21 views

Vulkan prefer 1D invocation to match SubGroup and WorkGroup size?

The Vulkan subgroup tutorial mentions: If you specify a workgroup size that is less than the subgroup size, you are guaranteed to have inactive invocations within the subgroup. Now assume you you ...
SerialSensor's user avatar
-1 votes
0 answers
16 views

Best practice for Android Vulkan development environment setup

I've ran the Vulkan implementation of the renderscript migration sample on an Android Emulator. When I do so, I get a white screen (no crash - emulator is using my PC's graphics card). I've also used ...
SerialSensor's user avatar
-1 votes
0 answers
27 views

Cannot capture gpu on Android13 with Snapdragon Profiler [closed]

When I try to caputure GPU frame on OnePlus Ace2 which is Android13, it says the vulkan game app do not have read/write external storage permission. But on Android13, we cannot get the permission. ...
cheng's user avatar
  • 19
-2 votes
0 answers
81 views

compiler can't find vulkan's H264 codec header file

I get 'vulkan/vulkan.h' file not found due to a different error on vulkan_core.h: vk_video/vulkan_video_codec_h264std.h' file not found after running a script using vulkan.h header file. The thing is ...
PartyPie's user avatar
-1 votes
0 answers
25 views

Vulkan shader that parses array of points

Hello I'm going to write a font rasterizer with Vulkan. I saw how some things works in CUDA and I wonder how to achieve that using GLSL compute shaders. Here's my supposed CUDA architecture: I have ...
TheRedCat's user avatar
-1 votes
0 answers
27 views

How does a ray marcher pass data from CPU to GPU?

I have a bit of background programming in OpenGL and Vulkan, but only with "standard" rendering (meshes). I wanted to dive a little into raymarching for a project, but I can't pass the ...
LucioleMaléfique's user avatar
-1 votes
1 answer
77 views

Vulkan compute shaders: Most efficient way to tranfer buffer to/from GPU? Retrieving the buffer seems to be slow

I am trying to use Vulkan now for some GPGPU work and am struggling to get decent performance on my GTX 1070. Let's say I want to run a compute shader against a block of data and write the result into ...
Caius Cosades's user avatar
2 votes
1 answer
47 views

How to open lod clamp specified in shader in glsl?

amd instruction set spec said: IMAGE_SAMPLE_D_CL_O SAMPLE_O, with LOD clamp specified in shader, with user derivatives. IMAGE_SAMPLE_D_CL sample texture map, with LOD clamp specified in shader, with ...
Lucas's user avatar
  • 65
-1 votes
0 answers
43 views

Vulkan Square Texture is Missing the Top Left Half

I am loading my textures and models using stb_image. When I did Array of Structs layout, everything looks fine, but when I changed it to Struct of Arrays layout, the top left corner is missing. ...
Jordan Liao's user avatar
-1 votes
0 answers
43 views

Vulkan swapchain creation

I want to share the error I encountered while trying to create a swapchain: void vk_render::createSwapchain(VkDevice device, VkSurfaceKHR surface) { VkSwapchainCreateInfoKHR createInfo = {}; ...
Teo98's user avatar
  • 1
0 votes
0 answers
97 views

Why does this for loop behave differently depending on how it is compiled?

I made an error while writing a method based on the vulkan-tutorial that I didn't catch until I changed my build. If you read below, you will see the erroneous method as well as the corrected method. ...
One234Fi's user avatar
0 votes
1 answer
44 views

Using Push Constant to refresh every frame

The code is as follow: # //begin info # //begin render pass mypipeline->bind(commandbuffer); for (auto& obj : gameObjects) { obj.transform2d.rotation = glm::mod(obj.transform2d.rotation + 0....
fresh bird's user avatar
-1 votes
2 answers
79 views

Linking with vulkan using GCC

I am not sure why gcc cannot find vulkan.h. I explicitly told gcc where to look, but it still cannot find it In my main.c I have #include "vulkan.h" int main(){} compiling i get, gcc main.c ...
Crowbar's user avatar
0 votes
1 answer
31 views

Compute shader writing to swapchain image, image layout validation error

I'm trying to write to a Swapchain image from a compute shader. So far I have: Bound the Swapchain Image to a Storage Image (VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) Added VK_IMAGE_USAGE_STORAGE_BIT to ...
RefuX's user avatar
  • 512
-1 votes
1 answer
93 views

Executable doesn't see Vulkan dynamic lib and throws an linker-error LNK2019

I wanted to write an application in C++/Vulkan without requiring the pre-installed VulkanSDK. So, I have added through "git submodule" vulkan-headers repo, copy VulkanRT to binaries-...
Paulus's user avatar
  • 11
1 vote
1 answer
91 views

Vulkan - do you need a graphics pipeline for each mesh in the scene?

Do you need a graphics pipeline for each mesh in the scene? or does an object only need a separate pipeline if its going to use a different shader to the others? Currently learning Vulkan and this ...
Charl1e's user avatar
  • 87
2 votes
0 answers
98 views

Textured quads rendered using vulkan flicker/corrupt, when viewed through OBS

I am implementing a basic 2D game engine using vulkan. I want to re-implement SpriteBatch from XNA/MonoGame, so basically I want to draw lots of textured quads with individual transformations (...
Whosdatdev's user avatar
0 votes
1 answer
47 views

How to calculate if a triangle is back-facing or front facing in Vulkan

In this page: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkFrontFace.html They give this equation: How would you apply that formula for example to a triangle with these ...
Owen Zhang's user avatar
0 votes
2 answers
50 views

Can you cancel a Vulkan execution?

I have a Vulkan Compute Shader than can take a second or two to do its work. If the user changes parameters whilst that's happening, I don't want there to be lag, I want the calculations to abort and ...
jg_at_pharos's user avatar
0 votes
1 answer
52 views

Vulkan VkVertexInputBindingDescription, how does it work?

I am trying to do something that I thought would be simple, but I can't get it work. I have few questions regarding the Vulkan binding. Q1. What is the difference between ...
gmmo's user avatar
  • 2,655
0 votes
1 answer
43 views

Effective way to avoid changing texture layout in Vulkan every frame

I have some texture data that updates very rarely but I cannot control when it updates (data is provided from an external library that renders GUI). Currently, I change their layout twice in every ...
Angelicos Phosphoros's user avatar
1 vote
1 answer
47 views

Why vkGetPhysicalDeviceQueueFamilyProperties has no return value

Most functions in Vulkan that query for an array of items usually follow a similar API style (for example vkEnumeratePhysicalDevices). Is there any reason that vkGetPhysicalDeviceQueueFamilyProperties ...
James Nguyen's user avatar
  • 1,121
-1 votes
1 answer
40 views

I can't get Vulkan vkCmdBindVertexBuffers2 to work and I don't know why

I am trying to bind my vertex buffers using this API: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindVertexBuffers2.html which is almost identical of the standard API ...
gmmo's user avatar
  • 2,655
-1 votes
1 answer
70 views

Write to texture in geometry shader and sample in fragment shader

Is it possible to write to a texture in the geometry shader and sample this texture in the fragment shader? If so, how would the descriptors setup be done? How can an image be ...
omniyo's user avatar
  • 340
0 votes
1 answer
46 views

Is it possible to release queue ownership of an image without knowing the layout the destination will use the image in?

I have two queues, Queue A and Queue B, from different queue families. Queue A currently has ownership of an image in exclusive sharing mode. I want to release ownership of the image to Queue B in ...
Tacodiva's user avatar
  • 433
-1 votes
0 answers
43 views

How do enable my device to use vkCmdBindVertexBuffers2?

I am trying to use vkCmdBindVertexBuffers2 to set dynamic strides when binding vertex buffers: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/vkCmdBindVertexBuffers2.html However, ...
gmmo's user avatar
  • 2,655
0 votes
0 answers
42 views

How should I bind various types of material data to the ray tracing rendering pipeline in DirectX12?

My problem is a bit complicated. When doing ray tracing rendering, all data in the scene needs to be prepared. In addition to texture resources, each object to be rendered will also have its own ...
AshenvaleZX's user avatar
0 votes
1 answer
89 views

Why am I getting "(exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)" when trying to map a vkDeviceMemory into application address space?

I am learning how to use Vulkan. I am using the Vulkan bindings for Rust called Ash. I am trying to write the index buffer data to the vkDeviceMemory. the program is crashing when index_slice....
mahjong master's user avatar
0 votes
1 answer
48 views

Screenshot function works, but results in the Vulkan application attempting to recreate the swapchian and crashing

I have been attempting to add the ability to create screenshots in my Vulkan application by closely following Sascha Willems exmaple. At this point the function works exactly as intended, But after ...
Meissel's user avatar
  • 17
1 vote
0 answers
40 views

Vulkan + GLFW : How to write color to screen buffer as unsigned integer(s)?

I am learning about Vulkan by creating a little program that will render 3D scatter plots. Every point in the scatter plot has an (x,y,z) position and an rgba color. I am packing the rgba color into a ...
NewToVulkan's user avatar
-1 votes
1 answer
48 views

Why does a triangle get deformed when being rotated around a non-perpendicular to the triangle plane's axis?

I'm writing a little vulkan app, and I was trying to test triangle rotation. These were my triangle's position (vec3 from the left) and color (vec4 from the right): obj.vertices = { {{-0.5, -0.5,...
Christopher Weronski's user avatar
4 votes
1 answer
39 views

Interpretation of the VK_FORMAT_R16G16_S10_5_NV format

The Vulkan spec sais: VK_FORMAT_R16G16_S10_5_NV specifies a two-component, fixed-point format where most significant bit specifies the sign bit, next 10 bits specify the integer value and last 5 bits ...
Pal Szasz's user avatar
  • 3,046
2 votes
2 answers
106 views

What is wrong with my MVP matrix operations?

I'm trying to program a 3D graphic engine (almost game engine) using Vulkan, following https://vulkan-tutorial.com/. I've gotten to end of the Uniform Buffer section but instead of nicely angled ...
infinityplusb's user avatar
0 votes
1 answer
47 views

vkEnumerateInstanceExtensionProperties was not declared in this scope

I'm trying to setup a development environment for Vulcan in Ubuntu 22, following the tutorial https://vulkan-tutorial.com/Development_environment#page_Linux. I'm getting an error error: ‘...
ChrisVonBienias's user avatar
1 vote
1 answer
39 views

Is there a Vulkan command equivalent to the synchronization guarantees from separate commandbuffers in the same queue submit?

I have a Vulkan backend for my renderer that uses multiple command buffers -- some for uploads, one per raster pass, one per compute pass, etc. I'd like to take more advantage of Vulkan's ...
leander's user avatar
  • 8,559
0 votes
0 answers
23 views

Is vulkan.hpp documentation wrong about initializing default dynamic dispatcher?

To be clear I installed latest version of LunarG's SDK for windows and I updated my nVidia drivers for the latest ones, still I am getting complains from compiler that no instance of overloaded ...
CJ_Notned's user avatar
  • 248
0 votes
1 answer
106 views

Unresolved external symbol when using vkSetDebugUtilsObjectNameEXT()? [duplicate]

Well i have changed some old function and after closing the Validationlayers tell me that i dont delete/clear up recources and now trying to set up DebugUtilsObjectName function to make it easier to ...
StarFox's user avatar
  • 15
0 votes
0 answers
41 views

What usefulness does having image views of particular mip levels have?

I know you use mip levels to reduce aliasing effects, but that's done at the sampling level. Let's just say you were only interested in using mips 3 and above you can control that with the sampling. ...
Zebrafish's user avatar
  • 12.1k
0 votes
0 answers
30 views

Shadow is cut off in some angles in Cascade Shadow Map

I am adding csm to my project, it work well all the day until I add sponza to my project. When I look down, it works ok. pic1 But when I look up or, look behind. It turns weird. pic2 pic3 following is ...
Kirin Gaen's user avatar
0 votes
1 answer
50 views

Can I assume that most Vulkan functions use a lock when calling them?

I mean either a mutex or a spinlock, given that most are not described in the spec as needing to be "externally synchronised", then you can them from multiple threads, therefore they must ...
Zebrafish's user avatar
  • 12.1k
0 votes
1 answer
57 views

How many GPUs have support for a particular feature?

At this site under Core 1.2 you can see that descriptorIndexing has 93.67% support across all platforms. Then under extensions page you can see that under VK_EXT_descriptor_indexing all the features ...
Zebrafish's user avatar
  • 12.1k
0 votes
1 answer
42 views

Why are so many colour formats not able to be transferred? [duplicate]

At this site it shows supports for formats. If you look at Windows it shows that BC formats are overwhelmingly supported, at 99% but if you look at the transfer destination and source you'll notice ...
Zebrafish's user avatar
  • 12.1k
0 votes
0 answers
82 views

shader uses descriptor slot (expected `VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER`) but not declared in pipeline layout

the full error [ VUID-VkGraphicsPipelineCreateInfo-layout-00756 ] Object 0: handle = 0xa43473000000002d, type = VK_OBJECT_TYPE_SHADER_MODULE; Object 1: handle = 0x4b7df1000000002f, type = ...
kanthonye's user avatar
  • 159
0 votes
1 answer
41 views

Can I sample a Vulkan SRGB image with UNORM image view?

This is my first try for a Vulkan rendering engine and I would like insights. My image loading code currently put images in SRGB VkImage, this is of course not suitable for normal maps and other data-...
Devilish Spirits's user avatar
1 vote
0 answers
60 views

Difference between VK_KHR_fragment_shading_rate and VK_EXT_fragment_density_map

The attachment method of VK_KHR_fragment_shading_rate (FSR) extension seems to be similar to VK_EXT_fragment_density_map (FDM) extension. One of the differences is in the way shading rate is defined. ...
WillyWonka's user avatar
0 votes
1 answer
44 views

What's the point of the SSCALED AND USCALED format types in OpenGL AND Vulkan?

With SSCALED and USCALED if you read integer values the shader will sampled and return that integer value converted directly as a float, so integer 255 becomes 255.f, not 1 like UNORM would do, or 255 ...
Zebrafish's user avatar
  • 12.1k
0 votes
0 answers
28 views

Fragment Output Interface incorrect?

I'm new to vulkan and setting up a graphics pipeline right now. I'm following this tutorial series. So VUID-VkGraphicsPipelineCreateInfo-alphaToCoverageEnable-08891 is the error I'm getting and I don'...
Pizza98's user avatar

1
2 3 4 5
47