Open raldone01 opened 7 months ago
What mesa version are you running exactly? The texture error indicates that something goes wrong on the Lavapipe side of things rather than WSI, and DXVK does occationally hit some edge cases that are required by D3D11 but not supported on Lavapipe, but this is just a plain old multisampled RGBA8 texture with Render Target usage, which isn't all that special and works fine on my end with 24.0.1.
This should really just work unless this is running on a rather outdated mesa version.
Does the docker container work for you? Or did you just run the triangle program with your dxvk setup?
Mesa 22.3.6
is that too old?
I will try to build it from source...
Or did you just run the triangle program with your dxvk setup?
Yeah I just ran it on my local desktop.
Mesa 22.3 is indeed quite old in the context of Lavapipe specifically, you'll definitely want to run something more up to date since it was missing quite a few features at the time.
That said, apps that don't use MSAA or esoteric combinations of texture format + usage flags might just work, it's just that d3d11-triangle uses 8xMSAA.
I switched the container to archlinux.
I now have mesa Mesa 24.0.2-arch1.1
.
Still the same error.
warn: DXVK: No state cache file found
info: DXVK: Graphics pipeline libraries supported
err: D3D11: Cannot create texture:
err: Format: 29
err: Extent: 1024x600x1
err: Samples: 8
err: Layers: 1
err: Levels: 1
err: Usage: 20
err: Flags: 0
err: DXGI: CreateSwapChainForHwnd: Failed to create swap chain, hr -2147467259
Failed to create DXGI swap chain
llvmpipe (LLVM 16.0.6, 256 bits)
What should I check next? Do you have an even simpler test program I can use?
Does vkcube even work?
@raldone01 I just looked at the code, current d3d11-triangle.exe
doesn't use MSAA actually which is why it works here. Sorry for the confusion, I forgot I changed that at some point.
You can find the current set of test apps here: https://github.com/doitsujin/dxvk-tests
I tried to setup a headless docker container that can run dxvk programs ideally 64bit and 32bit without any gpu. I don't think this is an issue with dxvk but I didn't know where else to ask for help.
Software information
I created a minimal reproducible example
627467028ba5be425d127248d46979cc3f1209c7
. I could not getxorg
orxvfb
to work.dxvk
always fails to create a texture. My guess is that some library is missing but I don't know which.Dockerfile
```Dockerfile FROM debian:bookworm RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \ export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true && \ sed -i -e's/ main/ main contrib non-free non-free-firmware/g' /etc/apt/sources.list.d/debian.sources && \ dpkg --add-architecture i386 && \ mkdir -pm755 /etc/apt/keyrings && \ apt-get update && \ apt-get install -y gnupg2 wget curl ca-certificates && \ wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key && \ wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources && \ apt-get update && \ apt-get install -y file winehq-stable xorg xserver-xorg-video-dummy xvfb libvulkan1 libvulkan1:i386 vulkan-tools mesa-utils mesa-utils-extra mesa-vulkan-drivers mesa-vulkan-drivers:i386 mesa-vdpau-drivers mesa-vdpau-drivers:i386 mesa-va-drivers mesa-va-drivers:i386 && \ debug_packages="nano strace less" && \ apt-get install -y $debug_packages && \ apt-get clean # Download and install dxvk RUN \ mkdir -p /tmp/dxvk && \ cd /tmp/dxvk && \ curl -L 'https://github.com/doitsujin/dxvk/releases/download/v2.3/dxvk-2.3.tar.gz' -o dxvk-2.3.tar.gz && \ # unpack and install dxvk tar -xzf dxvk-2.3.tar.gz && \ cd dxvk-2.3 && \ # copy the x32 and x64 folders to /usr/local/bin/dxvk mkdir -p /usr/local/bin/dxvk && \ cp -r x32 x64 /usr/local/bin/dxvk && \ rm -rf /tmp/dxvk ENV WINEPREFIX=/root/.wine64 ENV WINEARCH=win64 # Setup wine prefix and install dxvk RUN \ wineboot -u && \ cp /usr/local/bin/dxvk/x64/*.dll $WINEPREFIX/drive_c/windows/system32 && \ cp /usr/local/bin/dxvk/x32/*.dll $WINEPREFIX/drive_c/windows/syswow64 && \ #do this for every dll in x64 and x32 wine reg add 'HKEY_CURRENT_USER\\Software\\Wine\\DllOverrides' /v path_to_dll /d native /f && \ before=$(stat -c '%Y' $WINEPREFIX/user.reg) \ dlls_paths=$(find /usr/local/bin/dxvk -name '*.dll') && \ for dll in $dlls_paths; do \ wine reg add "HKEY_CURRENT_USER\Software\Wine\DllOverrides" /v "$(basename "${dll%.*}")" /d native /f; \ # get the reg keys # wine reg query "HKEY_CURRENT_USER\Software\Wine\DllOverrides" | grep -i $(basename "${dll%.*}"); \ done \ && while [ $(stat -c '%Y' $WINEPREFIX/user.reg) = $before ]; do sleep 1; done # Install d3d11-triangle.exe RUN \ mkdir -p /tmp/d3d11-triangle && \ cd /tmp/d3d11-triangle && \ curl -L 'https://gitlab.melroy.org/melroy/winegui/uploads/c4db93700d13dfb71997f28c2965aeb7/dxvk-test.tar.gz' -o triangle.tar.gz && \ mkdir -p /tmp/d3d11-triangle/dxvk-test && \ tar -xzf triangle.tar.gz -C /tmp/d3d11-triangle/dxvk-test && \ #64bit mv dxvk-test /usr/local/bin/d3d11-triangle && \ rm -rf /tmp/d3d11-triangle COPY --chown=root:root --chmod=755 entrypoint.sh /entrypoint.sh COPY xorg.conf /etc/X11/xorg.conf.d/20-virt.conf ENTRYPOINT ["/entrypoint.sh"] ```entrypoint.sh
```bash #!/bin/bash set -ex x11_tech=$1 # Setup headless X11 # use xvfb if [ "$x11_tech" = "xvfb" ]; then Xvfb :0 -screen 0 1024x768x24 -ac +extension GLX +extension RANDR +extension RENDER +render -noreset & export DISPLAY=:0 fi # use xorg if [ "$x11_tech" = "xorg" ]; then Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./10.log -config /etc/X11/xorg.conf :10 & export DISPLAY=:10 fi wine /usr/local/bin/d3d11-triangle/d3d11-triangle.exe ```xorg.conf
``` # This xorg configuration file is meant to be used by xpra # to start a dummy X11 server. # For details, please see: # https://github.com/Xpra-org/xpra/blob/master/docs/Usage/Xdummy.md Section "ServerFlags" Option "DontVTSwitch" "true" Option "AllowMouseOpenFail" "true" Option "PciForceNone" "true" Option "AllowEmptyInput" "true" Option "AutoEnableDevices" "false" Option "AutoAddDevices" "false" EndSection Section "Device" Identifier "dummy_videocard" Driver "dummy" DacSpeed 30000 Option "ConstantDPI" "true" #VideoRam 2048000 #VideoRam 1024000 VideoRam 768000 #VideoRam 512000 #VideoRam 384000 #VideoRam 256000 #VideoRam 192000 EndSection Section "Monitor" Identifier "dummy_monitor" HorizSync 1.0 - 300000.0 VertRefresh 1.0 - 300.0 EndSection Section "Screen" Identifier "dummy_screen" Device "dummy_videocard" Monitor "dummy_monitor" DefaultDepth 24 SubSection "Display" Viewport 0 0 Depth 8 #requires more ram: #Modes "16000x15000" "15000x15000" "16384x8192" .. Modes "8192x4096" "5120x3200" "3840x2880" "3840x2560" "3840x2048" "3840x2160" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" "1024x600" "800x600" "320x200" #Virtual 16384 16384 Virtual 11520 6318 EndSubSection SubSection "Display" Viewport 0 0 Depth 16 #requires more ram: #Modes "16000x15000" "15000x15000" "16384x8192" .. Modes "8192x4096" "5120x3200" "3840x2880" "3840x2560" "3840x2048" "3840x2160" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" "1024x600" "800x600" "320x200" #Virtual 16384 16384 Virtual 11520 6318 EndSubSection SubSection "Display" Viewport 0 0 Depth 24 #requires more ram: #Modes "16000x15000" "15000x15000" "16384x8192" .. Modes "8192x4096" "5120x3200" "3840x2880" "3840x2560" "3840x2048" "3840x2160" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" "1024x600" "800x600" "320x200" #Virtual 16384 16384 Virtual 11520 6318 EndSubSection SubSection "Display" Viewport 0 0 Depth 30 #requires more ram: #Modes "16000x15000" "15000x15000" "16384x8192" .. Modes "8192x4096" "5120x3200" "3840x2880" "3840x2560" "3840x2048" "3840x2160" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" "1024x600" "800x600" "320x200" #Virtual 16384 16384 Virtual 11520 6318 EndSubSection EndSection Section "ServerLayout" Identifier "dummy_layout" Screen "dummy_screen" EndSection ```System information
llvmpipe (LLVM 15.0.6, 256 bits)
llvmpipe 0.0.1
wine-9.0
v2.3
Log files
Excerpt:
docker run --rm -it dxvk_test xvfb > xvfb.log 2>&1
xvfb.logdocker run --rm -it dxvk_test xorg > xorg.log 2>&1
xorg.logThank you for your time.