Note for patch 7:
See https://docs.microsoft.com/en-us/windows/win32/api/d3d10/ns-d3d10-d3d10_map… :
> A block-compressed texture is encoded in 4x4 blocks (see virtual size vs physical size) ; therefore, RowPitch is the number of bytes in a block of 4x4 texels.
--
v4: d3dx10: Return E_FAIL in D3DX10CreateEffectFromFile for NULL file name.
d3dx10: Support effect creation for compiled shader.
d3dx10: Introduce create_effect().
d3dx10/tests: Add tests for D3DX10CreateEffectFromResource.
d3dx10/tests: Add tests for D3DX10CreateEffectFromFile.
d3dx10/tests: Add tests for D3DX10CreateEffectFromMemory.
https://gitlab.winehq.org/wine/wine/-/merge_requests/697
This implements props access to the underlying items in the storage, which is supported on native (although quirky). Unlike most normal props, the underlying storage for the props is asynchronous, so it can disappear or appear at any point, so they have to be re-checked as needed. The props themselves just map a name to a DISPID, but other than that, DISP_E_MEMBERNOTFOUND can return even after a successful GetDispID for example, even if GetDispID already checked for the item (which it has to, for e.g. (x in y) check).
It also contains some fixes for enumerating props, which are needed now because these props also have to be enumerated. They are custom props, so it's needed to have GetMemberName work for them. And since they are asynchronous it makes it even more complicated when enumerating.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/731
On Wed Aug 31 14:00:14 2022 +0000, Giovanni Mascellani wrote:
> For the future, please do code cleaning stuff (like renaming variables)
> in dedicated commits, so that the "meaty" commits are easier to read.
Okay,
I agree with this policy, now that merge requests have to be approved as a whole.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/7#note_7348
Run C++ global/static destructors during DLL_PROCESS_DETACH while other
other dllimport functions they may want to call are still viable. While
windows imposes many restrictions on what may be done in such destructors
(given that the run inside the loader lock), there are lots of legal and
useful kernel32 functions like DestroyCriticalSection, DeleteAtom, TlsFree,
etc that are both useful and legal. Currently this does not work for builtin
modules because all the Win32 structures are discarded well before
NtUnmapViewOfSection finally does the dlllose.
Even for a winelib .dll.so module, it woudl be preferable for destructors
to execute during process_detach (before wine tears down the MODREF
and detaches dependant dlls), rather than be left until after the last
NtUnmapViewOfSection (when we finally reach dlclose)
Therefore, winegcc now always uses the DllMainCRTStartup entry point
unless you specify your own --entry=func. Previously it did this only for
PE modules using msvcrt. Making this default consistent matches cl.exe,
which also always defaults to _DllMainCRTStartup unless overridden by /entry:foo
https://docs.microsoft.com/en-us/cpp/build/reference/entry-entry-point-symb…
The ELF version of winecrt0.a now provides a DllMainCRTStartup which,
per the Itanium ABI that is in practice what is used by gcc and clang,
performs this this destruction by calling __cxa_finalize(&__dso_handle)..
This libc function is required to be idempotent, so it's OK that dlclose
still calls it again later (there will just be no further work to do).
Multiple calls to __cxa_finalize shall not result in calling termination
function entries multiple times; the implementation may either remove
entries or mark them finished.
https://itanium-cxx-abi.github.io/cxx-abi/abi.html#dso-dtor-runtime-api
This has two main effects; it moves ELF destructors earlier (before imports
are unmapped), and it moves them inside the Nt loader lock. Being earlier
was the intended goal, and moving them inside the lock seems fine. Any Win32
API calls in destructors are just being subjected to the same lock-hiearchy
rules as usual on windows (MSVC also runs destructors from DllMainCrtStartup)
https://docs.microsoft.com/en-us/cpp/build/run-time-library-behavior?view=m…
And any purely-ELF destructors that happen to also run earlier should never
call functions exported from wine (and thus don't care about ntdll's locks).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/752
MSVC's delayimp.lib does not actually free delayload dependencies.
winecrt0's attempt to do so from ELF __attribute__((destructor))
is unnecessary and potentially harmful:
- When triggered naturally via LdrUnloadDll, this leads to recursive calls
to FreeLibrary, violating free_lib_count and missing DLL_PROCESS_DETACH
- when triggered by glibc's _dl_fini (at process exit), it leads to
use-after-free of the TEB (GetCurrentThreadID after the main thread is no longer Win32)
via FreeLibrary -> LdrLdrUnloadDll -> RtlEnterCriticalSection( &loader_section )
- double-free of the library itself, since the DLL_PROCESS_DETACH has
already been handled by LdrShutdownProcess
- Race against wineserver sending a SIGKILL from process_killed,
since all Win32 threads of the process have exited
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53032
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/750
- kernelbase: Fix error value for PE files without resource.
- include: Simplify handling of va_list in debug printf functions.
- include: Add va_list version of the debug printf functions.
- include: Avoid _t-suffixes.
- include: Add list_move_after() and list_move_before().
- user32: Call winproc_init before dpiaware_init.
- combase: Omit thread ID from the stub manager ipid for MTA objects.
- d3dx10: Factor out image format conversion function.
- d3dx10: Use WIC functions to obtain info about DDS image.
- d3dx10: Add support for texture cubes in D3DX10CreateTexture functions.
- d3dx10: Don't check frame count in load_texture_data.
- d3dx10: Add support for loading MipLevels data in load_texture_data.
- d3dx10/tests: Improve cube textures data testing.
- winemac.drv: Rename display modes cache variables.
- winemac.drv: Invalidate mode cache when enum flags changes.
- winemac.drv: Remove unnecessary macdrv_EnumDisplaySettingsEx declaration.
- winemac.drv: Check for non-primary adapter earlier in macdrv_ChangeDisplaySettingsEx.
- winemac.drv: Support getting non-primary adapter current display mode.
- winemac.drv: Support enumerating non-primary adapters display modes.
- evr/filter: Implement pin's connect/disconnect.
- d3dx10: Implement D3DX10PreprocessShaderFromMemory().
- d3dx10/tests: Add a test for D3DX10PreprocessShaderFromMemory().
- wmvcore/tests: Use a constant for test.wmv duration.
- wmvcore/tests: Test sync reader output settings read / write.
- wmvcore/tests: Test async reader output settings read / write.
- wmvcore/tests: Test that the callback thread is always the same.
- wmvcore/tests: Test async reader compressed sample monotonic pts.
- wmvcore/tests: Test async reader DedicatedDeliveryThread setting.
- mshtml/tests: Fix a spelling error in an ok() message.
- dbghelp: Fix a couple of spelling errors in a comment.
- mscvpdb: Fix a spelling error in a comment.
- winspool.drv/tests: Fix the spelling of a variable name.
- winex11.drv: Make get_unix_file_name() static.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/746
- kernelbase: Fix error value for PE files without resource.
- include: Simplify handling of va_list in debug printf functions.
- include: Add va_list version of the debug printf functions.
- include: Avoid _t-suffixes.
- include: Add list_move_after() and list_move_before().
- user32: Call winproc_init before dpiaware_init.
- combase: Omit thread ID from the stub manager ipid for MTA objects.
- d3dx10: Factor out image format conversion function.
- d3dx10: Use WIC functions to obtain info about DDS image.
- d3dx10: Add support for texture cubes in D3DX10CreateTexture functions.
- d3dx10: Don't check frame count in load_texture_data.
- d3dx10: Add support for loading MipLevels data in load_texture_data.
- d3dx10/tests: Improve cube textures data testing.
- winemac.drv: Rename display modes cache variables.
- winemac.drv: Invalidate mode cache when enum flags changes.
- winemac.drv: Remove unnecessary macdrv_EnumDisplaySettingsEx declaration.
- winemac.drv: Check for non-primary adapter earlier in macdrv_ChangeDisplaySettingsEx.
- winemac.drv: Support getting non-primary adapter current display mode.
- winemac.drv: Support enumerating non-primary adapters display modes.
- evr/filter: Implement pin's connect/disconnect.
- d3dx10: Implement D3DX10PreprocessShaderFromMemory().
- d3dx10/tests: Add a test for D3DX10PreprocessShaderFromMemory().
- wmvcore/tests: Use a constant for test.wmv duration.
- wmvcore/tests: Test sync reader output settings read / write.
- wmvcore/tests: Test async reader output settings read / write.
- wmvcore/tests: Test that the callback thread is always the same.
- wmvcore/tests: Test async reader compressed sample monotonic pts.
- wmvcore/tests: Test async reader DedicatedDeliveryThread setting.
- mshtml/tests: Fix a spelling error in an ok() message.
- dbghelp: Fix a couple of spelling errors in a comment.
- mscvpdb: Fix a spelling error in a comment.
- winspool.drv/tests: Fix the spelling of a variable name.
- winealsa.drv: Make functions static where possible.
- winex11.drv: Make get_unix_file_name() static.
- dinput: Remove WINAPI on static functions where not needed.
- dinput/tests: Remove WINAPI on static functions where not needed.
- crypt32: Remove WINAPI on static functions where not needed.
- windows.media.speech: Remove WINAPI on static functions where not needed.
- winexinput.sys: Remove WINAPI on static functions where not needed.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/743
This series implements a couple of enhancements to symbol undecoration in
msvcrt:
- more C++ constructs are correctly supported (pointer to member,
constructors/destructors from template class,
non-type function pointer template parameter...)
- some internal cleanups & simplification (most of them based on
revamped helper to build up the undecorated C++ symbols)
--
v4: dlls/msvcrt: Fix order of extended qualifiers and qualifiers
dlls/msvcrt: Use enum to clarify post-processing actions.
dlls/msvcrt: Undecorate function signature as template argument.
dlls/msvcrt: Fix white space output for typecast operator.
dlls/msvcrt: Improve support for template in methods.
dlls/msvcrt: Correctly support space generation in pointers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/492
--
v2: winevulkan: Get rid of unix_funcs.
winevulkan: Use __wine_unix_call for checking Vulkan functions availability.
winevulkan: Use vk_unix_call in loader.c.
gitlab: Run make_vulkan before building Wine.
https://gitlab.winehq.org/wine/wine/-/merge_requests/742
This should silence warnings about some branches non returning any value
without requiring additional "return 0" statement or similar.
Also, in theory this might enable to compiler to optimize the program
a little bit more, though that's unlikely to have any measurable effect.
--
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/11
On Tue Aug 30 17:26:10 2022 +0000, **** wrote:
> Zebediah Figura replied on the mailing list:
> ```
> On 8/30/22 06:24, Nikolay Sivov wrote:
> > +static HRESULT evr_connect(struct strmbase_renderer *iface, const
> AM_MEDIA_TYPE *mt)
> > +{
> > + struct evr *filter = impl_from_strmbase_renderer(iface);
> > + IMFMediaType *media_type;
> > + HRESULT hr;
> > +
> > + if (SUCCEEDED(hr = evr_test_input_type(filter, mt, &media_type)))
> It's perhaps worth noting that strmbase IPin::ReceiveConnection() [which
> calls this function] already calls query_accept(). Granted,
> evr_test_input_type() is also doing some other initialization, but
> arguably it could be named more appropriately in that case.
> ```
Yes, I'll have to review this again. One thing is that query_accept() currently does init-test-release, and does not check if we are already initialized, e.g. in connect(). I'll have to try to see how it works.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/727#note_7283
Some Wine tests are multi-threaded or start child processes which can
result in traces and failure messages being garbled which prevents them
from being recognized by continuous integration tools.
So printing the tests messages is now serialized. Note that if a process
crashes while holding the mutex, that mutex will be abandonned and not
cause a deadlock.
--
v4: tests: Make sure only one thread prints traces at a time.
https://gitlab.winehq.org/wine/wine/-/merge_requests/734
Some Wine tests are multi-threaded or start child processes which can
result in traces and failure messages being garbled which prevents them
from being recognized by continuous integration tools.
So printing the tests messages is now serialized. Note that if a process
crashes while holding the mutex, that mutex will be abandonned and not
cause a deadlock.
--
v2: tests: Make sure only one thread prints traces at a time.
https://gitlab.winehq.org/wine/wine/-/merge_requests/734
Some Wine tests are multi-threaded or start child processes which can
result in traces and failure messages being garbled which prevents them
from being recognized by continuous integration tools.
So printing the tests messages is now serialized. Note that if a process
crashes while holding the mutex, that mutex will be abandonned and not
cause a deadlock.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/734
In preparation for with https://gitlab.winehq.org/wine/wine/-/merge_requests/576. I think support for changing non-primary display modes in winemac will be easier /after/ the display placement logic is moved to win32u. I also don't really know how to handle the display position on macOS.
--
v5: winemac.drv: Support enumerating non-primary adapters display modes.
winemac.drv: Support getting non-primary adapter current display mode.
winemac.drv: Check for non-primary adapter earlier in macdrv_ChangeDisplaySettingsEx.
winemac.drv: Remove unnecessary macdrv_EnumDisplaySettingsEx declaration.
winemac.drv: Invalidate mode cache when enum flags changes.
winemac.drv: Rename display modes cache variables.
https://gitlab.winehq.org/wine/wine/-/merge_requests/720
This series implements a couple of enhancements to symbol undecoration in
msvcrt:
- more C++ constructs are correctly supported (pointer to member,
constructors/destructors from template class,
non-type function pointer template parameter...)
- some internal cleanups & simplification (most of them based on
revamped helper to build up the undecorated C++ symbols)
--
v3: dlls/msvcrt: Fix order of extended qualifiers and qualifiers
dlls/msvcrt: Use enum to clarify post-processing actions.
dlls/msvcrt: Undecorate function signature as template argument.
dlls/msvcrt: Fix white space output for typecast operator.
dlls/msvcrt: Improve support for template in methods.
dlls/msvcrt: Correctly support space generation in pointers.
https://gitlab.winehq.org/wine/wine/-/merge_requests/492
On Tue Aug 30 13:26:41 2022 +0000, Matteo Bruni wrote:
> I wonder if this should happen for all the mip level 0 elements of an
> array / cube texture (i.e. condition should just be !j instead).
We're creating the img_info structure only once (in D3DX10GetImageInfoFromMemory call) so there's no need to do it multiple times. Probably it should be moved outside of the loop to make it easier to read.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/641#note_7229
In preparation for with https://gitlab.winehq.org/wine/wine/-/merge_requests/576. I think support for changing non-primary display modes in winemac will be easier /after/ the display placement logic is moved to win32u. I also don't really know how to handle the display position on macOS.
--
v4: winemac.drv: Support enumerating non-primary adapters display modes.
winemac.drv: Support getting non-primary adapter current display mode.
winemac.drv: Check for non-primary adapter earlier in macdrv_ChangeDisplaySettingsEx.
winemac.drv: Remove unnecessary macdrv_EnumDisplaySettingsEx declaration.
winemac.drv: Invalidate mode cache when enum flags changes.
winemac.drv: Rename display modes cache variables.
https://gitlab.winehq.org/wine/wine/-/merge_requests/720
Fixes a bug that occurs when:
- `CoInitializeEx(NULL, COINIT_MULTITHREADED);` is called on thread 1
- `CoInitializeEx(NULL, COINIT_MULTITHREADED);` is called on thread 2
- `CoUninitialize()` is called on thread 1.
- `CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);` is called on thread 1.
After this, when attempting to marshal an interface on thread 2, when `ipid_to_ifstub` is called, `apartment_findfromtid()` will find thread 1's STA and not the MTA.
--
v2: combase: Omit thread ID from the stub manager ipid for MTA objects.
https://gitlab.winehq.org/wine/wine/-/merge_requests/705
--
v4: mf: Actually implement SESSION_CMD_END internal command.
mf: Use session_submit_command to put SESSION_CMD_END ahead of the queue.
mf: Keep pending session command out of the queued commands list.
mf: Use a dedicated session callback interface for sample requests.
https://gitlab.winehq.org/wine/wine/-/merge_requests/607
In preparation for with https://gitlab.winehq.org/wine/wine/-/merge_requests/576. I think support for changing non-primary display modes in winemac will be easier /after/ the display placement logic is moved to win32u. I also don't really know how to handle the display position on macOS.
--
v3: winemac.drv: Support enumerating non-primary adapters display modes.
winemac.drv: Support getting non-primary adapter current display mode.
winemac.drv: Invalidate mode cache when enum flags changes.
winemac.drv: Remove unnecessary macdrv_EnumDisplaySettingsEx declaration.
winemac.drv: Rename display modes cache variables.
https://gitlab.winehq.org/wine/wine/-/merge_requests/720
The previous version of the code incorrectly assumed that the lpszClass
member of CREATESTRUCT passed with WM_CREATE would point to the same
memory used for the CreateWindowEx class name parameter, and used a
pointer comparison to check for class name equality.
As a side effect of commit e41c255be6ba66d1eec7affe674b8cc7699226b8
"win32u: Use send_message_timeout for WM_CREATE and WM_NCCREATE" the
CREATESTRUCT lpszClass member started pointing to different memory,
breaking the current implementation of MCIWND_Create().
This commit fixes the problem by performing a proper, case-insensitive
string comparison to determine class name equality.
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=53578
--
v2: msvfw32: Use string comparison to determine class name equality.
https://gitlab.winehq.org/wine/wine/-/merge_requests/726
The previous version of the code incorrectly assumed that the lpszClass
member of CREATESTRUCT passed with WM_CREATE would point to the same
memory used for the CreateWindowEx class name parameter, and used a
pointer comparison to check for class name equality.
As a side effect of commit e41c255be6ba66d1eec7affe674b8cc7699226b8
"win32u: Use send_message_timeout for WM_CREATE and WM_NCCREATE" the
CREATESTRUCT lpszClass member started pointing to different memory,
breaking the current implementation of MCIWndCreate().
This commit fixes the problem by performing a proper, case-insensitive
string comparison to determine class name equality.
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=53578
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/726
Made changes to comdlg32/itemdlg.c to add missing controls, which are the address bar and the up button.
Updated bitmaps in comctl32 and SVG files for history icons.
My changes help to resolve this bug: https://bugs.winehq.org/show_bug.cgi?id=50338.
--
v11: comdlg32: Add missing controls to the common item dialog, only affecting the implementation
comdlg32: Add missing controls and their functionality to IFileDialog, or the common item dialog.
https://gitlab.winehq.org/wine/wine/-/merge_requests/672
--
v2: mountmgr.sys: Implemented FileFsSizeInformation and FileFsFullSizeInformation volume queries
ntdll: Implemented NtQueryVolumeInformationFile FileFsFullSizeInformation
kernel32/tests: Added tests for GetDiskFreeSpaceA/W with volume GUID paths
kernel32/tests: GetDiskFreeSpaceA/W test targetted at a real drive
https://gitlab.winehq.org/wine/wine/-/merge_requests/710
In preparation for with https://gitlab.winehq.org/wine/wine/-/merge_requests/576. I think support for changing non-primary display modes in winemac will be easier /after/ the display placement logic is moved to win32u. I also don't really know how to handle the display position on macOS.
--
v2: winemac.drv: Support enumerating non-primary adapters display modes.
winemac.drv: Support getting non-primary adapter current display mode.
winemac.drv: Invalidate mode cache when enum flags changes.
winemac.drv: Remove unnecessary macdrv_EnumDisplaySettingsEx declaration.
winemac.drv: Rename display modes cache variables.
https://gitlab.winehq.org/wine/wine/-/merge_requests/720
Created a new MR, because the mailing bridge wouldn't trigger on force pushes.
--
v5: windows.media.speech/tests: Skip SpeechRecognitionListConstraint tests on Win10 1709 x32 and below.
windows.media.speech/tests: Add basic query tests for SpeechSynthesizerOptions.
include/windows.media.speechsynthesis.idl: Add missing interfaces to SpeechSynthesizerOptions runtimeclass.
windows.media.speech: Add missing async_void_Release implementation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/708
Initial implementation for registry application hives, this is a step forward to get Visual Studio to run.
:-)
--
v5: server: save app hive into it's file when closing handle.
server/registry: pass file name instead of file handle to server.
kernelbase: Implement RegLoadAppKey.
ntdll: Initial implementation for application hives.
ntdll: Move NtLoadKey implementation to NtLoadKeyEx.
ntdll/test: Test for application hives.
ntdll: Create NtLoadKeyEx syscall stub.
advapi32/test: Create tests for RegLoadAppKey.
https://gitlab.winehq.org/wine/wine/-/merge_requests/717
Initial implementation for registry application hives, this is a step forward to get Visual Studio to run.
:-)
--
v4: server: save app hive into it's file when closing handle.
server/registry: pass file name instead of file handle to server.
kernelbase: Implement RegLoadAppKey.
https://gitlab.winehq.org/wine/wine/-/merge_requests/717