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.
--
v3: vkd3d-shader/ir: Validate modifiers and shift for SSA destinations.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/559
Stream sink such as evr can't be prerolled a second time, and when we are
restarting from a paused state, those stream sink will already be prerolled
so don't preroll them again. Otherwise we will be waiting for Prerolled
events that will never come.
Split from !4545, splitting the fix from the tests because turns out the tests are contentious.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4828
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.
--
v2: vkd3d-shader/ir: Validate modifiers and shift for SSA destinations.
vkd3d-shader/ir: Validate swizzle and modifiers for IMMCONST and IMMCONST64 sources.
vkd3d-shader/ir: Do not allow IMMCONST and IMMCONST64 as destination registers.
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
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
--
v4: user32/tests: Add tests for DrawTextExW.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4812
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.
--
v8: wip! winewayland.drv: Try to support smooth scroll events
https://gitlab.winehq.org/wine/wine/-/merge_requests/4809
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
--
v3: user32/tests: Add tests for DrawTextExW.
user32: Fix the number of characters processed by DrawTextExW.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4812
--
v11: 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.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/491
--
v24: 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.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/450
--
v2: 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.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/550
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 check whether there is a non-constant index on a vector on the
lhs of a load.
Ideally we would want to emit an hlsl_error on this pass, but we before
implementing loop unrolling, we could reach this point on valid HLSL.
Also, as pointed out by @nsivov 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.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/558
Apparently, this wasn't enough to fix it in all WMs. It's simpler to just use the same sequence as normal fullscreen windows and avoid headaches with virtual desktops, and Béla reported it working as well (I couldn't reproduce it, but nothing broke for me, at least).
I know the whole NtUserGetPrimaryMonitorRect thing is wrong and only works for one monitor, but that was already the case before, so I kept it the same since it won't fix a regression and we're in code freeze.
--
v4: winex11: Move the update_desktop_fullscreen callsite to update_net_wm_states.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4823
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v18: vkd3d-shader/tpf: Add initial support for writing fx_4_0/fx_4_1 binaries.
vkd3d-shader: Add separate binary target type for effects.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/443
Here is a preview of my shader cache work for early comments. It isn't complete, but does successfully cache things.
What's there:
* A new vkd3d API that is used internally for caching, can be used to implement the ID3D12ShaderCacheSession interface and hopefully be used by wined3d as well
* Simple saving and loading of the cached objects
* It is used to cache render passes, root signatures and pipeline states
What is not yet there
* Partial cache loading and eviction
* ID3D12ShaderCacheSession - largely because it needs bumping ID3D12Device up to version 9, which may bring unrelated regressions. For this and tests see my "cache-rework" branch (which
* Cache file compression
* Incremental updates of cache files - right now they are rewritten from scratch on exit
* Loading the cache in an extra thread. The pipeline state creation code will need some refactor for that
I am not quite happy yet with the two patches that write and reload actual graphics pipelines. The way I am storing the d3d settings aren't quite consistent yet either - in some cases I use the d3d input data as key directly, in others I store them as values attached to a hash value. The latter is usually the case if I need to cross-reference something, e.g. have a link from the pipeline state to the root signature. This kind of setup shows how wined3d can build a chain of linked state though.
There are also known issues with locking, explained in comments in the patches.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/541
Apparently, this wasn't enough to fix it in all WMs. It's simpler to just use the same sequence as normal fullscreen windows and avoid headaches with virtual desktops, and Béla reported it working as well (I couldn't reproduce it, but nothing broke for me, at least).
I know the whole NtUserGetPrimaryMonitorRect thing is wrong and only works for one monitor, but that was already the case before, so I kept it the same since it won't fix a regression and we're in code freeze.
--
v3: winex11: Move the update_desktop_fullscreen callsite to update_net_wm_states.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4823
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.
--
v9: tests: Use the vulkan runner to run SM1 compilation tests.
vkd3d-shader/ir: Lower texkill`s to discard_nz`s.
vkd3d-shader/d3dbc: Emit fixme for HLSL_RESOURCE_SAMPLE_LOD.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/514
Apparently, this wasn't enough to fix it in all WMs. It's simpler to just use the same sequence as normal fullscreen windows and avoid headaches with virtual desktops, and Béla reported it working as well (I couldn't reproduce it, but nothing broke for me, at least).
I know the whole NtUserGetPrimaryMonitorRect thing is wrong and only works for one monitor, but that was already the case before, so I kept it the same since it won't fix a regression and we're in code freeze.
--
v2: winex11: Move the update_desktop_fullscreen callsite to update_net_wm_states.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4823
Apparently, this wasn't enough to fix it in all WMs. It's simpler to just use the same sequence as normal fullscreen windows and avoid headaches with virtual desktops, and Béla reported it working as well (I couldn't reproduce it, but nothing broke for me, at least).
I know the whole NtUserGetPrimaryMonitorRect thing is wrong and only works for one monitor, but that was already the case before, so I kept it the same since it won't fix a regression and we're in code freeze.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4823
--
v10: 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.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/491
--
v9: 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/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.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/491
--
v22: vkd3d-shader/ir: Include an initial label instruction in the first control flow block.
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.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/450
For all mach vm operations this removes the task suspend and resume, which are not needed.
This uses `mach_vm_read_overwrite` to read into a caller-specified buffer, saving the `mach_vm_deallocate` call (bringing all read operations down to 1 syscall from 4).
The only alignment restriction on `mach_vm_write` according to the original CMU documentation is that data is
> [pointer to page aligned in array of bytes] An array of data to be written.
(In practice it also works with arbitrary addresses on macOS, but it probably doesn't hurt to follow the original specifications here).
The only other reference that these read/writes should be page-aligned is from the GNU Hurd documentation
> The current implementation requires that address, data and data_count all be page-aligned. Otherwise, KERN_INVALID_ARGUMENT is returned.
which I assume was the reason why this was originally done (plus it sounds to me like they will fix that in the future and 4fe19777 already broke GNU Hurd support anyways, if that was supposed to be working).
Also this includes the missing mach part of 5b1f3b14, which was only applied to the ptrace backend, and together with the `write_process_memory` rework, this gets rid of all fixmes in mach.c
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4826
Checking flags of the thread desktop to determine whether virtual desktop is on is unreliable.
For example, CEF applications create their own desktop and so is_virtual_desktop() could incorrectly
report that virtual desktop is off.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55810
--
v3: server: inherit wine internal desktop flags when creating desktops.
include: Rename DF_WINE_CREATE_DESKTOP to DF_WINE_VIRTUAL_DESKTOP.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4786
Jan Sikorski (@jsikorski) commented about dlls/ddraw/surface.c:
> src_impl ? &src_impl->IDirectDrawSurface_iface : NULL, flags);
> }
>
> +/* Emperor: Rise of the Middle Kingdom accesses the map pointer outside of
> + * Lock()/Unlock(), and expects those updates to be propagated by a Blt().
> + * It also blits to the surface, and color-fills it.
> + *
> + * This function is called after a blit or color-fill that might update the GPU
I'm a little confused because the comment says it's called after a blit or color fill, but in `ddraw_surface_blt` it's apparently only called after a color fill, and not after a blit.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4781#note_57154
--
v8: 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/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.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/491
--
v21: vkd3d-shader/ir: Include an initial label instruction in the first control flow block.
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.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/450
This fixes a rendering issue (and ultimately a crash) in PowerPoint when
compiling with GCC 8.
GCC8 doesn't support the `excess-precision=standard` option under the
`#pragma GCC optimize` directive.
This results in unpredictable floating point rounding leading to errors
when inserting segments (with missing edges and/or triangles).
Using 24-bit precision ensures we don't have any excess precision.
--
v3: d2d1: Fix double free bug when d2d_geometry_sink_Close fails
https://gitlab.winehq.org/wine/wine/-/merge_requests/4824
This fixes a rendering issue (and ultimately a crash) in PowerPoint when
compiling with GCC 8.
GCC8 doesn't support the `excess-precision=standard` option under the
`#pragma GCC optimize` directive.
This results in unpredictable floating point rounding leading to errors
when inserting segments (with missing edges and/or triangles).
Using 24-bit precision ensures we don't have any excess precision.
--
v2: d2d1: Use 24-bit FP precision for triangulate.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4824
This fixes a rendering issue (and ultimately a crash) in PowerPoint when
compiling with GCC 8.
GCC8 doesn't support the `excess-precision=standard` option under the
`#pragma GCC optimize` directive.
This results in unpredictable floating point rounding leading to errors
when inserting segments (with missing edges and/or triangles).
Using 24-bit precision ensures we don't have any excess precision.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4824
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 exactly 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.
--
v11: 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 exactly 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.
--
v10: kernelbase: Added a test for MapViewOfFile3 with MEM_REPLACE_PLACEHOLDER
ntdll: Fix: Use pagesize alignment if MEM_REPLACE_PLACEHOLDER is set in flags of NtMapViewOfSection(Ex)
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 exactly 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.
--
v8: 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 exactly 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.
--
v7: 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 exactly 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.
--
v5: kernelbase: Added a test for MapViewOfFile3 with MEM_REPLACE_PLACEHOLDER
https://gitlab.winehq.org/wine/wine/-/merge_requests/4822
At some point I would like to have an assembler for TPF, so that it's easier to write and modify tests. This is a first step in that direction, fixing some kind of format for serializing signatures in the comment at the beginning of the assembler code. I'm not decided yet on all details, so take this as an RFC for the moment.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/553
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 exactly 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.
--
v6: 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 exactly 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.
--
v4: ntdll: Fix: Ignore alignment if MEM_REPLACE_PLACEHOLDER is set in flags
https://gitlab.winehq.org/wine/wine/-/merge_requests/4822
On Wed Jan 10 21:19:15 2024 +0000, Felix Münchhalfen wrote:
> @gofman your suspicion is right. if they are not pagesize aligned it
> fails on windows too. (with ERROR_MAPPED_ALIGNMENT)
I did another update of the code
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4822#note_57096
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 exactly 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.
--
v2: ntdll: Fix: Ignore alignment if MEM_REPLACE_PLACEHOLDER is set in flags
https://gitlab.winehq.org/wine/wine/-/merge_requests/4822
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v17: vkd3d-shader/tpf: Add initial support for writing fx_4_0/fx_4_1 binaries.
vkd3d-shader: Add separate binary target type for effects.
vkd3d-shader/hlsl: Handle effect group statement.
vkd3d-shader/hlsl: Add variables for techniques.
vkd3d-shader/hlsl: Rename rule for top-level techniques.
vkd3d-shader/hlsl: Add 'fxgroup' token.
tests: Add some tests for effects groups syntax.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/443
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
--
v2: user32: Fix the number of characters processed by DrawTextExW.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4812
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 exactly 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.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4822
LANCommander calls NtMapViewOfSectionEx with
alloc_type=MEM_REPLACE_PLACEHOLDER, but you couldn't tell from the
trace.
--
v3: ntdll: Include alloc_type argument in NtMapViewOfSection(Ex) traces.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4788
Avoids conflicts with the dinput tests somehow.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52962
The dinput tests have been using that too for a long while without any known issues. It also makes the tests more robust to interruptions and IME have been able to get back to a working state after a test failed to properly uninstall devices.
(I've tried renaming dinput inf strings and files to something else but for some reason that's not enough and ntoskrnl.exe tests still fail on this call)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4819
When threaded locales are not enabled but an app is using setlocale() concurrently, create_locinfo() may use old locale after free. That happens because the reference is held from thread data, but some functions called from within create_locinfo() can get_locinfo() (->update_thread_locale) and that may result in freeing the old locinfo.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4816
--
v4: 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
--
v3: winex11: Update Virtual Desktop fullscreen WM state after setting window pos.
winex11: Set MWM_FUNC_RESIZE for fullscreen desktop windows.
Revert "winex11: Use the correct root window for virtual desktops."
https://gitlab.winehq.org/wine/wine/-/merge_requests/4810
Capability Geometry allows to use the Layer builtin in geometry shaders.
For vertex shaders ShaderLayer should be used, but it's only available
starting from SPIR-V 1.5. ShaderViewportIndexLayerEXT can be used instead
with extension SPV_EXT_shader_viewport_index_layer.
--
v3: vkd3d-shader/spirv: Use capability ShaderViewportIndexLayerEXT for decoration ViewportIndex.
vkd3d-shader/spirv: Use capability ShaderViewportIndexLayerEXT for decoration Layer.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/546
Capability Geometry allows to use the Layer builtin in geometry shaders.
For vertex shaders ShaderLayer should be used, but it's only available
starting from SPIR-V 1.5. ShaderViewportIndexLayerEXT can be used instead
with extension SPV_EXT_shader_viewport_index_layer.
--
v2: vkd3d-shader/spirv: Enable capability ShaderViewportIndexLayerEXT when needed.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/546
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v16: vkd3d-shader/tpf: Add initial support for writing fx_4_0/fx_4_1 binaries.
vkd3d-shader: Add separate binary target type for effects.
vkd3d-shader/hlsl: Handle effect group statement.
vkd3d-shader/hlsl: Add variables for techniques.
vkd3d-shader/hlsl: Rename rule for top-level techniques.
vkd3d-shader/hlsl: Add 'fxgroup' token.
tests: Add some tests for effects groups syntax.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/443
--
v20: 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.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/450