This serie:
- adds a couple of msvcrt env tests (mainly env block inheritance)
- introduces env tests for ucrtbase
- reimplement most of the env related functions to mimic native
behavior (basically when env is modified, native crt uses
a per-variable entry allocation block (instead of having
pointers inside a single chunk of memory).
This fixes programs which keep a pointer on returned getenv()
string and expect that pointer content is not modified when
other variables in env are modified.
@piotr: from previous version
- I dropped the synchronization of \_environ and \_wenviron
hence requiring the duplication of most of the code in
ansi/unicode versions
- I also tested the changes with unicode crt startup code
(you can find in [1] this MR extended with this test code
but I don't think we want to push it upstream)
- there are some init code changes because of ucrtbase tests
and unicode crt startup tests
[1] https://gitlab.winehq.org/epo/wine/-/tree/mr-crt-env-full?ref_type=heads
--
v4: msvcrt: Fix ucrtbase environment initialization.
msvcrt: Allocate environment variables in separate allocation chunks.
msvcrt: Lazily initialize ___winitenv.
msvcrt: Factor out env_get_index helper.
msvcrt: Factor out env_get_index helper.
ucrtbase/tests: Introduce environment tests.
msvcrt/tests: Test passing environment in child process.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4377
Commit 100504d2f5 introduced using GetDpiForWindow().
Unfortunately NOTEPAD_LoadSettingFromRegistry is executed when
the main window is not yet created, resulting in
having Globals.lfFont.lfHeight=0.
This is later stored in the registry in iPointSize=0.
In a fresh wine prefix there are not yet registry values created,
therefore the first run of notepad does not show this problem,
and iPointSize is saved with a sane value to the registry.
Having Globals.lfFont.lfHeight=0 manifests for example
in cups PDF prints being a single empty page.
The check of point_size for having a non-zero value should also fix
wine prefixes which have already a stored registry value of iPointSize=0.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55852
CC: @petrathekat
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4442
IMFMediaType_(Get|Free)Representation is called by Samurai Maiden, MFInitAMMediaTypeFromMFMediaType could be useful to simplify DMO / MFT transforms implementations.
--
v2: mfplat: Implement IMFMediaType_(Get|Free)Representation.
mfplat: Implement MFCreateAMMediaTypeFromMFMediaType.
mfplat: Implement MFInitAMMediaTypeFromMFMediaType.
mfplat: Use bits per pixel in uncompressed formats metadata.
mfplat: Only convert MEDIASUBTYPE for the formats that need it.
mfplat/tests: Add IMFMediaType_GetRepresentation tests.
mfplat/tests: Add tests for MFCreateAMMediaTypeFromMFMediaType.
mfplat/tests: Add tests for MFInitAMMediaTypeFromMFMediaType.
mfplat: Add MFInitAMMediaTypeFromMFMediaType stub.
mfplat: Add MFCreateAMMediaTypeFromMFMediaType stub.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4439
Currently we are not properly handling register(cX) reservations for SM1, this is one of the things required for the SNK shaders (CW Bug Bug 18092).
register(cX) reservations also change the offset in the $Globals buffer in SM4, so support for this is also included.
---
Patch 1/4 is required to specify:
```
[require]
shader model < 4.0
```
so that the tests that follow do not get run with the vulkan backend on SM4. I think nobody disagreed with that patch.
--
v6: vkd3d-shader/hlsl: Turn register(cX) reservations into buffer offset for SM4.
vkd3d-shader/hlsl: Make register(cX) reservations work for SM1.
tests: Test register(cX) reservations.
tests: Rename register-reservations.shader_test to register-reservations-resources.shader_test.
tests/shader-runner: Run compilation tests with SM1 when SM1 models are selected.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/458
Current copy-prop of swizzle instructions can result in infinite loops,
as with the included test before this commit.
Consider the following sequence of instructions where a load is stored
in the same variable it loads:
1 : A
2 : A = @1
3 : @1.x
In this case @3 would call copy_propagation_get_value() on A.x and
would get @1, without detecting that that is indeed the same node
it is already using as swizzle->value. So it would return true,
keeping copy-prop spinning.
To avoid this, it is check that the replacement instruction is not the
same as the swizzle->load instruction.
---
This was discovered when trying to compile shaders from [Bug 19499](https://www.codeweavers.com/support/bugs/browse?cmd=bug_edit;bug_id=….
--
v2: vkd3d-shader/hlsl: Avoid replacing with swizzles to loads that come after in copy-prop.
vkd3d-shader/hlsl: Move index_instructions() up.
vkd3d-shader/hlsl: Avoid replacing with the same swizzle in copy-prop.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/482
This adds the product ids for the DualSense Edge to enable feature parity with the existing DualSense suppport.
I've tested this with the DualSense Edge hardware and these Windows games installed from Steam:
* Returnal
* Death Stranding: Director's Cut
* Overwatch 2
--
v2: hidclass.sys: Add DualSense Edge to device_strings.
mmdevapi: Override product strings for DualSense Edge.
winebus.sys: Identify DualSense Edge as a DualSense controller.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4433
Here's a list of usages of `base.outer_window` that may be impacted by the change and my analysis/fixes. Note that I specifically did not look for `document->outer_window` since that one was already holding it forever, so it's out of scope for this MR (whether it's correct or not, the behavior is the same after this MR).
I also didn't consider some cases that already **did not check** for it being NULL or not, because they would have crashed earlier before anyway (they'd still crash now if outer window gets killed, but it's out of scope of the MR as I said). For those that says "Handled" it means I've added checks so that the behavior is same as before, i.e. detached inner windows behave as if outer window is NULL.
* `htmldoc.c/HTMLDocument_get_mimeType`: Changed so it doesn't rely on outer window.
* `htmldoc.c/HTMLDocument7_get_defaultView`: This is actually fixed by these patches.
* `htmlform.c/HTMLFormElement_submit`: Handled.
* `htmlstorage.c/send_storage_event`: Fixed in a separate patch with tests, since it follows the outer window.
* `htmlwindow.c/check_target_origin`: This (along with many other methods) can't have it NULL anymore or detached, since the caller must hold a ref to the outer window, and they're not called from our objects holding ref to inner window only.
* `htmlwindow.c/HTMLWindowSP_QueryService`: This uses the outer window to obtain the browser and the doc obj, so it's fine.
* `mutation.c/set_document_mode`: Handled.
* `navigate.c/BindCallbackRedirect_Redirect`: Handled.
* `navigate.c/nsAsyncVerifyRedirectCallback_OnRedirectVerifyCallback`: Handled.
* `navigate.c/nsChannelBSC_init_bindinfo`: Uses the outer window to obtain the browser and doc obj to set a flag, so it's harmless and probably correct this way.
* `navigate.c/handle_navigation_error`: Handled.
* `navigate.c/handle_extern_mime_navigation`: Handled.
* `omnavigator.c/OmHistory_get_length`: This is actually fixed by these patches.
* `script.c/ActiveScriptSite_GetItemInfo`: Handled.
* `script.c/ActiveScriptSiteWindow_GetWindow`: Handled.
--
v2: mshtml: Get rid of outer_window member in HTMLDocumentNode.
mshtml/tests: Improve the iframe navigation test.
mshtml: Remove the inner window ref from the doc only when it is actually
mshtml: Don't check for NULL outer_window from within HTMLWindow* methods.
mshtml: Don't attempt to send storage events after outer window is destroyed.
mshtml: Keep the inner window's outer_window pointer alive until it is
mshtml: Don't rely on the outer_window in document.mimeType.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4380
Goes atop !471. The last six commits belong to this MR.
--
v3: vkd3d-shader/dxil: Emit constant global arrays as immediate constant buffers.
vkd3d-shader: Add a register index to struct vkd3d_shader_immediate_constant_buffer.
vkd3d-shader/spirv: Support declared component type and count in immediate constant buffers.
vkd3d-shader/spirv: Support constant initialisers in indexable temps.
vkd3d-shader/dxil: Support null constant arrays.
vkd3d-shader/spirv: Support declared component type and count in indexable temps.
vkd3d-shader/dxil: Implement the DXIL LOAD instruction.
vkd3d-shader/dxil: Implement the DXIL GEP instruction.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/477