Copy propagation is translated to index paths, invalidation of variable components is made more precise.
This, together with checking for non-static object references (which are not allowed in HLSL) allows to set object register sizes back to zero without overlapping registers.
I also included implicit array initialization, since, if I remember correctly, what was holding it back was that structs/arrays with object components couldn't be represented with the correct register offsets.
After this, we have to decide if (and how to) move register allocation and register offset calculation to each shader model.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/7
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