vulkan

Vulkan on X11: vkGetPhysicalDeviceSurfaceCapabilitiesKHR error

匿名 (未验证) 提交于 2019-12-03 01:06:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: 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 ) Resource id in failed request :

Synchronization between command buffers in Vulkan

杀马特。学长 韩版系。学妹 提交于 2019-12-02 17:10:51
There are several ways to handle synchronization in Vulkan. This is how I understand it: Fences are GPU to CPU syncs. Semaphores are GPU to GPU syncs, they are used to sync queue submissions (on the same or different queues). Events are more general, reset and checked on both CPU and GPU. Barriers are used for synchronization inside a command buffer. In my case I have two command buffers. And I want the second command buffer to execute after the first one. submitInfo.pCommandBuffers = &firstCommandBuffer; vkQueueSubmit(queue, 1, &submitInfo, VK_NULL_HANDLE); // wait for first command buffer to

Vulkan descriptor binding

二次信任 提交于 2019-12-02 00:31:03
问题 In my vulkan application i used to draw meshes like this when all the meshes used the same texture Updatedescriptorsets(texture) Command buffer record { For each mesh Bind transformubo Draw mesh } But now I want each mesh to have a unique texture so i tried this Command buffer record { For each mesh Bind transformubo Updatedescriptorsets (textures[meshindex]) Draw mesh } But it gives an error saying descriptorset is destroyed or updated. I looked in vulkan documentation and found out that I

VKAPI_ATTR and VKAPI_CALL macros in Vulkan

此生再无相见时 提交于 2019-12-01 22:25:12
I have been searching and I still am not sure what VKAPI_ATTR and VKAPI_CALL are. I am not sure if they are suppose to be a macro or some fancy C++ function declaration I am not aware of. What is VKAPI_ATTR void VKAPI_CALL vkCommand(void) offering that void vkCommand(void) doesn't offer? They are macros to make sure the correct calling convention is applied. This is less important in 64 bit where they have mostly converged but in 32 bit there are several incompatible ones. Unfortunately different compilers have different ways of doing that. One puts the required token before the return value

How to deal with the layouts of presentable images?

ε祈祈猫儿з 提交于 2019-12-01 22:18:10
问题 A presentable image starts out in VK_IMAGE_LAYOUT_UNDEFINED but will be VK_IMAGE_LAYOUT_PRESENT_SRC_KHR after they have been presented once. A lot of examples do a transition of all vkImages to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR immediately after creating the vkSwapchain . Which allows them to use an VK_IMAGE_LAYOUT_PRESENT_SRC_KHR for oldLayout . But doing the transition right after creation of the swapchain is not allowed. Use of a presentable image must occur only after the image is returned

Vulkan descriptor binding

≡放荡痞女 提交于 2019-12-01 21:19:03
In my vulkan application i used to draw meshes like this when all the meshes used the same texture Updatedescriptorsets(texture) Command buffer record { For each mesh Bind transformubo Draw mesh } But now I want each mesh to have a unique texture so i tried this Command buffer record { For each mesh Bind transformubo Updatedescriptorsets (textures[meshindex]) Draw mesh } But it gives an error saying descriptorset is destroyed or updated. I looked in vulkan documentation and found out that I can't update descriptorset during command buffer records. So how can I have a unique texture to each

How to deal with the layouts of presentable images?

三世轮回 提交于 2019-12-01 20:10:56
A presentable image starts out in VK_IMAGE_LAYOUT_UNDEFINED but will be VK_IMAGE_LAYOUT_PRESENT_SRC_KHR after they have been presented once. A lot of examples do a transition of all vkImages to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR immediately after creating the vkSwapchain . Which allows them to use an VK_IMAGE_LAYOUT_PRESENT_SRC_KHR for oldLayout . But doing the transition right after creation of the swapchain is not allowed. Use of a presentable image must occur only after the image is returned by vkAcquireNextImageKHR , and before it is presented by vkQueuePresentKHR . This includes

Does Forcing "High" DPM Performance Help Out Your AMDGPU Performance?

五迷三道 提交于 2019-12-01 04:18:38
Does Forcing "High" DPM Performance Help Out Your AMDGPU Performance? Written by Michael Larabel in Radeon on 7 June 2018 at 06:04 AM EDT. 14 Comments A premium patron recently asked about testing the open-source Radeon driver performance when testing the forced "high" dynamic power management state rather than the default "auto" mode. Here are some benchmarks. This is about forcing /sys/class/drm/card0/device/power_dpm_force_performance_level to high rather than auto, to ensure the GPU is bound to its highest performance state rather than dynamically changing performance states based upon

Does Forcing "High" DPM Performance Help Out Your AMDGPU Performance?

六月ゝ 毕业季﹏ 提交于 2019-12-01 04:18:14
Does Forcing "High" DPM Performance Help Out Your AMDGPU Performance? Written by Michael Larabel in Radeon on 7 June 2018 at 06:04 AM EDT. 14 Comments A premium patron recently asked about testing the open-source Radeon driver performance when testing the forced "high" dynamic power management state rather than the default "auto" mode. Here are some benchmarks. This is about forcing /sys/class/drm/card0/device/power_dpm_force_performance_level to high rather than auto, to ensure the GPU is bound to its highest performance state rather than dynamically changing performance states based upon

What is actually a Queue family in Vulkan?

拜拜、爱过 提交于 2019-11-30 15:06:13
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 this output: Queue number: 16 Queue flags: {Graphics | Compute | Transfer | SparseBinding} Queue number: