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.
--
v7: 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.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/458
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