Created attachment 129554 [details] vulkaninfo I know this is going to be special... I am writting a little LWJGL Vulkan 2D application which basically draws few textures - nothing complex. It works fine on my nvidia machine, but on my laptop with Intel Ivy Bridge this does not work. The first call of vkUpdateDescriptorSets (1 Texture, 1 Uniform buffer, 1 Vertex Buffer) I get the following SIGSEGV: Stack: [0x00007ff64afa7000,0x00007ff64b0a8000], sp=0x00007ff64b0a6108, free space=1020k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) C [libvulkan_intel.so+0x1b4fb2] C [libvulkan_intel.so+0x33a72] j org.lwjgl.system.JNI.callPPPV(JJIJIJ)V+0 j org.lwjgl.vulkan.VK10.nvkUpdateDescriptorSets(Lorg/lwjgl/vulkan/VkDevice;IJIJ)V+38 j org.lwjgl.vulkan.VK10.vkUpdateDescriptorSets(Lorg/lwjgl/vulkan/VkDevice;Lorg/lwjgl/vulkan/VkWriteDescriptorSe I already tried to debug it with gdb but without compiled DEBUG flag this does not help that much: Thread 2 "java" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f002cad1700 (LWP 10011)] 0x00007effcdf69fb2 in ?? () from /usr/lib/x86_64-linux-gnu/libvulkan_intel.so I am also unable to compile the latest mesa-17.0.0-rc1: ./configure: line 23152: require_dri_shared_libs_and_glapi: command not found checking for GLPROTO... yes configure: error: Direct rendering requires libdrm >= 2.4.66 But having one installed: $ apt-cache policy libdrm-intel1 libdrm-intel1: Installiert: 2.4.74+git1611291830.dae413~gd~x Installationskandidat: 2.4.74+git1611291830.dae413~gd~x Versionstabelle: *** 2.4.74+git1611291830.dae413~gd~x 100 I am thankful for any kind of advice / help. $ cat /etc/apt/sources.list.d/paulo-miguel-dias-pkppa-xenial.list deb http://ppa.launchpad.net/paulo-miguel-dias/pkppa/ubuntu xenial main deb-src http://ppa.launchpad.net/paulo-miguel-dias/pkppa/ubuntu xenial main Linux mwpc56 4.8.0-30-generic #32~16.04.1-Ubuntu SMP Fri Dec 2 03:43:51 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux $ glxinfo | grep -i version server glx version string: 1.4 client glx version string: 1.4 GLX version: 1.4 Version: 17.0.0 Max core profile version: 3.3 Max compat profile version: 3.0 Max GLES1 profile version: 1.1 Max GLES[23] profile version: 3.0 OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.0.0-rc3 - padoka PPA OpenGL core profile shading language version string: 3.30 OpenGL version string: 3.0 Mesa 17.0.0-rc3 - padoka PPA OpenGL shading language version string: 1.30 OpenGL ES profile version string: OpenGL ES 3.0 Mesa 17.0.0-rc3 - padoka PPA OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00
MW, Unfortunately, that's not really enough info for me to get a good idea of what's going on. I've got a couple of guesses: 1) Something doesn't match between your layout and the descriptors you're writing. 2) The sampler in an image+sampler combination either doesn't exist or is invalid. 3) ou're using immutable samplers but something is wrong with layouts. In any case, you should be running with the Vulkan validation layers and making sure you get no warnings from them. They *should* catch all of the above. If that doesn't work, we'll need a better backtrace. If you installed the debug info for the mesa vulkan package (they appear to be available in your PPA), you should be able to get a real backtrace. Another option would be to build mesa from source. It's not terribly hard to do.
Thanks, with the additional package 'libgl1-mesa-glx-dbg' I know get a lot more information in gdb: Thread 2 "java" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7f67f4fee700 (LWP 19914)] isl_gen7_buffer_fill_state_s (state=0x3000, info=0x7f67f4fed2a0) at ./genxml/gen7_pack.h:1274 1274 ./genxml/gen7_pack.h: Datei oder Verzeichnis nicht gefunden. (File not found) (gdb) backtrace #0 isl_gen7_buffer_fill_state_s (state=0x3000, info=0x7f67f4fed2a0) at ./genxml/gen7_pack.h:1274 #1 0x00007f67cef7f348 in anv_fill_buffer_surface_state (device=0x7f67d4ff8000, state=..., format=<optimized out>, offset=<optimized out>, range=<optimized out>, stride=1) at ../../../../../src/intel/vulkan/anv_device.c:1966 #2 0x00007f67cef7ca72 in anv_UpdateDescriptorSets (_device=0x7f67d4ff8000, descriptorWriteCount=<optimized out>, pDescriptorWrites=<optimized out>, descriptorCopyCount=0, pDescriptorCopies=0x0) at ../../../../../src/intel/vulkan/anv_descriptor_set.c:673 I am using validation layers, they are working, since they already helped me a few times - but on the desktop on nvidia. Thats the reason I guess its something with mesa since it runs perfectly on the desktop. But nonetheless thanks for giving me tips to check for. Stepped through once: (gdb) b anv_UpdateDescriptorSets Haltepunkt 1 at 0x7fb5d05e8700: file ../../../../../src/intel/vulkan/anv_descriptor_set.c, line 573. (gdb) continue Continuing. [Thread 0x7fb5a3bfe700 (LWP 25151) exited] [Switching to Thread 0x7fb60f25d700 (LWP 25055)] Thread 2 "java" hit Breakpoint 1, anv_UpdateDescriptorSets (_device=0x7fb5d25f8000, descriptorWriteCount=1, pDescriptorWrites=0x7fb6083a30e8, descriptorCopyCount=0, pDescriptorCopies=0x0) at ../../../../../src/intel/vulkan/anv_descriptor_set.c:573 573 ../../../../../src/intel/vulkan/anv_descriptor_set.c: Datei oder Verzeichnis nicht gefunden. (gdb) step 576 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 573 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) backtrace #0 anv_UpdateDescriptorSets (_device=0x7fb5d25f8000, descriptorWriteCount=1, pDescriptorWrites=0x7fb6083a30e8, descriptorCopyCount=0, pDescriptorCopies=0x0) at ../../../../../src/intel/vulkan/anv_descriptor_set.c:573 #1 0x00007fb5f87d9ca4 in ?? () #2 0x00007fb600000000 in ?? () #3 0x0000000000000000 in ?? () (gdb) step 576 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 582 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 578 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 580 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 578 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 582 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 583 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 581 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 583 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 587 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 649 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 655 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 649 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 655 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 656 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 651 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 656 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 651 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 656 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 651 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 656 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 659 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step anv_isl_format_for_descriptor_type (type=VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) at ../../../../../src/intel/vulkan/anv_cmd_buffer.c:564 564 ../../../../../src/intel/vulkan/anv_cmd_buffer.c: Datei oder Verzeichnis nicht gefunden. (gdb) backtrace #0 anv_isl_format_for_descriptor_type (type=VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER) at ../../../../../src/intel/vulkan/anv_cmd_buffer.c:564 #1 0x00007fb5d05e8ad6 in anv_UpdateDescriptorSets (_device=0x7fb5d25f8000, descriptorWriteCount=<optimized out>, pDescriptorWrites=<optimized out>, descriptorCopyCount=0, pDescriptorCopies=0x0) at ../../../../../src/intel/vulkan/anv_descriptor_set.c:659 #2 0x00007fb5f87d9ca4 in ?? () #3 0x00007fb600000000 in ?? () #4 0x0000000000000000 in ?? () (gdb) step 565 in ../../../../../src/intel/vulkan/anv_cmd_buffer.c (gdb) step 564 in ../../../../../src/intel/vulkan/anv_cmd_buffer.c (gdb) step 565 in ../../../../../src/intel/vulkan/anv_cmd_buffer.c (gdb) step 568 in ../../../../../src/intel/vulkan/anv_cmd_buffer.c (gdb) step 577 in ../../../../../src/intel/vulkan/anv_cmd_buffer.c (gdb) step anv_UpdateDescriptorSets (_device=0x7fb5d25f8000, descriptorWriteCount=<optimized out>, pDescriptorWrites=<optimized out>, descriptorCopyCount=0, pDescriptorCopies=0x0) at ../../../../../src/intel/vulkan/anv_descriptor_set.c:660 660 ../../../../../src/intel/vulkan/anv_descriptor_set.c: Datei oder Verzeichnis nicht gefunden. (gdb) backtrace #0 anv_UpdateDescriptorSets (_device=0x7fb5d25f8000, descriptorWriteCount=<optimized out>, pDescriptorWrites=<optimized out>, descriptorCopyCount=0, pDescriptorCopies=0x0) at ../../../../../src/intel/vulkan/anv_descriptor_set.c:660 #1 0x00007fb5f87d9ca4 in ?? () #2 0x00007fb600000000 in ?? () #3 0x0000000000000000 in ?? () (gdb) step 661 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 658 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 660 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 661 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 660 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 661 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 667 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 661 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 667 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) backtrace #0 anv_UpdateDescriptorSets (_device=0x7fb5d25f8000, descriptorWriteCount=<optimized out>, pDescriptorWrites=<optimized out>, descriptorCopyCount=0, pDescriptorCopies=0x0) at ../../../../../src/intel/vulkan/anv_descriptor_set.c:667 #1 0x00007fb5f87d9ca4 in ?? () #2 0x00007fb600000000 in ?? () #3 0x0000000000000000 in ?? () (gdb) step 668 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 667 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 671 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 673 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step 649 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) stepi 673 in ../../../../../src/intel/vulkan/anv_descriptor_set.c (gdb) step anv_fill_buffer_surface_state (device=0x7fb5d25f8000, state=..., format=ISL_FORMAT_R32G32B32A32_FLOAT, offset=0, range=8, stride=1) at ../../../../../src/intel/vulkan/anv_device.c:1966 1966 ../../../../../src/intel/vulkan/anv_device.c: Datei oder Verzeichnis nicht gefunden. (gdb) backtrace #0 anv_fill_buffer_surface_state (device=0x7fb5d25f8000, state=..., format=ISL_FORMAT_R32G32B32A32_FLOAT, offset=0, range=8, stride=1) at ../../../../../src/intel/vulkan/anv_device.c:1966 #1 0x00007fb5d05e8a72 in anv_UpdateDescriptorSets (_device=0x7fb5d25f8000, descriptorWriteCount=<optimized out>, pDescriptorWrites=<optimized out>, descriptorCopyCount=0, pDescriptorCopies=0x0) at ../../../../../src/intel/vulkan/anv_descriptor_set.c:673 #2 0x00007fb5f87d9ca4 in ?? () #3 0x00007fb600000000 in ?? () #4 0x0000000000000000 in ?? () (gdb) step 1965 in ../../../../../src/intel/vulkan/anv_device.c (gdb) step 1966 in ../../../../../src/intel/vulkan/anv_device.c (gdb) step 1965 in ../../../../../src/intel/vulkan/anv_device.c (gdb) step 1966 in ../../../../../src/intel/vulkan/anv_device.c (gdb) step 1965 in ../../../../../src/intel/vulkan/anv_device.c (gdb) step 1966 in ../../../../../src/intel/vulkan/anv_device.c (gdb) step isl_buffer_fill_state_s (dev=0x7fb5d25f80a0, state=0x3000, info=0x7fb60f25c2a0) at ../../../../src/intel/isl/isl.c:1568 1568 ../../../../src/intel/isl/isl.c: Datei oder Verzeichnis nicht gefunden. (gdb) step 1569 in ../../../../src/intel/isl/isl.c (gdb) step 1568 in ../../../../src/intel/isl/isl.c (gdb) step 1569 in ../../../../src/intel/isl/isl.c (gdb) step 1589 in ../../../../src/intel/isl/isl.c (gdb) step 1569 in ../../../../src/intel/isl/isl.c (gdb) step 1579 in ../../../../src/intel/isl/isl.c (gdb) step 1582 in ../../../../src/intel/isl/isl.c (gdb) step isl_gen7_buffer_fill_state_s (state=0x3000, info=0x7fb60f25c2a0) at ../../../../src/intel/isl/isl_surface_state.c:623 623 ../../../../src/intel/isl/isl_surface_state.c: Datei oder Verzeichnis nicht gefunden. (gdb) step 624 in ../../../../src/intel/isl/isl_surface_state.c (gdb) step 658 in ../../../../src/intel/isl/isl_surface_state.c (gdb) step 685 in ../../../../src/intel/isl/isl_surface_state.c (gdb) step 623 in ../../../../src/intel/isl/isl_surface_state.c (gdb) step 698 in ../../../../src/intel/isl/isl_surface_state.c (gdb) step 658 in ../../../../src/intel/isl/isl_surface_state.c (gdb) step 1259 ./genxml/gen7_pack.h: Datei oder Verzeichnis nicht gefunden. (gdb) step 624 ../../../../src/intel/isl/isl_surface_state.c: Datei oder Verzeichnis nicht gefunden. (gdb) step 687 in ../../../../src/intel/isl/isl_surface_state.c (gdb) step 1280 ./genxml/gen7_pack.h: Datei oder Verzeichnis nicht gefunden. (gdb) step 1274 in ./genxml/gen7_pack.h (gdb) step Thread 2 "java" received signal SIGSEGV, Segmentation fault. isl_gen7_buffer_fill_state_s (state=0x3000, info=0x7fb60f25c2a0) at ./genxml/gen7_pack.h:1274 1274 in ./genxml/gen7_pack.h (gdb) backtrace #0 isl_gen7_buffer_fill_state_s (state=0x3000, info=0x7fb60f25c2a0) at ./genxml/gen7_pack.h:1274 #1 0x00007fb5d05eb348 in anv_fill_buffer_surface_state (device=0x7fb5d25f8000, state=..., format=<optimized out>, offset=<optimized out>, range=<optimized out>, stride=1) at ../../../../../src/intel/vulkan/anv_device.c:1966 #2 0x00007fb5d05e8a72 in anv_UpdateDescriptorSets (_device=0x7fb5d25f8000, descriptorWriteCount=<optimized out>, pDescriptorWrites=<optimized out>, descriptorCopyCount=0, pDescriptorCopies=0x0) at ../../../../../src/intel/vulkan/anv_descriptor_set.c:673 #3 0x00007fb5f87d9ca4 in ?? () #4 0x00007fb600000000 in ?? () #5 0x0000000000000000 in ?? () Interesting to debug another ones program with gdb and git web view xD
Just noticed "../../../../../src/intel/vulkan/anv_image.c:203: FINISHME: Implement gen7 HiZ" Release notes of meas 17 list "HiZ and performance improvements", seems I'll need to test with mesa 17 as soon as it is available in the padoka ppa
As well as WARNING: 140609672133195, code 0: /usr/lib/i386-linux-gnu/libvulkan_radeon.so: falsche ELF-Klasse: ELFCLASS32 WARNING: 140609672133195, code 0: /usr/lib/i386-linux-gnu/libvulkan_intel.so: falsche ELF-Klasse: ELFCLASS32 It says "wrong elf-class"
Turns out, I actually screwed up with the validation layers and close to nothing was logged, so the errors is: ERROR: [139684814067950] Code 937 : vkUpdateDescriptorsSets() failed write update validation for Descriptor Set 0x38 with error: Attempting write update to descriptor set 0x38 binding #0 with type VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER but update type is VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER. For more information refer to Vulkan Spec Section '13.2.4. Descriptor Set Updates' which states 'descriptorType must match the type of dstBinding within dstSet' (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec.html#VkWriteDescriptorSet) Which is quite bizarre since it works on nvidia - but I'll look into it. Thanks for your help so far :)
(In reply to MW from comment #5) > Turns out, I actually screwed up with the validation layers and close to > nothing was logged, so the errors is: > > ERROR: [139684814067950] Code 937 : vkUpdateDescriptorsSets() failed write > update validation for Descriptor Set 0x38 with error: Attempting write > update to descriptor set 0x38 binding #0 with type > VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER but update type is > VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER. For more information refer to Vulkan Spec > Section '13.2.4. Descriptor Set Updates' which states 'descriptorType must > match the type of dstBinding within dstSet' > (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec. > html#VkWriteDescriptorSet) That sounds very much like the kind of thing that would cause a segfault on our driver. > Which is quite bizarre since it works on nvidia - but I'll look into it. They implement descriptor sets differently.
I got a (In reply to Jason Ekstrand from comment #6) > (In reply to MW from comment #5) > > Turns out, I actually screwed up with the validation layers and close to > > nothing was logged, so the errors is: > > > > ERROR: [139684814067950] Code 937 : vkUpdateDescriptorsSets() failed write > > update validation for Descriptor Set 0x38 with error: Attempting write > > update to descriptor set 0x38 binding #0 with type > > VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER but update type is > > VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER. For more information refer to Vulkan Spec > > Section '13.2.4. Descriptor Set Updates' which states 'descriptorType must > > match the type of dstBinding within dstSet' > > (https://www.khronos.org/registry/vulkan/specs/1.0-extensions/xhtml/vkspec. > > html#VkWriteDescriptorSet) > > That sounds very much like the kind of thing that would cause a segfault on > our driver. > > > Which is quite bizarre since it works on nvidia - but I'll look into it. > > They implement descriptor sets differently. Since you are there, I got a "new" issue. Seems to be a shader compiler failure? "Fehler beim lesen der Variable": "Error while reading the variable" Thread 2 "java" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fa2472b3700 (LWP 23119)] 0x00007fa21d4a2b31 in brw::vec4_visitor::nir_emit_intrinsic (this=<optimized out>, instr=<optimized out>) at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4_nir.cpp:462 462 ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4_nir.cpp: Datei oder Verzeichnis nicht gefunden. (gdb) backtrace #0 0x00007fa21d4a2b31 in brw::vec4_visitor::nir_emit_intrinsic (this=<optimized out>, instr=<optimized out>) at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4_nir.cpp:462 #1 0x00007fa21d499be8 in brw::vec4_visitor::nir_emit_block (this=<optimized out>, block=<optimized out>) at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4_nir.cpp:215 #2 0x00007fa21d499b76 in brw::vec4_visitor::nir_emit_cf_list (this=<optimized out>, list=<optimized out>) at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4_nir.cpp:170 #3 0x00007fa21d499af8 in brw::vec4_visitor::nir_emit_impl (this=<optimized out>, impl=<optimized out>) at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4_nir.cpp:152 #4 0x00007fa21d499586 in brw::vec4_visitor::emit_nir_code (this=<optimized out>) at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4_nir.cpp:47 #5 0x00007fa21d489930 in brw::vec4_visitor::run (this=<optimized out>) at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4.cpp:2552 #6 0x00007fa21d489ba0 in brw_compile_vs (compiler=<optimized out>, log_data=<optimized out>, mem_ctx=<optimized out>, key=<optimized out>, prog_data=<optimized out>, src_shader=<optimized out>, clip_planes=<Fehler beim Lesen der Variable: Could not find the frame base for "brw_compile_vs(brw_compiler const*, void*, void*, brw_vs_prog_key const*, brw_vs_prog_data*, nir_shader const*, gl_clip_plane*, bool, int, unsigned int*, char**)".>, use_legacy_snorm_formula=<Fehler beim Lesen der Variable: Could not find the frame base for "brw_compile_vs(brw_compiler const*, void*, void*, brw_vs_prog_key const*, brw_vs_prog_data*, nir_shader const*, gl_clip_plane*, bool, int, unsigned int*, char**)".>, shader_time_index=<Fehler beim Lesen der Variable: Could not find the frame base for "brw_compile_vs(brw_compiler const*, void*, void*, brw_vs_prog_key const*, brw_vs_prog_data*, nir_shader const*, gl_clip_plane*, bool, int, unsigned int*, char**)".>, final_assembly_size=<Fehler beim Lesen der Variable: Could not find the frame base for "brw_compile_vs(brw_compiler const*, void*, void*, brw_vs_prog_key const*, brw_vs_prog_data*, nir_shader const*, gl_clip_plane*, bool, int, unsigned int*, char**)".>, error_str=<Fehler beim Lesen der Variable: Could not find the frame base for "brw_compile_vs(brw_compiler const*, void*, void*, brw_vs_prog_key const*, brw_vs_prog_data*, nir_shader const*, gl_clip_plane*, bool, int, unsigned int*, char**)".>) at ../../../../../../../src/mesa/drivers/dri/i965/brw_vec4.cpp:2835 #7 0x00007fa21d3e392e in anv_pipeline_compile_vs (pipeline=0x7fa21f364000, cache=0x7fa21f23f040, module=<optimized out>, entrypoint=<optimized out>, spec_info=<optimized out>, info=<optimized out>) at ../../../../../src/intel/vulkan/anv_pipeline.c:484 #8 0x00007fa21d3e4b0a in anv_pipeline_init (pipeline=0x7fa21f364000, device=0x7fa21f3f9000, cache=<optimized out>, pCreateInfo=0x7fa240799b48, alloc=0x7fa21f3f9008) at ../../../../../src/intel/vulkan/anv_pipeline.c:1216 #9 0x00007fa21d579c5b in gen7_CreateGraphicsPipelines (_device=0x7fa21f3f9000, pipelineCache=0x7fa21f23f040, count=1, pCreateInfos=<optimized out>, pAllocator=0x0, pPipelines=0x7fa240362ce0) at ../../../../../src/intel/vulkan/genX_pipeline.c:1465 #10 0x00007fa209b95e0a in unique_objects::CreateGraphicsPipelines(VkDevice_T*, VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*, VkAllocationCallbacks const*, VkPipeline_T**) () from /share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_unique_objects.so #11 0x00007fa208f85e9c in core_validation::CreateGraphicsPipelines(VkDevice_T*, VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*, VkAllocationCallbacks const*, VkPipeline_T**) () from /share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_core_validation.so #12 0x00007fa208864a29 in object_tracker::CreateGraphicsPipelines(VkDevice_T*, VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*, VkAllocationCallbacks const*, VkPipeline_T**) () from /share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_object_tracker.so #13 0x00007fa2085006ed in parameter_validation::CreateGraphicsPipelines(VkDevice_T*, VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*, VkAllocationCallbacks const*, VkPipeline_T**) () from /share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_parameter_validation.so #14 0x00007fa208202c0e in threading::CreateGraphicsPipelines(VkDevice_T*, VkPipelineCache_T*, unsigned int, VkGraphicsPipelineCreateInfo const*, VkAllocationCallbacks const*, VkPipeline_T**) () from /share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_threading.so Since it states "brw_compile_vs", the vertex shader looks like that: #version 450 #extension GL_ARB_separate_shader_objects : enable layout(binding = 1) uniform UniformBufferObject { float surfaceWidth; float surfaceHeight; // float scale; } ubo; layout(push_constant) uniform PushConstants { int flagsPos; int flagsPass; float postOffsetX; float postOffsetY; mat4 modelView; vec4 color; } push; layout(location = 0) in vec3 in_Position; layout(location = 1) in vec2 in_TextureCrd; layout(location = 0 ) out vec2 pass_TextureCrd; layout(location = 1000) out vec4 pass_Color; const int FLAG_POS_ABS = 0x1; const int FLAG_PASS_TXT = 0x1; const int FLAG_PASS_CLR = 0x2; const int FLAG_PASS_PUSH_CLR = 0x4; void main(void) { vec4 pos = push.modelView * vec4(in_Position, 1.0f); gl_Position.z = pos.z; // [0;width] to [-1;1] and [0;height] to [-1;1] if ((push.flagsPos & FLAG_POS_ABS) != 0) { gl_Position.x = pos.x / (.5f * ubo.surfaceWidth ) + push.postOffsetX; gl_Position.y = pos.y / (.5f * ubo.surfaceHeight) + push.postOffsetY; } else { gl_Position.x = pos.x + push.postOffsetX; gl_Position.y = pos.y + push.postOffsetY; } // parameters to pass along pass_TextureCrd = in_TextureCrd; pass_Color = push.color; } I am about to test it with a simpler shader, but desktop ~ laptop sync is slow atm :/
I forgot to mention, I switched the ppa for a more recent version: 17.1.0-devel - padoka PPA deb http://ppa.launchpad.net/paulo-miguel-dias/mesa/ubuntu xenial main deb-src http://ppa.launchpad.net/paulo-miguel-dias/mesa/ubuntu xenial main
In case that helps you, the current output including the validation debug lines (info+warning+error) available extension: VK_KHR_surface available extension: VK_KHR_xcb_surface available extension: VK_KHR_xlib_surface available extension: VK_KHR_get_physical_device_properties2 available extension: VK_EXT_debug_report added debug extension: VK_EXT_debug_report ext flipped: VK_KHR_surface ext flipped: VK_KHR_xlib_surface ext flipped: VK_EXT_debug_report ---------------- Engine name: vulkan2d Engine version: 0 Vulkan API min: 4194304 ---------------- App short name: HelloVulkan App long name: Vulkan Hello World App version: 0 ---------------- + required instance layers: VK_LAYER_LUNARG_standard_validation + required instance layers: VK_LAYER_LUNARG_core_validation + required instance layers: VK_LAYER_LUNARG_image + required instance layers: VK_LAYER_LUNARG_object_tracker + required instance layers: VK_LAYER_LUNARG_parameter_validation + required instance layers: VK_LAYER_LUNARG_swapchain + required instance layers: VK_LAYER_GOOGLE_threading + required instance layers: VK_LAYER_GOOGLE_unique_objects + required instance layers: VK_LAYER_LUNARG_object_tracker + required instance layers: VK_LAYER_LUNARG_core_validation + required instance extension: VK_KHR_surface + required instance extension: VK_KHR_xlib_surface + required instance extension: VK_EXT_debug_report Going to request vkCreateInstance ?? unknown debug flag:16: 139921312660043, code 0: Searching the following paths for manifest files: /share/home/michael/projects/java.vulkan/vulkan_layers ?? unknown debug flag:16: 139921312660043, code 0: Searching the following paths for manifest files: //etc/vulkan/implicit_layer.d:/usr/share/vulkan/implicit_layer.d ?? unknown debug flag:16: 139921312660043, code 0: Searching the following paths for manifest files: /share/home/michael/.local/share/vulkan/implicit_layer.d INFO: [139921312660043] Code 0 : Found manifest file /share/home/michael/projects/java.vulkan/vulkan_layers/VkLayer_swapchain.json, version "1.0.0" INFO: [139921312660043] Code 0 : Found manifest file /share/home/michael/projects/java.vulkan/vulkan_layers/VkLayer_image.json, version "1.0.0" INFO: [139921312660043] Code 0 : Found manifest file /share/home/michael/projects/java.vulkan/vulkan_layers/VkLayer_parameter_validation.json, version "1.0.0" INFO: [139921312660043] Code 0 : Found manifest file /share/home/michael/projects/java.vulkan/vulkan_layers/VkLayer_threading.json, version "1.0.0" INFO: [139921312660043] Code 0 : Found manifest file /share/home/michael/projects/java.vulkan/vulkan_layers/VkLayer_unique_objects.json, version "1.0.0" INFO: [139921312660043] Code 0 : Found manifest file /share/home/michael/projects/java.vulkan/vulkan_layers/VkLayer_core_validation.json, version "1.0.0" INFO: [139921312660043] Code 0 : Found manifest file /share/home/michael/projects/java.vulkan/vulkan_layers/VkLayer_object_tracker.json, version "1.0.0" INFO: [139921312660043] Code 0 : Found manifest file /share/home/michael/.local/share/vulkan/implicit_layer.d/steamoverlay_i386.json, version "1.0.0" INFO: [139921312660043] Code 0 : Found manifest file /share/home/michael/.local/share/vulkan/implicit_layer.d/steamoverlay_x86_64.json, version "1.0.0" INFO: [139921312660043] Code 0 : Found meta layer VK_LAYER_LUNARG_standard_validation, replacing with actual layer group ?? unknown debug flag:16: 139921312660043, code 0: Searching the following paths for manifest files: //etc/vulkan/icd.d:/usr/share/vulkan/icd.d ?? unknown debug flag:16: 139921312660043, code 0: Searching the following paths for manifest files: /share/home/michael/.local/share/vulkan/icd.d INFO: [139921312660043] Code 0 : Found manifest file //etc/vulkan/icd.d/radeon_icd.i686.json, version "1.0.0" ?? unknown debug flag:16: 139921312660043, code 0: Searching for ICD drivers named /usr/lib/i386-linux-gnu/libvulkan_radeon.so default dir WARNING: [139921312660043] Code 0 : /usr/lib/i386-linux-gnu/libvulkan_radeon.so: falsche ELF-Klasse: ELFCLASS32 INFO: [139921312660043] Code 0 : Found manifest file //etc/vulkan/icd.d/intel_icd.i686.json, version "1.0.0" ?? unknown debug flag:16: 139921312660043, code 0: Searching for ICD drivers named /usr/lib/i386-linux-gnu/libvulkan_intel.so default dir WARNING: [139921312660043] Code 0 : /usr/lib/i386-linux-gnu/libvulkan_intel.so: falsche ELF-Klasse: ELFCLASS32 INFO: [139921312660043] Code 0 : Found manifest file //etc/vulkan/icd.d/intel_icd.x86_64.json, version "1.0.0" ?? unknown debug flag:16: 139921312660043, code 0: Searching for ICD drivers named /usr/lib/x86_64-linux-gnu/libvulkan_intel.so default dir INFO: [139921312660043] Code 0 : Found manifest file //etc/vulkan/icd.d/radeon_icd.x86_64.json, version "1.0.0" ?? unknown debug flag:16: 139921312660043, code 0: Searching for ICD drivers named /usr/lib/x86_64-linux-gnu/libvulkan_radeon.so default dir ?? unknown debug flag:16: 139921312660043, code 0: Build ICD instance extension list ?? unknown debug flag:16: 139921312660043, code 0: Instance Extension: VK_KHR_surface (/usr/lib/x86_64-linux-gnu/libvulkan_intel.so) version 0.0.25 ?? unknown debug flag:16: 139921312660043, code 0: Instance Extension: VK_KHR_xcb_surface (/usr/lib/x86_64-linux-gnu/libvulkan_intel.so) version 0.0.6 ?? unknown debug flag:16: 139921312660043, code 0: Instance Extension: VK_KHR_xlib_surface (/usr/lib/x86_64-linux-gnu/libvulkan_intel.so) version 0.0.6 ?? unknown debug flag:16: 139921312660043, code 0: Instance Extension: VK_KHR_get_physical_device_properties2 (/usr/lib/x86_64-linux-gnu/libvulkan_intel.so) version 0.0.1 ?? unknown debug flag:16: 139921312660043, code 0: Instance Extension: VK_KHR_surface (/usr/lib/x86_64-linux-gnu/libvulkan_radeon.so) version 0.0.25 ?? unknown debug flag:16: 139921312660043, code 0: Instance Extension: VK_KHR_xcb_surface (/usr/lib/x86_64-linux-gnu/libvulkan_radeon.so) version 0.0.6 ?? unknown debug flag:16: 139921312660043, code 0: Instance Extension: VK_KHR_xlib_surface (/usr/lib/x86_64-linux-gnu/libvulkan_radeon.so) version 0.0.6 ?? unknown debug flag:16: 139921312660043, code 0: Chain: instance: Loading layer library /share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_unique_objects.so INFO: [139921312660043] Code 0 : Insert instance layer VK_LAYER_GOOGLE_unique_objects (/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_unique_objects.so) ?? unknown debug flag:16: 139921312660043, code 0: Chain: instance: Loading layer library /share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_swapchain.so INFO: [139921312660043] Code 0 : Insert instance layer VK_LAYER_LUNARG_swapchain (/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_swapchain.so) ?? unknown debug flag:16: 139921312660043, code 0: Chain: instance: Loading layer library /share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_core_validation.so INFO: [139921312660043] Code 0 : Insert instance layer VK_LAYER_LUNARG_core_validation (/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_core_validation.so) ?? unknown debug flag:16: 139921312660043, code 0: Chain: instance: Loading layer library /share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_image.so INFO: [139921312660043] Code 0 : Insert instance layer VK_LAYER_LUNARG_image (/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_image.so) ?? unknown debug flag:16: 139921312660043, code 0: Chain: instance: Loading layer library /share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_object_tracker.so INFO: [139921312660043] Code 0 : Insert instance layer VK_LAYER_LUNARG_object_tracker (/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_object_tracker.so) ?? unknown debug flag:16: 139921312660043, code 0: Chain: instance: Loading layer library /share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_parameter_validation.so INFO: [139921312660043] Code 0 : Insert instance layer VK_LAYER_LUNARG_parameter_validation (/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_parameter_validation.so) ?? unknown debug flag:16: 139921312660043, code 0: Chain: instance: Loading layer library /share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_threading.so INFO: [139921312660043] Code 0 : Insert instance layer VK_LAYER_GOOGLE_threading (/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_threading.so) ?? unknown debug flag:16: 139921312660043, code 0: Build ICD instance extension list ?? unknown debug flag:16: 139921312660043, code 0: Instance Extension: VK_KHR_surface (/usr/lib/x86_64-linux-gnu/libvulkan_intel.so) version 0.0.25 ?? unknown debug flag:16: 139921312660043, code 0: Instance Extension: VK_KHR_xcb_surface (/usr/lib/x86_64-linux-gnu/libvulkan_intel.so) version 0.0.6 ?? unknown debug flag:16: 139921312660043, code 0: Instance Extension: VK_KHR_xlib_surface (/usr/lib/x86_64-linux-gnu/libvulkan_intel.so) version 0.0.6 ?? unknown debug flag:16: 139921312660043, code 0: Instance Extension: VK_KHR_get_physical_device_properties2 (/usr/lib/x86_64-linux-gnu/libvulkan_intel.so) version 0.0.1 ?? unknown debug flag:16: 139921312660043, code 0: Build ICD instance extension list ?? unknown debug flag:16: 139921312660043, code 0: Instance Extension: VK_KHR_surface (/usr/lib/x86_64-linux-gnu/libvulkan_radeon.so) version 0.0.25 ?? unknown debug flag:16: 139921312660043, code 0: Instance Extension: VK_KHR_xcb_surface (/usr/lib/x86_64-linux-gnu/libvulkan_radeon.so) version 0.0.6 ?? unknown debug flag:16: 139921312660043, code 0: Instance Extension: VK_KHR_xlib_surface (/usr/lib/x86_64-linux-gnu/libvulkan_radeon.so) version 0.0.6 ?? unknown debug flag:16: 139920593888188, code 1: Added callback ?? unknown debug flag:16: 139920591357559, code 1: Added callback ?? unknown debug flag:16: 139920451543119, code 1: Added callback ?? unknown debug flag:16: 139920591357559, code 1: Added callback WARNING: Ivy Bridge Vulkan support is incomplete Available VkPhysicalDevice: Intel(R) Ivybridge Mobile ensure: VK_KHR_swapchain INFO: [139920573865728] Code 0 : OBJ[0x2] : CREATE Debug Report object 0x7f421c67f5d0 INFO: [139920573865728] Code 0 : OBJ[0x3] : CREATE SurfaceKHR object 0x1 INFO: [139921312660043] Code 0 : Insert device layer VK_LAYER_GOOGLE_unique_objects (/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_unique_objects.so) INFO: [139921312660043] Code 0 : Insert device layer VK_LAYER_LUNARG_swapchain (/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_swapchain.so) INFO: [139921312660043] Code 0 : Insert device layer VK_LAYER_LUNARG_core_validation (/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_core_validation.so) INFO: [139921312660043] Code 0 : Insert device layer VK_LAYER_LUNARG_image (/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_image.so) INFO: [139921312660043] Code 0 : Insert device layer VK_LAYER_LUNARG_object_tracker (/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_object_tracker.so) INFO: [139921312660043] Code 0 : Insert device layer VK_LAYER_LUNARG_parameter_validation (/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_parameter_validation.so) INFO: [139921312660043] Code 0 : Insert device layer VK_LAYER_GOOGLE_threading (/share/home/michael/projects/java.vulkan/vulkan_layers/./libVkLayer_threading.so) INFO: [139920573865728] Code 0 : OBJ[0x4] : CREATE Device object 0x7f41f9df9000 INFO: [139920573865728] Code 0 : OBJ[0x5] : CREATE Queue object 0x7f41f9df97e0 INFO: [139920573865728] Code 0 : OBJ[0x6] : CREATE Command Pool object 0x2 INFO: [139920573865728] Code 0 : OBJ[0x7] : CREATE VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT object 0x7f41f9d30000 INFO: [139920573865728] Code 0 : OBJ[0x8] : CREATE SwapchainKHR object 0x3 INFO: [139920573865728] Code 0 : OBJ[0x9] : CREATE SwapchainImage object 0x4 INFO: [139920573865728] Code 0 : OBJ[0xa] : CREATE SwapchainImage object 0x5 INFO: [139920573865728] Code 0 : OBJ[0xb] : CREATE SwapchainImage object 0x6 INFO: [139920573865728] Code 0 : OBJ[0xc] : CREATE Image View object 0x7 INFO: [139920573865728] Code 0 : OBJ[0xd] : CREATE Image View object 0x8 INFO: [139920573865728] Code 0 : OBJ[0xe] : CREATE Image View object 0x9 ../../../../../src/intel/vulkan/anv_image.c:203: FINISHME: Implement gen7 HiZ INFO: [139920573865728] Code 0 : OBJ[0xf] : CREATE Image object 0xa INFO: [139920573865728] Code 0 : OBJ[0x10] : CREATE Device Memory object 0xb INFO: [139920573865728] Code 0 : OBJ[0x11] : CREATE VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT object 0x7f41f9d31800 INFO: [139920573865728] Code 0 : OBJ[0x12] : CREATE Image View object 0xc INFO: [139920573865728] Code 0 : OBJ[0x13] : CREATE Render Pass object 0xd INFO: [139920573865728] Code 0 : OBJ[0x14] : CREATE Buffer object 0xe INFO: [139920573865728] Code 0 : OBJ[0x15] : CREATE Device Memory object 0xf INFO: [139920573865728] Code 0 : OBJ[0x16] : CREATE Descriptor Set Layout object 0x10 INFO: [139920573865728] Code 0 : OBJ[0x17] : CREATE Pipeline Layout object 0x11 INFO: [139920582343844] Code 26 : Created Descriptor Pool 0x12 INFO: [139920573865728] Code 0 : OBJ[0x18] : CREATE Descriptor Pool object 0x12 INFO: [139920573865728] Code 0 : OBJ[0x19] : CREATE Shader Module object 0x13 INFO: [139920573865728] Code 0 : OBJ[0x1a] : CREATE Shader Module object 0x14 INFO: [139920573865728] Code 0 : OBJ[0x1b] : CREATE Pipeline Cache object 0x15 # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f41cfc84b31, pid=3316, tid=0x00007f4225de0700 # # JRE version: Java(TM) SE Runtime Environment (8.0_121-b13) (build 1.8.0_121-b13) # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.121-b13 mixed mode linux-amd64 compressed oops) # Problematic frame: # C [libvulkan_intel.so+0x100b31] # # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again # # An error report file with more information is saved as: # /share/home/michael/projects/java.vulkan/hs_err_pid3316.log # # If you would like to submit a bug report, please visit: # http://bugreport.java.com/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # Process finished with exit code 134 (interrupted by signal 6: SIGABRT)
I nailed it down. Its about the vertex shader. With another spirv shader code my little aplication started working on the intel machine (well, with wrong results, but no sigsegvs' or what so ever). I copied the shader code from here: https://github.com/LWJGL/lwjgl3/blob/master/modules/core/src/test/java/org/lwjgl/demo/vulkan/HelloVulkan.java (see vertShaderCode and fragShaderCode). Since I don't know the source code of it, I started to simplify mine. And as soon as I removed "pass_Color = push.color;" it worked. With it, given SIGSEGV.
Well, setting the location from 1000 to 1 also fixes it (of course that includes updating the location in the fragment shader). Well... it could have nearly worked yesterday, since I just changed it for a bigger refactoring :/ Is there anywhere by definition written that location needs to be ascending without leaving one empty in between? ... Just had a look at vulkaninfo... whooops. So they need to be lower than max but not only in sum less than max? $ vulkaninfo | grep -i attri WARNING: Ivy Bridge Vulkan support is incomplete maxVertexInputAttributes = 31
BTW: nvidia says max 32, but still works Sorry for that spam *feels guilty* ^_^;
I'm going to close this for now. Feel free to re-open if you find an actual bug.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.