--
v6: vkd3d-shader/tpf: Add support for writing 'resinfo' instruction.
vkd3d-shader/tpf: Add support for writing 'sampleinfo' instruction.
vkd3d-shader/hlsl: Parse GetDimensions() method.
tests: Add some tests for GetDimensions().
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/218
This introduces temporary helpers block_to_list and list_to_block.
The job of block_to_list(), at least, could be done by simply writing
"&block->instrs" everywhere instead. Using the helper instead ensures that
all of these instances will eventually be converted.
--
v3: vkd3d-shader/hlsl: Store the fields of struct parse_if_body as hlsl_block pointers.
vkd3d-shader/hlsl: Store the "instrs" field of struct parse_initializer as a hlsl_block pointer.
vkd3d-shader/hlsl: Merge the "discard_statement" rule into "jump_statement".
vkd3d-shader/hlsl: Use add_unary_arithmetic_expr() in the subtraction rule.
vkd3d-shader/hlsl: Factor out add_binary_expr_merge().
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/230
--
v6: wineoss: Implement main_loop in unixlib.
winecoreaudio: Implement main_loop in unixlib.
winealsa: Implement main_loop in unixlib.
winepulse: Move main loop logic into mmdevapi.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3027
This MR attempts to bring Wine's handling of `setlocale` and `_create_locale` more in line with the behavior of native >= `msvcr110`. It does this by replacing the usage of the LCID based `GetLocaleInfo` with the sname based `GetLocaleInfoEx`. `GetLocaleInfo` doesn't support neutral locales, even on native, which causes problems with neutral Chinese locales like `zh-Hans` and `zh-Hant`.
It also improves the accuracy of the internal `__lc_locale_name_func`, as tests indicate that it returns `LOCALE_SNAME`s instead of ISO 639 language names.
Potential future improvements:
* Modifying the generation of the `pclmap` and `pcumap` fields of `threadlocaleinfostruct` to work on WCHARs.
* I've done some changes to `__thread_data` which make it not fully match native, I'll submit a follow up which fixes this.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3050
Mainly promoting single object components to variables for SM 5.0's RDEF block and lowering combined samplers to separate sampler+texture objects for SM 4.
Following patches (including prepending uniform copies resource components within struct parameters) in:
https://gitlab.winehq.org/fcasas/vkd3d/-/commits/master6c
--
v3: vkd3d-shader/hlsl: Don't allocate all texture registers for synthetic separated samplers.
vkd3d-shader/hlsl: Lower combined samplers to separate sampler and texture objects for SM4.
vkd3d-shader/hlsl: Separate tracking of sampler_dim and usage for object components.
vkd3d-shader/hlsl: Introduce hlsl_new_synthetic_var_named().
vkd3d-shader/hlsl: Check is_uniform instead of HLSL_STORAGE_UNIFORM when validating object refs.
tests: Add lowering combined samplers tests.
vkd3d-shader/hlsl: Handle resource components individually for SM 5.0.
vkd3d-shader/tpf: Introduce struct extern_resource.
vkd3d-shader/hlsl: Allow derefs to provide the data_type.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/209
This introduces temporary helpers block_to_list and list_to_block.
The job of block_to_list(), at least, could be done by simply writing
"&block->instrs" everywhere instead. Using the helper instead ensures that
all of these instances will eventually be converted.
--
v2: vkd3d-shader/hlsl: Store the fields of struct parse_if_body as hlsl_block pointers.
vkd3d-shader/hlsl: Store the "instrs" field of struct parse_initializer as a hlsl_block pointer.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/230
This introduces temporary helpers block_to_list and list_to_block.
The job of block_to_list(), at least, could be done by simply writing
"&block->instrs" everywhere instead. Using the helper instead ensures that
all of these instances will eventually be converted.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/230
--
v5: wineoss: Implement main_loop in unixlib.
winecoreaudio: Implement main_loop in unixlib.
winealsa: Implement main_loop in unixlib.
winepulse: Move main loop logic into mmdevapi.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3027
--
v5: uiautomationcore: Unconditionally match all events registered on the desktop node with a scope of subtree.
uiautomationcore: Implement UiaRaiseAutomationEvent.
uiautomationcore: Add support for cloning UiaCondition structures.
uiautomationcore: Clone UiaCacheRequest structure passed to UiaAddEvent.
uiautomationcore: Store all events in an event list.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2988
The goal of this MR is to set up the minimum necessary infrastructure to display the contents of some simple, software rendered windows. This involves two major steps:
1. Associate a window with a Wayland surface and give it the `xdg_toplevel` role, so that the compositor can display it. We also have to implement the required initial `xdg_surface` configuration sequence to be able to safely (i.e., without the compositor disconnecting us with an error) attach buffers to the surface in step (2).
2. Implement the `window_surface` interface for the Wayland driver. For now we provide a simple (and suboptimal) `window_surface_flush` implementation: for each flush we create a new `wl_shm` buffer, copy the whole window contents (ignoring damaged bounds for now) into it and attach it to the target Wayland surface. In the next MR I will optimize this implementation in multiple ways: a. implement a buffer queue to avoid constantly allocating new buffers b. respect the damaged bounds of the `window_surface` to minimize copying of data from the `window_surface` to the SHM buffer (and also for correctness) c. communicate damaged surface regions to the compositor to (potentially) allow more efficient texture uploads.
With this MR many (software-rendered) applications can now display dynamic content on screen. We can't interact with the apps yet, but we do get to enjoy `notepad` in all its blinking-cursor glory.
Thanks!
--
v3: winewayland.drv: Implement a simple window_surface flush.
winewayland.drv: Introduce window_surface for Wayland.
winewayland.drv: Ensure Wayland surface handlers don't access invalid data.
winewayland.drv: Basic Wayland toplevel surface support.
winewayland.drv: Introduce per-window driver data.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2944
Some of these fixes are subtle (like the first patch) and very annoying to debug. Although the first patch looks like a hack, surprisingly, it's how the spec itself says it is! It's not even an IE quirk, but a special case in the spec.
For example, the variable name (which holds the builtin eval func) **does** matter: if it's called something other than 'eval', it gets treated differently (as if indirect), and this is verified by the tests + the spec's wording (so Microsoft's implementation follows it).
Most of the patches other than the first 2 are pretty small so they're in same MR.
--
v4: jscript: Store ref to the function code instead of the function instance
jscript: Start from the last argument when adding them to named locals.
jscript: Always store the passed arguments into the argument obj, if not
jscript: Don't use iface_to_jsdisp where it's not necessary to grab it.
jscript: Get rid of jsobj in scope_chain_t.
jscript: Move arguments_obj from the frame to the base scope.
jscript: Fix addressing invalid memory if ref is an argument.
jscript: Correctly implement context for indirect eval calls in ES5+ modes.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2942
--
v3: uiautomationcore: Unconditionally match all events registered on the desktop node with a scope of subtree.
uiautomationcore: Implement UiaRaiseAutomationEvent.
uiautomationcore: Add support for cloning UiaCondition structures.
uiautomationcore: Clone UiaCacheRequest structure passed to UiaAddEvent.
uiautomationcore: Store all events in an event list.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2988
--
v2: uiautomationcore: Unconditionally match all events registered on the desktop node with a scope of subtree.
uiautomationcore: Implement UiaRaiseAutomationEvent.
uiautomationcore: Add support for cloning UiaCondition structures.
uiautomationcore: Clone UiaCacheRequest structure passed to UiaAddEvent.
uiautomationcore: Store all events in an event list.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2988
This only affects clip and cull distances. The HLSL compiler emits these using
dcl_input, but the previous shader (vertex or TES) will write them as a SPIRV
builtin, and hence we want to read this as a SPIRV builtin as well.
This fixes validation errors in Wine's test_clip_distance().
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/231
As per title, the size columns in My Computer are not showing correct values.
MR changes them as follows:

The D: to H: here are card adapter drives and DVD drive. Turns out they shouldn't show any size at all, and were probably showing whatever uninitialized memory was in `ULARGE_INTEGER`.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3046
This allows access to the in-process cached monitor list and reduces the number of registry calls issued for QueryDisplayConfig (in case of no change) from `4 x monitors` to `1`.
--
v7: win32u: Cleanup naming and log messages for QueryDisplayConfig.
win32u: Move QueryDisplayConfig from user32.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2957
On Sun Jun 11 02:48:44 2023 +0000, Fabian Maurer wrote:
> There is exception handling:
> ```
> #include "wine/exception.h"
> __TRY
> {
> }
> __EXCEPT_PAGE_FAULT
> {
> }
> __ENDTRY
> ```
> Though maybe there is a reason that is not used in tests, maybe one of
> the devs can chime in.
It needs compiler support. I don't think you will be able to write a test for this easily, manually checking that it actually crashes on Windows is enough.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3030#note_35373
This allows access to the in-process cached monitor list and reduces the number of registry calls issued for QueryDisplayConfig (in case of no change) from `4 x monitors` to `1`.
--
v4: win32u: Cleanup naming and log messages for QueryDisplayConfig.
win32u: Move QueryDisplayConfig from user32.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2957
On Sun Jun 11 02:34:19 2023 +0000, Etaash Mathamsetty wrote:
> If I added the test, it would just crash the test program. In other
> tests they simply just add a win_skip in these cases, but then there's
> no point in having a test in my opinion, since it's just going to get skipped.
> Not sure what to do about RtlReAllocateHeap unfortunately.
There is exception handling:
```
#include "wine/exception.h"
__TRY
{
}
__EXCEPT_PAGE_FAULT
{
}
__ENDTRY
```
Though maybe there is a reason that is not used in tests, maybe one of the devs can chime in.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3030#note_35348
On Sun Jun 11 02:32:59 2023 +0000, Fabian Maurer wrote:
> FWIW, there seems to be a difference between 32bit and 64bit Growtopia.
> 32bit Growtopia launches normally, while 64bit crashes without the fix.
> Btw, what about RtlReAllocateHeap? Should that behavior be consistent? I
> don't know what the Wine consensus is.
> Also, since it's pretty counter intuitive, would you mind adding tests?
> Just a suggestions from a random contributor, though. :smile:
If I added the test, it would just crash the test program. In other tests they simply just add a win_skip in these cases, but then there's no point in having a test in my opinion, since it's just going to get skipped.
Not sure what to do about RtlReAllocateHeap
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3030#note_35347
Redo of !1857, as suggested, the plan is to split original MR in half, breadcrumbs in first (this) MR, and address edit in another.
The changes are mostly cleanup (formatting, renaming, unused variables, missing free).
Part two branch can be found [here](https://gitlab.winehq.org/vt/wine/-/commits/fd-navbar-part2).
Visually, it hasn't changed:

Requires !2068, otherwise if application doesn't request comctl v6 (e.g. qapitrace), navigation bar will look like this:

Closes:
- https://bugs.winehq.org/show_bug.cgi?id=29912
- https://bugs.winehq.org/show_bug.cgi?id=54812
- https://bugs.winehq.org/show_bug.cgi?id=50338 (partially? fully with address edit?)
--
v2: comdlg32: Prevent arrow navigation of IFileDialog navigation bar buttons.
comdlg32: Don't paint focus rect in IFileDialog navigation bar buttons.
comdlg32: Keep IExplorerBrowser in IFileDialog focused after Backspace.
comdlg32: Add breadcrumb overflow menu to IFileDialog navigation bar.
comdlg32: Add inner border to breadcrumbs in IFileDialog navigation bar.
comdlg32: Always show at least 2 crumbs in IFileDialog navigation bar.
comdlg32: Reuse address breadcrumbs in IFileDialog navigation bar.
comdlg32: Add address breadcrumbs to IFileDialog navigation bar.
comdlg32: Add go up button to IFileDialog navigation bar.
comdlg32: Add IFileDialog navigation bar control.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2993
FWIW, there seems to be a difference between 32bit and 64bit Growtopia. 32bit Growtopia launches normally, while 64bit crashes without the fix.
Btw, what about RtlReAllocateHeap? Should that behavior be consistent? I don't know what the Wine consensus is.
Also, since it's pretty counter intuitive, would you mind adding tests? Just a suggestions from a random contributor, though. :smile:
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3030#note_35326
On Fri Jun 9 11:59:33 2023 +0000, Huw Davies wrote:
> There's a lot of new things going on here and in subsequent commits.
> They need to be split like you've just done for the main_loop bits.
> It may be better to reduce the scope of this MR to just the main_loop stuff.
Agreed, `Initialize()` carries a lot of stuff with it and as a result the changes lines are way too many.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3027#note_35279
> (and in the next commit)
I'm wondering why the OSS failure was not reported, are we not testing for *BSD on CI?
> But also there seem to be a lot of small pointless differences (mainly in whitespace) between the new implementations in the non-pulse drivers and the existing one in the pulse driver. That means the merge commits have unnecessary changes.
Right, the non-pulse drivers also have a different code style (e.g. opening bracket attached to `if`) I would like to adhere to, for consistency.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3027#note_35278
--
v3: vkd3d: Append CopyTileMappings() commands to the command queue op array.
vkd3d: Append UpdateTileMappings() commands to the command queue op array.
vkd3d: Add missing const attributes to ID3D12CommandQueue::UpdateTileMappings() parameters.
vkd3d: Validate plane count for tiled textures.
vkd3d: Validate tiled resources tier for 3D textures.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/216
Huw Davies (@huw) commented about dlls/mmdevapi/client.c:
> extern void sessions_unlock(void) DECLSPEC_HIDDEN;
>
> +extern HRESULT get_audio_session(const GUID *sessionguid, IMMDevice *device, UINT channels,
> + struct audio_session **out) DECLSPEC_HIDDEN;
> extern struct audio_session_wrapper *session_wrapper_create(struct audio_client *client) DECLSPEC_HIDDEN;
>
> +static HANDLE main_loop_thread;
> +
> +void stop_main_loop(void)
> +{
> + if (main_loop_thread) {
> + WaitForSingleObject(main_loop_thread, INFINITE);
> + CloseHandle(main_loop_thread);
> + }
> +}
> +
There's a lot of new things going on here and in subsequent commits. They need to be split like you've just done for the main_loop bits.
It may be better to reduce the scope of this MR to just the main_loop stuff.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3027#note_35263
Huw Davies (@huw) commented about dlls/winecoreaudio.drv/mmdevdrv.c:
> +
> DeleteCriticalSection(&g_sessions_lock);
> break;
> }
> return TRUE;
> }
>
> +static DWORD CALLBACK main_loop_func(void *event)
> +{
> + struct main_loop_params params;
> +
> + SetThreadDescription(GetCurrentThread(), L"coreaudio_main");
> +
> + params.event = event;
> +
> + ALSA_CALL(main_loop, ¶ms);
```suggestion:-0+0
UNIX_CALL(main_loop, ¶ms);
```
(and in the next commit)
But also there seem to be a lot of small pointless differences (mainly in whitespace) between the new implementations in the non-pulse drivers and the existing one in the pulse driver. That means the merge commits have unnecessary changes.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3027#note_35262
This is to prevent NULL pointers when creating a TextService with no rows in it.
This NULL pointers doesn't happen when creating a richedit windows, because
it sets an empty text when the richedit window procedure handles the WM_CREATE event.
--
v8: riched20: Call ME_UpdateRepaint instead of editor_ensure_visible in set_selection.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2941
[5/5] is actually not relevant to this serial, but my next serial will depend on it, so I submit it by the way first, so that I can avoid maintaining too many patches locally. :D
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3028
nCharOfs is the key for paragraphs added to the marked tree
If it is updated, re-add the entry to update its position
--
v2: riched20: Update paragraph position in marked tree.
https://gitlab.winehq.org/wine/wine/-/merge_requests/3020
This is to prevent NULL pointers when creating a TextService with no rows in it.
This NULL pointers doesn't happen when creating a richedit windows, because
it sets an empty text when the richedit window procedure handles the WM_CREATE event.
--
v7: riched20: Call ME_UpdateRepaint instead of editor_ensure_visible in set_selection.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2941
First we set the EOS state, so the wait_parser_stream_buffer function doesn't
call pthread_cond_wait again. Then we must call pthread_cond_signal to make sure
that no one is waiting for it, if we don't do that, there is the possibility of
hanging wg_parser_disconnect at the free_stream call, because pthread_cond_destroy
will hang when the cond object is being waited by other threads.
Specifically this helps to fix a hang in some applications, specially Unreal Engine
games when changing sources too fast in a MediaPlayer.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2887
This is to prevent NULL pointers when creating a TextService with no rows in it.
This NULL pointers doesn't happen when creating a richedit windows, because
it sets an empty text when the richedit window procedure handles the WM_CREATE event.
--
v6: riched20: Call ME_UpdateRepaint instead of editor_ensure_visible in set_selection.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2941
--
v7: vkd3d-shader/hlsl: Handle 'texkill' jump type.
vkd3d-shader/hlsl: Parse clip() function.
tests: Add some tests for clip().
vkd3d-shader: Make some helpers available from hlsl.c.
vkd3d-shader/hlsl: Add a parameter for jump nodes and use it for 'discard'.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/211
On Thu Jun 8 10:13:38 2023 +0000, Huw Davies wrote:
> Yes. See the existing tests in `dlls/riched20/tests/txtsrv.c`. We
> don't currently do much testing on which `ITextHost` members get called,
> but at least there's already an implementation there to get you started.
From what I see when reading the trace calls with `WINETEST_DEBUG` set, windows calls two times TxViewChange, I suppose the first time it's called by the SetText call, and then the second one is called by EM_SETSEL, in wine we don't call it. There are also other functions from the TextHost that get called and we don't do it in wine, so I'm going to write tests for it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2941#note_35179