Despite common sense, native doesn't seem to look for exact match first; it simply case-insensitively compares the props and returns as soon as it finds one. This is also reliant on implementation details in case the object has multiple props with same case-insensitive names, e.g. an object having `Foo` prop, with `foo` prop on its prototype, can still find `Foo` even if you look up `foo` instead (which matches exactly on the prototype). Which is not always reliable, sometimes it finds the prototype first.
See the following diff to illustrate possible behavior on native (which is what I get). Note that especially for jscript, the behavior makes no sense logically; first it picks 'Foo', despite 'foo' being available on the prototype (i.e. exact match). You might think it just looks up on props first, and prototype later, but the second ok() added shows that it finds the prototype's prop first, instead!
```diff
diff --git a/dlls/jscript/tests/jscript.c b/dlls/jscript/tests/jscript.c
index 03774da..2428363 100644
--- a/dlls/jscript/tests/jscript.c
+++ b/dlls/jscript/tests/jscript.c
@@ -999,6 +999,7 @@ static void test_case_sens(void)
/* Native picks one "arbitrarily" here, depending how it's laid out, so can't compare exact id */
hr = IDispatchEx_GetDispID(disp, bstr, fdexNameCaseInsensitive, &id2);
ok(hr == S_OK, "GetDispID failed: %08lx\n", hr);
+ ok(id != id2, "id == id2\n");
hr = IDispatchEx_GetIDsOfNames(disp, &IID_NULL, &bstr, 1, 0, &id2);
ok(hr == S_OK, "GetIDsOfNames failed: %08lx\n", hr);
@@ -1031,6 +1032,7 @@ static void test_case_sens(void)
hr = IDispatchEx_GetDispID(disp, bstr, fdexNameCaseInsensitive | fdexNameEnsure, &id2);
ok(hr == S_OK, "GetDispID failed: %08lx\n", hr);
+ ok(id == id2, "id != id2\n");
SysFreeString(bstr);
IDispatchEx_Release(disp);
diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c
index 14e3a14..563b87a 100644
--- a/dlls/mshtml/tests/script.c
+++ b/dlls/mshtml/tests/script.c
@@ -241,6 +241,7 @@ static void test_script_vars(unsigned argc, VARIANTARG *argv)
/* Native picks one "arbitrarily" here, depending how it's laid out, so can't compare exact id */
hres = IDispatchEx_GetDispID(disp, bstr, fdexNameCaseInsensitive, &id2);
ok(hres == S_OK, "GetDispID failed: %08lx\n", hres);
+ ok(id != id2, "id == id2\n");
hres = IDispatchEx_GetIDsOfNames(disp, &IID_NULL, &bstr, 1, 0, &id2);
ok(hres == S_OK, "GetIDsOfNames failed: %08lx\n", hres);
@@ -273,6 +274,7 @@ static void test_script_vars(unsigned argc, VARIANTARG *argv)
hres = IDispatchEx_GetDispID(disp, bstr, fdexNameCaseInsensitive | fdexNameEnsure, &id2);
ok(hres == S_OK, "GetDispID failed: %08lx\n", hres);
+ ok(id != id2, "id == id2\n");
SysFreeString(bstr);
IDispatchEx_Release(disp);
```
Strangely, mshtml's jscript still finds the prop on the object the second time, but that could be to different underlying implementation. I don't think it's necessary to replicate this quirk.
The main point of this case insensitive handling is that it will be needed later when IE9+ modes use jscript proxy objects for the mshtml objects, because those default to case-insensitive search in GetIDsOfNames, likely to preserve backwards compatibility with pre-IE9 modes. It's a weird quirk, I know, but we have tests for that, which would otherwise break when proxies get added. I'll also add more tests around it later, to prove this, of course, that it also applies to jscript props (e.g. hasOwnProperty on the prototype is still looked case-insensitively if GetIDsOfNames is used).
--
v2: jscript: Implement fdexNameCaseInsensitive flag handling.
https://gitlab.winehq.org/wine/wine/-/merge_requests/656
- Based on !463
- _RunAndWait and exception handling implemented in later commits
@piotr
--
v27: msvcr100: Implement _StructuredTaskCollection::_Schedule and _Schedule_loc.
msvcr100: Factor out the mapping of a context to a scheduler.
msvcr100: Factor out EXCEPTION_RECORD to exception_ptr conversion.
msvcr100: Move exception_ptr functions to a separate file.
https://gitlab.winehq.org/wine/wine/-/merge_requests/464
function call from windows dll to unix function should use `__wine_unix_call` instead of callback function pointer. remove callback struct unix_funcs and add wrapper function of `unixlib_entry_t` type.
--
v2: win32u: replace calling unix functions by unix_call and remove callback unix_funcs
https://gitlab.winehq.org/wine/wine/-/merge_requests/655
On Wed Aug 17 10:20:46 2022 +0000, Jiajin Cui wrote:
> This is to ensure that the second_name is english in a non-english environment.
> When we get the name of another non-english environment before get the
> local environment name, it causes the second_name to be the name of the
> other non-english environment.
> As a result, when looking up a font using an English name, the
> corresponding font cannot be found.
But should it overwrite a second_name if one has already been found?
Note also that this MR has failed the build pipeline.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/628#note_6406
On Wed Aug 17 10:06:52 2022 +0000, Huw Davies wrote:
> I'm afraid I don't understand the logic behind this change.
This is to ensure that the second_name is english in a non-english environment.
When we get the name of another non-english environment before get the local environment name, it causes the second_name to be the name of the other non-english environment.
As a result, when looking up a font using an English name, the corresponding font cannot be found.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/628#note_6405
Manipulating the font size results in the script_cache going stale. From MSDN[1]
`The application should never pass the same handle for different fonts or different sizes.`
This is however exactly what happens when the font size changes as a result of zooming(both in and out). ScriptShape and relative functions will only inspect the hardware device context only if the required data is not cached[2] and hence the data from a previous call to these functions is retrieved even though the font size has changed hence the bug where text both doesn't wrap and doesn't paint as it should.
In patch one, I have tried to keep track of the script_cache objects alongside the relevant font.
Patch two fixes an issue where the cursor doesn't scale after zooming until after one interacts with the editor.
Signed-off-by: David Kahurani <k.kahurani(a)gmail.com>
1. https://docs.microsoft.com/en-us/windows/win32/intl/caching
2. https://docs.microsoft.com/en-us/windows/win32/intl/script-cache
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/626
In preparation for nulldrv display modes support.
--
v8: win32u: Move display placement logic out of graphics drivers.
win32u: Move full display mode lookup out of graphics drivers.
win32u: Use current mode position if desired mode doesn't specify it.
win32u: Always copy devmode in validate_display_settings.
win32u: Read registry or current mode when validation needs it.
win32u: Do not keep display modes driver extra in the registry.
https://gitlab.winehq.org/wine/wine/-/merge_requests/576
On Wed Aug 10 12:00:48 2022 +0000, Piotr Caban wrote:
> The __Fiopen function is a stub in msvcp70. So there's no difference
> between setting it to `_MSVCP_VER >= 70` or `_MSVCP_VER >= 71` (I didn't
> test what's the expected behavior with msvcp70 since it's not available
> on my machine). The `_MSVCP_VER <= 90` check comes from the test I have
> attached to your last merge request (I had to add more dll versions to
> the test to validate how each version works).
I built the demo by vs2003/vs2005/vs2008, and it printed 'read: ok' for vs2003 building, but printed 'open file failed!' for vs2005/vs2008 buildings.
I think "\_MSVCP_VER >= 71" can change to "\_MSVCP_VER >= 80" at least.
And I think it's a bug on vs2005/vs2008, do we have to be exactly the same as windows? Why do we keep this bug?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/606#note_6382
On Wed Aug 17 03:48:19 2022 +0000, Piotr Caban wrote:
> There's no need to close the MR if patches needs updating. You can
> force-push updated version. This way all the comments will be preserved.
Thank you.
This is my first attempt to commit a patch using gitlab, and I'm not quite sure how to do.
Thanks for your guidance, I won't close merge request directly next time.
I see that the patch has been merged in, I think I can close this merge request this time.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/606#note_6381
Despite common sense, native doesn't seem to look for exact match first; it simply case-insensitively compares the props and returns as soon as it finds one. This is also reliant on implementation details in case the object has multiple props with same case-insensitive names, e.g. an object having `Foo` prop, with `foo` prop on its prototype, can still find `Foo` even if you look up `foo` instead (which matches exactly on the prototype). Which is not always reliable, sometimes it finds the prototype first.
See the following diff to illustrate possible behavior on native (which is what I get). Note that especially for jscript, the behavior makes no sense logically; first it picks 'Foo', despite 'foo' being available on the prototype (i.e. exact match). You might think it just looks up on props first, and prototype later, but the second ok() added shows that it finds the prototype's prop first, instead!
```diff
diff --git a/dlls/jscript/tests/jscript.c b/dlls/jscript/tests/jscript.c
index 03774da..2428363 100644
--- a/dlls/jscript/tests/jscript.c
+++ b/dlls/jscript/tests/jscript.c
@@ -999,6 +999,7 @@ static void test_case_sens(void)
/* Native picks one "arbitrarily" here, depending how it's laid out, so can't compare exact id */
hr = IDispatchEx_GetDispID(disp, bstr, fdexNameCaseInsensitive, &id2);
ok(hr == S_OK, "GetDispID failed: %08lx\n", hr);
+ ok(id != id2, "id == id2\n");
hr = IDispatchEx_GetIDsOfNames(disp, &IID_NULL, &bstr, 1, 0, &id2);
ok(hr == S_OK, "GetIDsOfNames failed: %08lx\n", hr);
@@ -1031,6 +1032,7 @@ static void test_case_sens(void)
hr = IDispatchEx_GetDispID(disp, bstr, fdexNameCaseInsensitive | fdexNameEnsure, &id2);
ok(hr == S_OK, "GetDispID failed: %08lx\n", hr);
+ ok(id == id2, "id != id2\n");
SysFreeString(bstr);
IDispatchEx_Release(disp);
diff --git a/dlls/mshtml/tests/script.c b/dlls/mshtml/tests/script.c
index 14e3a14..563b87a 100644
--- a/dlls/mshtml/tests/script.c
+++ b/dlls/mshtml/tests/script.c
@@ -241,6 +241,7 @@ static void test_script_vars(unsigned argc, VARIANTARG *argv)
/* Native picks one "arbitrarily" here, depending how it's laid out, so can't compare exact id */
hres = IDispatchEx_GetDispID(disp, bstr, fdexNameCaseInsensitive, &id2);
ok(hres == S_OK, "GetDispID failed: %08lx\n", hres);
+ ok(id != id2, "id == id2\n");
hres = IDispatchEx_GetIDsOfNames(disp, &IID_NULL, &bstr, 1, 0, &id2);
ok(hres == S_OK, "GetIDsOfNames failed: %08lx\n", hres);
@@ -273,6 +274,7 @@ static void test_script_vars(unsigned argc, VARIANTARG *argv)
hres = IDispatchEx_GetDispID(disp, bstr, fdexNameCaseInsensitive | fdexNameEnsure, &id2);
ok(hres == S_OK, "GetDispID failed: %08lx\n", hres);
+ ok(id != id2, "id == id2\n");
SysFreeString(bstr);
IDispatchEx_Release(disp);
```
Strangely, mshtml's jscript still finds the prop on the object the second time, but that could be to different underlying implementation. I don't think it's necessary to replicate this quirk.
The main point of this case insensitive handling is that it will be needed later when IE9+ modes use jscript proxy objects for the mshtml objects, because those default to case-insensitive search in GetIDsOfNames, likely to preserve backwards compatibility with pre-IE9 modes. It's a weird quirk, I know, but we have tests for that, which would otherwise break when proxies get added. I'll also add more tests around it later, to prove this, of course, that it also applies to jscript props (e.g. hasOwnProperty on the prototype is still looked case-insensitively if GetIDsOfNames is used).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/656
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
--
v2: comctl32/edit: Handle IME composition result string only when EIMES_GETCOMPSTRATONCE is set.
comctl32/edit: Let DefWindowProcW() handle WM_IME_CHAR.
comctl32/edit: Implement EM_GETIMESTATUS.
comctl32/edit: Implement EM_SETIMESTATUS.
comctl32/tests: Add IME tests for edit control.
https://gitlab.winehq.org/wine/wine/-/merge_requests/627
The added inner loop over attachment chain in the second patch minds zero attachment array only. That is because the only case when non-zero complex_array elements are used is the root of the cube texture.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/650
function call from windows dll to unix function should use `__wine_unix_call` instead of callback function pointer. remove callback struct unix_funcs and add wrapper function of `unixlib_entry_t` type.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/655
--
v2: d3d11: Implement D3D11_FEATURE_FORMAT_SUPPORT.
d3d11: Always return E_FAIL for formats which have no support flags.
d3d11/tests: Use winetest_push_context() to print explicit feature levels.
https://gitlab.winehq.org/wine/wine/-/merge_requests/633
Some transforms, such as the EVR mixer do not implement GetInputAvailableType
and may not have any current media type set, though they would accept upstream
media type right away.
--
v2: mf: Only enumerate types for decoders / converter if down type is missing.
mf: Only allow converter connection if decoder didn't accept down type.
mf: Allow resolving topology with missing downstream current type.
mf/tests: Add more topology loader converter and enumeration tests.
mf/tests: Add some MP3 decoder transform tests.
mf/tests: Add some topology loader tests with missing output type.
https://gitlab.winehq.org/wine/wine/-/merge_requests/608
Fix the crash when opening notepad++ v8.4.4 preference dialog before e52e42b.
--
v2: comctl32: Set reference data to zero on failure for GetWindowSubclass().
comctl32: Check reference data pointer before using it.
comctl32/tests: Add GetWindowSubclass() tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/651
> Node manipulation might be fine, I haven't checked it in full. However my impression was that we don't really need it right now? I believe I saw some examples where ID2D1DrawTransform is implemented for \*Impl object directly, for which runtime presumably calls SetDrawInfo, letting effect set back shaders and resources.
Yeah, ID2D1DrawTransform can be implemented for *Impl object, that's true. But we still need transfrom graph. Implementing ID2D1DrawTransform for *Impl doesn't means that it will be used automatically without doing anything else. We still need to regard it as a transform node, and add it to transfrom graph. And latter, runtime will call SetDrawInfo for it because it is in transform graph.
> Regarding prototyped drawing, creating render target on every draw seems wrong. It's possible you'll have to recreate something, but only when when parameters or inputs have changed.
You are right. We should recreate things only when things are changed. I ignore it in this draft just to make things look simpler. I'll take this into consideration.
Nikolay, do you think I can submit first 3 patches in another MR to make you have a full reviewing in order to upstream them?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/635#note_6269
Node manipulation might be fine, I haven't checked it in full. However my impression was that we don't really need it right now? I believe I saw some examples where ID2D1DrawTransform is implemented for *Impl object directly, for which runtime presumably calls SetDrawInfo, letting effect set back shaders and resources.
Regarding prototyped drawing, creating render target on every draw seems wrong. It's possible you'll have to recreate something, but only when when parameters or inputs have changed. I certainly don't have a full picture of how this works, but shouldn't we be using MapOutputRectToInputRects() at some point?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/635#note_6266
Cursor (both the cursor itself and its visibility) are per thread on Windows and Wine's implementation outside of winex11.drv seem to agree with that. Using global cursor variable in winex11.drv leads to wrong cursor being set or set visible for a window when the app sets a cursor from the other thread.
--
v2: winex11.drv: Set correct cursor when setting cursor from another thread.
https://gitlab.winehq.org/wine/wine/-/merge_requests/647
Don't assume that enums and uint32_t parameters are identical. Clang
16 changes the diagonstic for incompatible function pointer types
from a warning into an error by default.
This fixes the following error, when built (for aarch64, but probably
also for other architectures) in MSVC mode:
```
../src/libs/vkd3d/libs/vkd3d-shader/spirv.c:1083:13: error: incompatible function pointer types passing 'uint32_t (struct vkd3d_spirv_builder *, uint32_t, SpvDim, uint32_t, uint32_t, uint32_t, uint32_t, SpvImageFormat)' (aka 'unsigned int (struct vkd3d_spirv_builder *, unsigned int, enum SpvDim_, unsigned int, unsigned int, unsigned int, unsigned int, enum SpvImageFormat_)') to parameter of type 'vkd3d_spirv_build7_pfn' (aka 'unsigned int (*)(struct vkd3d_spirv_builder *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)') [-Wincompatible-function-pointer-types]
vkd3d_spirv_build_op_type_image);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/libs/vkd3d/libs/vkd3d-shader/spirv.c:612:68: note: passing argument to parameter 'build_pfn' here
SpvOp op, const uint32_t *operands, vkd3d_spirv_build7_pfn build_pfn)
^
```
This backports https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/8 to the bundled copy in wine.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/644
Cursor (both the cursor itself and its visibility) are per thread on Windows and Wine's implementation outside of winex11.drv seem to agree with that. Using global cursor variable in winex11.drv leads to wrong cursor being set or set visible for a window when the app sets a cursor from the other thread.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/647
Patch 1.
The tests on Windows show that when the timer callback is queued behind the clock time it is queued and executed quite soon with 0-15ms delay which corresponds to default timer granularity. The timeout tolerance in the test is quite bigger to avoid a flaky test. Wine currently may execute the callback right away or delay it indefinitely depending on the time difference and current system time.
Patch 2.
It turns out when the session is paused and then restarted and all the samples were delivered to sample grabber before restart, nothing is going to request the samples again when the session is restarted. I am attaching a test in a patch which hopefully confirms how that should work. I am not including that in the patches as the test involves delays (to make sure all the async events settle at certain points) and inherently flaky. Also, _
IMFStreamSink_GetEvent(stream, ...) in the test crashes on Win7 for some unknown reason.
[0001-mf-tests-Add-test-for-pausing-and-restarting-sample-.patch](/uploads/58c1738d48b3392e7ec430a0757210d0/0001-mf-tests-Add-test-for-pausing-and-restarting-sample-.patch)
--
v4: mf/samplegrabber: Handle samples receieved in paused state.
mf/samplegrabber: Process samples in paused state in ignore_clock mode.
mf: Handle timer time behind clock time in present_clock_schedule_timer().
https://gitlab.winehq.org/wine/wine/-/merge_requests/574
Instead of leaking kernel pointers.
--
v2: user32: Always use original parameter values in dispatch_send_message.
wow64win: Implement wow64_NtUserMessageCall.
wow64win: Implement wow64_NtUserCallWinProc.
win32u: Remove no longer needed unicode call_hooks argument.
win32u: Use send_message_timeout for WM_CREATE and WM_NCCREATE.
user32: Pass window name as UNICODE_STRING to NtUserCreateWindowEx.
win32u: Pack messages sent directly from win32u.
https://gitlab.winehq.org/wine/wine/-/merge_requests/646
In preparation for nulldrv display modes support.
--
v7: win32u: Move display placement logic out of graphics drivers.
win32u: Move full display mode lookup out of graphics drivers.
win32u: Use current mode position if desired mode doesn't specify it.
win32u: Always copy devmode in validate_display_settings.
win32u: Read registry or current mode when validation needs it.
win32u: Do not keep display modes driver extra in the registry.
https://gitlab.winehq.org/wine/wine/-/merge_requests/576
Clang 16 is defaulting -Wincompatible-function-pointer-types to
an error instead of a warning. This isn't an issue for most of Wine,
but the error shows up in a lot of cases if doing a non-PE build for
ARM (32 bit, 64 has no such issues), in particular around the integration
of libxml2 and faudio.
The root cause of the issue is that some functions are specified with
e.g. __attribute__((pcs("aapcs-vfp"))) - which is equal to the
default calling convention when compiling with -mfloat-abi=hard - but
Clang's warning doesn't treat such function pointers as equal. (This
could maybe be considered a bug or limitation in Clang though.)
There's also some smaller amount of cases where our attributes
actually do conflict, where we mix __attribute__((pcs("aapcs"))), i.e.
arm softfloat calling convention, with the default calling convention
(which is set to hardfloat), but they drown in the noise from the
other ones.
Therefore, on arm, try to downgrade this diagnostic back to a warning,
not an error - while keeping the warnings visible.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/643
Don't assume that enums and uint32_t parameters are identical. Clang
16 changes the diagonstic for incompatible function pointer types
from a warning into an error by default.
This fixes the following error, when built (for aarch64, but probably
also for other architectures) in MSVC mode:
```
../src/libs/vkd3d/libs/vkd3d-shader/spirv.c:1083:13: error: incompatible function pointer types passing 'uint32_t (struct vkd3d_spirv_builder *, uint32_t, SpvDim, uint32_t, uint32_t, uint32_t, uint32_t, SpvImageFormat)' (aka 'unsigned int (struct vkd3d_spirv_builder *, unsigned int, enum SpvDim_, unsigned int, unsigned int, unsigned int, unsigned int, enum SpvImageFormat_)') to parameter of type 'vkd3d_spirv_build7_pfn' (aka 'unsigned int (*)(struct vkd3d_spirv_builder *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)') [-Wincompatible-function-pointer-types]
vkd3d_spirv_build_op_type_image);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/libs/vkd3d/libs/vkd3d-shader/spirv.c:612:68: note: passing argument to parameter 'build_pfn' here
SpvOp op, const uint32_t *operands, vkd3d_spirv_build7_pfn build_pfn)
^
```
--
v2: vkd3d-shader/spirv: Fix the signature of vkd3d_spirv_build_op_type_image
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/8
Don't assume that enums and uint32_t parameters are identical. Clang
16 changes the diagonstic for incompatible function pointer types
from a warning into an error by default.
This fixes the following error, when built (for aarch64, but probably
also for other architectures) in MSVC mode:
```
../src/libs/vkd3d/libs/vkd3d-shader/spirv.c:1083:13: error: incompatible function pointer types passing 'uint32_t (struct vkd3d_spirv_builder *, uint32_t, SpvDim, uint32_t, uint32_t, uint32_t, uint32_t, SpvImageFormat)' (aka 'unsigned int (struct vkd3d_spirv_builder *, unsigned int, enum SpvDim_, unsigned int, unsigned int, unsigned int, unsigned int, enum SpvImageFormat_)') to parameter of type 'vkd3d_spirv_build7_pfn' (aka 'unsigned int (*)(struct vkd3d_spirv_builder *, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)') [-Wincompatible-function-pointer-types]
vkd3d_spirv_build_op_type_image);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/libs/vkd3d/libs/vkd3d-shader/spirv.c:612:68: note: passing argument to parameter 'build_pfn' here
SpvOp op, const uint32_t *operands, vkd3d_spirv_build7_pfn build_pfn)
^
```
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/8
--
v4: d3d9/tests: Add more tests for dirty rect handling.
d3d8/tests: Add more tests for dirty rect handling.
d3d8/tests: Read back directly from the specified surface if possible.
d3d9/tests: Expand tests for valid pools in UpdateTexture().
d3d8/tests: Expand tests for valid pools in UpdateTexture().
wined3d: Use wined3d_array_reserve() in wined3d_adapter_create_output().
https://gitlab.winehq.org/wine/wine/-/merge_requests/581
Patch 1.
The tests on Windows show that when the timer callback is queued behind the clock time it is queued and executed quite soon with 0-15ms delay which corresponds to default timer granularity. The timeout tolerance in the test is quite bigger to avoid a flaky test. Wine currently may execute the callback right away or delay it indefinitely depending on the time difference and current system time.
Patch 2.
It turns out when the session is paused and then restarted and all the samples were delivered to sample grabber before restart, nothing is going to request the samples again when the session is restarted. I am attaching a test in a patch which hopefully confirms how that should work. I am not including that in the patches as the test involves delays (to make sure all the async events settle at certain points) and inherently flaky. Also, _
IMFStreamSink_GetEvent(stream, ...) in the test crashes on Win7 for some unknown reason.
[0001-mf-tests-Add-test-for-pausing-and-restarting-sample-.patch](/uploads/58c1738d48b3392e7ec430a0757210d0/0001-mf-tests-Add-test-for-pausing-and-restarting-sample-.patch)
--
v3: mf/samplegrabber: Request a sample when going from paused to running state.
mf: Handle timer time behind clock time in present_clock_schedule_timer().
https://gitlab.winehq.org/wine/wine/-/merge_requests/574
--
v4: qasf: Configure WMReader stream selection in asf_reader_init_stream.
qasf: Configure WMReader stream format in asf_reader_init_stream.
qasf: Start/stop the WM reader in asf_reader_init/cleanup_stream.
qasf: Implement ASF Reader filter init_stream and cleanup_stream.
qasf: Wait for IWMReader_Open to complete in ASF Reader Load.
https://gitlab.winehq.org/wine/wine/-/merge_requests/625
Fixes black screen in Sweet Transit game.
The game depends on ID3D11Device_CreateInputLayout to fail properly when mandatory VS input is not filled. It is coming from MonoGame engine available as source, here is the place of interest: https://github.com/MonoGame/MonoGame/blob/158c0154ac18ed6102c65e24665c6a080…
As far as my testing goes:
- missing mandatory inputs cause failure, extra elements in input layout are fine;
- shader type is not checked;
- what is mandatory is unrelated to sysval semantics value in dxbc, it probably just checks for sv_ special names with position being a special case which is still mandatory;
- there are more validation checks which are not implemented in this patch, e. g., for InputSlotClass validity. There is a single todo_wine test for that, but it doesn't cover all the specifics.
--
v2: d3d11: Validate layout description in d3d_input_layout_create().
https://gitlab.winehq.org/wine/wine/-/merge_requests/618
--
v3: qasf: Configure WMReader stream selection in asf_reader_init_stream.
qasf: Configure WMReader stream format in asf_reader_init_stream.
qasf: Start/stop the WM reader in asf_reader_init/cleanup_stream.
qasf: Implement ASF Reader filter init_stream and cleanup_stream.
qasf: Wait for IWMReader_Open to complete in ASF Reader Load.
https://gitlab.winehq.org/wine/wine/-/merge_requests/625
The last patch will be useful later when we have to use the dispex itself.
--
v2: mshtml: Return DISP_E_MEMBERNOTFOUND when not finding member by DISPID.
mshtml: Implement document.location with a hook.
mshtml: Implement window.setTimeout with a hook.
mshtml: Implement window.location setter with a hook.
mshtml: Forward Document's Invoke to InvokeEx.
https://gitlab.winehq.org/wine/wine/-/merge_requests/632
On Wed Aug 10 14:12:37 2022 +0000, Torge Matthies wrote:
> So update:
> I used `HeapValidate` to check if `Context`s stay valid after thread
> exit if in use. They don't. It only works because either the Context is
> not used once the chores are running or the data in the memory stays
> valid enough for it to not crash. So we don't need to do refcounting.
> This implementation of `_StructuredTaskCollection` here doesn't use the
> context anyway once the chores are running, so there should rarely (if
> ever) be crashes if some program doesn't clean up its task collections.
> For the caching: It seems like there are always n/m Contexts cached,
> with n = the number of logical CPUs (probably
> `CurrentScheduler::GetNumberOfVirtualProcessors()`) and more
> interestingly m = the number of schedulers created (default scheduler +
> any created with `Scheduler_Create`).
I have tested _StructuredTaskCollection behavior on Context destroy, here are some thoughts:
- the _StructuredTaskCollection is not canceled
- destructor is not waiting for chores to finish
- there's no crash if Context is destroyed while tasks are running/scheduled to run
- when context is reused old tasks are gone
I think, that in order to implement it correctly, tasks queue needs to be moved to scheduler. On _Context destroy, all tasks created by the context should be removed from the list.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/464#note_6113
--
v2: qasf: Configure WMReader stream selection in asf_reader_init_stream.
qasf: Configure WMReader stream format in asf_reader_init_stream.
qasf: Start/stop the WM reader in asf_reader_init/cleanup_stream.
qasf: Implement ASF Reader filter init_stream and cleanup_stream.
qasf: Wait for IWMReader_Open to complete in ASF Reader Load.
https://gitlab.winehq.org/wine/wine/-/merge_requests/625
mf_media_type_from_wg_format() may return NULL.
Fix Airborne Kingdom crash at start because WG_AUDIO_FORMAT_UNKNOWN is passed to
mf_media_type_from_wg_format().
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
--
v2: winegstreamer: Trace mf_media_type_from_wg_format_{audio|video}().
winegstreamer: Always check the return value from mf_media_type_from_wg_format().
https://gitlab.winehq.org/wine/wine/-/merge_requests/616