vulkano icon indicating copy to clipboard operation
vulkano copied to clipboard

deferred example segfaults on vulkan-intel driver on archlinux

Open m4b opened this issue 7 years ago • 5 comments

Linux efrit 4.18.16-arch1-1-ARCH #1 SMP PREEMPT Sat Oct 20 22:06:45 UTC 2018 x86_64 GNU/Linux

pacman -Qi vulkan-intel
Name            : vulkan-intel
Version         : 18.2.3-1
Description     : Intel's Vulkan mesa driver

thr 1 segfaults somewhere in libvulkan_intel.so

(gdb) bt
#0  0x00007f443011dbf3 in ?? () from /usr/lib/libvulkan_intel.so
#1  0x00007f4430143dab in ?? () from /usr/lib/libvulkan_intel.so
#2  0x00007f443014444d in ?? () from /usr/lib/libvulkan_intel.so
#3  0x0000557737490321 in vk_sys::DevicePointers::CmdDraw (self=0x7f44331ef828, commandBuffer=139930844455936, vertexCount=3, instanceCount=1, firstVertex=0, firstInstance=0)
    at /home/m4b/git/vulkano/vk-sys/src/lib.rs:2713
#4  0x000055773738c765 in <vulkano::command_buffer::sys::UnsafeCommandBufferBuilder<P>>::draw (self=0x7fff38cd9840, vertex_count=3, instance_count=1, first_vertex=0, first_instance=0)
    at /home/m4b/git/vulkano/vulkano/src/command_buffer/sys.rs:1092
#5  0x000055773739eef8 in <vulkano::command_buffer::synced::commands::<impl vulkano::command_buffer::synced::base::SyncCommandBufferBuilder<P>>::draw::Cmd as vulkano::command_buffer::synced::base::Command<P>>::send (self=0x7f443318ba30, out=0x7fff38cd9840) at /home/m4b/git/vulkano/vulkano/src/command_buffer/synced/commands.rs:1126
#6  0x00005577372fb2a8 in <vulkano::command_buffer::synced::base::SyncCommandBufferBuilder<P>>::build (self=...) at /home/m4b/git/vulkano/vulkano/src/command_buffer/synced/base.rs:699
#7  0x000055773753afac in <vulkano::command_buffer::auto::AutoCommandBufferBuilder<P>>::build (self=...) at /home/m4b/git/vulkano/vulkano/src/command_buffer/auto.rs:473
#8  0x000055773754a863 in deferred::triangle_draw_system::TriangleDrawSystem::draw (self=0x7fff38cdc700, viewport_dimensions=...) at examples/src/bin/deferred/triangle_draw_system.rs:71
#9  0x0000557737454f19 in deferred::main () at examples/src/bin/deferred/main.rs:144
(gdb) info thr
  Id   Target Id                         Frame 
* 1    Thread 0x7f44335a69c0 (LWP 14817) 0x00007f443011dbf3 in ?? () from /usr/lib/libvulkan_intel.so
  2    Thread 0x7f442e1ff700 (LWP 14819) 0x00007f443391bafc in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
(gdb) thr 2
[Switching to thread 2 (Thread 0x7f442e1ff700 (LWP 14819))]
#0  0x00007f443391bafc in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
(gdb) bt
#0  0x00007f443391bafc in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib/libpthread.so.0
#1  0x00007f44302738bc in ?? () from /usr/lib/libvulkan_intel.so
#2  0x00007f44302735f8 in ?? () from /usr/lib/libvulkan_intel.so
#3  0x00007f4433915a9d in start_thread () from /usr/lib/libpthread.so.0
#4  0x00007f443382bb23 in clone () from /usr/lib/libc.so.6

It prints this before segfaulting:

Xlib:  extension "NV-GLX" missing on display ":0".
Segmentation fault (core dumped)

However, the triangle, and teapot both print the same (but do not segfault), as well as: Using device: Intel(R) HD Graphics 620 (Kaby Lake GT2) (type: IntegratedGpu)

I'm on latest master:

commit 23709fb0117b569a8c7e35b36b929938361f1dba (HEAD -> master, origin/master, origin/HEAD)
Author: Lucas Kent <[email protected]>
Date:   Fri Oct 26 13:49:36 2018 +1100

    Remove vulkano-shader-derive (#1085)

m4b avatar Oct 26 '18 03:10 m4b

I can confirm that I have the same issue. I have the exact same integrated device "Intel(R) HD Graphics 620 (Kaby Lake GT2)" However I have an amd discrete card so I dont get the message NV-GLX.

rukai avatar Oct 26 '18 05:10 rukai

Ran with the validation layers enabled and get:

rubic@LAPTOP bin$ VK_INSTANCE_LAYERS=VK_LAYER_LUNARG_standard_validation cargo run --release --bin deferred
VUID-VkSubpassDependency-srcAccessMask-00868(ERROR / SPEC): msgNum: 0 - CreateRenderPass: pDependencies[0].srcAccessMask (0x1FFFF) is not supported by srcStageMask (0x8000). The Vulkan spec states: Any access flag included in srcAccessMask must be supported by one of the pipeline stages in srcStageMask, as specified in the table of supported access types (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkSubpassDependency-srcAccessMask-00868)
    Objects: 1
       [0] 0x0, type: 0, name: (null)
Validation(ERROR): msg_code: 0:  [ VUID-VkSubpassDependency-srcAccessMask-00868 ] Object: VK_NULL_HANDLE (Type = 0) | CreateRenderPass: pDependencies[0].srcAccessMask (0x1FFFF) is not supported by srcStageMask (0x8000). The Vulkan spec states: Any access flag included in srcAccessMask must be supported by one of the pipeline stages in srcStageMask, as specified in the table of supported access types (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkSubpassDependency-srcAccessMask-00868)
VUID-VkSubpassDependency-dstAccessMask-00869(ERROR / SPEC): msgNum: 0 - CreateRenderPass: pDependencies[0].dstAccessMask (0x1FFFF) is not supported by dstStageMask (0x8000). The Vulkan spec states: Any access flag included in dstAccessMask must be supported by one of the pipeline stages in dstStageMask, as specified in the table of supported access types (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkSubpassDependency-dstAccessMask-00869)
    Objects: 1
       [0] 0x0, type: 0, name: (null)
Validation(ERROR): msg_code: 0:  [ VUID-VkSubpassDependency-dstAccessMask-00869 ] Object: VK_NULL_HANDLE (Type = 0) | CreateRenderPass: pDependencies[0].dstAccessMask (0x1FFFF) is not supported by dstStageMask (0x8000). The Vulkan spec states: Any access flag included in dstAccessMask must be supported by one of the pipeline stages in dstStageMask, as specified in the table of supported access types (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkSubpassDependency-dstAccessMask-00869)
Segmentation fault (core dumped)

Same errors as mentioned here https://github.com/vulkano-rs/vulkano/issues/1063

rukai avatar Oct 26 '18 05:10 rukai

Just confirming that I also run into this with the exact same integrated device.

GPU id       : 0 (Intel(R) HD Graphics 620 (Kaby Lake GT2))        

mitchmindtree avatar Nov 02 '18 08:11 mitchmindtree

Had the same problem, but now woks fine.

5.0.5-arch1-1-ARCH
vulkan-intel 19.0.1-2
Mesa DRI Intel(R) HD Graphics 620 (Kaby Lake GT2)

Dantistnfs avatar Apr 04 '19 00:04 Dantistnfs

Yes I can confirm this is fixed for me too, also on Arch with vulkano-intel drivers and a Intel HD 320.

mitchmindtree avatar Apr 04 '19 04:04 mitchmindtree