Questions tagged [vulkan]

For questions about the Vulkan graphics/compute API.

Filter by
Sorted by
Tagged with
1
vote
0answers
37 views

OpenGL/D3D11 offscreen render multiple buffering

Recently I've been looking at Vulkan, and one thing that I noticed is that the application is responsible for choosing which buffer to render to in the case of multiple buffering. This got me thinking:...
9
votes
1answer
2k views

What prevents older GPUs from supporting Vulkan?

More out of curiosity than for any practical purpose, I'm wondering what is lacking from older GPUs that causes them to be unable to support Vulkan. I know that some argue that some hardware, such as ...
2
votes
1answer
47 views

Do you have to group and optimize your draw and shader calls in Vulkan?

This is in reference and contrast to the discipline (or more or less requirement) of opengl to group draws that use the same materials together, to minimize making many draw calls or many switch ...
-1
votes
1answer
93 views

When do people need to work directly with a graphical API (eg: Direct3D) instead of using already made software?

I had this doubt in my head for several months and have been unable to find an answer anywhere on internet. I know what OpenGL, DirectX, Vulkan, Metal, etc... are, I already know what they are used ...
0
votes
0answers
31 views

Volumetric Photon Mapping - Grid Rendering Artifacts

I am currently implementing a volumetric progressive photon mapping renderer for cloud data (stored as grid density values). As you can see in the image, I am getting this grid with the indirect in-...
0
votes
1answer
88 views

Feeding acceleration structure to the GPU then raytracing it in a compute shader?

I want to use Vulkan's rasterization to solve for the visibility problem, but once that is done I want to do shading, reflection and transmission through a raytracer which also runs on the GPU. With a ...
0
votes
0answers
45 views

Queue from a family queue that supports presentation doesn't work [Vulkan]

I'm following this tutorial on Vulkan and I tried to see if it actually worked with different queues for drawing and presenting the image of the triangle. My GPU supports presentation with every queue ...
2
votes
1answer
544 views

Feeding vertex data to a compute shader

I'm writing a CAD program in vulkan. In my current design, I have line paths represented as large vertex buffers for rendering. I would like to implement an algorithm for extruding the path outwards, ...
1
vote
1answer
109 views

Retrieve real distance from depth buffer for shadow ray (vulkan hybrid rendering)

I'm trying to implement an hybrid renderer based on Vulkan extension VK_NV_ray_tracing. Basically, the rasterizer compute the albedo and depth map of the scene. Then I try to compute the distance from ...
60
votes
9answers
35k views

Should new graphics programmers be learning Vulkan instead of OpenGL?

From the wiki: "the Vulkan API was initially referred to as the 'next generation OpenGL initiative' by Khrono", and that it is "a grounds-up redesign effort to unify OpenGL and OpenGL ES into one ...
4
votes
2answers
3k views

Can i compile my shaders to SPIR-V without using glslangValidator?

I'm making a cross-platform application, and i need my shaders to be compiled to SPIR-V for both Opengl and Vulkan. It seems that the only way to do so is to call a separate program, called "...
2
votes
1answer
104 views

Vulkan: using gl_PrimitiveID without geometryShader feature

When compiling a glsl fragment shader which reads gl_PrimitiveID with glslc compiler I get the spirv-1.0 with Geometry capability enabled, which is technically ...
3
votes
1answer
570 views

Vulkan: efficient way to update VBO mesh vertices?

I would like to change/add/remove some mesh vertices in existing VBO's (while deforming and remeshing 3D objects) . With OpenGL I would have to reload whole vertex VBO's. I suppose with Vulkan there ...
1
vote
0answers
17 views

How to handle object drawables?

Currently the graphics API I am using is Vulkan, but I am trying to find a general enough way to represent the following. In graphics, drawing can be generalized as: Get vertex buffers and send them ...
0
votes
0answers
47 views

Bloom Effect Blending, Depth Buffer Resolution Mismatch Problem

In most cases, Bloom's intensity-filtered image is rendered for objects affected by it to a low-res FBO and blended with the image at last. If the bloom is not applied to some objects, Depth Buffer ...
7
votes
1answer
5k views

What are Metal and Vulkan?

I keep coming across the terms 'Metal' and 'Vulkan' on this site. Guessing this to be some CG software, I'm interested to know what these are exactly and what the intended and most common usage is. A ...
0
votes
0answers
80 views

Disable both depth clamp and depth clip in Vulkan (older drivers)

I'd like to store arbitrary float depth, so I have to disable both primitive clipping and depth clamping. I can disable clipping by setting ...
1
vote
0answers
86 views

Difference between Passing Instance Data to Vertex Shader methods

I see two kinds of passing Instance Data to Vertex Shader in different Examples. 1 .Using a Uniform Buffer and filling in an array, like below ...
4
votes
0answers
89 views

Are there any reasons to use power of two textures with modern mobile platforms?

Are there any reasons to use power of two textures (like 128x128 sized) if one targets modern mobile platforms (with OpenGL ES 3.0, Metal and/or Vulkan)? With iOS the PVRTC only supports power of two ...
1
vote
0answers
160 views

Compute shader only 5 times faster on the GPU than on the CPU

I'm running following compute shader in Vulkan. worldImage is device local memory that holds the world. resultImage is reference to the memory of the swapchain image: ...
0
votes
1answer
72 views

Only each third image in swapchain is being used, causing flickering

I've managed to write a "small" Vulkan program that outputs a solid color using compute shader directly to swapchain. However, it doesn't work properly. ImageMemoryBarriers I've setup don't ...
2
votes
0answers
114 views

Out of core rendering

Suppose there is a frame, which is larger that the device memory (I mean, dozens of Gb). And I would like to render to it from a set of textures, which is larger than the host memory (I mean, dozens ...
1
vote
2answers
438 views

Multiple swapchains in Vulkan app with ImGui

I am integrating imgui into my app using glfw + vulkan example. The function vkCreateSwapchainKHR() is also called by imgui setup logic in addition to my app on the same device and it fails with "...
0
votes
0answers
34 views

Mathing gl_PerVertex declarations

Half a year ago the vulkan validation layer of matching the declaration of gl_PerVertex between shaders (e.g. vertex and geometry). Hence following pair of shaders now throws a validation error: <...
2
votes
0answers
47 views
1
vote
1answer
142 views

How was computer graphics libraries or gtk,qt programmed?

I am wondering how was first graphic or image libraries created,I know C and Python ,I want to create plotting application,and I cant imagine these libraries(QT,OpenGL,Vulkan) written by C,how can I ...
0
votes
1answer
313 views

shaderc compile through api with #include

I'm using shaderc to compile glsl code in to spirv module and pass to pipelie in REAL-TIME. I want to use #include to reuse some of the shader code but shaderc is having problems recognizing it. Any ...
5
votes
1answer
505 views

Is vkCmdPushDescriptorSetKHR efficient?

I am new to Vulkan. Compared to DX12, the resource binding procedure seems a little bit complicated. In terms of per draw call uniform buffers, I currently have two approaches in mind, and they both ...
2
votes
1answer
363 views

Clarifying vulkan glsl std140

So I have a uniform block that looks something lile this { mat4; mat4[128]; uint[16] } The block should total up to 8320 bytes. After aligning by 256 bytes for nvidia, that brings the total ...
2
votes
1answer
155 views

Inconsistent behavior involving VkPhysicalDeviceFeatures.fillModeNonSolid

I departed slightly from the Vulkan tutorial I was following and decided to draw a wireframe instead of a solid triangle. As soon as I call ...
2
votes
1answer
477 views

What is the oldest hardware able to feasibly support Vulkan?

What is the oldest hardware or minimum requirements conceptually able to support a fully hardware-accelerated Vulkan implementation? I am not referring to what implementations are currently available ...
4
votes
1answer
246 views

How much does driver quality affect Vulkan and DX12 compared to OpenGL and DX11?

Considering the fact that Vulkan and DX12 delegate most of the memory management / work scheduling tasks to the application itself, how much do drivers affect performance? To put my question into ...
1
vote
1answer
215 views

How do I swap the buffers when using a Win32 window with Vulkan?

I was recently told here how to manage the integration between Vulkan and Win32. I am writing a windowing library like "GLFW", that is only going to support Vulkan; I have now come to the point where ...
1
vote
1answer
573 views

Do I need separate Graphics and Transfer commands?

I was following this tutorial on Vulkan https://vulkan-tutorial.com/Vertex_buffers/Staging_buffer and I decided to do this bit: The buffer copy command requires a queue family that supports transfer ...
2
votes
1answer
698 views

Is a single shader and 1x1 pixel white sampler more efficient than frequent switching between shaders with and without samplers?

I have some existing OpenGL code that I am porting to Vulkan. The question is somewhat relevant to both OpenGL and Vulkan. I am rendering some primitives using textures, some single channel, others ...
1
vote
2answers
3k views

FPS counter for a simple Vulkan app

What measurement/monitoring tools could I use to get the FPS values for a simple Vulkan app? Thanks in advance
2
votes
1answer
2k views

How do I create a Win32 window with a Vulkan context?

I am aware of libraries that already do this (like GLFW), but I would actually prefer do all of the window and context creation by myself.
1
vote
1answer
757 views

Which 3D applications currently uses Vulkan API?

I'm a newbie in terms of CG world. I'm curious to know about the applications that use Vulkan API and their performances compared to other APIs. As I read, Vulkan has more access to the graphic cards ...
1
vote
1answer
530 views

What is a “Vulkan Extension”?

When creating a VkInstance, you need to setup the API's extensions that are going to be used by your application (for example you need an extension to interface with the window system on desktop ...
0
votes
2answers
499 views

Is it possible to emulate Vulkan on a non Vulkan compatible gpu?

I don't think there is much to explain here, since the question is pretty much in the title, but i'll try to explain myself better: My current laptop's gpu does not support Vulkan, so i was wondering ...
1
vote
1answer
1k views

Best way to clear a framebuffer image without drawing?

So I have a framebuffer image which later acts as input to a compute shader, and some frames there is geometry drawn to the framebuffer, but some frames this is not necessary. The thing is, in my ...
1
vote
1answer
241 views

Controling order of execution of a (compute) shader on an array of vertices (data) in Vulkan

Is it possible to force Vulkan to execute a shader on vertices (data) in a semi-consecutive manner? For example, if the data passed to the shaders as a binary tree, shader would process it one layer ...
21
votes
3answers
751 views

Why is thread safety such a huge deal for Graphics APIs?

Both Vulkan and DirectX12 are claimed to be usable in a thread-safe manner. People seem to be excited about that. Why is this considered such a huge feature? The "real" processing gets thrown over ...
1
vote
1answer
276 views

How different is the SPIR-V accepted by OpenGL (ARB_gl_spirv) from SPIR-V accepted by Vulkan?

The format of SPIR-V bytecode is probably one of the least documented parts of both OpenGL and Vulkan that I am aware of. I have compiled a very basic fragment shaders into both the OpenGL and Vulkan ...
5
votes
2answers
1k views

Vulkan: how does host coherence work?

I have a memory that is persistently mapped. It is both HOST_VISIBLE and HOST_COHERENT but not DEVICE_LOCAL. (My physical device offers no memory that is exclusively HOST_VISIBLE without also being ...
1
vote
0answers
134 views

Vulkan's vkEnumeratePhysicalDevices does not detect Radeon GPU

I am on a ubuntu 16.04 machine with a Radeon HD 8670M card. I had installed the examples provided by LunarG on their github repo and they compiled and executed successfully. To teach myself how to ...
1
vote
1answer
827 views

Why do vulkan extensions need to be enabled?

This is sort of an API design question. Why do vulkan instance/device extensions need to be specifically enabled, in order for their calls to be available? Wouldn't it make more sense to have ...
1
vote
1answer
326 views

Vulkan: Swapchain image count with VK_PRESENT_MODE_FIFO_KHR

I'm working on an engine for Win32 exclusively. Can I safely assume that the flag VK_PRESENT_MODE_FIFO_KHR will always generate 2 and only 2 images for the swapchain?
3
votes
1answer
127 views

What mechanisms are being used by Directx12 and Vulkan APIs in order to communicate with graphic card drivers internally?

I am trying and learning to develop a low level graphics API. I want to know, how do modern graphics APIs manage to communicate with graphic card drivers (to tackle GPU) so efficiently and in an ...
2
votes
1answer
1k views

Vulkan best way of updating pipeline viewport

I have discovered that there are two ways to update the viewport (might be more, but not sure). Currently I am rebuilding the Pipeline when I resize my screen but there is a noticeable stutter as it ...