Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v4: programs/vkd3d-compiler: Dynamically allocate options array.
vkd3d-shader/tpf: Convert some of the semantic names to system values names when in compatibility mode.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/381
I've fixed the `beforeunload` case, since it happens during `load_nsuri`. I added tests for both it and `unload`, but unfortunately the new tests are somewhat hackish, as we have to release the View without actually closing it to test this, because closing the view sends those events (this is already tested by existing tests), and we want to test if releasing the doc obj sends those events. As for why we have to release the View, it's because it holds a ref to the doc obj.
So I placed the test last now since it doesn't close the view properly. If you think the test is too hackish I can remove it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4109
Don't use hard coded string indexes as one of the expected string
can be absent, hence decreasing its index; nothing ensures that the
strings are placed in the order of the fields in the smbios structure.
So use, smbios structures' indexes instead.
Wbemprox was also expecting one string too much.
Signed-off-by: Eric Pouech <epouech(a)codeweavers.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4107
--
v2: user32: Pass real argument to NtUserGetClassName in RealGetWindowClass.
win32u: Add support for retrieving real window class ID across processes.
user32: Set real window class ID for user32 standard controls.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4092
On Sat Oct 14 22:06:36 2023 +0000, Bartosz Kosiorek wrote:
> With previous implementation we have 2*4 float multiplication inside
> `GdipTransformMatrixPoints` function:
> ```
> pts[i].X = x * matrix->matrix[0] + y * matrix->matrix[2] + matrix->matrix[4];
> pts[i].Y = x * matrix->matrix[1] + y * matrix->matrix[3] + matrix->matrix[5];
> ```
> Here is the full source code:
> ```
> GpStatus WINGDIPAPI GdipTransformMatrixPoints(GpMatrix *matrix, GpPointF *pts,
> INT count)
> {
> REAL x, y;
> INT i;
> TRACE("(%s, %p, %d)\n", debugstr_matrix(matrix), pts, count);
> if(!matrix || !pts || count <= 0)
> return InvalidParameter;
> for(i = 0; i < count; i++)
> {
> x = pts[i].X;
> y = pts[i].Y;
> pts[i].X = x * matrix->matrix[0] + y * matrix->matrix[2] + matrix->matrix[4];
> pts[i].Y = x * matrix->matrix[1] + y * matrix->matrix[3] + matrix->matrix[5];
> }
> return Ok;
> }
> ```
> As the vector is (0,0) and (1, 1), we could replace invocation of this
> function by simple assigment (no need to multiple anything):
> ```
> scale_x = graphics->worldtrans.matrix[0] + graphics->worldtrans.matrix[2];
> scale_y = graphics->worldtrans.matrix[1] + graphics->worldtrans.matrix[3];
> ```
> We could also optimize it more and calculate width via `sqrt` only once
> (I would like to leave it for next MR).
This seems simple enough that I have no problem changing it without performance numbers. Note that we immediately turn around and do the same thing with graphics->gdi_transform (with some indirection through gdip_transform_points and get_graphics_transform that could be eliminated).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3971#note_48812
Goes atop MR 403 and 388. The last four commits belong to this MR.
--
v7: vkd3d-shader: Clone descriptor scan info from struct vkd3d_shader_desc.
vkd3d-shader/dxil: Read CBV descriptors.
vkd3d-shader/dxil: Validate the descriptor list metadata nodes.
vkd3d-shader/spirv: Align constant buffer sizes to 16 bytes.
vkd3d-shader/dxil: Read DXIL compute shader thread group dimensions.
vkd3d-shader/dxil: Read DXIL global flags.
vkd3d-shader: Define more global flags.
vkd3d-shader/dxil: Handle multi-row signature elements.
vkd3d-shader/dxil: Handle signature element additional tag/value pairs.
vkd3d-shader/dxil: Read the DXIL input and output signatures.
vkd3d-shader/dxil: Validate the entry point info.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/401
The PE build uses FlsAlloc(), which for our purposes makes no difference vs TlsAlloc(), and allows the use of a destruction callback.
--
v5: vkd3d: Replace the descriptor object cache with a thread-local implementation.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/384
This is in view of eventually running the vkd3d cross tests in the CI. With this MR d3d12 passes all the tests ([see a test pipeline](https://gitlab.winehq.org/giomasce/vkd3d/-/jobs/32587)), but some shader runner tests are still failing.
I haven't investigated in detail all these issues. Also, it is known that WARP doesn't emulate faithfully a hardware device. The idea is that having the CI able to quickly check most (even if not all) our tests on native is still better than nothing.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/406
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v15: vkd3d-shader/tpf: Write out 'switch' statements.
vkd3d-shader/hlsl: Add a pass to validate switch cases blocks.
vkd3d-shader/hlsl: Add a pass to remove unreachable code.
vkd3d-shader/hlsl: Add copy propagation logic for switches.
vkd3d-shader/hlsl: Validate break/continue context.
vkd3d-shader/hlsl: Check for duplicate case statements.
vkd3d-shader/hlsl: Add initial support for parsing 'switch' statements.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/361
--
v2: advapi32: Implement GetSecurityInfo(SE_WINDOW_OBJECT).
user32/tests: Add basic tests for GetUserObjectSecurity().
advapi32: Respect object type in SetSecurityInfo().
advapi32: Respect object type in GetSecurityInfo().
advapi32/tests: Add more tests for GetSecurityInfo().
https://gitlab.winehq.org/wine/wine/-/merge_requests/4105
@afrantzis Can't seem to be possible to add you as a reviewer, probably you need to request "Access" to the wine/wine project (near the top of the project page).
What do you think of something like that? It is very different from the current winex11 code, but I believe it will match keyboard layouts in a much more accurate way, and it's also IMO much simpler. If that works well with Wayland, I think it could be a good hint that it might work as well in X11 and make a case for my other MR to use that approach there.
I was a bit annoyed that it doesn't seem possible to retrieve the Xkb "layout:variant" string here, but only the layout description, so I had to use xkbregistry to match it back to the known layouts.
It is mostly only there to provide a more accurate HKL value (which should match the layout langid), and scan to vk mapping table, and custom layouts should still work. The lang would be neutral then, and the scan to vk table is QWERTY by default, which is the most common case, and doesn't enforce any vkey -> unicode mapping anyway. So, if the xkbregistry dependency is an issue we could probably make it optional and dynamically loaded, and skip the langid and scan to vk specialized mappings.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4102
Rainbow 6 Siege and some other games require this. Type is printed in the FIXME to determine which type the application requires.
--
v2: gdi32: Add stub for D3DKMTQueryAdapterInfo.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3777
Bug 53017 causes test failures here because it leaves the display at 720x400 resolution. Since this already causes a test failure earlier, and having a very small resolution isn't technically "broken", I figure it makes sense to adjust the test to account for this situation.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4100
--
v2: uiautomationcore: Add support for translating EVENT_OBJECT_FOCUS for native MSAA IAccessibles.
uiautomationcore: Potentially raise focus event on the currently focused serverside provider in response to EVENT_OBJECT_FOCUS.
uiautomationcore: Potentially raise focus event for serverside providers in response to EVENT_OBJECT_FOCUS.
uiautomationcore/tests: Add tests for COM API EVENT_OBJECT_FOCUS translation.
uiautomationcore: Release node lresult upon failure to allocate a node in uia_node_from_lresult().
https://gitlab.winehq.org/wine/wine/-/merge_requests/4077
Whenever an app switches stack using its own code, we are left with stale frame handlers (which, on x64, is Wine workaround for missing compiler support for SEH handling). This is one of the two most common places breaking the apps as here frame handler is created for every thread and stays there (unlike most of other __TRY usages which are narrow scoped to Wine code without calling apps code callbacks). The only other place nearly as common is exception unwinding (where frame handlers are left whenever an app sets context on its own without calling RtlRestoreContext, like .Net core does). So I hope for these two cases having manual wrappers with proper .seh handling is justified.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4094
Check that NULL has no special meaning.
Check GetLastError() for systray windows.
Trace the module filename in case of unexpected success and enclose it
in quotes in case there are leading or trailing spaces.
Fix the filename buffer initialization.
---
The buf2[0] = 0 line at the top of the patch was introduced in
914cb228685b but buf2 was not used after that. So clearly it is buf1
that should have been initialized there.
That said I'm not sure initializing buf1 & buf2 is really necessary as
they are only used in case of success. I guess the fear was that
GetWindowModuleFileName() would sometimes return success without
touching the buffer but I'm not convinced that fear is justified. Still
I decided to be conservative and preserve the initializations. I'm fine
with removing them though (maybe the buf2 case is a bit special).
Finally this is meant to help figure out the reason for the failure
decribed in bug 55777.
--
v2: user32/tests: Don't test GetWindowModuleFileName() on windows belonging to another process.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4084
This MR improves window management related behavior and adds support for more scenarios.
Some highlights (please see the full commit list and messages for more info):
1. Better support for tiled states.
2. Detect and handle fullscreen windows.
3. Increased robustness against state disagreements between Wine and the Wayland compositor.
4. Move top-level windows to (0,0) (using that fixed point for now, we will later generalize this mechanism for multiple monitors), in order to:
a. maximize the accessible mouse input region (which may be clipped in Windows virtual screen space, but still accessible in Wayland space).
b. introduce the basic mechanism to allow windows applications to (very roughly!) track which output(s) they are really on (to be continued in the full multi-monitor form).
Although (4) is not a perfect solution for the lack of absolute positioning, it has worked well in practice in its full, multi-monitor implementation (i.e., in the experimental branch). I wonder if for (4a) in particular we can do better, e.g., by being able to emit input that circumvents the normal virtual screen clipping. Is there a way to do this already? If not, do you think that such an approach would be a feasible and acceptable way forward, or is virtual screen input clipping fundamentally baked in the current core design and assumptions?
Thanks!
--
v4: winewayland.drv: Avoid resizing fullscreen windows.
winewayland.drv: Rename wayland_surface_configure_is_compatible for consistency.
winewayland.drv: Use surface geometry to satisfy state size constraints.
winewayland.drv: Handle application-initiated fullscreen state.
winewayland.drv: Store and use the latest window config for a wayland_surface.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4014
I.e., top-left origin, and clockwise front-facing. These end up cancelling
each other out when drawing full-screen quads, but that's not necessarily true
for other geometry.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/404
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v14: vkd3d-shader/tpf: Write out 'switch' statements.
vkd3d-shader/hlsl: Add a pass to validate switch cases blocks.
vkd3d-shader/hlsl: Add a pass to remove unreachable code.
vkd3d-shader/hlsl: Add copy propagation logic for switches.
vkd3d-shader/hlsl: Validate break/continue context.
vkd3d-shader/hlsl: Check for duplicate case statements.
vkd3d-shader/hlsl: Add initial support for parsing 'switch' statements.
tests: Add some tests for the 'switch' statements.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/361
This MR improves window management related behavior and adds support for more scenarios.
Some highlights (please see the full commit list and messages for more info):
1. Better support for tiled states.
2. Detect and handle fullscreen windows.
3. Increased robustness against state disagreements between Wine and the Wayland compositor.
4. Move top-level windows to (0,0) (using that fixed point for now, we will later generalize this mechanism for multiple monitors), in order to:
a. maximize the accessible mouse input region (which may be clipped in Windows virtual screen space, but still accessible in Wayland space).
b. introduce the basic mechanism to allow windows applications to (very roughly!) track which output(s) they are really on (to be continued in the full multi-monitor form).
Although (4) is not a perfect solution for the lack of absolute positioning, it has worked well in practice in its full, multi-monitor implementation (i.e., in the experimental branch). I wonder if for (4a) in particular we can do better, e.g., by being able to emit input that circumvents the normal virtual screen clipping. Is there a way to do this already? If not, do you think that such an approach would be a feasible and acceptable way forward, or is virtual screen input clipping fundamentally baked in the current core design and assumptions?
Thanks!
--
v3: winewayland.drv: Avoid resizing fullscreen windows.
winewayland.drv: Rename wayland_surface_configure_is_compatible for consistency.
winewayland.drv: Use surface geometry to satisfy state size constraints.
winewayland.drv: Handle application-initiated fullscreen state.
winewayland.drv: Store and use the latest window config for a wayland_surface.
winewayland.drv: Explicitly set the visible window rectangle.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4014
The PE build uses FlsAlloc(), which for our purposes makes no difference vs TlsAlloc(), and allows the use of a destruction callback.
--
v4: vkd3d: Replace the descriptor object cache with a thread-local implementation.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/384
Since `self.cursorFrames` is a copy property, its pointer value will only equal `frames` when both are nil. Also return early from the function if the array contents are equivalent.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4087
> So I copied and modified a version-check from dlls/schedsvc/rpcapi.c to skip the tests on early winversions. There are still test failures but they seem to happen in ShouldSystemUseDarkMode.
That looks reasonable.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4043#note_48599
We have a number of debugstr_an(..., 4) used for the same purpose in different modules. It will give different output if replaced with fourcc helper, because of isprint(), but still might be worth considering.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3994#note_48597
First part of the continuation of the implementation of non-constant offset dereferences (a.k.a. relative addressing) for SM4, now that we use vsir registers in tpf.c.
As a quick recap: while parsing HLSL we are expressing derefs as paths, and then we are lowering these paths into a single offset node (which is closer to the bytecode) using the replace_deref_path_with_offset() pass, right before register allocation.
This first part of the series splits this offset node into 2 parts:
- A constant uint, which will be called hlsl_deref.offset_const.
- A non-hlsl_ir_constant offset node that will only be present when we need relative addressing, that we will end up calling hlsl_deref.offset_rel.
Both these fields will be analog to the ones used in vsir register indexes, vkd3d_shader_register_index.rel_addr and vkd3d_shader_register_index.offset respectively, which is something we need for the second part of this series.
The following patches are in my [nonconst-offsets-8](https://gitlab.winehq.org/fcasas/vkd3d/-/commits/noncon… branch, if something is not clear in this series, it may be worth skimming through them.
Supersedes !229.
--
v2: vkd3d-shader/tpf: Declare indexable temps.
vkd3d-shader/hlsl: Mark vars that require non-constant dereferences.
vkd3d-shader/hlsl: Rename hlsl_deref.offset to hlsl_deref.rel_offset.
vkd3d-shader/hlsl: Absorb hlsl_ir_constant deref offsets into const_offset.
vkd3d-shader/hlsl: Express deref->offset in whole registers.
vkd3d-shader/hlsl: Split deref-offset into a node and a constant uint.
vkd3d-shader/hlsl: Introduce hlsl_deref_is_lowered() helper.
vkd3d-shader/hlsl: Clean-up instruction block for offset node creation.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/396
Some fixes to valid clangd warnings, since I am using it as linter.
Also, I am removing enum hlsl_error_level on 4/6, since it doesn't seem to be meant to be used anywhere after 3/6.
--
v3: vkd3d-shader/d3dbc: Use D3DSIO_TEXKILL instead of VKD3D_SM1_OP_TEXKILL (clangd).
vkd3d-shader/hlsl: Remove enum hlsl_error_level (clangd).
vkd3d-shader/tpf: Avoid translations to D3DDECLUSAGE and back (clangd).
vkd3d-shader: Remove unnecessary fallthroughs (clangd).
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/402
The problem with implementing mspatchc for me, is that then tests must be written for that as well :sweat:
Additionally it seems like a bad idea to implement an entire module just to generate data for tests for another module.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870#note_48550
Check that NULL has no special meaning.
Check GetLastError() for systray windows.
Trace the module filename in case of unexpected success and enclose it
in quotes in case there are leading or trailing spaces.
Fix the filename buffer initialization.
---
The buf2[0] = 0 line at the top of the patch was introduced in
914cb228685b but buf2 was not used after that. So clearly it is buf1
that should have been initialized there.
That said I'm not sure initializing buf1 & buf2 is really necessary as
they are only used in case of success. I guess the fear was that
GetWindowModuleFileName() would sometimes return success without
touching the buffer but I'm not convinced that fear is justified. Still
I decided to be conservative and preserve the initializations. I'm fine
with removing them though (maybe the buf2 case is a bit special).
Finally this is meant to help figure out the reason for the failure
decribed in bug 55777.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4084
- Make it present some frames
- Make it check that the frames are from the new device, instead of checking TerminateDevice count; fixes https://bugs.winehq.org/show_bug.cgi?id=55649
- ~~Make it check for and avoid some absurd crash on Windows~~
~~I tried everything I could think of, but Windows absolutely refuses to present a frame after changing the D3D device, instead choosing to return various absurd errors (segfaults, deadlocks, out of memory, etc). I suspect the VMR9 is haunted.~~
edit: Works on Windows now
--
v4: quartz/tests: Improve VMR9 ChangeD3DDevice test.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3970
Looks like I no longer have the code I used to make test data, but because it generated the minimum amount required to test the features implemented at the time, I think it would not be much help with PE files. Yes, implementing mspatchc may allow proper testing, and it wouldn't need to have especially fast or high-ratio compression, but even then it's not trivial to do. I have my hands full at the moment, but I may look at doing this later if nobody else has.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3870#note_48536
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
v12: vkd3d-shader/tpf: Write out 'switch' statements.
vkd3d-shader/hlsl: Add a pass to validate switch cases blocks.
vkd3d-shader/hlsl: Add a pass to remove unreachable code.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/361