--
v2: win32u: Remove now unnecessary ImeToAsciiEx driver entry.
winemac: Use the default ImeToAsciiEx implementation.
win32u: Support posting IME updates while processing keys.
win32u: Move ImeToAsciiEx implementation from winex11.
winex11: Return STATUS_NOT_FOUND when IME update isn't found.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4859
The `write_process_memory ` calls are also down from 8 syscalls to 1 and fixes a bug where it should fail on non-writable memory, but still succeeds, because it changes the memory protection to allow them and then changes it back.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4826#note_57730
--
v4: dmime: Semi-support creating an audio path from config.
dmime: IDirectMusicPerformance::CreateAudioPath should fail when config is NULL.
dmime: Parse AudioPathConfig
https://gitlab.winehq.org/wine/wine/-/merge_requests/4852
--
v3: dmime: Semi-support creating an audio path from config.
dmime: IDirectMusicPerformance::CreateAudioPath should fail when config is NULL.
dmime: Parse AudioPathConfig
dmime: AudioPathConfig is not AudioPath.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4852
--
v2: dmime: Semi-support creating an audio path from config.
dmime: IDirectMusicPerformance::CreateAudioPath should fail when config is NULL.
dmime: Parse AudioPathConfig
dmime: AudioPathConfig is not AudioPath.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4852
When League of Legends game released update 13.23 it stopped working in Wine.
Initially we didn't know why it stopped working and due to anti-cheat it was quite difficult to figure out what exactly is happening and so we were just trying to implement random things.
One of the differences when comparing previous version with this version was the addition of something like this to their anti-cheat:
```c
size_t size = 0x100000;
int finalClass = 0xef;
char *buffer = malloc(size * finalClass);
ULONG length;
for (int informationClass=0x00, informationClass < finalClass; informationClass++) {
NtQuerySystemInformation(informationClass, buffer + size * informationClass, size, &length);
}
// later use stuff from there, of course everything's highly obfuscated
```
Essentially this hides what exactly they need since it could be any of classes.
So we started to implement most likely classes that might be used to work like they do in Windows.
This MR contains improvement of `SystemModuleInformationEx` so result will match pretty much exactly how it would on Windows.
I only didn't include more modules but if anyone ever needs that it's very simple to add those.
Also one of the things I noticed is that on Windows even if you give smaller buffer size it will still fill it with data unlike current Wine implementation and this is true for most of classes.
Anyway in the end it turned out not to be issue/needed but I think it still could be useful.
--
v3: ntdll: Improve NtQuerySystemInformation(SystemModuleInformationEx)
https://gitlab.winehq.org/wine/wine/-/merge_requests/4832
Unlike previous vkd3d-utils interfaces, ID3D12ShaderReflection is rather more
large and complex, and will probably end up needing several new individual
scan interfaces from vkd3d-shader, which are themselves not exactly trivial to
design.
Therefore, instead of implementing everything in vkd3d-shader and then hooking
up the vkd3d-utils interfaces on top of that, this patch series copies the
existing implementation of reflection and then begins the process of moving its
implementation to vkd3d-shader.
The primary motivation here is to add reflection crosstests (primarily for the
benefit of the HLSL compiler) without being blocked on API design. Part 2 of
this patch series does this.
--
v2: tests: Test signature reflection via D3DReflect().
tests: Test VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES.
vkd3d-utils: Use vkd3d_shader_scan() to retrieve signature information.
vkd3d-utils: Strip d3dcompiler_ prefix from reflection definitions.
vkd3d-utils: Add D3DReflect().
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/561
Goes atop !537.
--
v5: tests/d3d12: Test multiple clip distance inputs in test_clip_distance().
tests/d3d12: Use 5 clip distances for the multiple test in test_clip_distance().
vkd3d-shader/ir: Transform clip/cull outputs and patch constants into arrays.
vkd3d-shader/ir: Transform clip/cull inputs into an array.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/564
In ntoskrnl.exe, when a PnP device interface is registered, the
interface path casing is retained, with only the hardware ID being upper
case. Thus, this patch looks to align the behaviour between PnP and
rawinput, particularly for games that seem to rely on these two strings
being consistent for hotplug.
This updated behaviour also seems consistent with Windows.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4861
SQL Native Client ODBC driver fails to load if GetProcAddress("NtCompareTokens")
returns NULL, however it never calls it.
Important: Run 'tools/make_specfiles' after applying the patch to update
the syscalls list.
Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4860
Goes atop !537.
--
v4: tests/d3d12: Test multiple clip distance inputs in test_clip_distance().
tests/d3d12: Use 5 clip distances for the multiple test in test_clip_distance().
vkd3d-shader/ir: Transform clip/cull outputs and patch constants into arrays.
vkd3d-shader/ir: Transform clip/cull inputs into an array.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/564
Goes atop !537.
--
v3: tests/d3d12: Test multiple clip distance inputs in test_clip_distance().
tests/d3d12: Use 5 clip distances for the multiple test in test_clip_distance().
vkd3d-shader/ir: Transform clip/cull outputs and patch constants into arrays.
vkd3d-shader/ir: Transform clip/cull inputs into an array.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/564
This reworks `set_native_thread_name()` for macOS to not rely on mach thread ports returned server side (which were potentially colliding cross-process anyways) and re-implements what `pthread_setname_np()` would do on wines side, with additionally allowing setting threadnames cross-process.
On the kernel side `bsd_setthreadname()` is apparently "known to race with regards to the contents of the thread name", so that is only exposed for the thread calling it on itself.
Since the pthread struct is private, the location of the thread name is determined at runtime (although in practice, it is constant (80 bytes) from at least 10.15 up to 14.0).
This has an effect on both `pthread_getname_np()` and the `NSThread` implementation on top a native library would use.
Cross-thread naming is only not visible to external debuggers, which have acquired a mach port right and calling `thread_info()` with `THREAD_EXTENDED_INFO`
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4854
Fix Toad for Oracle F3 find next function not working properly because its WH_KEYBOARD hook gets called too many times.
There is another case that could cause WH_CBT HCBT_CLICKSKIPPED hooks to get called recursively as the tests show. I will send patches for that after the code freeze.
--
v2: user32/tests: Add recursive WM_SETCURSOR message tests.
win32u: Avoid calling WH_CBT HCBT_CLICKSKIPPED hooks recursively.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4711
An alternative approach to `EnumAdapters2` that does not directly call to GDI driver and therefore does not require GDI driver functions to be expanded. The implementation now lives in `sysparams.c` to make it closer to win32u caches it accesses. It still uses `OpenAdapterFromLuid` internally because that's where adapter handles are actually assigned and to make sure returned handles are usable with other functions that rely on GDI driver being aware of what the handle represents to be able to function correctly (like `QueryVideoMemoryInfo`).
See !4791 for some background and why this version might be preferable over the one submitted there.
--
v2: win32u: Implement NtGdiDdDDIEnumAdapters2.
gdi32,win32u: Add stubs for D3DKMTEnumAdapters2 and NtGdiDdDDIEnumAdapters2.
gdi32/tests: Add D3DKMTEnumAdapters2 tests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4857
I had a bugreport here: https://bugs.winehq.org/show_bug.cgi?id=56161
This pull req fixes the bug that programs that do VirtualAlloc(placeholder)/VirtualFree(keep placeholder)/MapViewOfFile3(replace placeholder), do not run. Like the dotnet pe loader in .net 7 for example.
It was not clear to me at first, because i didnt notice it on msdn, but the way that Dmitry Timoshkov "hacked" it in https://bugs.winehq.org/show_bug.cgi?id=56122 is actually (nearly) how it is supposed to happen according to msdn.
From here: https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-… 
So thanks to Dmitry Timoshkov. If you are interested you could also look into the thing i mentioned in the bug report, that MapViewOfFile3 doesn't round down to 64k, but, i don't think this is a serious problem yet.
Edit: I found out that under windows, the alignment constraint is not fully lifted but, it is only required to be pagesize aligned if MEM_REPLACE_PLACEHOLDER is present in the flags.
To clarify why i want this in wine. The PE Loader of .net (see here https://github.com/dotnet/runtime/blob/f21dc6c3dceb6ea76bef73e2a026c770aaed…) does align with page size. Not with 64k. This breaks a .net 7 app during load up, that will execute otherwise just execute fine.
--
v14: kernelbase: Added a test for MapViewOfFile3 with MEM_REPLACE_PLACEHOLDER
https://gitlab.winehq.org/wine/wine/-/merge_requests/4822
I had a bugreport here: https://bugs.winehq.org/show_bug.cgi?id=56161
This pull req fixes the bug that programs that do VirtualAlloc(placeholder)/VirtualFree(keep placeholder)/MapViewOfFile3(replace placeholder), do not run. Like the dotnet pe loader in .net 7 for example.
It was not clear to me at first, because i didnt notice it on msdn, but the way that Dmitry Timoshkov "hacked" it in https://bugs.winehq.org/show_bug.cgi?id=56122 is actually (nearly) how it is supposed to happen according to msdn.
From here: https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-… 
So thanks to Dmitry Timoshkov. If you are interested you could also look into the thing i mentioned in the bug report, that MapViewOfFile3 doesn't round down to 64k, but, i don't think this is a serious problem yet.
Edit: I found out that under windows, the alignment constraint is not fully lifted but, it is only required to be pagesize aligned if MEM_REPLACE_PLACEHOLDER is present in the flags.
To clarify why i want this in wine. The PE Loader of .net (see here https://github.com/dotnet/runtime/blob/f21dc6c3dceb6ea76bef73e2a026c770aaed…) does align with page size. Not with 64k. This breaks a .net 7 app during load up, that will execute otherwise just execute fine.
--
v13: kernelbase: Added a test for MapViewOfFile3 with MEM_REPLACE_PLACEHOLDER
https://gitlab.winehq.org/wine/wine/-/merge_requests/4822
An alternative approach to `EnumAdapters2` that does not directly call to GDI driver and therefore does not require GDI driver functions to be expanded. The implementation now lives in `sysparams.c` to make it closer to win32u caches it accesses. It still uses `OpenAdapterFromLuid` internally because that's where adapter handles are actually assigned and to make sure returned handles are usable with other functions that rely on GDI driver being aware of what the handle represents to be able to function correctly (like `QueryVideoMemoryInfo`).
See !4791 for some background and why this version might be preferable over the one submitted there.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4857
--
v5: vkd3d-shader/tpf: Validate sysvals in index range declarations.
vkd3d-shader: Make the control point count the outer dimension of I/O arrays.
tests: Test punned array access in patch constant functions.
vkd3d-shader/ir: Expand index range write masks to cover all element masks.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/537
--
v9: vkd3d-shader/hlsl: Allow non-numeric types in the ternary operator.
vkd3d-shader/hlsl: Separate an add_ternary() helper.
tests: Add many more tests for ternary expressions.
vkd3d-shader/hlsl: Do not try to lower ternaries of types other than scalar or vector.
vkd3d-shader/hlsl: Remove a redundant definition of the "float" type.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/463
Currently there is `NtContinue()` test only for `aarch64` so implement it for amd64 aswell.
This implementation is very similar to `aarch64` and it's very basic test.
It doesn't change/test `ContextFlags` so it won't catch https://bugs.winehq.org/show_bug.cgi?id=56050 but that can be implemented later on top of this.
--
v9: ntdll/tests: Implement test_continue() for amd64
https://gitlab.winehq.org/wine/wine/-/merge_requests/4720
Implements asin, acos, atan, and atan2.
Also includes some tests in a new test file.
One possible problem here is that I'm not sure how to test what Microsoft's atan and atan2 outputs are in boundary cases like atan2(1, 0). I've made the test suites adhere with the calculator program I've been using (Qalculate, which I assume is using libc's atan2).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55154
--
v7: vkd3d-shader/hlsl: Implement atan and atan2.
vkd3d-shader/hlsl: Implement acos and asin trig intrinsics.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/364
The rest is in MR !531.
--
v2: tests: Mark count buffers as buggy on MoltenVK.
tests: Mark a timestamp query test as buggy on MoltenVK.
tests: Mark clip distance as unsupported on MoltenVK.
tests: Mark cull distance as buggy on MoltenVK.
tests: Skip unbounded descriptor ranges tests when they're unsupported.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/545
Add `PowerWriteACValueIndex` stub.
This is required for an internal application to work
It seems like the status-quo is just leaking the outputs of `debugstr_guid`, so I did that....
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4850
Unlike previous vkd3d-utils interfaces, ID3D12ShaderReflection is rather more
large and complex, and will probably end up needing several new individual
scan interfaces from vkd3d-shader, which are themselves not exactly trivial to
design.
Therefore, instead of implementing everything in vkd3d-shader and then hooking
up the vkd3d-utils interfaces on top of that, this patch series copies the
existing implementation of reflection and then begins the process of moving its
implementation to vkd3d-shader.
The primary motivation here is to add reflection crosstests (primarily for the
benefit of the HLSL compiler) without being blocked on API design. Part 2 of
this patch series does this.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/561
vkd3d-shader/hlsl: Emit fixmes on non-constant vector addressing.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56162
Storing to a vector component using a non-constant index is not allowed
on profiles lower than 6.0. Unless this happens inside a loop that can be
unrolled, which we are not doing yet.
For this reason, a validate_nonconstant_vector_store_derefs pass is
added to detect these cases.
Ideally we would want to emit an hlsl_error on this pass, but before
implementing loop unrolling, we could reach this point on valid HLSL.
Also, as pointed out by Nikolay in the mentioned bug, currently
new_offset_from_path_index() fails an assertion when this happens,
because it expects an hlsl_ir_constant, so a check is added.
It also felt correct to emit an hlsl_fixme there, despite the
redundancy.
--
v2: vkd3d-shader/hlsl: Emit fixmes on non-constant vector addressing.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/558
Recap:
My previous proposals to extend the shader_runner to SM1 were focusing on separating compilation tests ([shader] directives) from execution tests ([test] directives), and let the generic shader_runner.c:compile_shader() in charge of the former.
However, Henri was more inclined to aim for making the parser agnostic to the language of the tests so we can potentially extend the shader_runner tests to other languages such as d3d-asm. This means, removing the burden of compilation from the parser altogether, and moving it to the runners, probably through a runner->compile function pointer (even if most of them end up doing the same thing, compiling with vkd3d-shader or the native compiler, depending on availability).
Agreeing with going in this general direction, this MR contains patches to do SM1 compilation calling run_shader_tests() for SM1 profiles from the Vulkan runner (skipping execution for now), and some improvements to the qualifiers syntax.
Despite this, there are parallel discussions on:
- Whether to name the shader models individually in the [require] directives or expressing the range of shader models where the test should pass. In the latter case, whether to run for all shader models, only the lowest one in the SM1, SM4, and SM6 groups, or to allow the runner to select a shader model within the range (I feel strongly against this now, I think the runner should just retrieve a boolean in runner->check_requirements).
- Where to do the iteration across different shader models, if in run_shader_tests() or expect each runner to call run_shader_tests() several times as we do now.
But there is no need to settle on something for these yet.
---
Now, what may be the most noisy part of this MR is that even though we are calling run_shader_tests() through the Vulkan runner, this will result in calling shader_runner.c:compile_shader() instead of shader_runner_vulkan.c:compile_shader(), but if we follow the "making the parser agnostic" plan, we eventually should get rid of shader_runner.c:compile_shader() and introduce the runner->compile pointer instead.
--
v12: tests: Use the vulkan runner to run SM1 compilation tests.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/514
Recap:
My previous proposals to extend the shader_runner to SM1 were focusing on separating compilation tests ([shader] directives) from execution tests ([test] directives), and let the generic shader_runner.c:compile_shader() in charge of the former.
However, Henri was more inclined to aim for making the parser agnostic to the language of the tests so we can potentially extend the shader_runner tests to other languages such as d3d-asm. This means, removing the burden of compilation from the parser altogether, and moving it to the runners, probably through a runner->compile function pointer (even if most of them end up doing the same thing, compiling with vkd3d-shader or the native compiler, depending on availability).
Agreeing with going in this general direction, this MR contains patches to do SM1 compilation calling run_shader_tests() for SM1 profiles from the Vulkan runner (skipping execution for now), and some improvements to the qualifiers syntax.
Despite this, there are parallel discussions on:
- Whether to name the shader models individually in the [require] directives or expressing the range of shader models where the test should pass. In the latter case, whether to run for all shader models, only the lowest one in the SM1, SM4, and SM6 groups, or to allow the runner to select a shader model within the range (I feel strongly against this now, I think the runner should just retrieve a boolean in runner->check_requirements).
- Where to do the iteration across different shader models, if in run_shader_tests() or expect each runner to call run_shader_tests() several times as we do now.
But there is no need to settle on something for these yet.
---
Now, what may be the most noisy part of this MR is that even though we are calling run_shader_tests() through the Vulkan runner, this will result in calling shader_runner.c:compile_shader() instead of shader_runner_vulkan.c:compile_shader(), but if we follow the "making the parser agnostic" plan, we eventually should get rid of shader_runner.c:compile_shader() and introduce the runner->compile pointer instead.
--
v11: tests: Use the vulkan runner to run SM1 compilation tests.
vkd3d-shader/ir: Lower texkill instructions to discard_nz.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/514
This partially reverts commit 67f2da2a8d1f219f528bf820b3d6002c5f34d5e4 which
broke ccache cache as the job configurations were overriding the default
cache configuration from .wine-build instead of extending it.
It then also updates the ccache cache config to add a key and try to avoid cache
invalidation between jobs with different compilers.
--
v2: gitlab: Add key to the jobs ccache cache config.
gitlab: Use a common configure cache key prefix.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4846
Recap:
My previous proposals to extend the shader_runner to SM1 were focusing on separating compilation tests ([shader] directives) from execution tests ([test] directives), and let the generic shader_runner.c:compile_shader() in charge of the former.
However, Henri was more inclined to aim for making the parser agnostic to the language of the tests so we can potentially extend the shader_runner tests to other languages such as d3d-asm. This means, removing the burden of compilation from the parser altogether, and moving it to the runners, probably through a runner->compile function pointer (even if most of them end up doing the same thing, compiling with vkd3d-shader or the native compiler, depending on availability).
Agreeing with going in this general direction, this MR contains patches to do SM1 compilation calling run_shader_tests() for SM1 profiles from the Vulkan runner (skipping execution for now), and some improvements to the qualifiers syntax.
Despite this, there are parallel discussions on:
- Whether to name the shader models individually in the [require] directives or expressing the range of shader models where the test should pass. In the latter case, whether to run for all shader models, only the lowest one in the SM1, SM4, and SM6 groups, or to allow the runner to select a shader model within the range (I feel strongly against this now, I think the runner should just retrieve a boolean in runner->check_requirements).
- Where to do the iteration across different shader models, if in run_shader_tests() or expect each runner to call run_shader_tests() several times as we do now.
But there is no need to settle on something for these yet.
---
Now, what may be the most noisy part of this MR is that even though we are calling run_shader_tests() through the Vulkan runner, this will result in calling shader_runner.c:compile_shader() instead of shader_runner_vulkan.c:compile_shader(), but if we follow the "making the parser agnostic" plan, we eventually should get rid of shader_runner.c:compile_shader() and introduce the runner->compile pointer instead.
--
v10: tests: Use the vulkan runner to run SM1 compilation tests.
vkd3d-shader/ir: Lower texkill instructions to discard_nz.
vkd3d-shader/d3dbc: Emit fixme for HLSL_RESOURCE_SAMPLE_LOD.
tests/shader-runner: Call each runner only once.
tests/shader-runner: Support reading multiple model range args for qualifiers.
vkd3d-shader: Make *src and *dst mutable in vkd3d_shader_instruction.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/514
--
v8: vkd3d-shader/hlsl: Allow non-numeric types in the ternary operator.
vkd3d-shader/hlsl: Separate an add_ternary() helper.
tests: Add many more tests for ternary expressions.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/463
Implements asin, acos, atan, and atan2.
Also includes some tests in a new test file.
One possible problem here is that I'm not sure how to test what Microsoft's atan and atan2 outputs are in boundary cases like atan2(1, 0). I've made the test suites adhere with the calculator program I've been using (Qalculate, which I assume is using libc's atan2).
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55154
--
v6: vkd3d-shader/hlsl: Implement atan and atan2.
vkd3d-shader/hlsl: Implement acos and asin trig intrinsics.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/364
This partially reverts commit 67f2da2a8d1f219f528bf820b3d6002c5f34d5e4 which
broke ccache cache as the job configurations were overriding the default
cache configuration from .wine-build instead of extending it.
It then also updates the ccache cache config to add a key and try to avoid cache
invalidation between jobs with different compilers.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4846
Fixes the test name passed to winetest.exe which is otherwise split
into a character array when there's a single line in the winetest.args
file, and then causes it to miss the test and always return success.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4847
Other validation stuff I plan to send as soon as !450 and !550 are in.
I guess the CI is going to timeout because of too many commits, so I'll preemptively stop it.
--
v5: vkd3d-shader/ir: Validate PHI instructions.
vkd3d-shader/ir: Validate modifiers and shift for SSA destinations.
vkd3d-shader/ir: Do not allow IMMCONST and IMMCONST64 as destination registers.
vkd3d-shader/ir: Check that all instructions appear in a block.
vkd3d-shader/ir: Validate RET instructions.
vkd3d-shader/ir: Validate SWITCH_MONOLITHIC instructions.
tests: Add a couple of degenerate switch instances.
vkd3d-shader/ir: Validate BRANCH instructions.
vkd3d-shader/ir: Validate LABEL instructions.
vkd3d-shader/ir: Validate LABEL registers.
vkd3d-shader/ir: Validate that structured CF does not appear in block-based shaders.
vkd3d-shader/ir: Check that SSA registers are used validly.
vkd3d-shader/ir: Check that SSA registers have consistent dimensions.
vkd3d-shader/ir: Check that TEMP registers have consistent dimensions.
vkd3d-shader/ir: Use vkd3d_free() instead of free().
vkd3d-shader/ir: Simplify control flow in vsir_validate_register().
tests: Add a test with non-trivial control flow.
[test] Do not check DXBC checksum.
[test] tests: Dump the DXIL code.
vkd3d-shader/dxil: Handle the DXIL SWITCH instruction.
vkd3d-shader/dxil: Handle the DXIL PHI instruction.
vkd3d-shader/dxil: Handle the DXIL BR instruction conditional variant.
vkd3d-shader/dxil: Handle the DXIL BR instruction unconditional variant.
vkd3d-shader/dxil: Introduce a code block terminator struct.
vkd3d-shader/ir: Include an initial label instruction in the first control flow block.
vkd3d-shader/spirv: Do not emit function code before the main prolog.
vkd3d-shader/spirv: Declare indexable temps as Private unless function scope is specified.
vkd3d-shader/ir: Store code block names in struct vkd3d_shader_desc.
vkd3d-shader/ir: Flatten SWITCH/CASE/DEFAULT/ENDSWITCH control flow instructions.
vkd3d-shader/ir: Flatten LOOP/BREAK/CONTINUE/ENDLOOP control flow instructions.
vkd3d-shader/ir: Flatten IF/ELSE/ENDIF control flow instructions.
vkd3d-shader/spirv: Handle RETP in spirv_compiler_handle_instruction().
vkd3d-shader/spirv: Handle DISCARD and TEXKILL in spirv_compiler_handle_instruction().
vkd3d-shader/spirv: Emit descriptor offset loads in the function entry block.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/559
This is the current proton thread priority implementation by @rbernon rebased for upstream with a few `#ifdef`s added since AFAIK Linux is the only operating system where threads have a unique PID which can be used to set niceness on.
~~I also ran `./tools/make_requests` on https://gitlab.winehq.org/mzent/wine/-/commit/6705d3481be0409f7e971c1d2c7a3… as well and `autoconf` on https://gitlab.winehq.org/mzent/wine/-/commit/d7bafe40c411753662b2ad97148a6… (which does blow up the line count a bit).~~
A few tiny changes ~~(with the ready variable for example)~~ are in anticipation for Part 2, which also adds Mach thread priorities and recalculates thread priorities on process priority change.
Since this is a rather large MR, I hope the split here is appropriate ~~(with the second part being slightly smaller)~~, but I think logically it makes the most sense here.
--
v10: server: Check wineserver privileges on init with -20 niceness.
server: Use setpriority to update thread niceness when safe.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4551
Adding flaky_wine to some SetActiveWindow tests and refactor SendInput tests to make them more readable, try to fix some spurious failures and extend them with more tests and non-US layout support.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4842
Description:
When flags does not include DT_CALCRECT, since len is calculated in the middle,
it will be reduced to zero. Resulting in the length of the processed string that
is finally returned to zero and the non-processing string length is unchanged.
But some application taking the non-processing string length to zero as the loop
end condition.
Log:
Signed-off-by: chenjiangyi <chenjiangyi(a)uniontech.com>
Change-Id: Icc0f250f5f4faba1bee8326fc911a4fc9cd7c012
--
v5: user32: Fix the number of characters processed by DrawTextExW.
user32/tests: Add tests for DrawTextExW.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4812
When League of Legends game released update 13.23 it stopped working in Wine.
Initially we didn't know why it stopped working and due to anti-cheat it was quite difficult to figure out what exactly is happening and so we were just trying to implement random things.
One of the differences when comparing previous version with this version was the addition of something like this to their anti-cheat:
```c
size_t size = 0x100000;
int finalClass = 0xef;
char *buffer = malloc(size * finalClass);
ULONG length;
for (int informationClass=0x00, informationClass < finalClass; informationClass++) {
NtQuerySystemInformation(informationClass, buffer + size * informationClass, size, &length);
}
// later use stuff from there, of course everything's highly obfuscated
```
Essentially this hides what exactly they need since it could be any of classes.
So we started to implement most likely classes that might be used to work like they do in Windows.
This MR contains improvement of `SystemModuleInformationEx` so result will match pretty much exactly how it would on Windows.
I only didn't include more modules but if anyone ever needs that it's very simple to add those.
Also one of the things I noticed is that on Windows even if you give smaller buffer size it will still fill it with data unlike current Wine implementation and this is true for most of classes.
Anyway in the end it turned out not to be issue/needed but I think it still could be useful.
--
v2: ntdll: Improve NtQuerySystemInformation(SystemModuleInformationEx)
https://gitlab.winehq.org/wine/wine/-/merge_requests/4832
When League of Legends game released update 13.23 it stopped working in Wine.
Initially we didn't know why it stopped working and due to anti-cheat it was quite difficult to figure out what exactly is happening and so we were just trying to implement random things.
One of the differences when comparing previous version with this version was the addition of something like this to their anti-cheat:
```c
size_t size = 0x100000;
int finalClass = 0xef;
char *buffer = malloc(size * finalClass);
ULONG length;
for (int informationClass=0x00, informationClass < finalClass; informationClass++) {
NtQuerySystemInformation(informationClass, buffer + size * informationClass, size, &length);
}
// later use stuff from there, of course everything's highly obfuscated
```
Essentially this hides what exactly they need since it could be any of classes.
So we started to implement most likely classes that might be used to work like they do in Windows.
This MR contains improvement of `SystemModuleInformationEx` so result will match pretty much exactly how it would on Windows.
I only didn't include more modules but if anyone ever needs that it's very simple to add those.
Also one of the things I noticed is that on Windows even if you give smaller buffer size it will still fill it with data unlike current Wine implementation and this is true for most of classes.
Anyway in the end it turned out not to be issue/needed but I think it still could be useful.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4832
This MR implements `NtContinueEx(PCONTEXT, PCONTINUE_OPTIONS)` which was added in Windows 10 20H1.
Also added basic test reusing existing `test_continue()` (included from !4720)
League of Legends game hooks `NtContinue()` and `NtContinueEx()` by putting `jmp` instruction in front of it.
Note that LoL doesn't actually use `NtContinueEx()` itself and game will work fine without it but if game doesn't find `NtContinueEx()` it will permanently ban your account due to detecting "scripting program"
--
v3: ntdll/tests: Add basic test for NtContinueEx()
ntdll: NtContinueEx() handle few error cases
ntdll: Implement NtContinueEx()
ntdll/tests: Implement test_continue() for amd64
https://gitlab.winehq.org/wine/wine/-/merge_requests/4761
Currently there is `NtContinue()` test only for `aarch64` so implement it for amd64 aswell.
This implementation is very similar to `aarch64` and it's very basic test.
It doesn't change/test `ContextFlags` so it won't catch https://bugs.winehq.org/show_bug.cgi?id=56050 but that can be implemented later on top of this.
--
v8: ntdll/tests: Implement test_continue() for amd64
https://gitlab.winehq.org/wine/wine/-/merge_requests/4720
Currently there is `NtContinue()` test only for `aarch64` so implement it for amd64 aswell.
This implementation is very similar to `aarch64` and it's very basic test.
It doesn't change/test `ContextFlags` so it won't catch https://bugs.winehq.org/show_bug.cgi?id=56050 but that can be implemented later on top of this.
--
v7: ntdll/tests: Implement test_continue() for amd64
https://gitlab.winehq.org/wine/wine/-/merge_requests/4720
This MR implements `EnumSystemFirmwareTables()` and `NtQuerySystemInformation(SystemFirmwareTableInformation)` with `SystemFirmwareTable_Enumerate` which are currently not implemented.
For more context/background info see !4832
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4836
On Sat Jan 13 18:12:01 2024 +0000, Tyson Whitehead wrote:
> Just a note that I have some more changes coming to this
> * set `DIPROP_AUTOCENTER` on at start (currently defaults to off)
> * update the tests
Only had a quick look so far and it looks okay, so feel free to add these too.
Fwiw in general we prefer to add tests first, with todo_wine as needed, and then remove the todo_wine as things are implemented. This better shows the desired behavior which is being implemented.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4830#note_57341
Autocenter is a default effect playing on the device following power up or reset. It is disabled by stopping all effects. On at least some devices (all?) it is a spring effect playing in slot 1. Capturing Windows USB packets reveals it dinput acquire does (1) a reset (this enabled autocenter) and, if autocenter is disabled, (2) a stop all effects (this disabled autocenter).
This logic works regardless of whether autocenter is a spring effect playing in slot 1 or not. It does mean autocenter can only be set when the device is not acquired. Testing on Windows reveals setting autocenter properties while acquired returns DIERR_ACQUIRED even if the device is exclusively acquired, so this is consistent.
--
v2: dinput: implement DIPROP_AUTOCENTER
https://gitlab.winehq.org/wine/wine/-/merge_requests/4830
Autocenter is a default effect playing on the device following power up or reset. It is disabled by stopping all effects. On at least some devices (all?) it is a spring effect playing in slot 1. Capturing Windows USB packets reveals it dinput acquire does (1) a reset (this enabled autocenter) and, if autocenter is disabled, (2) a stop all effects (this disabled autocenter).
This logic works regardless of whether autocenter is a spring effect playing in slot 1 or not. It does mean autocenter can only be set when the device is not acquired. Testing on Windows reveals setting autocenter properties while acquired returns DIERR_ACQUIRED even if the device is exclusively acquired, so this is consistent.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4830
Wayland has 3 types of scrolling events:
- axis. Used for e.g., touchpad 2 finger smooth scrolling
- axis_discrete. Used for mouse scroll wheels (i.e., notches)
- axis_value120. Used for high resolution input devices
Wine currently only supports axis_discrete, meaning that
2 finger scroll events get ignored.
This commit tries to add basic support for axis scrolling events,
by translating the smooth motion in scroll increments using some
primitive assumptions about line height and number of lines to scroll.
--
v10: wip! winewayland.drv: Try to support smooth scroll events
https://gitlab.winehq.org/wine/wine/-/merge_requests/4809
Other validation stuff I plan to send as soon as !450 and !550 are in.
I guess the CI is going to timeout because of too many commits, so I'll preemptively stop it.
--
v4: vkd3d-shader/ir: Validate modifiers and shift for SSA destinations.
vkd3d-shader/ir: Do not allow IMMCONST and IMMCONST64 as destination registers.
vkd3d-shader/ir: Check that all instructions appear in a block.
vkd3d-shader/ir: Validate RET instructions.
vkd3d-shader/ir: Validate SWITCH_MONOLITHIC instructions.
tests: Add a couple of degenerate switch instances.
vkd3d-shader/ir: Validate BRANCH instructions.
vkd3d-shader/ir: Validate LABEL instructions.
vkd3d-shader/ir: Validate LABEL registers.
vkd3d-shader/ir: Validate that structured CF does not appear in block-based shaders.
vkd3d-shader/ir: Check that SSA registers are used validly.
vkd3d-shader/ir: Check that SSA registers have consistent dimensions.
vkd3d-shader/ir: Check that TEMP registers have consistent dimensions.
vkd3d-shader/ir: Use vkd3d_free() instead of free().
vkd3d-shader/ir: Simplify control flow in vsir_validate_register().
vkd3d-shader/dxil: Handle the DXIL SWITCH instruction.
vkd3d-shader/dxil: Handle the DXIL PHI instruction.
vkd3d-shader/dxil: Handle the DXIL BR instruction conditional variant.
vkd3d-shader/dxil: Handle the DXIL BR instruction unconditional variant.
vkd3d-shader/dxil: Introduce a code block terminator struct.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/559