A message context in the normaliser will also be needed for the next normalisation patch set.
--
v2: vkd3d-shader/ir: Emit a shader error if the control point phase id cannot be inserted.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/170
--
v6: winex11: Use EM_REPLACESEL to set IME composition strings.
include: Add some immdev.h definitions.
winex11: Always zero terminate XIM composition string.
winex11: Compute preedit text buffer sizes in WCHAR units.
winex11: Use an IME UI message to set composition status.
imm32: Only send GCS_CURSORPOS when cursor position changes.
winex11: Use an IME UI message to set cursor pos.
winex11: Use an IME UI message to get cursor pos.
winex11: Use an IME UI message to set open status.
win32u: Keep the builtin IME UI window in win32u struct imc.
imm32: Add a struct ime field to track whether IME is builtin.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2637
The tests shows that, for sink writer created by MFCreateSinkWriterFromURL,
we are not able to grab the media sink object immediately after the creation,
unless the media sink object can be created without setting media type(MP3, ASF).
--
v3: mfreadwrite/tests: Test GetService for MP4 sink writer.
mfreadwrite/tests: Add more tests for MFCreateSinkWriterFromURL.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2690
According to the tests in 23b72ad, when we are reading a compressed stream, the type returned by `stream_props_GetMediaType()` should reflect compressed format even if we finnally output uncomressed data. For example, if we use wmvcore reader to read a WMV3 stream and output RGB24, the format information returned by `stream_props_GetMediaType()` should be WMV3, not RGB24.
--
v7: winegstreamer: Use stream format in stream_props_GetMediaType.
winegstreamer: Implement amt_from_wg_format_video_wmv.
winegstreamer: Implement wg_parser_stream_get_codec_format.
winegstreamer: Introduce format_is_compressed.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2387
According to the tests in 23b72ad, when we are reading a compressed stream, the type returned by `stream_props_GetMediaType()` should reflect compressed format even if we finnally output uncomressed data. For example, if we use wmvcore reader to read a WMV3 stream and output RGB24, the format information returned by `stream_props_GetMediaType()` should be WMV3, not RGB24.
This patch set is marked as draft now, because PATCH 2 and PATCH 3 is affected by 3e8936a2 in MR !2258. So I'll submit a newer version of this after !2258 get merged.
--
v6: winegstreamer: Use stream format in stream_props_GetMediaType.
winegstreamer: Implement amt_from_wg_format_video_wmv.
winegstreamer: Implement wg_parser_stream_get_stream_format.
winegstreamer: Introduce format_is_compressed.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2387
The tests shows that, for sink writer created by MFCreateSinkWriterFromURL,
we are not able to grab the media sink object immediately after the creation,
unless the media sink object can be created without setting media type(MP3, ASF).
--
v2: mfreadwrite/tests: Test getting media sink immediately after MFCreateSinkWriterFromURL.
mfreadwrite/tests: Add more tests for MFCreateSinkWriterFromURL.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2690
Unpolished. Raises framerate by around 15% in SotTR because vk_sets_mutex
is locked only once for each descriptor heap. It's possible to collate
multiple writes for a single vkUpdateDescriptorSets() call as was done
in the optimised copying path, but it may not be worth it.
A possible complication with this: if it becomes possible to remove the
descriptor mutexes after the remaining problems with queue sequencing are
fixed, we theoretically may still need them for this. Descriptors should
not be updated while binding, but there's no reason more can't be written
in another thread while a command list is submitted to a queue.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/71
On Tue Apr 25 20:26:04 2023 +0000, Henri Verbeet wrote:
> As an aside, I should note that MSVC is not officially a supported
> compiler for vkd3d. I'll happily take patches to make it work provided
> they're not too unreasonable, but if it breaks, it breaks.
The other issue I run into - and this is probably a Vulkan SDK thing, not MSVC as such - is that the options I have for GLSL.std.450.h are
spirv-headers/GLSL.std.450.h
spirv_cross/GLSL.std.450.h
and not spirv/unified1/GLSL.std.450.h or vulkan/GLSL.std.450.h as checked by configure. Has the location changed in newer Vulkan SDK versions, or was this never tested on Windows (with any compiler) to begin with?
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/171#note_31131
While working on Wine ports or Hangover I sometimes come across exceptions with code=6ba.
When I forget about which exception it is, I have a hard time figuring it out, as greping for 6ba shows nothing relevant.
Only after conversion to dec (1722) one stumbles across the right exception.
So please consider adding it to the list.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2706
Mainly comprises support for allocating arrays of resources, and loading from them, for both SM1 and SM4.
--
v4: vkd3d-shader/hlsl: Support resource arrays when writting SM4.
vkd3d-shader/hlsl: Write resource loads in SM1.
vkd3d-shader/hlsl: Write sampler declarations in SM1.
vkd3d-shader/hlsl: Track objects sampling dimension.
vkd3d-shader/hlsl: Track object components usage and allocate registers accordingly.
tests: Test objects as parameters.
vkd3d-shader/hlsl: Skip object components when creating input/output copies.
vkd3d-shader/hlsl: Add fixme for uniform copies for objects within structs.
vkd3d-shader/hlsl: Support multiple-register variables in object regsets.
tests: Add additional texture array register reservation tests.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/159
This should finally fix the ref leaks that keep all gecko nsDocuments alive even on the most basic docs.
--
v5: mshtml/tests: Fix element leak in elem_fire_event.
mshtml: Pass actual node_ccp to ccref_decr for nodes.
mshtml: Fix nsChannel's load_info leak.
mshtml: Support cycle collection for nsChannel.
mshtml: Store minimum compat mode required for events in the ctor table.
mshtml: Fix URI leak in NewURI on failure.
mshtml: Fix nsIFile dir leak in init_xpcom.
mshtml: Fix factory leak in init_nsio.
mshtml: Do not release the principal returned by GetPrincipal.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2691
This should finally fix the ref leaks that keep all gecko nsDocuments alive even on the most basic docs.
--
v4: mshtml/tests: Fix element leak in elem_fire_event.
mshtml: Pass actual node_ccp to ccref_decr for nodes.
mshtml: Fix nsChannel's load_info leak.
mshtml: Support cycle collection for nsChannel.
mshtml: Store minimum compat mode required for events in the ctor table.
mshtml: Fix URI leak in NewURI on failure.
mshtml: Fix nsIFile dir leak in init_xpcom.
mshtml: Fix factory leak in init_nsio.
mshtml: Do not release the principal returned by GetPrincipal.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2691
This should finally fix the ref leaks that keep all gecko nsDocuments alive even on the most basic docs.
--
v3: mshtml/tests: Fix element leak in elem_fire_event.
mshtml: Pass actual node_ccp to ccref_decr for nodes.
mshtml: Fix nsChannel's load_info leak.
mshtml: Support cycle collection for nsChannel.
mshtml: Store minimum compat mode required for events in the ctor table.
mshtml: Fix URI leak in NewURI on failure.
mshtml: Fix nsIFile dir leak in init_xpcom.
mshtml: Fix factory leak in init_nsio.
mshtml: Do not release the principal returned by GetPrincipal.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2691
Nikolay Sivov (@nsivov) commented about include/shtypes.idl:
> SCALE_450_PERCENT = 450,
> SCALE_500_PERCENT = 500
> } DEVICE_SCALE_FACTOR;
> +
> +typedef [v1_enum] enum tagSFBS_FLAGS {
> + SFBS_FLAGS_ROUND_TO_NEAREST_DISPLAYED_DIGIT = 0x0001,
> + SFBS_FLAGS_TRUNCATE_UNDISPLAYED_DECIMAL_DIGITS = 0x0002
> +} SFBS_FLAGS;
I don't see this in current SDK, it's not defined in an idl.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2609#note_31102
Nikolay Sivov (@nsivov) commented about dlls/shlwapi/string.c:
> + {
> + case SFBS_FLAGS_ROUND_TO_NEAREST_DISPLAYED_DIGIT:
> + dBytes = round(dBytes / bfFormats[i].dDivisor) / bfFormats[i].dNormaliser;
> + break;
> + case SFBS_FLAGS_TRUNCATE_UNDISPLAYED_DECIMAL_DIGITS:
> + dBytes = floor(dBytes / bfFormats[i].dDivisor) / bfFormats[i].dNormaliser;
> + break;
> + default:
> + return E_INVALIDARG;
> + }
>
> + /* Not sure about the error code. Can't find a way to trigger the error here */
> if (!FormatDouble(dBytes, bfFormats[i].nDecimals, lpszDest, cchMax))
> - return NULL;
> + return E_UNEXPECTED;
> +
E_FAIL is probably more generic. Also comment is not really needed here. I'd also remove documentation comments before function declaration, leaving just function name there.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2609#note_31101
--
v2: shell32: Update view mode flags while creating IShellView for IExplorerBrowser.
shell32: Reimplement IExplorerBrowser_SetFolderSettings() with support of setting flags.
shell32/tests: Move tests of IExplorerBrowser_SetFolderSettings() to a separated function and more tests.
shell32: Reimplement IFolderView2_SetCurrentViewMode() with modern behaviours.
shell32: Implement IFolderView2_{Get, Set}CurrentFolderFlags().
shell32/tests: Add tests for IFolderView2_{Get, Set}CurrentFolderFlags().
https://gitlab.winehq.org/wine/wine/-/merge_requests/2628
This is needed for mod.io integration in game "The Entropy Centre". Without support for this option the game hangs when trying to authenticate.
Please note that i do not know how Wine works, and have very little understanding of what i am doing. I copied and adjusted code from `connect_query_option()` in the same file. The game does work with this patch though.
--
v2: winhttp: Avoid unnecessary cast in connect_query_option().
winhttp: Support WINHTTP_OPTION_PARENT_HANDLE in request_query_option().
https://gitlab.winehq.org/wine/wine/-/merge_requests/2697
This is required by https://bugs.winehq.org/show_bug.cgi?id=54660 .
--
v7: vkd3d-shader/hlsl: Consider duplicated input semantic types equivalent in SM1.
vkd3d-shader/hlsl: Handle possibly different types in input semantic var load.
vkd3d-shader/hlsl: Error out when a semantic is used with incompatible types.
vkd3d-shader/hlsl: Error out when an output semantic is used more than once.
vkd3d-shader/hlsl: Support semantics for array types.
vkd3d-shader/hlsl: Don't create semantic vars more than once.
vkd3d-shader/hlsl: Move get_array_size() and get_array_type() to hlsl.c.
tests: Test duplicated semantics.
tests: Test array types with semantics.
vkd3d-shader/hlsl: Avoid invalid input/output copies for non-numeric types.
tests: Map unindentified hrs on compilation.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/148
--
v2: winepulse: Use dedicated macros to call interface functions.
wineoss: Use dedicated macros to call interface functions.
winecoreaudio: Use dedicated macros to call interface functions.
winealsa: Use dedicated macros to call interface functions.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2695
This is required by https://bugs.winehq.org/show_bug.cgi?id=54660 .
--
v6: vkd3d-shader/hlsl: Consider duplicated input semantic types equivalent in SM1.
vkd3d-shader/hlsl: Handle possibly different types in input semantic var load.
vkd3d-shader/hlsl: Error out when a semantic is used with incompatible types.
vkd3d-shader/hlsl: Error out when an output semantic is used more than once.
vkd3d-shader/hlsl: Support semantics for array types.
vkd3d-shader/hlsl: Don't create semantic vars more than once.
vkd3d-shader/hlsl: Move get_array_size() and get_array_type() to hlsl.c.
tests: Test duplicated semantics.
tests: Test array types with semantics.
vkd3d-shader/hlsl: Avoid invalid input/output copies for non-numeric types.
tests: Allow invalid vertex shader tests.
tests: Expect S_OK result on [vertex shader].
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/148
The `nb_threads` counter in ntdll is decremented by `abort_thread` but not `exit_thread`, which is used when `NtTerminateThread` is called on the current thread. That results in `nb_threads` being off by one, so neither `abort_thread` nor `exit_thread` will notice when the final thread is killed or call `abort_process`/`exit_process` of its own volition.
In some instances that results in the final thread of a process hanging around and continuing to do work until it's killed by the server's SIGKILL timer. Since most of the process' internal state has been torn down by that point, that usually results in syscall faults or server `write` failures.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2701
--
v2: vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_resource_store().
vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_resource_load().
vkd3d-shader/hlsl: Return an hlsl_ir_node pointer from hlsl_new_loop().
vkd3d-shader/hlsl: Pass an hlsl_block pointer to hlsl_new_loop().
vkd3d-shader/hlsl: Reuse the "init" instruction list if possible in create_loop().
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/176
SPIR-V already handled DSX/DSY, so only D3DBC/TPF needed new case blocks.
You'll notice that there's no test for this one - in addition to being a pretty straightforward translation for all possible formats, this feature uses the render target width/height and I wasn't sure if there was a good way to ensure that the test would always make sense.
Instead, I did the test manually, and it's what you'd expect:
HLSL:
```
uniform float f;
float4 main() : sv_target
{
float4 x = ddx(f);
float4 y = ddy(f);
return x + y;
}
```
D3DBC:
```
ps_3_0
mov r0.x, c0.x
dsx r1.x, r0.x
dsy r0.x, r0.x
mov r1.xyzw, r1.x
mov r0.xyzw, r0.x
add r0.xyzw, r1.xyzw, r0.xyzw
mov oC0.xyzw, r0.xyzw
```
DXBC-TPF:
```
ps_4_0
dcl_constantBuffer cb0[1], immediateIndexed
dcl_output o0.xyzw
dcl_temps 2
mov r0.x, cb0[0].x
dsx r0.y, r0.x
dsy r0.x, r0.x
mov r1.xyzw, r0.y
mov r0.xyzw, r0.x
add r0.xyzw, r1.xyzw, r0.xyzw
mov o0.xyzw, r0.xyzw
ret
```
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/179
custom.c does not use the test.h and debug.h definitions and presumably has a good reason not to. But this resulted in the printf-format compiler attribute getting lost. So copy it from debug.h to allow proper checks of the ok_() format string.
Also fix said format strings.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2692
Mainly comprises support for allocating arrays of resources, and loading from them, for both SM1 and SM4.
--
v3: vkd3d-shader/hlsl: Support resource arrays when writting SM4.
vkd3d-shader/hlsl: Write resource loads in SM1.
vkd3d-shader/hlsl: Write sampler declarations in SM1.
vkd3d-shader/hlsl: Track objects sampling dimension.
vkd3d-shader/hlsl: Track object components usage and allocate registers accordingly.
tests: Test objects as parameters.
vkd3d-shader/hlsl: Skip object components when creating input/output copies.
vkd3d-shader/hlsl: Add fixme for uniform copies for objects within structs.
vkd3d-shader/hlsl: Support multiple-register variables in object regsets.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/159
This should finally fix the ref leaks that keep all gecko nsDocuments alive even on the most basic docs.
--
v2: mshtml/tests: Fix element leak in elem_fire_event.
mshtml: Pass actual node_ccp to ccref_decr for nodes.
mshtml: Fix nsChannel's load_info leak.
mshtml: Support cycle collection for nsChannel.
mshtml: Ensure SnowWhite objects are cleared when forcing cycle collection.
mshtml: Supply dummy logger when forcing cycle collection.
mshtml: Flush all gecko thread events after detaching Gecko browser.
mshtml: Fix nsProgressEvent leak for pre IE10 modes.
mshtml: Fix URI leak in NewURI on failure.
mshtml: Fix nsIFile dir leak in init_xpcom.
mshtml: Fix factory leak in init_nsio.
mshtml: Do not release the principal returned by GetPrincipal.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2691
On Mon Apr 24 17:46:10 2023 +0000, Nikolay Sivov wrote:
> Another option is to build separate modules with PARENTSRC. Was it dismissed?
Right, sorry, meant to mention that. I was trying to avoid having a multiple-megabyte copy of libxml2 in each msxml*.dll.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2700#note_31019
Currently, all the Wine msxml versions point to msxml3. So if there
is a native override for msxml3, all the other versions will cease to
work, since they expect our msxml3. This change moves the actual
implementation to winexml.dll, so that all versions will function
even if msxml3 is native.
Suggestions welcome. I wasn't quite sure what should end up where, so
I took the approach of only moving the absolutely necessary
components to winexml.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2700
Valgrind support requires a fork, which I've published to https://gitlab.winehq.org/rbernon/valgrind. The fork implements loading DWARF debug info from PE files, instead of the old and broken upstream PDB support. I've tried to upstream these changes a long time ago but didn't receive any feedback.
I think we could maybe consider keeping a fork, which I'm happy to maintain, as the changes aren't too large. We may want to investigate adding 32-on-64 support, which may require a bit more changes (to VEX specifically, because its amd64 guest doesn't support segment register manipulation).
The changes here are not all related to Valgrind, and I'll create separate MR for those which may make sense independently from Valgrind / GDB.
Also included is a suppression file to silent some annoying false positives, many of which are coming from the cross-stack accesses during syscalls, which are confusing Valgrind's stack heuristics. One can try this out with something like:
`WINELOADERNOEXEC=1 valgrind --suppressions=tools/valgrind.supp wine64/loader/wine64 wine64/programs/winecfg/winecfg.exe`
--
v6: ntdll: Avoid writing to invalid memory in i386 unix dispatcher.
ntdll: Set %rsp before args in x86_64 call_user_mode_callback.
ntdll: Fix incorrect i386 call_user_mode_callback CFI.
ntdll: Fix valgrind notifications from ntdll.so.
ntdll: Import valgrind headers for PE side ntdll.
ntdll: Allocate a truly separate stack for the kernel stack.
ntdll: Maintain a PE module link map and expose it to GDB.
ntdll: Pass a UNICODE_STRING to load_builtin and virtual_map_image.
loader: Expose a shadow copy of ld.so link map to GDB.
ntdll: Add .cfi_signal_frame to __wine_syscall_dispatcher.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1074
The tests shows that, for sink writer created by MFCreateSinkWriterFromURL,
we are not able to grab the media sink object immediately after the creation,
unless the media sink object can be created without setting media type(MP3, ASF).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2690
All return paths in d3d12_command_queue_flush_ops_locked() must
leave the op mutex locked.
(cherry-picked from upstream commit e27ceddfb4a89470d5d35ab4391d0a5cf4453ef1)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2654
--
v5: vkd3d: Collect multiple descriptor writes in a buffer and update in one call.
vkd3d: Use atomic exchange for descriptor writes.
vkd3d: Delay writing Vulkan descriptors until submitted to a queue.
vkd3d: Ensure descriptors are pointer aligned.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/156
--
v4: vkd3d: Collect multiple descriptor writes in a buffer and update in one call.
vkd3d: Use atomic exchange for descriptor writes.
vkd3d: Delay writing Vulkan descriptors until submitted to a queue.
vkd3d: Ensure descriptors are pointer aligned.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/156
This is needed for mod.io integration in game "The Entropy Centre". Without support for this option the game hangs when trying to authenticate.
Please note that i do not know how Wine works, and have very little understanding of what i am doing. I copied and adjusted code from `connect_query_option()` in the same file. The game does work with this patch though.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2697
Hi,
It looks like this has stalled.
@nsivov Are you okay with this? I made changes to address your comment, just in case you have not looked at them already.
@julliard It doesn't look like there's a designated reviewer on this front. Any suggestions on changes I could possibly make to improve the chances of this getting merged? It looks like there's an application using it and more importantly, it looks like someone might be in need of this...
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2609#note_30976
In the generate code, Converity is reporting __frame->code unitilized in the failed case.
When we initialize the object, then __f will also point to a fully initizliaed structure.
--
v2: widl: Suppress a coverity warning
https://gitlab.winehq.org/wine/wine/-/merge_requests/1950
Company of Heroes: Battle of Crete needs a functioning tasklist.exe to exit properly.
--
v4: tasklist: Partially support '/fi' option.
tasklist: Support '/fo' option.
tasklist: Support '/nh' option.
tasklist: Add basic functionality.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2688
On Fri Mar 24 02:49:18 2023 +0000, Zhao Yi wrote:
> I have just updated my commit message and you can review it again.
Again, MR description is what it should look like. What you have for commit message duplicates code changes. New paragraph in commit message mixes together unrelated things - it's talking about shellview case it seems, which is not something Listview is directly related to.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2413#note_30948
--
v6: winepulse: Use mmdevapi's AudioSessionControl.
wineoss: Use mmdevapi's AudioSessionControl.
winecoreaudio: Use mmdevapi's AudioSessionControl.
winealsa: Use mmdevapi's AudioSessionControl.
winepulse: Implement function to (un)lock sessions.
wineoss: Implement function to (un)lock sessions.
winecoreaudio: Implement function to (un)lock sessions.
winealsa: Implement function to (un)lock sessions.
mmdevapi: Implement AudioSessionControl.
mmdevapi: Implement AudioClient stub.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2669
Mainly comprises support for allocating arrays of resources, and loading from them, for both SM1 and SM4.
--
v2: vkd3d-shader/hlsl: Support resource arrays when writting SM4.
vkd3d-shader/hlsl: Write resource loads in SM1.
vkd3d-shader/hlsl: Write sampler declarations in SM1.
vkd3d-shader/hlsl: Track objects sampling dimension.
vkd3d-shader/hlsl: Track object components usage and allocate registers accordingly.
tests: Test objects as parameters.
vkd3d-shader/hlsl: Skip object components when creating input/output copies.
vkd3d-shader/hlsl: Add fixme for uniform copies for objects within structs.
vkd3d-shader/hlsl: Support multiple-register variables in object regsets.
tests: Add additional texture array register reservation tests.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/159
> The effect of all this is that while it's not hard to adjust, it could eventually involve rewriting a *lot* of transformations, and so it seems like the kind of thing to think about now before we commit to one approach.
Right, I don't disagree; I'm generally in favour of thinking things through. What I'm saying is that right now we haven't committed to a particular approach yet, largely because there doesn't appear to be a clear winner; it mostly just seems like different sets of trade-offs at this point. If you have a preference, and want to have a go at moving things in that direction, by all means go ahead. :)
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/174#note_30909
> For example, I would find ideal to have `hlsl_codegen.c` splitted in a few pieces. The prepend/append copies and copy propagation sections could be easily moved to an independent file each one, keeping basically everything `static` except a handful of functions that are called by `hlsl_emit_bytecode()`. You have a small interface, but everything else you have to do in copy propagation doesn't need to interact with all the rest of `hlsl_codegen.c`, and splitting the file ensures that. If somebody wants to learn how copy propagation works, they can read `hlsl_copy_propagation.c` instead of having to potentially have to go through the whole of `hlsl_codegen.c`. This luckily already happened for `hlsl_constant_ops.c`. I wouldn't move each other pass in its own file because that would be too small, though. There is some sweet spot, which of course can change from person to person.
Mesa does this, and I suspect this is exactly the kind of thing that Henri finds distasteful. Personally it seems excessive to me as well, actually. There is a cost to having a lot of files, mostly in terms of slowing navigation a bit, and having to have more tabs open in one's editor.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/174#note_30882
> > > In any case, while it's perhaps not quite true at the moment, parsing and serialising the different bytecode formats should be closely related and use the same constants, structures, and so on. There's currently some HLSL-specific code intermixed that would more properly belong in hlsl.c/hlsl_codegen.c, but we can deal with that once we get to it.
> >
> > ...Possibly. I would have appreciated a bit more discussion on this first. I had been vaguely thinking of moving more code *to* the backend files, so now I need to stop and re-plan.
> >
> > And while I think we'd always been talking about using the same structures in hlsl_smX, I kind of thought that we would perform that conversion before moving things around. That would have let things be done more gradually, and avoided some unpleasant rebases.
> >
> > Anyway, generally this ties into the question I brought up in \[1\]. I brought up a relatively complete summary of our options with the IR there, but it doesn't seem to have garnered any discussion. At best we seem to have committed to a "maximally CISC" instruction set with Conor's normalization patches, so that rules out option (2).
>
> Well, yeah, the impression I came away with from that conversation was that there were no particularly strong preferences, and not much of a general consensus either; few people seem to care. I don't think we've ruled out any of the options presented there at this point. As noted there, (1) is essentially the current state, but we could certainly move away from that towards one of the other options.
Yeah, that makes sense. It's just that there are several vkd3d developers rather experienced in design—and also often opinionated—and I was hoping to get at least some thoughts on the matter :-/
> And ultimately I think the distinction between the options is a bit artificial to begin with; it ends up largely being a matter of doing particular transformation passes on either the frontend IR, the intermediate IR, or the backend IR. That's not a decision we need to make upfront for every conceivable transformation, and we can change our minds if a particular choice doesn't quite work out. In the case of Conor's tessellation shader work, the consideration is simply that these transformations are more practical to do on the vkd3d_shader_instruction level than on the SPIR-V level, and while doing them on the TPF level would also be plausible, that would require doing a bunch of disassembler work first.
I think it's less artificial than it looks, largely because we only have the one target (SPIRV) that would involve lowering transformations. Which is to say, there are a lot of lowering transformations that we could be doing, rather than (as I suspect we will initially) independently lowering things in GLSL and SPIRV. Similarly there are a lot of raising transformations we could be doing in HLSL -> smX that we currently aren't.
I think there's also a lot to be said for being consistent about where we do a given transformation, but maybe I'm cargo-culting consistency a bit too hard.
The effect of all this is that while it's not hard to adjust, it could eventually involve rewriting a *lot* of transformations, and so it seems like the kind of thing to think about now before we commit to one approach.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/174#note_30881
> > I don't want to be insensitive to the concern, particularly since both Giovanni and you raised it, but I just don't get it? Navigating within a file seems at least as easy as navigating between files, and files on the order of \~2k lines in case of d3dbc.c and \~5k lines in case of tpf.c don't seem particularly unusual in either vkd3d or Wine. (I had been thinking we might as well merge hlsl.c, hlsl_codegen.c and hlsl_constant_ops.c, but I guess not then...)
>
> I suppose it depends a lot on one's own thought processes and habits, so I don't claim that what's better for me is intrinsecally better for everybody. Also, as you say, Wine's standards are much worse than what we're discussing here, so, while I don't think they are good standards, I had to come to terms with them.
>
> I agree with Zeb that having smaller files helps segregation of code, and if code is segregated properly with reasonable interfaces between the segregated parts it is easier (for me at least) to understand and change, because I can study each of the segregated parts somewhat independently. In theory it is not the number of lines or functions that counts, but in practice, with some exceptions, once a file has grown past a few thousands lines of code it's hard for me not to think that it would make good use of some splitting.
Something like this. I find it hard to give an objective rationalization of *why* I want to split things up, but I think to a degree it comes down to the same reasons that large functions should be split up. It communicates to the reader that a piece of code is self-contained and should make sense by itself. On the other hand, when I see a large file, much like a large function, I can't help but think "can this be split up into a coherent set of pieces?" To a degree I guess it also is an intuitive judgement, and that can be poor.
The cost of compiling large files shouldn't be discarded either, I don't think. E.g. our d3d12.c test file (or d3d11.c, and so on) doesn't really need to be split from an architectural standpoint—yes, the tests *can* stand alone, but there's no common thread segregating any one group of tests from another, and splitting *every* test into its own file seems excessive. No, if something makes me want to split up that file, it's that it takes multiple seconds to compile (depending on machine).
I don't think there's any concern regarding navigation, at least on my part.
That said, it's also something that feels like a waste of time to argue a lot about. I didn't feel like hlsl_constant_ops.c was particularly necessary, and would probably have just kept it in hlsl_codegen.c if it was just me, but it also doesn't feel like it's worth bikeshedding at all. Nor do I really intend to argue about splitting up the backend readers and writers here, just make a vague comment about code organization and move on.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/174#note_30876
This fixes a crash seen with the .NET Framework 3.5 SP1 installer in a 64-bit prefix where `ServiceModelReg.exe` throws a C++ exception, it's rethrown again, then a CLR exception (`0xe0434f4d`) exception is thrown, and finally there's another C++ rethrow.
At the last rethrow, `cxx_frame_handler()` detects the rethrow and sets `*rec` to the previous exception record, which is the CLR exception, not the C++ exception. If `+seh` is enabled, it then assumes `*rec` is a C++ exception and tries to TRACE info about it, which crashes.
Move the rethrow detection before the exception type check, so the TRACEs are not done.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2685
Company of Heroes: Battle of Crete needs a functioning tasklist.exe to exit properly.
--
v3: tasklist: Partially support '/fi' option.
tasklist: Support '/fo' option.
tasklist: Support '/nh' option.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2688
Fixes bug [53826](https://bugs.winehq.org/show_bug.cgi?id=53826).
--
v26: ntdll: Set xattr in NtCreateFile if inferred and requested attributes don't match.
ntdll: Only infer hidden attribute from file name if xattr is not present.
ntdll: Handle hidden file names inside get_file_info instead of after it.
ntdll/tests: Add test for file attributes of files with names beginning with a dot.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1148