protonscr

dnSpy menus (menubar and right-click) are black when using dxvk

dxvkopen d3d9
doitsujin/dxvk#4883 · opened 2025-05-01 by iczero · updated 2025-05-07 · 5 comments · github
Iiczero 2025-05-01 github

When running dnSpy (https://github.com/dnSpyEx/dnSpy/releases/tag/v6.5.1) in Wine using dxvk, the menubar menus and the right-click menus are completely black. This also happens with wined3d when using the default opengl renderer, but setting HKEY_CURRENT_USER\Software\Wine\Direct3D\renderer to gdi (with winetricks renderer=gdi) fixes the problem. I'm not sure if this is a dxvk issue, I apologize if not.

wined3d with renderer=gdi:
Image

dxvk (and wined3d with default renderer):
Image

Software information

dnSpy v6.5.1 on dotnet core 8.0.624.26715 (WPF)

System information

  • GPU: Nvidia RTX 3060 Ti
  • Driver: nvidia 570.144
  • Wine version: wine-staging 10.6
  • DXVK version: 2.6.1

Apitrace file(s)

apitrace said "Rendered 0 frames in 0.197544 secs, average of 0 fps" when attempting replay. Not sure if this is supposed to happen.
dnSpy.trace

Log files

out.log

BBlisto91 2025-05-03 github

Just taking a look visually at the app i think it utilizes partial presentation. d3d9.shaderModel = 1 in a config also works around the issue.

Iiczero 2025-05-04 github

By my understanding from reading #2749, it seems that setting d3d9.shaderModel = 1 makes WPF fall back to software rendering. In that case, this would still be a bug?

I would also like to note that the menus seem to be separate windows since they can extend past the edge of the main window, but I'm not sure.

KK0bin maintainer 2025-05-04 github

By my understanding from reading #2749, it seems that setting d3d9.shaderModel = 1 makes WPF fall back to software rendering. In that case, this would still be a bug?

That's correct and there can still be a bug. DotnetSpy uses WPF and that has interesting approaches to a lot of things.

I'll take a look.

Iiczero 2025-05-04 github

Thank you!

Jjs6pak 2025-05-07 github

Fyi dnSpy will be disabling hardware acceleration on wine as a workaround whenever this commit https://github.com/dnSpyEx/dnSpy/commit/f20c00583c15d91214dee7e97e4f680a48e891a5 lands in a release.
But if the underlying issue would be fixed, that would be great.

Nothing extracted yet.