Adding an extension will now require an additional step, but
this evolved version of the extension list code is more sane
and the structures can be more easily copied around.
In addition to moving the code to a separate class, this also
improves flushing behaviour by limiting the amount of memory
being initialized rather than the number of commands executed.
- Implements move semantics for thread objects properly.
This is necessary in order to avoid closing the thread
handle multiple times, and to avoid passing invalid
pointers to the thread function in some cases.
- More closely emulates the behaviour of std::thread.
* [build] do not use shared_library/objects property with MSVC
* [util] use ./com/com_include.h instead of windef.h
It is required for Windows 10 SDK.
* [util] store thread procedure lambda in std::function
* [dxgi] fix annoying MSVC warning
warning C4099: 'IDXGIVkInteropDevice': type name first seen using 'class' now seen using 'struct'
This reverts commit d744a3cd69.
Reportely has an unexpected negative impact on frame times in
The Witcher 3 and potentially other games on some setups.
In my winelib builds, I get unresolved dxvk::D3D11ImmediateContext::MinFlushIntervalUs symbol. I'm not sure why it doesn't inline this constexpr, but it doesn't seem useful to expose that in header anyway.
Wine needs to setup each thread that has an access to Windows APIs. It means that in winelib builds, we can't let standard C++ library create threads and need to use Wine for that instead. I wrote a thin wrapper around Windows thread functions so that the rest of code just has to use new dxvk::thread class instead of std::thread.
std::wstring is problematic, because wchar_t on other platforms might not be what we need. -fshort-wchar can mitigate that partially, but it's more problematic for stdc++ classes.
Also, using UTF-8 for convertion may not be what's intended, esp. if such strings end up being passed back to system API (eg. open file). The patch uses CP_ACP on mingw build (which is how Windows APIs will interpret it) or CP_UNIXCP on Wine (which is Wine extension to convert to whatever glibc and other host libs expect).
It's also needed for the next patch.
According to the meson documentation, vcs commands need to be a part
of the command string list. Right now, it pulls the version number no
matter what.