I have an AMD Ryzen 7 5700U, which when my system was running Mesa 22.0.4 identified itself in `glxinfo` as:
```
Vendor: AMD (0x1002)
Device: AMD RENOIR (LLVM 13.0.1, DRM 3.47, 5.19.17) (0x164c)
```
After a recent system upgrade that took Mesa to 22.2.3, `glxinfo` now gives:
```
Vendor: AMD (0x1002)
Device: RENOIR (renoir, LLVM 14.0.6, DRM 3.48, 6.0.12) (0x164c)
```
Wine programs also started reliably crashing on me, with the following message that did not appear before:
```
0130:fixme:d3d:wined3d_guess_card_vendor Received unrecognized GL_VENDOR "AMD". Returning HW_VENDOR_NVIDIA.
```
I don't really know what I'm doing but that message suggested this patch to me, which does resolve the crashes and doesn't seem obviously wrong. Maybe there's some other table to which the new identifying information of this APU needs to be added, but keeping this check for future-proofing might still be a good idea in that case?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1837
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=53525
--
v3: dinput/tests: Remove unnecessary goto and label.
dinput/tests: Wait for each device interface to start / stop.
dinput/tests: Add a device count parameter to hid_device_(start|stop).
dinput/tests: Use semaphores to count and notify rawinput messages.
dinput/tests: Avoid using INFINITE timeouts.
dinput/tests: Remove old physical joystick tests.
dinput/tests: Unregister rawinput devices after tests.
hidclass.sys: Make sure a desktop is created for the driver process.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1842
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=53525
--
v2: dinput/tests: Wait for each device interface to start / stop.
dinput/tests: Add a device count parameter to hid_device_(start|stop).
dinput/tests: Use semaphores to count and notify rawinput messages.
dinput/tests: Avoid using INFINITE timeouts.
dinput/tests: Remove old physical joystick tests.
dinput/tests: Unregister rawinput devices after tests.
hidclass.sys: Make sure a desktop is created for the driver process.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1842
This was previously automatically done when user32 was loaded, but since
the move of __wine_send_input to win32u, we do not need to load it any
more. Somehow it is still loaded when prefix is initialized or updated,
and the dinput tests work in some cases, but not in some other.
This makes sure we have a desktop or WM_INPUT messages won't be sent by
wineserver.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1841
On Mon Dec 19 11:04:02 2022 +0000, Ziqing Hui wrote:
> Testbot complains about too much printing. Should I remove some tests?
> For example, test only one input type for SetOutputType tests.
I'd suggest to shorten the test messages, like for instance `SetOutputType returned unexpected hr 0x80004001 for flag 0.` shorten to `0x0: SetOutputType returned 0x80004001.` with wine_push_context for the flags, or as an even more extreme measure, if necessary, `0x0: got hr 0x80004001.`.
If that's not enough then yes, you can probably think about removing some tests.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1839#note_19835
If a hlsl_ir_load loads a variable whose components are stored from different
instructions, copy propagation doesn't replace it.
But if all these instructions are constants (which currently is the case
for value constructors), the load can be replaced with a constant value, which
is what the first patch of this series does.
For instance, this shader:
```
sampler s;
Texture2D t;
float4 main() : sv_target
{
return t.Gather(s, float2(0.6, 0.6), int2(0, 0));
}
```
results in the following IR before applying the patch:
```
float | 6.00000024e-01
float | 6.00000024e-01
uint | 0
| = (<constructor-2>[@4].x @2)
uint | 1
| = (<constructor-2>[@6].x @3)
float2 | <constructor-2>
int | 0
int | 0
uint | 0
| = (<constructor-5>[@11].x @9)
uint | 1
| = (<constructor-5>[@13].x @10)
int2 | <constructor-5>
float4 | gather_red(resource = t, sampler = s, coords = @8, offset = @15)
| return
| = (<output-sv_target0> @16)
```
and this IR afterwards:
```
float2 | {6.00000024e-01 6.00000024e-01 }
int2 | {0 0 }
float4 | gather_red(resource = t, sampler = s, coords = @2, offset = @3)
| return
| = (<output-sv_target0> @4)
```
This is required to write texel_offsets as aoffimmi modifiers in the sm4 backend, since it expects the texel_offset arguments to be hlsl_ir_constant.
This series also:
* Allows Gather() methods to use aoffimmi modifiers instead of an additional source register (which is the only way allowed for shader model 4.1), when possible.
* Adds support to texel_offsets in the Load() method via aoffimmi modifiers (the only allowed method).
--
v5: vkd3d-shader/hlsl: Propagate swizzle chains.
vkd3d-shader/hlsl: Replace swizzles with constants in copy prop.
tests: Test constant propagation through swizzles.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/51
Zebediah Figura (@zfigura) commented about dlls/kernelbase/path.c:
> */
> HRESULT WINAPI UrlFixupW(PCWSTR url, PWSTR translatedUrl, DWORD maxChars)
> {
> - DWORD srcLen;
> + DWORD srcLen, dstLen, len;
> + DWORD colon_pos = 0, pos = 0;
> + wchar_t *helper_str = NULL;
> + PWSTR save_str = translatedUrl;
We use WCHAR, not wchar_t.
It'd also be nice to use a consistent style for all of variable names in this function (wrt snake case vs camel case). In new code I think we prefer snake case.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1825#note_19808
Zebediah Figura (@zfigura) commented about dlls/kernelbase/path.c:
> + * First check for known, valid and typo free scheme
> + */
> + for (pos=1; pos<ARRAY_SIZE(url_scheme); pos++)
> + {
> + len = wcslen(url_scheme[pos]);
> + if ( (len <= wcslen(url)) && (!_wcsnicmp(url, url_scheme[pos], len)) )
> + {
> + /*
> + * check if string fits into maxChars
> + */
> + if (len+1 >= maxChars)
> + return S_FALSE;
> +
> + lstrcpynW(save_str, url_scheme[pos], len+1);
> + url += len;
> + goto scheme_done;
Can we use a helper function to fix up the scheme instead of using a goto? This will probably also help make the function easier to follow, by virtue of being less monolithic.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1825#note_19809
Zebediah Figura (@zfigura) commented about dlls/kernelbase/path.c:
>
> -HRESULT WINAPI UrlFixupW(const WCHAR *url, WCHAR *translatedUrl, DWORD maxChars)
> +/*
> + * from Documentation:
> + * https://docs.microsoft.com/en-us/windows/desktop/api/shlwapi/nf-shlwapi-url…
> + *
> + * UrlFixupW attempts to correct a URL whose protocol identifier is incorrect.
> + * For example, htttp will be changed to http.
> + *
> + * LWSTDAPI UrlFixupW(
> + * [in] PCWSTR pcszUrl,
> + * [out] PWSTR pszTranslatedUrl,
> + * DWORD cchMax
> + * );
> +*/
> +HRESULT WINAPI UrlFixupW(PCWSTR url, PWSTR translatedUrl, DWORD maxChars)
Without trying to get bogged down in style, this change is somewhat counterproductive; we tend to avoid P* typedefs in new code, and we also have been abandoning the use of "documentation" style headers, which rarely convey any useful information.
(This also doesn't really belong in a commit which should only affect tests.)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1825#note_19805