vulkan

What is actually a Queue family in Vulkan?

大城市里の小女人 提交于 2019-12-30 03:13:08
问题 I am currently learning vulkan, right now I am just taking apart each command and inspecting the structures to try to understand what they mean. Right now I am analyzing QueueFamilies, for which I have the following code: vector<vk::QueueFamilyProperties> queue_families = device.getQueueFamilyProperties(); for(auto &q_family : queue_families) { cout << "Queue number: " + to_string(q_family.queueCount) << endl; cout << "Queue flags: " + to_string(q_family.queueFlags) << endl; } This produces

Vulkan validation layers don't load/work on Linux

笑着哭i 提交于 2019-12-25 01:17:25
问题 I have basic Vulkan application, "Hello triangle",derived from this tutorial. In debug mode I use two validations layers: VK_LAYER_KHRONOS_validation and VK_LAYER_LUNARG_monitor On Windows I got no problem. Both layers load, I can see FPS counter in the title bar. But I am experiencing different behaviour on Linux (Ubuntu 18.04). Only VK_LAYER_LUNARG_monitor loads. No FPS counter appears in the title bar. VK_LAYER_KHRONOS_validation fails to load with the error: ERROR: libVkLayer_khronos

Using Vulkan with SFML?

守給你的承諾、 提交于 2019-12-24 19:33:27
问题 Im currently using GLFW for window creation and user input. GLFW simply allows us to say: glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API); To tell GLFW were not working with OpenGL. It even provides function like glfwCreateWindowSurface(...) To automate window surface creation for different platforms. Is there any way I can do something similar with SFML? I could not find any information about it on their website, so i assume the answer is no. But maybe there is some kind of hack, or is this not

AccessViolationException when calling vkEnumeratePhysicalDevices via pInvoke from c#

时光毁灭记忆、已成空白 提交于 2019-12-24 16:06:13
问题 I have the keen idea to write a wrapper for Vulkan in c#. Unfortunately the second call of the Vulkan API already fails unexplainably. The code below is taken from Sascha Willems' Vulkan examples and converted into c# code: Vk.ApplicationInfo applicationInfo = new Vk.ApplicationInfo(); applicationInfo.sType = Vk.StructureType.STRUCTURE_TYPE_APPLICATION_INFO; applicationInfo.pApplicationName = "Example"; applicationInfo.pEngineName = "Example"; applicationInfo.apiVersion = (uint)Math.Pow(2, 22

Vulkan on X11: vkGetPhysicalDeviceSurfaceCapabilitiesKHR error

℡╲_俬逩灬. 提交于 2019-12-24 14:47:44
问题 I am trying to get Vulkan running under X11. I have (apparently) successfully created an instance, device and surface, and several calls relating to the surface also succeed, and even return reasonable values (for example vkGetPhysicalDeviceSurfaceFormatsKHR returns two formats). However, when I call vkGetPhysicalDeviceSurfaceCapabilitiesKHR , I get the following: X Error of failed request: BadDrawable (invalid Pixmap or Window parameter) Major opcode of failed request: 14 (X_GetGeometry)

Debugging a black image in Vulkan

冷暖自知 提交于 2019-12-24 08:20:16
问题 I'm trying to render a scene into an image in Vulkan which I want to sample on a quad that's floating around somewhere in that scene. My approach was to basically do the same steps I used to render the scene into presentation images, except that I would only have a single image in RGBA8 format instead of a presentation-specific format. All I'm seeing, though, is blackness. The validation layers are on and do not report anything. When debugging with RenderDoc, the data seems to be correct. It

Impossible to acquire and present in parallel with rendering?

倖福魔咒の 提交于 2019-12-24 01:57:09
问题 Note: I'm self-learning Vulkan with little knowledge of modern OpenGL. Reading the Vulkan specifications, I can see very nice semaphores that allow the command buffer and the swapchain to synchronize. Here's what I understand to be a simple (yet I think inefficient) way of doing things: Get image with vkAcquireNextImageKHR , signalling sem_post_acq Build command buffer (or use pre-built) with: Image barrier to transition image away from VK_IMAGE_LAYOUT_UNDEFINED render Image barrier to

Can `vkCommandPool` be allocated from the main thread and the moved to other threads?

佐手、 提交于 2019-12-24 01:55:19
问题 Is it possible, to allocate vkCommandPool from the main thread and then move them into a new thread, where it is used exclusively? Pseudo code: // Pool for creating secondary buffers threaded_command_pool = new CommandPool(); // Thread for filling secondary buffers // threaded_command_poolzd is used only here thread_handle = new Thread(move(command_pool)) thread_handle.join() // Pool for merging secondary buffers command_pool = new CommandPool() primary_command_buffer = command_pool.create

vkCreateDebugReportCallback EXT not linking, but every other functions in vulkan.h works perfectly

强颜欢笑 提交于 2019-12-23 13:41:12
问题 So I have been trying to learn Vulkan lately, and while trying to get the validation layers to work, I got error LNK2019: 1>Renderer.obj : error LNK2019: unresolved external symbol vkCreateDebugReportCallbackEXT referenced in function "private: void __cdecl Renderer::_InitDebug(void)" (?_InitDebug@Renderer@@AEAAXXZ) Now the odd thing is that every other function in vulkan.h works perfectly. I have vulkan-1.lib linked, and I run the AMD implementation of vulkan. The library is from the Vulkan

Using different push-constants in different shader stages

一个人想着一个人 提交于 2019-12-23 07:03:48
问题 I have a vertex shader with a push-constant block containing one float: layout(push_constant) uniform pushConstants { float test1; } u_pushConstants; And a fragment shader with another push-constant block with a different float value: layout(push_constant) uniform pushConstants { float test2; } u_pushConstants; test1 and test2 are supposed to be different. The push-constant ranges for the pipeline layout are defined like this: std::array<vk::PushConstantRange,2> ranges = { vk: