doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
12.98k stars 833 forks source link

Build failed: Missing updated vulkan headers? #760

Closed kakra closed 5 years ago

kakra commented 5 years ago

It looks like DXVK bundles the needed vulkan headers but it fails to compile:

[1/143] Generating 'src/dxvk/src@dxvk@@dxvk@sta/dxvk_pack_d24s8.h'.
FAILED: src/dxvk/src@dxvk@@dxvk@sta/dxvk_pack_d24s8.h
/usr/bin/glslangValidator -V --vn dxvk_pack_d24s8 ../../src/dxvk/shaders/dxvk_pack_d24s8.comp -o src/dxvk/src@dxvk@@dxvk@sta/dxvk_pack_d24s8.h
../../src/dxvk/shaders/dxvk_pack_d24s8.comp
WARNING: ../../src/dxvk/shaders/dxvk_pack_d24s8.comp:3: '#extension' : extension not supported: GL_EXT_samplerless_texture_functions
ERROR: ../../src/dxvk/shaders/dxvk_pack_d24s8.comp:37: 'texelFetch' : no matching overloaded function found
ERROR: ../../src/dxvk/shaders/dxvk_pack_d24s8.comp:37: '' : compilation terminated
ERROR: 2 compilation errors.  No code generated.

SPIR-V is not generated for failed compile or link
[2/143] Generating 'src/dxvk/src@dxvk@@dxvk@sta/dxvk_pack_d32s8.h'.
FAILED: src/dxvk/src@dxvk@@dxvk@sta/dxvk_pack_d32s8.h
/usr/bin/glslangValidator -V --vn dxvk_pack_d32s8 ../../src/dxvk/shaders/dxvk_pack_d32s8.comp -o src/dxvk/src@dxvk@@dxvk@sta/dxvk_pack_d32s8.h
../../src/dxvk/shaders/dxvk_pack_d32s8.comp
WARNING: ../../src/dxvk/shaders/dxvk_pack_d32s8.comp:3: '#extension' : extension not supported: GL_EXT_samplerless_texture_functions
ERROR: ../../src/dxvk/shaders/dxvk_pack_d32s8.comp:42: 'texelFetch' : no matching overloaded function found
ERROR: ../../src/dxvk/shaders/dxvk_pack_d32s8.comp:42: '' : compilation terminated
ERROR: 2 compilation errors.  No code generated.

SPIR-V is not generated for failed compile or link
kakra commented 5 years ago

Updating the glslang package helped (7.9.2888)... Should the build file check the minimum version required?

doitsujin commented 5 years ago

My plan is to replace the problematic code by something that works on older glslang versions. Unless you're running Arch or Gentoo or something like that, there's a good chace you can't compile the code, even though the GLSL extension that's causing problems here isn't that recent...

kakra commented 5 years ago

Gentoo here... So I'm pretty flexible and I know how to craft my own ebuilds if version requirements need that.

SveSop commented 5 years ago

Built https://github.com/doitsujin/dxvk/tree/a971370524ce76c50016d6d98131c9dfda757bb8 on Ubuntu 18.04 without issues...

But, i use the LunarG provided ubuntu repo for the VulkanSDK. I guess the glslang package is updated there? https://vulkan.lunarg.com/sdk/home#linux Click on Ubuntu and so on, and find the info for adding the repo.

HOWEVER! BE WARNED: They (LunarG) do NOT provide a :i386 libvulkan1 library, so you HAVE to build your own i386 version to run wine 32-bit programs! This is not very hard, but nevertheless a fiddly thing to do. If you are up to trying i am attaching the libvulkan1_1.1.85.0.1-1bionic~lunarg1.1_i386.deb here. (I take no responsibility for breaking your system tho...)

I have opened a issue with them https://vulkan.lunarg.com/issue/view/5bd879b166315139cfb55e44

libvulkan1_1.1.85.0.1-1bionic~lunarg1.1_i386.deb.gz

SveSop commented 5 years ago

@doitsujin The text on 6f28ce5 is a bit weird..

Ubuntu ships a version of the GLSL compiler that does not support this extension yet, so building DXVK fails on those systems.

What Ubuntu version is that? 18.10? 7.8.2853-2 https://launchpad.net/ubuntu/+source/glslang? And that is not working?

Afaik Ubuntu 18.04 does not HAVE the glslang-tools/glslang-dev package at all... other than "by-manual-download" or as mentioned, from the LunarG repo's. I have not verified that this is a problem with Ubuntu 18.10 and that package tho, so it might be.

Prior to using the LunarG repo, i used https://github.com/KhronosGroup/glslang/releases and https://github.com/KhronosGroup/SPIRV-Tools/releases

Sorry if i am missunderstanding this with libvulkan-dev headers or something tho.

doitsujin commented 5 years ago

An Ubuntu 18.10 user did run into this problem before the bug was reported, yes. I assumed that this was due to the distro package being outdated.

SveSop commented 5 years ago

Yeah, it seems as 18.10 have glslang (7.8.2853-2) https://packages.ubuntu.com/source/cosmic/glslang

For Bionic (18.04) it is: Package not available in this suite.