protonscr

[native] DxVk uses platform default as WIN32 WCHAR

dxvkopen native
doitsujin/dxvk#5566 · opened 2026-03-27 by zznty · updated 2026-03-28 · 2 comments · github
Zzznty 2026-03-27 github

Basically ive ran into difference between platforms default wchar_t size (on windows its 2-byte, on unix 4-byte) and dxvk is using the default type for dx apis which would probably work fine if you consume the api via headers, but in my case it's .NET interop always using 2-byte UTF16 size for char type.

I've opened related issue https://github.com/dotnet/Silk.NET/issues/2548 but it looks like need of modifications to dxvk in order to support/default to char16_t.

Let me know if you want this in your repo since i've already changed that in my fork.

Ddoitsujin maintainer 2026-03-27 github

Changing this is going to break roughly everything ever. I don't remember why we ended up going with wchar_t rather than forcing 16-bit types (@misyltoad), but it was a conscious decision and pretty much everything using dxvk-native is going to be relying on it now.

On that note, platform-dependent types suck, but it's not like we can reverse five decades of legacy C jank.

Zzznty 2026-03-28 github

I agree that breaking changes are not acceptable, thinking about it again could be a build option since silk.net are rolling their own binary builds for dxvk

Nothing extracted yet.