This makes most vkd3d-shader insufficiencies a lot more obvious when used as an
embedded library.
The obvious disadvantage here is that vkd3d-compiler will basically print every
fixme message twice.
This is a bit of an RFC, since I'm not married to this patch. Other potential
approaches I see (not all mutually exclusive):
* Always print a FIXME if we return VKD3D_ERROR_NOT_IMPLEMENTED from
compile_hlsl(), but don't print messages for individual compilation errors.
Thus we clue in debuggers that a bug is related to HLSL, but let them use
VKD3D_SHADER_DEBUG to find out what the actual bug is. Since the first step is
most of the hard part I think this is a reasonable solution.
* Or do the same thing from d3dcompiler.
* Relegate hlsl_fixme to a separate vkd3d_shader_log_level, and print messages
from that log level in d3dcompiler by default. This isn't quite as simple as
that though, since currently all the messages are stored in a single blob.
* Extra APIs to control whether FIXMES are printed.
I'd also like to propose extending whichever of the above solutions to the
hlsl_error() / VKD3D_ERROR_INVALID_SHADER cases. That way we catch things which
we aren't going to catch via hlsl_fixme(), such as syntax errors from
unrecognized keywords. There's a counterargument that compiling an invalid
shader is valid usage, and that we (wine or vkd3d) shouldn't print any ERR/FIXME
messages when a program does something valid and implemented, but I'd counter
that in practice intentionally compiling an invalid shader should be exceedingly
rare, and especially for something like wine or vkd3d where debugging is
difficult, it's simply not worth insisting on "a correctly functioning program
should print no messages" if it's at the cost of making debugging that much
harder.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/41
Currently, unwinding the unix libraries (or full ELF builds) requires having libunwind available.
When starting up a wine environment, an exception of type `RPC_S_SERVER_UNAVAILABLE` gets thrown - and if libunwind isn't available, this breaks the startup. Thus, currently on ARM/ARM64, libunwind is essentially mandatory.
Additionally, at least on ARM, libunwind seems brittle (commits in latest git master breaks the unwinding use cases in Wine, see e.g. https://github.com/libunwind/libunwind/pull/203#issuecomment-984126066.
For ARM, libunwind has currently relied on DWARF debug info in the `.debug_frame` section, since Linux on ARM doesn't use DWARF for runtime unwinding. This MR adds ARM EHABI unwind opcodes where necessary, and adds a local reimplementation of an ARM EHABI/EXIDX/EXTBL unwinder, similar to the DWARF one.
With these changes, unwinding on ARM seems to work fine, even without libunwind.
See the individual commit messages for more commentary on the decisions taken so far (I've tried to write up all relevant considerations there - it's a fair amount of commentery).
A couple open questions:
- I wrote the ARM EHABI unwind code mostly with `stdint.h` types like `uint32_t`(as it's in the ntdll/unix directory anyway), but I can rewrite it with `DWORD` or similar if that's preferred.
- The ARM EHABI opcodes are enabled for `defined(__arm__) && defined(__ELF__) && defined(__GNUC__) && !defined(__SEH__) && !defined(__ARM_DWARF_EH__)` - there's no define to check for for knowing it's used and enabled, but it has to be implicitly assumed if no other other unwind mechanism is signaled.
- The `dl_iterate_phdr` function, used for finding the EXIDX section for locating ARM EHABI unwind info, is used within `#ifdef linux`. It might be available on other OSes too (like FreeBSD etc). Or should I go ahead and add a configure check for it?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1162
While adding tests for this I also find a couple of things related to previous MR 1111 which I am also fixing here:
- it turns out IPV6 loopback (as in "::1") should not be mapped to ipv4-mapped loopback, ipv6 and ipv4 loopbacks are different addresses. The mapping of that was also missing htonl() for INADDR_LOOPBACK so essentially didn't break anything;
- basically the same is for INADDR_ANY (ipv6 "any" doesn't prevent binding to ipv4 "any"), although that is different when SO_EXCLUSIVEADDRUSE is used: in that case ipv6 wildcard address actually blocks ipv4 INADDR_ANY.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1196
The function `scale_font_metrics()` in `win32u/font.c` was generating a division by zero exception in one of the `comctl32` tests (`status.ok`). This patch just short-circuits the ratio check in the function in case `tm->tmHeight == 0`. This was enough to allow the tests to pass.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1192
Overwatch 2 verifies that every kernel callback that is run, lives in user32. Introduce a callback in user32 that just forwards to the other modules' callbacks.
--
v9: user32: Remove NtUserDriverCallback* kernel callbacks.
winex11.drv: Route kernel callbacks through user32.
winemac.drv: Route kernel callbacks through user32.
wineandroid.drv: Route kernel callbacks through user32.
winevulkan: Route kernel callbacks through user32.
user32: Add NtUserDispatchCallback kernel callback.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1180