protonscr

How do I use dxvk-native on Linux?

dxvkclosed
doitsujin/dxvk#4182 · opened 2024-07-31 by IriaSomobu · updated 2024-08-03 · 4 comments · github
IIriaSomobu 2024-07-31 github
  • Linux Mint 21.2 (kernel 5.15.0);
  • gcc 11.4.0
  • dxvk-native-2.4-steamrt-sniper.tar.gz from Releases page (manually unpacked in /usr)
  • no wine* packages installed

I've compiled this example.zip using the following command:

gcc \
-I/usr/include/dxvk/ \
-L/usr/lib/ \
-ldxvk_dxgi \
-ldxvk_d3d8 \
-ldxvk_d3d9 \
-ldxvk_d3d10core \
-ldxvk_d3d11 \
main.cpp -o main

And got linking error:

/usr/bin/ld: /tmp/cc8Kc4kk.o: in function `main':
main.cpp:(.text+0x73): undefined reference to `D3D11CreateDevice'
/usr/bin/ld: main.cpp:(.text+0x600): undefined reference to `D3DCompileFromFile'
/usr/bin/ld: main.cpp:(.text+0x70c): undefined reference to `D3DCompileFromFile'
collect2: error: ld returned 1 exit status

I guess I'm missing something obvious, like grabbing some other binaries (.sos? ) from somewhere else, but I cannot understand what exactly I'm doing wrong. Can somebody land me a hand?

IIriaSomobu 2024-08-02 github

Built from source (e2b823b) -- same error :/

Mmisyltoad 2024-08-02 github

Hello. Does your /usr/lib actually contain libdxvk_dxgi, etc? Make sure if you build and install from src you install to /usr/lib instead of /usr/local/lib unless you want to change your -L.

I tried your example, and it works fine, aside from that DXVK does not implement D3DCompileFromFile. For that, you will need upstream vkd3d's vkd3d-utils and to load the file yourself.

Thanks.

IIriaSomobu 2024-08-02 github

Yup, the problem was on my side -- my friend w/ Archlinux says he has undefined reference to 'D3DCompileFromFile' only.

@Joshua-Ashton thank you! :blue_heart:

IIriaSomobu 2024-08-03 github

For anyone come here looking for a solution: it seems that gcc 11 produces error but gcc 14 is not. Try changing gcc version or compile/link with clang instead -- the latter worked for me.

Nothing extracted yet.