1
0
Fork 0
mirror of synced 2025-03-07 03:53:26 +01:00

Compare commits

...

1547 commits

Author SHA1 Message Date
Alexandre Julliard
4f8958eb56 widl: Use the correct type for non-encapsulated union discriminants. 2024-04-02 23:30:10 +02:00
Alexandre Julliard
66bec19434 widl: Output more correct /robust flags. 2024-04-02 23:30:10 +02:00
Alexandre Julliard
4d8ee6bb18 widl: Add /robust flags in correlation descriptors. 2024-04-02 23:30:10 +02:00
Alexandre Julliard
896b4f05ea widl: Always use new-style format strings in interpreted mode. 2024-04-02 23:30:03 +02:00
Louis Lenders
7cd0f395ca wbemprox: Add property 'Status' to Win32_BIOS.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56361
2024-04-02 12:17:26 +02:00
Nikolay Sivov
f38a32e64c d2d1/tests: Add a test for a custom effect using a pixel shader.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-04-01 20:23:14 +02:00
Nikolay Sivov
51b675ef7f d2d1/effect: Use a helper internally instead of IsShaderLoaded().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-04-01 20:23:13 +02:00
Nikolay Sivov
43ce2bf5da d2d1/effect: Use effect property types identifier directly in initializers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-04-01 20:23:11 +02:00
Jacek Caban
aa2aa2033c ntdll: Use __ASM_GLOBAL_IMPORT for RtlUnwind.
Avoids importing locally defined symbols on ARM and ARM64, where we call it from winecrt0.
2024-04-01 20:22:52 +02:00
Rémi Bernon
593dcb1b5c mf/session: Avoid leaking samples in transform_node_deliver_samples. 2024-04-01 20:22:46 +02:00
Alexandre Julliard
43fb0ecd07 msi/tests: Delete the temp .msi file in all failure cases. 2024-04-01 09:12:07 +02:00
Eric Pouech
7f60584a90 cmd: Fix substring expansion for 'magic' variables.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56498
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-04-01 09:08:56 +02:00
Eric Pouech
b868d82391 cmd: Add test for substring handling in 'magic' variable expansion.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-04-01 09:08:49 +02:00
Aurimas Fišeras
29c0826e6d po: Update Lithuanian translation. 2024-04-01 09:07:57 +02:00
Dmitry Timoshkov
8568848ba8 windowscodecs: Silence fixme for IID_CMetaBitmapRenderTarget.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-03-29 22:45:36 +01:00
Nikolay Sivov
87ebccc37d d2d1/tests: Get rid of test shader blobs.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-29 22:45:36 +01:00
Louis Lenders
5a8bb41cad wmic: Support interactive mode and piped commands.
Make piped commands work like for example "echo os get version|wmic"
or "type file.txt | wmic" where file.txt contains some commands.
Also support interactive mode.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56361
2024-03-29 22:45:36 +01:00
Zebediah Figura
c9b72d2d2f wined3d: Remove the OffscreenRenderingMode setting.
FBOs are required now.
2024-03-29 22:45:36 +01:00
Zebediah Figura
437eb42ad2 wined3d: Require EXT_framebuffer_object. 2024-03-29 22:45:36 +01:00
Zebediah Figura
b9d2885148 wined3d: Use dynamic state for patch vertex count if possible. 2024-03-29 22:45:36 +01:00
Zebediah Figura
6f6ef6cd04 wined3d: Use dynamic state for primitive type if possible. 2024-03-29 22:45:36 +01:00
Zebediah Figura
48d68e0c50 wined3d: Enable EXT_extended_dynamic_state2. 2024-03-29 22:45:36 +01:00
Alexandre Julliard
8bac669056 rpcrt4: Make sure that the stack is set when catching an exception.
Fixes a test crash in interpreted mode.
2024-03-29 22:45:34 +01:00
Alexandre Julliard
2d801c46c7 rpcrt4: Return the correct failure for a NULL binding handle.
Fixes a test crash in interpreted mode.
2024-03-29 22:45:14 +01:00
Paul Gofman
a2c20d0e93 avifil32: Update lCurrentFrame in IGetFrame_fnGetFrame(). 2024-03-28 20:00:13 +01:00
Brendan Shanks
6ea3bc56ec server: Clarify that registry files are always in the current directory, and simplify save_branch(). 2024-03-28 19:57:01 +01:00
Brendan Shanks
9b4e3718ed server: Replace sprintf with snprintf to avoid deprecation warnings on macOS. 2024-03-28 19:51:35 +01:00
Brendan Shanks
4e04b2d528 server: Replace some malloc/sprintf/strcpy calls with asprintf. 2024-03-28 19:51:35 +01:00
Rémi Bernon
d7cf25dcd4 winegstreamer: Fallback to input caps only when no parser was found. 2024-03-28 19:50:00 +01:00
Rémi Bernon
3668a46675 winegstreamer: Create the transform parsed caps from wg_format. 2024-03-28 19:50:00 +01:00
Nikolay Sivov
850660ada0 d3d10/tests: Add a test for effect compilation containing empty buffers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-28 19:49:37 +01:00
Nikolay Sivov
36a4e5c9bb d3d10: Use older compiler for D3D10CompileEffectFromMemory().
Compilation output from D3D10CompileEffectFromMemory() always
contains $Globals buffer, even if it's empty. That matches
behaviour of 33-39 compilers.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-28 19:49:35 +01:00
Rémi Bernon
69b049d1b6 winevulkan: Remove now unnecessary vkDestroyInstance driver entry. 2024-03-28 19:48:52 +01:00
Rémi Bernon
a875c18552 winevulkan: Remove now unnecessary vkCreateInstance driver entry. 2024-03-28 19:48:49 +01:00
Rémi Bernon
c7da2450c9 winevulkan: Introduce a new get_host_surface_extension driver entry. 2024-03-28 19:48:48 +01:00
Rémi Bernon
5db24dbb32 winevulkan: Remove now unnecessary vkEnumerateInstanceExtensionProperties driver entry. 2024-03-28 19:48:46 +01:00
Rémi Bernon
e4e0ce2bc6 winevulkan: Strip surface extensions in vkEnumerateInstanceExtensionProperties. 2024-03-28 19:48:42 +01:00
Paul Gofman
1194995050 ddraw: Don't demand WINED3D_BIND_SHADER_RESOURCE for making surface in vidmem. 2024-03-28 19:48:08 +01:00
Rémi Bernon
c635a25f21 win32u: Rename struct adapter to struct source.
To match the D3DKMT terminology and avoid confusion between the GPUs,
which are called adapter there.
2024-03-28 19:47:38 +01:00
Rémi Bernon
fecfb44240 win32u: Use named adapters instead of struct gdi_adapter. 2024-03-28 19:47:38 +01:00
Rémi Bernon
00a0c97879 win32u: Use a symlink for the logically indexed adapter config key.
Linking it to what will be a physically identified adapter config key.
2024-03-28 19:47:34 +01:00
Rémi Bernon
c6e328c2d0 win32u: Split writing adapter to registry to a separate helper. 2024-03-28 19:47:34 +01:00
Piotr Caban
2546468b4c gdi32: Implicitly call StartPage in ExtEscape on printer DC. 2024-03-28 19:47:27 +01:00
Alexandre Julliard
dd68561c4a widl: Fix method number for call_as functions. 2024-03-28 15:44:46 +01:00
Alexandre Julliard
53bb4117ac widl: Don't output the explicit handle argument. 2024-03-28 14:30:47 +01:00
Alexandre Julliard
7ff6c6316e widl: Merge interpreted stubs header and parameters output into a single function. 2024-03-28 14:30:42 +01:00
Alistair Leslie-Hughes
e01cb2b915 ntoskrnl/tests: Add FltBuildDefaultSecurityDescriptor test.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
2024-03-27 22:44:57 +01:00
Alistair Leslie-Hughes
351d36b0da fltmgr.sys: Create import library.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
2024-03-27 22:44:57 +01:00
Alistair Leslie-Hughes
ac49899e32 fltmgr.sys: Implement FltBuildDefaultSecurityDescriptor.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
2024-03-27 22:44:57 +01:00
Aida Jonikienė
f2f453c454 sapi: Only print GetStatus() FIXME once.
The Speedtest app calls this function excessively.
2024-03-27 22:38:26 +01:00
Brendan Shanks
617b29c402 server: Simplify creation of the server directory. 2024-03-27 22:19:25 +01:00
Brendan Shanks
abcbd85b7c ntdll: Simplify creation of the server directory. 2024-03-27 22:19:24 +01:00
Brendan Shanks
d86627a27a mmdevapi: Make IMMDeviceCollection immutable after creation. 2024-03-27 22:19:24 +01:00
Aida Jonikienė
7a529fc94f wbemprox: Stub most of the Win32_VideoController properties.
Tomato Jones II queries most of these properties and errors out
if any of them aren't found.
2024-03-27 22:19:24 +01:00
Esme Povirk
60059bf744 user32/tests: Revert test updates for win11. 2024-03-27 22:19:24 +01:00
Rémi Bernon
8f58b9e1e1 winegstreamer: Set GST_DEBUG if not set, based on WINEDEBUG channels. 2024-03-27 22:19:24 +01:00
Alexandre Julliard
35cb600c43 idl: Use IPSFactoryBuffer instead of a non-existent IFactoryBuffer.
Caught by midl.
2024-03-27 22:19:24 +01:00
Alexandre Julliard
5e1da85068 include: Fix a parameter type in the IEnumTfUIElements interface.
Caught by midl.
2024-03-27 22:08:56 +01:00
Alexandre Julliard
69849bd2ee widl: Don't skip a pointer level for pointers to pointers to strings. 2024-03-27 11:26:10 +01:00
Rémi Bernon
4573910acc win32u: Move D3DKMT vulkan implementation out of winex11. 2024-03-26 22:46:05 +01:00
Rémi Bernon
dc9229e6fa winex11: Introduce a new find_adapter_from_handle helper. 2024-03-26 22:45:20 +01:00
Rémi Bernon
3686a04cdd winex11: Introduce a new get_vulkan_physical_device helper. 2024-03-26 22:45:18 +01:00
Rémi Bernon
3f5d18b3b6 winex11: Initialize D3DKMT vulkan instance only once.
Creating an instance is an expensive operation and we should avoid
constantly re-creating one when opening then closing a D3DKMT adapter.
2024-03-26 22:44:31 +01:00
Rémi Bernon
eb38f7418a win32u: Open adapters in NtGdiDdDDIEnumAdapters2 outside of the display devices lock. 2024-03-26 22:44:31 +01:00
Alexandre Julliard
47e4907c0d wshom.ocx: Don't show a message box on ShellExecute error. 2024-03-26 22:26:51 +01:00
Paul Gofman
568e90ad11 win32u: Avoid leaking previous buffer in get_buffer_space(). 2024-03-26 22:26:51 +01:00
Paul Gofman
054a95a817 win32u: Avoid writing past allocated memory in peek_message(). 2024-03-26 22:26:51 +01:00
Paul Gofman
8b7ac24752 ddraw/tests: Add tests for multiple devices. 2024-03-26 22:26:51 +01:00
Paul Gofman
9d95bd5f4b ddraw: Support multiple devices per ddraw object. 2024-03-26 22:26:51 +01:00
Paul Gofman
6fe8e64c1a ddraw: Sync wined3d render target in d3d_device_sync_rendertarget(). 2024-03-26 22:26:51 +01:00
Paul Gofman
aa8487a4b3 ddraw: Store wined3d state in d3d_device. 2024-03-26 22:26:51 +01:00
Paul Gofman
9492a10f44 wined3d: Factor out wined3d_texture_set_lod() function. 2024-03-26 22:26:51 +01:00
Paul Gofman
2e088045b5 ddraw: Don't apply state in ddraw_surface_blt(). 2024-03-26 22:26:51 +01:00
Paul Gofman
4e81f66127 ddraw: Store matrix handle in the global table. 2024-03-26 22:26:51 +01:00
Paul Gofman
5a7ff3b45c ddraw: Store surface handles in the global table. 2024-03-26 22:26:51 +01:00
Paul Gofman
b9eb9a7453 ddraw: Store material handles in the global table. 2024-03-26 22:26:51 +01:00
Paul Gofman
2799c95dd2 wintypes: Report some API contracts as present in api_information_statics_IsApiContractPresentByMajor(). 2024-03-26 22:26:51 +01:00
Hans Leidekker
ce2ae79f9d bcrypt: Add support for RSA OAEP padding.
Needs GnuTLS 3.8.4.
2024-03-26 22:26:51 +01:00
Eric Pouech
1304bf7fb9 evr: Fix YUY2 image copy in evr_copy_sample_buffer().
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-26 22:26:51 +01:00
Eric Pouech
d950e1b61f evr: Remove useless code.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-26 22:26:51 +01:00
Tuomas Räsänen
ef58b8c770 winebus: Ignore udev events of devices which do not have devnodes.
Udev monitor monitors the whole input subsystem, but not all devices
in the input subsystem have devnodes associated to them.

This commit makes the event processing ignore such devices.

All device handling assumes devices have devnodes, so here we just
simply ignore all devices which do not have one.

Previously, udev bus thread aborted when an event for a device without
a devnode was processed:

  10111.330:0068:0084:trace:hid:process_monitor_event Received action "remove" for udev device (null)
  10111.330:0068:0084:warn:hid:bus_main_thread L"UDEV" bus wait returned status 0xc0000005

Just plugging in and out a normal mouse was enough cause this.

This was because root input devices (which do not have devnodes) were
handled too and find_device_from_devnode() choked on NULL argument.
2024-03-26 22:26:51 +01:00
Zebediah Figura
37d71415ed wined3d: Skip bindless samplers with no uniform location.
This can happen legitimately if the sampler access was optimized out.
2024-03-26 22:26:51 +01:00
Zebediah Figura
58c680bace wined3d: Recreate buffer textures when renaming the existing buffer storage.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56438
2024-03-26 22:26:51 +01:00
Zebediah Figura
4e13c72f70 d3d11/tests: Test discarding a buffer in test_high_resource_count(). 2024-03-26 22:26:50 +01:00
Paul Gofman
ddff863355 windows.perception.stub: Add stub IHolographicSpaceInterop interface. 2024-03-26 18:22:24 +01:00
Paul Gofman
bb47eb9f72 ntdll/tests: Add more tests for xstate. 2024-03-26 18:21:06 +01:00
Paul Gofman
29c73ee173 ntdll: Support more xstate features. 2024-03-26 18:20:56 +01:00
Paul Gofman
3dea242677 ntdll: Mind generic xstate masks in server context conversion. 2024-03-26 18:20:56 +01:00
Paul Gofman
a9d77d0989 ntdll: Factor out context_to_server() function. 2024-03-26 18:20:56 +01:00
Paul Gofman
25e0a25807 ntdll: Factor out xstate_from_server() function. 2024-03-26 18:20:56 +01:00
Paul Gofman
6bc2c09232 ntdll: Support generic xstate in Unix-side manipulation functions. 2024-03-26 18:20:55 +01:00
Paul Gofman
a10da8a42a ntdll: Preserve untouched parts of xstate in NtSetContextThread(). 2024-03-26 18:20:55 +01:00
Paul Gofman
7ae23ad775 ntdll: Only save AVX xstate in wine_syscall_dispatcher. 2024-03-26 18:20:53 +01:00
Alexandre Julliard
cf08bbaa0f ntdll: Use a common wrapper to call unwind handlers on x86-64. 2024-03-25 18:05:39 +01:00
Alexandre Julliard
24e9fcac08 ntdll: Use a common wrapper to call exception handlers on x86-64. 2024-03-25 18:05:25 +01:00
Alexandre Julliard
47f94fcf5f ntdll: Copy the context contents instead of the pointer on collided unwind.
Similar to how it's done on ARM platforms.
2024-03-25 18:04:56 +01:00
Nikolay Sivov
8dec8cc96c gdi32/emf: Zero-initialize handles array (Valgrind).
It's checked in emr_reset(), and reallocation already zero-initializes new slots.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-25 18:04:09 +01:00
Zhiyi Zhang
de89f77727 mfmediaengine/tests: Test IMFMediaEngineEx::SetCurrentTime/Ex(). 2024-03-25 18:04:01 +01:00
Zhiyi Zhang
283d4bab22 mfmediaengine: Implement IMFMediaEngineEx::SetCurrentTimeEx(). 2024-03-25 18:04:01 +01:00
Zhiyi Zhang
2bcc87b303 mfmediaengine: Implement IMFMediaEngineEx::SetCurrentTime(). 2024-03-25 18:04:01 +01:00
Rémi Bernon
b1cca5b52a evr/mixer: Respect input media type MF_MT_GEOMETRIC_APERTURE. 2024-03-25 18:03:43 +01:00
Rémi Bernon
d304e58789 evr/tests: Add more video mixer input media type aperture tests. 2024-03-25 18:03:43 +01:00
Rémi Bernon
c5f0039223 evr/tests: Split check_presenter_output to a separate helper. 2024-03-25 18:03:43 +01:00
Rémi Bernon
1f589f6304 evr/tests: Split create_d3d_sample to a separate helper. 2024-03-25 18:03:43 +01:00
Rémi Bernon
da2c20a2e6 mf/tests: Check that pan scan and geometric apertures are set. 2024-03-25 18:03:43 +01:00
Santino Mazza
624e87a725 crypt32: Fix CryptBinaryToString not adding a separator. 2024-03-25 18:03:37 +01:00
Nikolay Sivov
df97793045 d2d1: Fix a double free on error path (Valgrind).
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-25 12:57:04 +01:00
Nikolay Sivov
967f3a5074 dwrite/shape: Fully initialize shaping context when getting glyph positions (Valgrind).
Actual issue is uninitialized has_gpos_attachment flag, it might be harmless in practice
but it's better to avoid.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-25 12:56:52 +01:00
Rémi Bernon
5ce5dc1f1e configure: Quote ac_cv_lib_soname_MoltenVK when setting SONAME_LIBVULKAN. 2024-03-25 12:56:52 +01:00
Alexandre Julliard
7c5b9304a6 Release 9.5. 2024-03-22 22:28:01 +01:00
Esme Povirk
81e8513ef2 user32/tests: Further updates for win11 TrackPopupMenu failures. 2024-03-22 21:50:46 +01:00
Paul Gofman
2745228b14 ntdll: Don't use debug info presence to detect critical section global status. 2024-03-22 21:50:46 +01:00
Nikolay Sivov
e1606d698f include: Remove XMLSchemaCache60 from msxml2.idl.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-22 21:00:22 +01:00
Nikolay Sivov
19b7f33a6e msxml/tests: Move version-specific schema tests to corresponding modules.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-22 21:00:22 +01:00
Nikolay Sivov
91f3d8b0be msxml/tests: Move some of the validation tests to their modules.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-22 21:00:21 +01:00
Jinoh Kang
0b0259c476 gitlab: Output collapsible section markers in test stage script. 2024-03-22 17:09:26 +01:00
Rémi Bernon
26876b4a6e mfplat: Append MFVIDEOFORMAT user data after the structure padding.
Instead of using the last palette entry, which might be misaligned.
2024-03-22 17:05:40 +01:00
Rémi Bernon
c11f9a8bc9 win32u: Move vkGet(Device|Instance)ProcAddr helpers inline. 2024-03-22 17:05:31 +01:00
Rémi Bernon
a75dde2c1f winevulkan: Stop generating the wine/vulkan_driver.h header. 2024-03-22 17:05:31 +01:00
Rémi Bernon
9ee2adba14 win32u: Move vkGet(Instance|Device)ProcAddr out the drivers. 2024-03-22 17:05:31 +01:00
Rémi Bernon
28873ce8c4 win32u: Move vulkan loading and init guard out of the drivers. 2024-03-22 17:05:31 +01:00
Rémi Bernon
1ddaa1d385 winemac: Use SONAME_LIBVULKAN as an alias for MoltenVK. 2024-03-22 17:05:31 +01:00
Rémi Bernon
737e4411d9 user32/tests: Add some LoadKeyboardLayoutEx tests.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=28170
2024-03-22 17:02:32 +01:00
Rémi Bernon
be62646098 user32/tests: Add missing winetest_pop_context. 2024-03-22 17:02:32 +01:00
Vijay Kiran Kamuju
a71223eed9 user32: Add LoadKeyboardLayoutEx stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=28170
2024-03-22 17:02:31 +01:00
Alexandre Julliard
84d5614b11 server: Add a helper to trace uint64 arrays. 2024-03-22 16:54:09 +01:00
Alexandre Julliard
117fefa274 wow64: Use setjmp/longjmp from ntdll. 2024-03-22 13:09:57 +01:00
Alexandre Julliard
567b31d7f3 wow64cpu: Save non-volatile registers before switching to 32-bit code.
To make it possible to unwind the stack.
2024-03-22 13:06:40 +01:00
Alexandre Julliard
d91f16a24a wow64: Use a .seh handler for system calls. 2024-03-22 13:05:25 +01:00
Rémi Bernon
b053e924e8 server: Process internal messages when checking queue status. 2024-03-21 22:19:58 +01:00
Rémi Bernon
a84517418e server: Check for internal hardware messages before others. 2024-03-21 22:19:58 +01:00
Rémi Bernon
8405fe85d4 win32u: Use a structure to pass peek_message arguments. 2024-03-21 22:19:58 +01:00
Rémi Bernon
994021da99 server: Send WM_WINE_SETCURSOR message only when necessary. 2024-03-21 22:19:58 +01:00
Rémi Bernon
1604d8a202 server: Send WM_WINE_CLIPCURSOR message only when necessary. 2024-03-21 22:19:58 +01:00
Rémi Bernon
f1dca8914c winex11: Accept key and mouse events with QS_RAWINPUT. 2024-03-21 22:19:58 +01:00
David Heidelberg
5d8e8804d4 mailmap: Add a mailmap entry for myself with the proper name.
Signed-off-by: David Heidelberg <david@ixit.cz>
2024-03-21 22:19:58 +01:00
David Heidelberg
a63af560dd d3d9/tests: Replace LPDWORD cast with float_to_int function.
Borrowed from dlls/wined3d/wined3d_private.h

Signed-off-by: David Heidelberg <david@ixit.cz>
2024-03-21 22:19:58 +01:00
Pavel Ondračka
d0e37372cf d3d9/tests: Define enums outside of struct.
Co-authored-by: David Heidelberg <david@ixit.cz>
Signed-off-by: David Heidelberg <david@ixit.cz>
2024-03-21 22:19:58 +01:00
Zebediah Figura
c38df594f5 wined3d: Avoid leaking string buffers in shader_glsl_load_bindless_samplers().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56445
2024-03-21 22:19:58 +01:00
Jacek Caban
3b12583db0 widl: Always close parsed input file.
Fixes a regression from 9d537999e3, which removed closing the file.
This causes Windows widl build to be to remove the temporary file on exit.
2024-03-21 22:19:58 +01:00
Akihiro Sagawa
6ce8a31b0b dsound: Initialize MTA in IDirectSound::Initialize().
RE:D Cherish! (Trial ver) depends on this behavior.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53613
2024-03-21 22:19:58 +01:00
Akihiro Sagawa
67153fa0c3 dsound/tests: Add tests for implicit MTA creation in IDirectSound::Initialize().
On recent Windows, at least Windows 7, a multithread apartment (MTA) is
initialized within IDirectSound::Initialize().
2024-03-21 22:19:58 +01:00
Jinoh Kang
4b0b489f6f kernelbase: Open object with DELETE access for NtMakeTemporaryObject().
Fixes: a4ef56e1d9
2024-03-21 22:19:58 +01:00
Eric Pouech
a7ad588ec5 winedbg: Don't reload a minidump for a different machine.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-21 22:19:58 +01:00
Eric Pouech
70d11a59c6 winedbg: Update the CPU information displayed when reloading a minidump.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-21 22:19:58 +01:00
Eric Pouech
97e584b695 winedbg: Flush expr buffer upon internal exception.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-21 22:19:58 +01:00
Eric Pouech
2e46d81c64 winedbg: Extend 'attach' command to load minidump files.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-21 22:19:58 +01:00
Eric Pouech
8a65cdd13d winedbg: Add ability to set executable name.
Either from command line option, or as a command.
Mostly handy for scripting.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-21 22:19:58 +01:00
Rémi Bernon
5d91ab65fa server: Avoid removing thread twice from its desktop thread list. 2024-03-21 22:19:58 +01:00
Piotr Caban
b13477deb4 advapi32/tests: Remove all files created by RegLoadAppKey tests. 2024-03-21 22:19:58 +01:00
Piotr Caban
cc62cdc1fd advapi32/tests: Test if modifications are saved in RegUnLoadKey. 2024-03-21 22:19:58 +01:00
Piotr Caban
98bd248778 advapi32/tests: Remove all files created by RegLoadKey tests. 2024-03-21 22:19:58 +01:00
Piotr Caban
cdc842f60d advapi32/tests: Merge RegLoadKey and RegUnLoadKey tests. 2024-03-21 22:19:58 +01:00
Piotr Caban
d7aaf51459 winedump: Fix REG_DWORD dumping with no data. 2024-03-21 22:19:58 +01:00
Alexandre Julliard
753875e80b wow64: Access the BTCpuSimulate backend function pointer directly. 2024-03-21 22:19:58 +01:00
Alexandre Julliard
d09501691e wow64: Always use a .seh handler in cpu_simulate(). 2024-03-21 22:19:58 +01:00
Alexandre Julliard
d2c0efe163 wow64: Use a .seh handler in raise_exception(). 2024-03-21 22:19:58 +01:00
Alexandre Julliard
e317eafe8f configure: Don't build wow64 support in non-PE builds. 2024-03-21 22:19:58 +01:00
Rémi Bernon
f67b4f6bf4 ntoskrnl.exe: Open symbolic link with DELETE before making them temporary. 2024-03-21 22:19:58 +01:00
Rémi Bernon
552cec9477 mfplat/mediatype: Use MFCreateWaveFormatExFromMFMediaType in init_am_media_type_audio_format. 2024-03-21 22:19:58 +01:00
Rémi Bernon
1e053810f3 mfplat/mediatype: Implement MFCreateMediaTypeFromRepresentation. 2024-03-21 22:19:57 +01:00
Rémi Bernon
a4fb357c89 mfplat/mediatype: Force WAVEFORMATEXTENSIBLE in MFCreateWaveFormatExFromMFMediaType in some cases. 2024-03-21 22:19:57 +01:00
Rémi Bernon
689868cd50 mfplat/mediatype: Support audio major type in MFInitMediaTypeFromAMMediaType. 2024-03-21 22:19:57 +01:00
Rémi Bernon
45d4aa9f60 mfplat/mediatype: Check format pointers and sizes in MFInitMediaTypeFromAMMediaType. 2024-03-21 22:19:57 +01:00
Rémi Bernon
9ee0720d98 mfplat/tests: Check how AAC attributes are copied from user data. 2024-03-21 22:19:57 +01:00
Rémi Bernon
3593ce002f mfplat/tests: Test initializing mediatype from AAC WAVEFORMATEXTENSIBLE. 2024-03-21 22:19:57 +01:00
Rémi Bernon
2734b266de mfplat/tests: Add some broken results for Win7. 2024-03-21 22:19:57 +01:00
Dmitry Timoshkov
0bffa32226 widl: Add initial implementation of SLTG typelib generator.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-03-21 22:19:57 +01:00
Yuxuan Shui
85d029e3b0 shell32: Rely solely on SHELL_FindExecutable for ShellExecute.
This does two things:

1. ShellExecute no longer searches in the directory where the current executable is in.
2. We always CreateProcess with a fully qualified path, so we CreateProcess won't do its own path
   resolution.

Serendipitously this also fixes some existing todos in tests.
2024-03-21 10:51:00 +01:00
Yuxuan Shui
1bc7db2e7d shell32: Fix FindExecutable search path.
It should look in the currect working directory, instead of the directory where the current
executable is in.
2024-03-21 10:50:59 +01:00
Yuxuan Shui
a1d0e21b0a shell32: PathResolve should remove trailing dot. 2024-03-21 10:50:59 +01:00
Yuxuan Shui
f59947bc10 shell32: PathResolve should be able to find files that already have extensions.
Setting dwWhich to 0xff forces extensions to be appended, even when the file name already includes
an extension. This causes PathResolve to fail in some cases where the file does exist.
2024-03-21 10:50:58 +01:00
Yuxuan Shui
5426e597bb shell32: Make sure PathResolve can find files in the current directory.
Previously looking for file that does exist in current directory will fail because of the early
`!PathFileExists(path)` check, even when the current directory is specified in `dirs`.
2024-03-21 10:50:56 +01:00
Yuxuan Shui
520b7c6d83 shell32: PathResolve(file, NULL, ...) should not look in the current directory.
Unless it's explicitly specified.
2024-03-21 10:50:55 +01:00
Yuxuan Shui
c6fa51a949 shell32/tests: Check ShellExecute is looking in the correct current directory. 2024-03-21 10:50:55 +01:00
Yuxuan Shui
ae70b66dce shell32/tests: Check FindExecutable is looking in the correct current directory.
FindExecutable should look in the current working directory, not relative to the current executable
image (which is what SearchPathW(NULL, ...) does).
2024-03-21 10:50:54 +01:00
Rémi Bernon
7c7e55892e winegstreamer: Append an optional parser before decoders. 2024-03-21 10:50:32 +01:00
Rémi Bernon
8ae8063743 winegstreamer: Release sink caps in the error path. 2024-03-21 10:50:32 +01:00
Jinoh Kang
a4ef56e1d9 server: Check for DELETE access in NtMakeTemporaryObject(). 2024-03-20 23:16:24 +01:00
Esme Povirk
0b472874af user32/tests: Accept WM_ACTIVATE in TrackPopupMenu. 2024-03-20 23:15:40 +01:00
Esme Povirk
290dd95dd4 gdiplus: Calculate region bounding box without generating HRGN. 2024-03-20 23:07:34 +01:00
Esme Povirk
423ba9cb23 gdiplus/tests: Region bounds aren't rounded. 2024-03-20 23:05:27 +01:00
Rémi Bernon
9f3f61283d win32u: Avoid a crash when cleaning up a monitor without an adapter. 2024-03-20 23:05:06 +01:00
Giovanni Mascellani
a78cea20d1 d2d1: Compile the pixel shader with D3DCompile(). 2024-03-20 23:04:48 +01:00
Jinoh Kang
25ffa32beb Revert "ntdll/tests: Load NtMakeTemporaryObject() dynamically."
This reverts commit 4fdb45f23f.

NtMakeTemporaryObject() has existed since at least Windows NT 3.10.
2024-03-20 19:00:14 +01:00
Vijay Kiran Kamuju
3719aed1f9 d3dcompiler: Add D3DCreateLinker stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52622
2024-03-20 09:15:18 +01:00
Paul Gofman
86557b9e0b strmbase: Fallback to InitializeCriticalSection() if RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO is unsupported. 2024-03-19 23:02:11 +01:00
Zebediah Figura
525ef1bf77 quartz/tests: Add some tests for VMR7 renderless mode. 2024-03-19 23:02:11 +01:00
Zebediah Figura
668c959f5a quartz: Return S_OK from IVMRSurfaceAllocator_PrepareSurface(). 2024-03-19 23:02:11 +01:00
Zebediah Figura
442ef40665 quartz: Implement IVMRSurfaceAllocatorNotify::AdviseSurfaceAllocator(). 2024-03-19 23:02:11 +01:00
Zebediah Figura
4c40aeb90b quartz: Reimplement the VMR7 using the VMR7 presenter. 2024-03-19 23:02:11 +01:00
Zebediah Figura
e428afe4ae quartz: Implement SetVideoClippingWindow() and PresentImage() in the VMR7 presenter. 2024-03-19 23:02:11 +01:00
Rémi Bernon
69f8118883 winevulkan: Allow only one vulkan surface at a time for an HWND.
Fixes bb872831de which lost this from the
winex11 driver. This might be something we want to relax at some point
to allow multiple APIs to draw to the same HWND, but it was done like
that before and it is technically a regression.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56380
2024-03-19 23:02:11 +01:00
Vijay Kiran Kamuju
2fd582e165 urlmon: Add stub for ordinal 414.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53635
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52352
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48085
2024-03-19 23:02:11 +01:00
Jinoh Kang
fa7c837f91 ntdll/tests: Don't import kernel32.RtlPcToFileHeader.
kernel32.RtlPcToFileHeader is an export forwarder to
ntdll.RtlPcToFileHeader and does not exist on Windows 8 or earlier.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56458
2024-03-19 23:02:11 +01:00
Rémi Bernon
de265dfa0b winebus: Remove devices that are ignored wrt hidraw preferences.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56450
2024-03-19 23:02:11 +01:00
Rémi Bernon
8b41c2cfdd winebus: Prefer hidraw for everything that is not a game controller.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56450
2024-03-19 23:02:11 +01:00
Rémi Bernon
ebfe2653ea winebus: Read hidraw device usages from their report descriptors.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56450
2024-03-19 23:02:11 +01:00
Rémi Bernon
d48e250835 winebus: Add HID usages in the device descriptor when possible.
As a hint for the frontend to decide whether to use hidraw.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56450
2024-03-19 23:02:11 +01:00
Rémi Bernon
eac5ad2a26 mfplat/mediatype: Implement MFInitMediaTypeFromMFVideoFormat. 2024-03-19 23:02:11 +01:00
Rémi Bernon
899abeafe4 mfplat/tests: Add tests for MFInitMediaTypeFromMFVideoFormat. 2024-03-19 23:02:11 +01:00
Rémi Bernon
a712d7ec87 mfplat/mediatype: Stub MFInitMediaTypeFromMFVideoFormat. 2024-03-19 23:02:11 +01:00
Rémi Bernon
fe0c129e0b mfplat/tests: Check the conditions for the MFVideoFlag_BottomUpLinearRep flags. 2024-03-19 23:02:11 +01:00
Rémi Bernon
b1d7c03514 mfplat/mediatype: Append user data in MFCreateMFVideoFormatFromMFMediaType. 2024-03-19 23:02:11 +01:00
Rémi Bernon
75a5263c60 mfplat/tests: Test that MFCreateMFVideoFormatFromMFMediaType appends user data. 2024-03-19 23:02:11 +01:00
Rémi Bernon
7598556b64 mfplat/tests: Test that aperture is dropped with VIDEOINFOHEADER2.
But preserved with MFVIDEOFORMAT.
2024-03-19 23:02:11 +01:00
Hans Leidekker
4fdb45f23f ntdll/tests: Load NtMakeTemporaryObject() dynamically. 2024-03-19 23:02:11 +01:00
Zhenbo Li
b4a5775ffb shell32: Create nonexistent destination directories in FO_MOVE.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=25207
2024-03-19 23:02:11 +01:00
Zebediah Figura
19627b13e4 shell32/tests: Remove obsolete workarounds from test_move(). 2024-03-19 23:02:11 +01:00
Alexandre Julliard
1bb011f815 ntdll/tests: Update the KiUserExceptionDispatcher test for ARM64EC. 2024-03-19 23:02:11 +01:00
Alexandre Julliard
2c22295233 ntdll/tests: Fix exception address checks in child process on ARM64EC. 2024-03-19 22:26:07 +01:00
Alexandre Julliard
d70dd61030 msvcrt: Use floating point comparison builtins also in MSVC mode. 2024-03-19 11:06:03 +01:00
Alexandre Julliard
5cf558935d netprofm: Use the correct symbols for error codes. 2024-03-19 10:05:57 +01:00
Mark Jansen
9e639ff1f6 kernel32/tests: Add tests for job object accounting.
Signed-off-by: Mark Jansen <mark.jansen@reactos.org>
2024-03-18 23:21:37 +01:00
Santino Mazza
b37d3f232b mf/topoloader: Preserve input topology id. 2024-03-18 23:21:37 +01:00
Santino Mazza
4da091eddd mf/test: Check the topologies id's in topo loader. 2024-03-18 23:21:37 +01:00
Rémi Bernon
fc97535ccb mfplat/mediatype: Implement some VIDEOINFOHEADER2 dwInterlaceFlags conversion. 2024-03-18 23:21:37 +01:00
Rémi Bernon
76abdf3403 mfplat/mediatype: Implement VIDEOINFOHEADER2 dwControlFlags conversion. 2024-03-18 23:21:37 +01:00
Rémi Bernon
5a34601606 mfplat/mediatype: Implement MF_MT_FRAME_RATE from VIDEOINFOHEADER2.
Native seems to also treat some frame rate specially, matching a wide
range of time per frame into the same predefined frame rates.
2024-03-18 23:21:37 +01:00
Rémi Bernon
aa385765a1 mfplat: Support flexible frame time in MFAverageTimePerFrameToFrameRate. 2024-03-18 23:21:37 +01:00
Rémi Bernon
578d104cf6 mfplat/tests: Add more MFAverageTimePerFrameToFrameRate tests. 2024-03-18 23:21:37 +01:00
Rémi Bernon
c94c464920 mfplat/mediatype: Set rcSource and rcTarget if stride differs from width. 2024-03-18 23:21:37 +01:00
Rémi Bernon
d0c996b2b4 mfplat/mediatype: Map rcSource to MF_MT_(PAN_SCAN|MINIMUM_DISPLAY)_APERTURE. 2024-03-18 23:21:37 +01:00
Rémi Bernon
66ea15f13a mfplat/mediatype: Set MF_MT_SAMPLE_SIZE from bmiHeader.biSizeImage. 2024-03-18 23:21:37 +01:00
Rémi Bernon
08cafe23d5 mfplat/mediatype: Support FORMAT_VideoInfo2 in MFInitMediaTypeFromAMMediaType. 2024-03-18 23:21:37 +01:00
Rémi Bernon
6413303e60 mfplat/tests: Test aperture to VIDEOINFOHEADER fields mapping. 2024-03-18 23:21:37 +01:00
Nikolay Sivov
30140b7d7e msxml6/tests: Add some tests for MXWriter60.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-18 23:21:37 +01:00
Alexandre Julliard
bd5ab1c6cd jscript: Use the correct facility for JScript errors. 2024-03-18 11:00:41 +01:00
Esme Povirk
552cc456d1 user32/tests: Add another missing message for TrackPopupMenu. 2024-03-15 23:49:00 +01:00
Paul Gofman
4d56a33ab0 server: Ignore some ICMP-originated socket errors for connectionless sockets. 2024-03-15 23:48:52 +01:00
Nikolay Sivov
9d3e458c55 wshom/network: Implement UserDomain property.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56434
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-15 23:48:17 +01:00
Alexandros Frantzis
e63da6ea68 win32u: Cancel previous key auto-repeat when starting a new one.
The previous auto-repeat may be associated with a different HWND,
so we cannot rely on the new timer replacing the old timer, and
we don't want simultaneous repeats on different windows in the
same thread.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56307
2024-03-15 17:55:30 +01:00
Alexandros Frantzis
7a25bd885e win32u: Cancel auto-repeat only if the repeat key is released.
This fixes the behavior to match other systems, where releasing
an unrelated key does not affect the repeating key.
2024-03-15 17:55:28 +01:00
Eric Pouech
819d8692c6 dbghelp: No longer embed unwind information in minidump (x86_64).
This can generate very long time when saving the minidump, but
also when reloading it.
Unwind information is expected to be gotten from an image matching
the modules listed in the minidump for Normal mode.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55798
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-15 15:06:38 +01:00
Eric Pouech
6b9c1682b1 winedbg: Reload module without virtual flag.
So that we can get to debug info.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-15 15:06:38 +01:00
Eric Pouech
aabf6334f3 winedbg: Fallback to PE image when reading memory (minidump).
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-15 15:06:38 +01:00
Eric Pouech
ca95533e8a dbghelp: Add support for V2 unwind info (x86_64).
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-15 15:06:38 +01:00
Rémi Bernon
8dd24ad2a4 mfplat/mediatype: Implement MFInitAMMediaTypeFromMFMediaType for FORMAT_VideoInfo2. 2024-03-15 15:06:38 +01:00
Rémi Bernon
d307cfede9 mfplat/tests: Add tests for MFInitMediaTypeFromVideoInfoHeader2. 2024-03-15 15:06:38 +01:00
Rémi Bernon
4319ada736 mfplat/mediatype: Implement MFInitMediaTypeFromVideoInfoHeader2. 2024-03-15 15:06:38 +01:00
Rémi Bernon
e497f0e88d mfplat/mediatype: Implement implicit MFInitMediaTypeFromVideoInfoHeader subtype. 2024-03-15 15:06:38 +01:00
Rémi Bernon
2692cd8b04 mfplat/tests: Test each VIDEOINFOHEADER field conversion separately. 2024-03-15 15:06:38 +01:00
Hans Leidekker
498b632899 ntdll/tests: Fix a test failure. 2024-03-15 15:06:37 +01:00
Kyrylo Babikov
b16b366327 dbghelp: Fix PDB processing using the FPO stream instead of FPOEXT. 2024-03-15 15:06:37 +01:00
Robin Kertels
f166b298ec d3d9/tests: Skip desktop window tests if device creation fails.
Signed-off-by: Robin Kertels <robin.kertels@gmail.com>
2024-03-15 15:06:37 +01:00
Henri Verbeet
47be32f3d1 wined3d: Do not check the input signature element count for sm4+ shaders in shader_spirv_compile_arguments_init().
Shader model 4 fragment shaders can have more than 12 input varyings. That's
fine though, because we don't need to build a varying map for them in the
first place. Note that in principle the ERR in question could still be
triggered by e.g. attempting to use a shader model 4 fragment shader with a
shader model 3 vertex shader.
2024-03-15 15:06:37 +01:00
Zhiyi Zhang
d6ac41a9f4 win32u: Don't enumerate mirrored monitor clones when unnecessary.
These functions don't need to enumerate mirrored monitor clones.
2024-03-15 15:06:37 +01:00
Zhiyi Zhang
793e4640e4 win32u: Don't enumerate mirrored monitor clones for GetSystemMetrics(SM_CMONITORS).
Only one monitor in a mirrored monitor set contributes to the result of GetSystemMetrics(SM_CMONITORS).
Tested manually on Win7 and Win10.
2024-03-15 15:06:37 +01:00
Zhiyi Zhang
6505403e58 win32u: Fix a possible condition that makes EnumDisplayMonitors() not reporting any monitors.
When there are two monitors and they are mirrored, both of them are considered primary. When the
first primary monitor happens to be a clone, EnumDisplayMonitors() ends up not reporting any
monitors because should_enumerate_monitor() returns FALSE and we break out the loop to enumerate
primary monitors after that.

This is a regression from b59619d and my review comments. My indent was to break out of the loop
after finding the *master* primary monitor, not cloned primary monitors, to avoid unnecessary
iterations. However, the primary monitor count is small and it's cleaner this way so let's break
when should_enumerate_monitor() returns TRUE.
2024-03-15 15:06:37 +01:00
Andrew Nguyen
1600f2e6bd ddraw: Release only valid texture parents on ddraw_texture_init failure.
When ddraw_texture_init needs to clean up on failure, it will call the
wined3d_texture_get_sub_resource_parent function on draw_texture in
order to retrieve its parent for a IDirectDrawSurface release call.
However, if draw_texture is NULL, then the function call will crash
due to a null pointer dereference.

Therefore, on failure cleanup, the release operation on the texture
parent should only be performed if draw_texture is not NULL.

This fixes a crash in the Virtual Insanity game demo.
2024-03-15 15:06:37 +01:00
Alexandre Julliard
72fd6e9251 ntdll: Add mappings for more status codes. 2024-03-15 15:06:37 +01:00
Alexandre Julliard
08f46b8de0 include: Add some new status codes.
And sort everything consistently.
2024-03-15 15:06:37 +01:00
Alexandre Julliard
98b7095a21 include: Add some new error codes.
And sort everything consistently.
2024-03-15 15:06:37 +01:00
Jinoh Kang
ce41edab3f ntdll: Implement NtMakePermanentObject. 2024-03-15 15:06:37 +01:00
Jinoh Kang
e368515eef server: Generalize server request make_temporary to set_object_permanence.
Required for implementing NtMakePermanentObject().
2024-03-15 15:06:33 +01:00
Jinoh Kang
d282208ac3 ntdll/tests: Add tests for NtMakeTemporaryObject. 2024-03-15 08:37:42 +01:00
Jinoh Kang
a4ad64dda3 ntdll/tests: Add tests for OBJ_PERMANENT object attribute. 2024-03-15 08:37:39 +01:00
Rémi Bernon
65864f92f2 winevulkan: Get rid of the wine_vk_instance_free helper. 2024-03-14 20:52:33 +01:00
Rémi Bernon
c814cf0d35 winevulkan: Add handle mappings on creation success only. 2024-03-14 20:52:33 +01:00
Rémi Bernon
81ed2e5465 winevulkan: Simplify wine_vk_instance_free helper. 2024-03-14 20:52:33 +01:00
Rémi Bernon
04981ad759 winevulkan: Get rid of the wine_vk_device_free helper. 2024-03-14 20:52:33 +01:00
Rémi Bernon
aaeb221f52 winevulkan: Use a single allocation for instance and physical devices. 2024-03-14 20:52:33 +01:00
Rémi Bernon
bda48ed85e winevulkan: Rename wine_vk_physical_device_alloc parameters and variables. 2024-03-14 20:52:33 +01:00
Rémi Bernon
3b39027655 winevulkan: Pass VkDeviceQueueCreateInfo to wine_vk_device_init_queues. 2024-03-14 20:52:33 +01:00
Rémi Bernon
5ef47e916a winevulkan: Use a single allocation for device and queues. 2024-03-14 20:52:33 +01:00
Rémi Bernon
5bde3f4c97 winevulkan: Use an rb_tree and allocate entries for handle mappings. 2024-03-14 20:52:33 +01:00
Paul Gofman
8b3944e134 ntdll: Only allocate debug info in critical sections with RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO. 2024-03-14 20:52:33 +01:00
Paul Gofman
9115dc0aba explorer: Force debug info in critical sections. 2024-03-14 20:52:33 +01:00
Paul Gofman
95b0e65b07 services: Force debug info in critical sections. 2024-03-14 20:52:33 +01:00
Paul Gofman
90ee219c44 qasf: Force debug info in critical sections. 2024-03-14 20:52:33 +01:00
Paul Gofman
c4ab638083 dsdmo: Force debug info in critical sections. 2024-03-14 20:52:33 +01:00
Paul Gofman
63ff75cf12 diasymreader: Force debug info in critical sections. 2024-03-14 20:52:33 +01:00
Paul Gofman
8d933bf187 cryptowinrt: Force debug info in critical sections. 2024-03-14 20:52:33 +01:00
Zhiyi Zhang
2f094cbfe6 win32u: Support HiDPI for the non-client close button in WS_EX_TOOLWINDOW windows. 2024-03-14 18:41:42 +01:00
Nikolay Sivov
a5a0bc10f9 d3d10_1/tests: Remove todo from now passing test.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-14 18:41:42 +01:00
Nikolay Sivov
e91243a94e d3dx10/tests: Remove todo's from now passing tests.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-14 18:41:42 +01:00
Nikolay Sivov
866cb1ca63 wshom/network: Check pointer argument in get_UserName().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-14 18:41:42 +01:00
Nikolay Sivov
30e5111dd5 wshom/network: Implement ComputerName() property.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56434
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-14 18:41:42 +01:00
Nikolay Sivov
2c325f8bd3 wshom/network: Implement GetTypeInfo().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-14 18:41:42 +01:00
Nikolay Sivov
fcce392066 wshom/network: Use TRACE() for implemented method.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-14 18:41:42 +01:00
Dmitry Timoshkov
ee3b9be8e2 comctl32: Implement IImageList2::Initialize().
... by moving ImageList_Create() implementation.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-03-14 18:41:42 +01:00
Dmitry Timoshkov
fedcd4bb0e comctl32/tests: Add more tests for IImageList2 interface.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-03-14 18:41:42 +01:00
Rémi Bernon
3944b36b98 win32u: Fix incorrect ascii key name in get_config_key.
Fixes 6b8b35f950 which incorrectly
replaced it with string literal, leading to the default setting being
used all the time.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56435
2024-03-14 18:41:42 +01:00
Noah Berner
898892d5f0 advapi32/tests: Add todo_wine to tests that are currently failing. 2024-03-14 18:41:42 +01:00
Rémi Bernon
14743b0ffb mfreadwrite/reader: Handle MF_E_TRANSFORM_STREAM_CHANGE results. 2024-03-14 18:41:42 +01:00
Eric Pouech
7f10145a91 dbghelp: Simplify thread info generation in minidump.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-14 18:41:42 +01:00
Eric Pouech
f799bf025b dbghelp: Don't write minidump from running thread.
In case a minidump is written from current process, create
a dedicated thread to write the minidump (and hide that thread
from the minidump).

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-14 18:41:42 +01:00
Eric Pouech
56193155a0 dbghelp: Use an intermediate buffer in SymFunctionTableAccess (x86_64).
This mainly allows to release internal resources bound to image.
Also follow chained RUNTIME_FUNCTION entries (if any).

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-14 18:41:42 +01:00
Eric Pouech
da22ef6c0d dbghelp/tests: Add tests for function table lookup.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-14 18:41:42 +01:00
Rémi Bernon
b59619d2e4 win32u: Enumerate monitors from their device keys. 2024-03-14 18:41:42 +01:00
Rémi Bernon
b4e4921cb6 win32u: Get rid of the monitor flags. 2024-03-14 18:41:42 +01:00
Rémi Bernon
d77d36b1f4 win32u: Get rid of the adapter display_device. 2024-03-14 18:41:42 +01:00
Rémi Bernon
e6a8fc2448 win32u: Get rid of the monitor state_flags. 2024-03-14 18:41:42 +01:00
Rémi Bernon
caf9585c3c win32u: Get rid of the monitor display_device. 2024-03-14 18:41:42 +01:00
Rémi Bernon
3bcd6f1aab win32u: Split writing monitor to registry to a separate helper. 2024-03-14 18:41:42 +01:00
Rémi Bernon
737e9d7ffc win32u: Add an adapter struct to the device manager context. 2024-03-14 18:41:42 +01:00
Alexandre Julliard
866907ee3d kernelbase: Remove no longer needed DllMainCRTStartup function. 2024-03-14 18:41:42 +01:00
Alexandre Julliard
180bd1044b ntdll: Implement RtlGetCallersAddress. 2024-03-14 18:02:29 +01:00
Alexandre Julliard
92d20c1120 ntdll/tests: Fix a few more test failures on ARM64EC. 2024-03-14 18:02:17 +01:00
Alexandre Julliard
3036dddca4 ntdll/tests: Fix debug register tests on ARM64EC. 2024-03-14 17:19:02 +01:00
Alexandre Julliard
97f07ae211 ntdll/tests: Skip segment register tests on ARM64EC. 2024-03-14 17:19:01 +01:00
Andrew Wesie
f6a1844dbe wined3d: Use bindless textures for GLSL shaders if possible.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44514
Signed-off-by: Andrew Wesie <awesie@gmail.com>
2024-03-14 10:16:34 +01:00
Zebediah Figura
6e619d98a3 wined3d: Move checking shader_update_mask to shader_glsl_apply_compute_state(). 2024-03-14 10:16:34 +01:00
Zebediah Figura
8e77d28165 wined3d: Rename the shader_select_compute method to shader_apply_compute_state.
Following shader_apply_draw_state.
2024-03-14 10:16:32 +01:00
Zebediah Figura
a81bcbe0a9 d3d11/tests: Add a test for using a large number of SRV resources. 2024-03-14 10:16:32 +01:00
Zebediah Figura
fc18e54e63 d3d9/tests: Remove a no longer accurate comment.
Fixes: 7641980a9e
2024-03-14 10:16:30 +01:00
Daniel Lehman
c1f5f98f79 oleaut32: Return success from GetSizeMax if not dirty. 2024-03-14 10:16:13 +01:00
Daniel Lehman
148db6a6c5 oleaut32/tests: Add tests for GetSizeMax after dirty flag cleared. 2024-03-14 10:16:13 +01:00
Louis Lenders
4edfe426e4 shell32: Try appending .exe when looking up an App Paths key.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51957
2024-03-14 10:16:06 +01:00
Andrew Nguyen
50a1c5bc92 oleaut32: Bump version resource to Windows 10.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55876
2024-03-14 10:11:10 +01:00
Eric Pouech
0d616f9eb0 dbghelp/tests: Test exception information in minidump.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-13 21:04:34 +01:00
Eric Pouech
504d0caae5 dbghelp/tests: Add tests about minidump's callback.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-13 21:04:34 +01:00
Eric Pouech
3316f59041 dbghelp/tests: Add tests about generated memory chunks.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-13 21:04:34 +01:00
Eric Pouech
9620340b6b dbghelp/tests: Add tests for minidumps.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-13 21:04:34 +01:00
Eric Pouech
abac4b879e include: Update minidumpapiset.h.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-13 21:04:34 +01:00
Alexandros Frantzis
5f76872e17 winewayland.drv: Implement wgl(Get)SwapIntervalEXT. 2024-03-13 20:59:56 +01:00
Alexandros Frantzis
065cbb460b winewayland.drv: Implement wglShareLists.
EGL works similarly to GLX, in that it only allows sharing on context
creation, so we adapt the approach used by winex11.
2024-03-13 20:59:54 +01:00
Alexandros Frantzis
ac32f0a81d winewayland.drv: Implement wglCreateContextAttribsARB. 2024-03-13 20:59:52 +01:00
Zebediah Figura
3042c7100c ntdll: Assign a primary token in elevate_token().
This fixes Quicken 2020 installation.
2024-03-13 20:59:42 +01:00
Vijay Kiran Kamuju
929732034c include: Add Windows.UI.ViewManagement.UIViewSettings definitions. 2024-03-13 19:10:58 +01:00
Rémi Bernon
00a541d6a0 win32u: Move D3DKMT VidPn* functions out of winex11. 2024-03-13 18:28:49 +01:00
Rémi Bernon
7299d3728a win32u: Move D3DKMT functions to a new d3dkmt.c source. 2024-03-13 18:28:49 +01:00
Alexandre Julliard
8c1f96f7ab ntdll: Always use SEH support on ARM64. 2024-03-13 11:26:39 +01:00
Alexandre Julliard
c47d6ef1f7 ntdll: Implement __C_specific_handler on ARM64EC. 2024-03-13 11:03:01 +01:00
Alexandre Julliard
7b5267cf63 ntdll: Move __C_specific_handler implementation to unwind.c. 2024-03-13 11:02:44 +01:00
Alexandre Julliard
83949ee269 ntdll: Implement RtlUnwindEx on ARM64EC. 2024-03-13 09:55:32 +01:00
Piotr Caban
174bb7776d ntdll: Workaround sendmsg bug on macOS.
There's a race on macOS when sending socket fd with sendmsg. The fd may get
broken if it's closed before recvmsg is called.
2024-03-12 22:36:12 +01:00
David Gow
e2b1de523e evr/dshow: Support NV12 in evr_render.
Add support for NV12 to evr_render(), as otherwise no video is rendered
at all in games like Age of Empires II DE.

In the process, the evr_copy_sample_buffer() function has been
refactored to move the MFCopyImage() call into format-specific code (to
better handle multi-planar formats cleanly).

Signed-off-by: David Gow <david@ingeniumdigital.com>
2024-03-12 22:36:12 +01:00
Hans Leidekker
1482e2f960 dnsapi/tests: Skip tests if no CNAME records are returned. 2024-03-12 22:36:12 +01:00
Dmitry Timoshkov
7c7702f91d kerberos: Allocate memory for the output token if requested.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-03-12 22:36:12 +01:00
Andrew Nguyen
2c8d4f5abd ddraw: Reserve extra space in the reference device description buffer.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56367
2024-03-12 22:36:12 +01:00
Dmitry Timoshkov
e42afe7daf wineps.drv: Return default resolution if PPD doesn't provide the list of supported resolutions.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-03-12 22:36:12 +01:00
Alexandre Julliard
f42316c86d ntdll: Port the RtlRestoreContext test to ARM. 2024-03-12 22:36:12 +01:00
Alexandre Julliard
74d1dbb95a ntdll: Port the RtlRestoreContext test to ARM64. 2024-03-12 22:36:12 +01:00
Alexandre Julliard
5286ed3b0a ntdll: Add test for non-volatile regs in consolidated unwinds. 2024-03-12 22:36:12 +01:00
Alexandre Julliard
ffade87df1 ntdll/tests: Fix a backtrace test failure on Windows ARM64. 2024-03-12 20:58:19 +01:00
Alexandre Julliard
99aee076e5 ntdll/tests: Directly link to setjmp(). 2024-03-12 20:49:21 +01:00
Alexandre Julliard
fd865a8386 include: Define setjmpex prototype even when it's a builtin. 2024-03-12 20:49:21 +01:00
Alexandre Julliard
66f940a2ec ws2_32/tests: Fix a couple of failures on Windows. 2024-03-12 20:49:21 +01:00
Marcus Meissner
084c8cc9c0 ntdll/tests: Fix size passed to GetModuleFileNameW. 2024-03-12 20:49:21 +01:00
Dmitry Timoshkov
354ddcb382 d2d1: Make some strings const.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-03-12 13:43:41 +01:00
Brendan McGrath
bbdc50c532 comdlg32: Don't treat cmb1 as the printer list unless in PRINT_SETUP.
This changes WMCommandW to match WMCommandA.
2024-03-12 13:43:41 +01:00
Brendan McGrath
39bd338a62 comdlg32: Use ANSI functions in ANSI WMCommandA. 2024-03-12 13:43:41 +01:00
Brendan McGrath
91207991f2 comdlg32: Populate printer name on the print dialogs.
This will display the name of the selected printer on the Print dialog
and the default printer on the Print Setup dialog
2024-03-12 13:43:41 +01:00
Brendan McGrath
8b7d1a65d0 comdlg32: Add resolutions to PRINTDLG_ChangePrinterW.
This was done in PRINTDLG_ChangePrinterA, but missing from
PRINTDLG_ChangePrinterW
2024-03-12 13:43:41 +01:00
Brendan McGrath
4ec559743d comdlg32: Use values from DeviceCapabilities in combobox.
dpiX,dpiY are the default printer values from the GetDeviceCaps calls.
This causes the item data to be the same for every option in the
combobox.

The item data should reflect the selected values.
2024-03-12 13:43:41 +01:00
Gabriel Ivăncescu
a9b3fdd3ae shell32: Construct the proper path target for UnixFolder.
Worse than just no unix integration is that it can actually crash if you
parse e.g. "/".

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-03-12 08:32:18 +01:00
Nikolay Sivov
40afa8d937 d3d10/tests: Add a small effect compilation test.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-12 08:31:51 +01:00
Nikolay Sivov
a44681e19b d3dcompiler: Wrap fx_4_x output in a dxbc container.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-12 08:31:51 +01:00
Nikolay Sivov
d01ae1512f d3dcompiler: Set correct compilation target for effects profiles.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-12 08:31:51 +01:00
Zhiyi Zhang
e21244f7a3 mfreadwrite: Fix a memory leak (Coverity). 2024-03-12 08:31:36 +01:00
Brendan Shanks
4860fbe7b5 secur32: Replace sprintf with snprintf to avoid deprecation warnings on macOS. 2024-03-11 22:19:49 +01:00
Brendan Shanks
5851ba8686 opengl32: Replace sprintf with snprintf/asprintf to avoid deprecation warnings on macOS. 2024-03-11 21:22:41 +01:00
Brendan Shanks
3af1e7df21 mountmgr: Replace some malloc/sprintf/strcpy calls with asprintf. 2024-03-11 21:22:08 +01:00
Brendan Shanks
a5b8e68422 mountmgr: Replace sprintf with snprintf to avoid deprecation warnings on macOS. 2024-03-11 21:22:08 +01:00
Jacek Caban
81111326ff configure: Don't explicitly enable -Wenum-conversion on Clang.
Clang enables -Wenum-conversion by default anyway, we add it to CFLAGS to enable them on GCC.
When explicitly enabled, Clang also enables additional warnings. Some of those warnings, like
-Wenum-enum-conversion, are too strict to be practical with win32, so avoid enabling them.
2024-03-11 20:11:18 +01:00
Jinoh Kang
b527b232cf tools/gitlab: Run make_specfiles before building.
Since wine commit 401288a78d (make_specfiles: Generate a list of
syscalls from the corresponding spec files., 2023-11-16), spec files
are used to auto-generate the following files:

- dlls/ntdll/ntsyscalls.h (from dlls/ntdll/ntdll.spec)
- dlls/win32u/win32syscalls.h (from dlls/win32u/win32u.spec)
2024-03-11 18:46:09 +01:00
Brendan Shanks
befd7abe10 server: Remove support for msg_accrights FD passing. 2024-03-11 18:12:03 +01:00
Brendan Shanks
af2c686628 ntdll: Remove support for msg_accrights FD passing. 2024-03-11 18:12:03 +01:00
Nikolay Sivov
f2e6fc695a include: Add ID2D1DeviceContext6 definition.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-11 18:12:03 +01:00
Nikolay Sivov
94f5cd1d30 include: Add ID2D1Factory7 definition.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-11 18:12:03 +01:00
Paul Gofman
d71fb7229f imm32: Set lengths to 0 for NULL strings in ImmSetCompositionString(). 2024-03-11 18:12:03 +01:00
Alexandre Julliard
834a88fc3f secur32/tests: Update count for new winehq.org certificate. 2024-03-11 18:12:03 +01:00
Alexandre Julliard
38fb2f41ad ntdll: Share RtlCaptureStackBackTrace implementation across platforms. 2024-03-11 17:31:38 +01:00
Alexandre Julliard
2bf209bb4f ntdll: Export RtlVirtualUnwind2 and RtlWalkFrameChain. 2024-03-11 17:29:44 +01:00
Alexandre Julliard
3418bf6ccd ntdll: Implement RtlWalkFrameChain on ARM64EC. 2024-03-11 17:29:44 +01:00
Alexandre Julliard
6184f74ef5 ntdll: Implement RtlWalkFrameChain on ARM64. 2024-03-11 17:29:44 +01:00
Alexandre Julliard
3938478aab ntdll: Implement RtlWalkFrameChain on ARM. 2024-03-11 17:29:44 +01:00
Alexandre Julliard
37ded7380e ntdll: Implement RtlWalkFrameChain on i386. 2024-03-11 17:29:44 +01:00
Alexandre Julliard
f127448d00 ntdll: Implement RtlWalkFrameChain on x86-64. 2024-03-11 17:29:44 +01:00
Alexandre Julliard
6d8b4e661f ntdll: Implement RtlRestoreContext on ARM64EC. 2024-03-11 16:43:44 +01:00
Alexandre Julliard
2ab736e292 configure: Check the correct variable for the Wayland EGL library.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56411
2024-03-11 15:19:20 +01:00
Esme Povirk
47e9980bb1 gdiplus: Check bounding box in GdipIsVisibleRegionPoint. 2024-03-11 12:18:49 +01:00
Esme Povirk
14f69583aa user32/tests: Accept HCBT_ACTIVATE in TrackPopupMenu. 2024-03-11 12:18:49 +01:00
Alexandre Julliard
1719aef8cb Release 9.4. 2024-03-08 23:35:07 +01:00
Rémi Bernon
28c52d4ac3 server: Remove desktop from their winstation list before looking for another input desktop. 2024-03-08 17:40:03 +01:00
Zhiyi Zhang
818d9a1210 win32u: Only send mouse input in ReleaseCapture() when a window is captured.
Fix a regression from "bb496ea8 - server: Always queue mouse messages delivered to another window."

Fix ETHER VAPOR Remaster (214570) launches to black screen when the cursor is in the game window.

The game calls ReleaseCapture() when handling WM_MOUSEMOVE. After bb496ea8, WM_MOUSEMOVE is always
queued because the message window is NULL. So ReleaseCapture() ends up queuing another WM_MOUSEMOVE.
So the game ends up handling infinite WM_MOUSEMOVE messages at startup and is not able to do anything.
2024-03-08 17:37:08 +01:00
Zhiyi Zhang
d47b13c45a user32/tests: Add some ReleaseCapture() tests. 2024-03-08 17:37:08 +01:00
Alexandre Julliard
c51c257b06 msvcrt: Import longjmp from ntdll for PE builds. 2024-03-08 17:37:08 +01:00
Alexandre Julliard
d538432d79 msvcrt: Import setjmp/setjmpex from ntdll. 2024-03-08 17:37:08 +01:00
Alexandre Julliard
1d168222fd include: Always use _setjmpex on non-i386 platforms. 2024-03-08 17:37:08 +01:00
Alexandre Julliard
5c26513278 winedump: Dump the __os_arm64x_helper functions. 2024-03-08 17:37:08 +01:00
Alexandre Julliard
4a026f4230 ntdll: Support the __os_arm64x_helper functions in the loader. 2024-03-08 17:37:08 +01:00
Alexandre Julliard
fd5b56b96d ntdll: Remove a misleading WARN. 2024-03-08 17:37:08 +01:00
Alexandre Julliard
8dc2cc24d7 ntdll: Don't copy a missing context in get_thread_context().
Fixes a test failure on ARM64EC.
2024-03-08 09:51:56 +01:00
Zebediah Figura
e92ba2de43 server: Create processes using a limited administrator token by default.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40613
2024-03-08 09:49:52 +01:00
Zebediah Figura
897bcd5d5c ntdll: Elevate processes if requested in the manifest.
Rufus 3.13 Portable requires administrator privileges, and uses a manifest to
elevate itself.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51000
2024-03-08 09:49:52 +01:00
Zebediah Figura
95a91bd816 ntdll: Implement NtSetInformationProcess(ProcessAccessToken). 2024-03-08 09:49:52 +01:00
Zebediah Figura
3103adb6a6 winetest: Elevate test processes on Wine. 2024-03-08 09:49:40 +01:00
Aida Jonikienė
4860be4747 msvcrt: Handle wide specifiers option in __stdio_common_vfscanf().
This prevents log spam in one game.
2024-03-08 09:48:43 +01:00
Esme Povirk
934cfb86b5 mscoree: Implement CLRRuntimeHost_Start. 2024-03-07 23:00:47 +01:00
Paul Gofman
d30dafa14d windows.media.speech: Force debug info in critical sections. 2024-03-07 22:56:13 +01:00
Paul Gofman
84cb31556a windows.gaming.input: Force debug info in critical sections. 2024-03-07 22:56:13 +01:00
Paul Gofman
5152e73779 wmiutil: Force debug info in critical sections. 2024-03-07 22:56:13 +01:00
Paul Gofman
3fd83279c0 winegstreamer: Force debug info in critical sections. 2024-03-07 22:56:12 +01:00
Paul Gofman
8857df969c urlmon: Force debug info in critical sections. 2024-03-07 22:56:12 +01:00
Paul Gofman
ec66697005 quartz: Force debug info in critical sections. 2024-03-07 22:56:12 +01:00
Gabriel Ivăncescu
b1a61e74a3 winex11: Set the correct visual even if alpha matches.
8a71a4a304 caused us to set a different visual
but with the correct alpha prior to actually setting it to the systray's
visual. In this case, the alpha would match and not set it to the systray's
visual. This caused the Ubuntu 23.10.1 default WM to crash.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-03-07 22:56:12 +01:00
Zebediah Figura
a0c390de8d shell32: Fix a test failure in test_DataObject().
Fixes: b6128bbb51
2024-03-07 22:56:12 +01:00
Connor McAdams
ec44170322 d3dx9: Preserve the contents of unaligned compressed destination surfaces.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
2024-03-07 22:56:12 +01:00
Connor McAdams
a1381fbedb d3dx9: Split off image decompression into a helper function.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
2024-03-07 22:56:12 +01:00
Connor McAdams
7ff4e5672d d3dx9: Split D3DXLoadSurfaceFromMemory functionality into a separate function.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
2024-03-07 22:56:12 +01:00
Connor McAdams
20b50c0096 d3dx9: Use base image pointer when decompressing source image.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
2024-03-07 22:56:12 +01:00
Connor McAdams
b5cd4c471a d3dx9/tests: Add more tests for misaligned compressed surface loading.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
2024-03-07 22:56:12 +01:00
Eric Pouech
d094bde414 dbghelp: Fixed module information when unmatched pdb file is loaded.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-07 22:56:12 +01:00
Eric Pouech
6ab88cafaa dbghelp: Don't fail in SymAddSymbol for modules without debug information.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-07 22:56:12 +01:00
Eric Pouech
61f9f5a05f dbghelp: Support SLMFLAG_NO_SYMBOLS in SymLoadModuleEx*().
Also correctly handling ImageName (the passed image name
in SymLoadModule) and LoadedImageName, which is only set when
debug info have been loaded (and is always an absolute path,
contrary to ImageName which can be relative).

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-07 22:56:12 +01:00
Eric Pouech
51a0aaeff4 dbghelp/tests: Extend the tests for SymLoadModule().
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-07 22:56:12 +01:00
David McFarland
1496ce1614 mmdevapi: Add stub for IDeviceTopology. 2024-03-07 22:56:12 +01:00
David McFarland
ec2db2ff75 mmdevapi/tests: Add test for IDeviceTopology. 2024-03-07 22:56:12 +01:00
David McFarland
a30a617212 mmdevapi: Implement IAudioClient3_GetSharedModeEnginePeriod.
For now min/max/default are all hard-coded to ~10ms.
2024-03-07 22:56:12 +01:00
David McFarland
73a6f764d0 mmdevapi: Implement IAudioClient3_InitializeSharedAudioStream. 2024-03-07 22:56:12 +01:00
David McFarland
eef4a25d0c mmdevapi/tests: Add test for AudioClient3_InitializeSharedAudioStream. 2024-03-07 22:56:12 +01:00
Rémi Bernon
0d8bdf392f win32u: Keep the vulkan GUID on the gpu structure. 2024-03-07 22:56:12 +01:00
Rémi Bernon
c8d2955cdc win32u: Split read / write of gpu to registry to separate helpers. 2024-03-07 22:56:12 +01:00
Rémi Bernon
c67726b3d0 win32u: Enumerate devices with a dedicated helper.
Which will allow us to enumerate monitor devices later as well.
2024-03-07 22:56:12 +01:00
Rémi Bernon
788ba75432 win32u: Lookup adapter gpus from their device paths. 2024-03-07 22:56:12 +01:00
Rémi Bernon
955ddc6ea6 win32u: Load gpus from registry before adapters. 2024-03-07 22:56:12 +01:00
Rémi Bernon
c179b269ab win32u: Keep a reference on the adapters gpu. 2024-03-07 22:56:12 +01:00
Zebediah Figura
e5afb283cf shell32: Respect the drop effect in do_paste().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34322
2024-03-07 22:56:12 +01:00
Zebediah Figura
a415874f59 shell32: Set the drop effect from the context menu. 2024-03-07 22:56:12 +01:00
Zebediah Figura
0c35d5cc29 shell32: Remove the no longer used ISFHelper::CopyItems() helper. 2024-03-07 22:56:12 +01:00
Zebediah Figura
a277ab8e42 shell32: Reimplement pasting from a CIDA without ISFHelper. 2024-03-07 22:56:12 +01:00
Alexandre Julliard
1c95001f8f d3dx9/tests: Mark failing tests as todo.
Triggered by the vkd3d 1.11 import.
2024-03-07 22:56:12 +01:00
Alexandre Julliard
27b22fedde d3d10_1/tests: Mark a failing test as todo.
Triggered by the vkd3d 1.11 import.
2024-03-07 22:56:12 +01:00
Alexandre Julliard
1edd53f00f ntdll: Implement _setjmpex on ARM64EC. 2024-03-07 22:56:12 +01:00
Alexandre Julliard
e1d624a06f ntdll: Export longjmp. 2024-03-07 12:38:05 +01:00
Alexandre Julliard
8ec8a7f11c ntdll: Export _setjmpex. 2024-03-07 12:31:09 +01:00
Alexandre Julliard
7a156cbd7f ntdll: Use jump buffer definitions from setjmp.h. 2024-03-07 10:23:15 +01:00
Brendan Shanks
542e11fcd9 quartz: Set the name of internal threads. 2024-03-07 08:58:49 +01:00
Eric Pouech
83476e3d4a dbghelp: Fix some corner case of virtual module loading.
Seen when debugging some game, one can load a virtual module with
a NULL image name.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-06 22:05:51 +01:00
Eric Pouech
4f80a599b6 dbghelp: Mimic native behavior for module name.
Module names appear in three spots in dbghelp:
  A) SymGetModuleInfo() .ModuleName
  B) module enumeration (as parameter in callback)
  C) in symbol/type research in module!name form

Tests show that:
- A) and B) always use only the derivation of the image
  name, whatever the passed module name in SymLoadModule().
- C) can use either the form derived from image name
  {as A) and B)}, but also the passed module name in
  SymLoadModule().

Note: B) is limited to 64 characters, while A) is limited to 32
characters (not tested here).

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-06 22:05:49 +01:00
Eric Pouech
d6d22677da dbghelp: Change order when trying to load modules.
Change from: dll.so   > PE image > ELF/Mach-O images
into         PE image > dll.so   > ELF/Mach-O images

Main goal is in SymLoadModule*(), to not resynchronize the system
modules list when requesting loading of a PE image.
This can gain quite some time in some situations.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-06 22:05:47 +01:00
Eric Pouech
0e3dba2a7a dbghelp: Relax failure conditions.
dbghelp tests build PDB files, without hash table in TPI stream,
but also no types. Native is able to load these PDB files.
So, don't fail when loading a PDB without a TPI hash table and
without any types.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-06 22:05:34 +01:00
Eric Pouech
d05b7c8e19 dbghelp: Search subdirectories in element path.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-06 22:05:34 +01:00
Yuxuan Shui
28b94c4d42 dmime: Handle MIDI control events in MIDI files.
Adding them to the seqtrack, and also implementing playing them from the seqtrack.
2024-03-06 22:04:20 +01:00
Yuxuan Shui
5ff94358a0 dmime: Parse note on/off events and generate a seqtrack. 2024-03-06 22:04:20 +01:00
Yuxuan Shui
1df0e34293 dmime/tests: Call the correct QueryInterface function for DirectMusic track. 2024-03-06 22:04:20 +01:00
Rémi Bernon
24ad74ee26 server: Send emulated mouse messages on primary pointer updates. 2024-03-06 19:20:09 +01:00
Rémi Bernon
40b65e28a7 server: Continuously send pointer update messages while it's down. 2024-03-06 19:20:09 +01:00
Rémi Bernon
d8b8ac85eb server: Generate WM_POINTERENTER / WM_POINTERLEAVE messages. 2024-03-06 19:20:09 +01:00
Rémi Bernon
5b833c83be server: Stop waiting on LL-hooks for non-injected input. 2024-03-06 19:19:47 +01:00
Alexandros Frantzis
4bba16fd18 winewayland.drv: Handle resizing of OpenGL content.
Wayland surfaces don't have an inherent native size that the EGL
implementation can track, so we need to explicitly tell EGL about changes
in the native size with wl_egl_window_resize.

Since the resize can be triggered outside the GL render thread, and
wl_egl_window_resize is not thread safe (with respect to other EGL/GL
calls), we cannot call it directly at will. Instead we mark the
wayland_gl_drawable as resized, and actually call the
wl_egl_window_resize function from the thread in which the respective
drawable is current.

Note that the first EGL/GL operation that requires a new backbuffer
latches whatever native size we have reported, until the next
eglSwapBuffers. In order to ensure the current native size is applied as
soon as possible (to avoid glitches), we check for and apply resizes at
a few extra points where a new backbuffer may be required (e.g.,
glClear, eglMakeCurrent).
2024-03-06 19:12:18 +01:00
Alexandros Frantzis
aed0c822f1 winewayland.drv: Implement wglSwapBuffers. 2024-03-06 19:12:16 +01:00
Alexandros Frantzis
075a0e2623 winewayland.drv: Implement wglMakeCurrent and wglMakeContextCurrentARB. 2024-03-06 19:12:14 +01:00
Alexandros Frantzis
e8f7660c75 winewayland.drv: Implement OpenGL context creation.
Each WGL context is backed by a config-less EGL context. We require the
EGL_KHR_no_config_context extension.
2024-03-06 19:12:12 +01:00
Alexandros Frantzis
e7ccb1480a winewayland.drv: Implement wglSetPixelFormat(WINE).
Introduce the internal wayland_gl_drawable object, which associates a
window (and its backing Wayland surface) with an EGL surface.
2024-03-06 19:12:08 +01:00
Alexandros Frantzis
825ec8c597 winewayland.drv: Implement wglDescribePixelFormat.
Create an array of supported EGLConfigs, and use this information to
populate the PIXELFORMATDESCRIPTOR.
2024-03-06 19:12:07 +01:00
Alexandros Frantzis
d47220a23c winewayland.drv: Implement wglGetProcAddress. 2024-03-06 19:12:05 +01:00
Alexandros Frantzis
e5d995d826 winewayland.drv: Implement wglGetExtensionsString{ARB,EXT}. 2024-03-06 19:12:03 +01:00
Alexandros Frantzis
ea522c6135 winewayland.drv: Initialize core GL functions. 2024-03-06 19:12:01 +01:00
Alexandros Frantzis
aaaac72fdb winewayland.drv: Add skeleton OpenGL driver.
The driver performs basic EGL initialization.
2024-03-06 19:11:56 +01:00
Rémi Bernon
c0d0468da9 winex11: Select XI_Touch* input and translate it to WM_POINTER*. 2024-03-06 19:03:26 +01:00
Rémi Bernon
0f1322d2df winex11: Support XInput2 events on individual windows. 2024-03-06 19:03:26 +01:00
Hans Leidekker
e7ff2688c8 wbemprox: Use separate critical sections for tables and table list. 2024-03-06 19:03:11 +01:00
Ziqing Hui
ff0cd457b4 winegstreamer: Set AvgTimePerFrame in GetOutputType() for WMV decoder.
Krkr2 game engine need AvgTimePerFrame to calculate video frame time.
2024-03-06 19:01:38 +01:00
Ziqing Hui
732ed62819 mf/tests: Test AvgTimePerFrame for WMV decoder DMO. 2024-03-06 19:01:38 +01:00
Zebediah Figura
f8ddba3ad0 shell32: Implement IDataObject::SetData(). 2024-03-06 19:01:28 +01:00
Zebediah Figura
4f02c8ba2d shell32: Reimplement the data object to store a generic array of HGLOBALs. 2024-03-06 19:01:28 +01:00
Zebediah Figura
0344f3aa85 shell32: Do not interpret the direction in IDataObject::EnumFormatEtc(). 2024-03-06 19:01:28 +01:00
Zebediah Figura
b6128bbb51 shell32/tests: Add more tests for IDataObject. 2024-03-06 19:01:28 +01:00
Rémi Bernon
e614610aaf win32u: Introduce and use new reg_(open|create)_ascii_key helpers. 2024-03-06 18:59:34 +01:00
Rémi Bernon
6b8b35f950 win32u: Use set_reg_ascii_value whenever possible. 2024-03-06 18:59:34 +01:00
Rémi Bernon
3909a93bc2 win32u: Remove unnecessary class_guidW double check. 2024-03-06 18:59:34 +01:00
Rémi Bernon
eaed90d9b4 win32u: Use REG_SZ instead of REG_BINARY for some adapter keys. 2024-03-06 18:59:34 +01:00
Rémi Bernon
20a09a3071 win32u: Remove unused wine_devpropkey_monitor_adapternameW property. 2024-03-06 18:59:34 +01:00
Rémi Bernon
ab5d9bb67b win32u: Simplify adapter key path creation from gpu_guid. 2024-03-06 18:59:34 +01:00
Rémi Bernon
8fcc3c4efe win32u: Use char array for the device manager context gpuid. 2024-03-06 18:59:34 +01:00
Zebediah Figura
910bd392f6 mciwave: Abort the playback thread regardless of state when stopping. 2024-03-06 18:57:12 +01:00
Alexandre Julliard
5bb80251b1 vkd3d: Import upstream release 1.11. 2024-03-06 12:45:47 +01:00
Alexandre Julliard
ec2e266c76 ntdll: Implement KiUserExceptionDispatcher on ARM64EC. 2024-03-06 12:32:18 +01:00
Alexandre Julliard
e6ce5d5df7 ntdll: Implement exception dispatching on ARM64EC. 2024-03-06 12:24:15 +01:00
Alexandre Julliard
daea0b9b57 ntdll: Allocate the data structure and stack for the ARM64EC emulator. 2024-03-06 12:24:15 +01:00
Nikolay Sivov
5eb46419b4 d3d10_1/tests: Add an effect compilation test using 10.1 features.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-05 22:32:17 +01:00
Nikolay Sivov
0a9ad614e6 d3d10_1/tests: Add a basic test for returned preferred profiles.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-05 22:32:17 +01:00
Henri Verbeet
37bb8c14e0 wined3d: Slightly adjust an ERR in shader_spirv_compile_shader().
We're not necessarily compiling DXBC shaders here after commit
1474f5cc47.
2024-03-05 20:52:48 +01:00
Daniel Lehman
91e5d21cdf ole32/tests: Remove todo from lock tests. 2024-03-05 20:52:41 +01:00
Daniel Lehman
2fc073591b ole32: Do not lock storage in read-only deny-write mode. 2024-03-05 20:52:41 +01:00
Zebediah Figura
6fa1458378 wined3d/nvrc: Remove now redundant WINED3D_TSS_RESULT_ARG handlers.
nvrc_update_color_op() takes care of this. Redirect WINED3D_TSS_RESULT_ARG to nvrc_colorop() so that the shader is invalidated.
2024-03-05 20:50:40 +01:00
Zebediah Figura
c3840b6c49 wined3d/nvrc: Move alpha op application to nvrc_apply_draw_state(). 2024-03-05 20:50:39 +01:00
Zebediah Figura
115d690731 wined3d/nvrc: Remove now redundant STATE_SAMPLER handlers.
nvrc_update_color_op() takes care of this. Redirect STATE_SAMPLER to nvrc_colorop() so that the shader is invalidated.
2024-03-05 20:50:38 +01:00
Zebediah Figura
1c03b29f7b wined3d/nvrc: Move color ops from nvrc_colorop() to nvrc_apply_draw_state(). 2024-03-05 20:50:37 +01:00
Zebediah Figura
e65679f455 wined3d/nvrc: Move FFP bumpenv constant loading to nvrc_apply_draw_state(). 2024-03-05 20:50:35 +01:00
Zebediah Figura
8f2586cfb5 wined3d/nvrc: Move TEXTUREFACTOR constant loading to nvrc_apply_draw_state(). 2024-03-05 20:50:34 +01:00
Martin Storsjö
aa78b46e9c arm64: Expose information about more modern CPU extensions.
Signed-off-by: Martin Storsjö <martin@martin.st>
2024-03-05 20:50:23 +01:00
Rémi Bernon
c9ffab4602 win32u: Add support for sending and receiving WM_POINTER* messages. 2024-03-05 20:50:07 +01:00
Rémi Bernon
61d1c18957 server: Add support for sending and receiving WM_POINTER* messages. 2024-03-05 20:50:07 +01:00
Rémi Bernon
48f8db6c30 mouhid.sys: Send WM_POINTER* messages on contact updates. 2024-03-05 20:50:07 +01:00
Rémi Bernon
13f908b9b5 dinput/tests: Test the WM_POINTER* message parameter values. 2024-03-05 20:50:07 +01:00
Rémi Bernon
bb5f0e122f win32u: Use a custom struct hid_input for NtUserSendHardwareInput. 2024-03-05 20:50:06 +01:00
Rémi Bernon
66baee8b99 win32u: Use NtUserCallHwndParam interface for __wine_send_input. 2024-03-05 20:50:06 +01:00
Eric Pouech
ad921b3c56 dbghelp: Return matched information for path_find_symbol_file.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-05 20:46:36 +01:00
Eric Pouech
f824a72c7f dbghelp: Get rid of struct pdb_lookup.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-05 20:46:36 +01:00
Eric Pouech
feee77f84d dbghelp: Rework loading of PDB string table.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-05 20:46:36 +01:00
Eric Pouech
f014745676 dbghelp: Always use SymGetSrvIndexFileInfo() for files lookup.
This will help separate debug info files lookup from their actual
loading once found and correctly matched.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-05 20:46:34 +01:00
Eric Pouech
ec099b8ea3 dbghelp/tests: Add more tests for SymLoadModule*.
- SymLoadModules flags (SLMFLAG_VIRTUAL and SLMFLAG_NO_SYMBOLS),
- handling of load details (SymType, ImageName vs LoadedImageName,
  various instances of module name).

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-05 20:46:26 +01:00
Alexandre Julliard
a9428fe390 ntdll: Use a common wrapper to call unwind handlers on ARM. 2024-03-05 14:34:52 +01:00
Alexandre Julliard
5f890e3ce9 ntdll: Use a common wrapper to call unwind handlers on ARM64. 2024-03-05 14:34:52 +01:00
Alexandre Julliard
d6285af1fc ntdll: Use a common wrapper to call exception handlers on ARM. 2024-03-05 10:30:26 +01:00
Alexandre Julliard
8d8c10fe92 ntdll: Use a common wrapper to call exception handlers on ARM64. 2024-03-05 10:30:17 +01:00
Alexandre Julliard
5c98412929 ntdll: Also copy non-volatile regs on collided unwind.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56401
2024-03-05 10:14:18 +01:00
Paul Gofman
6f55a13169 ntdll: Respect red zone in usr1_handler() on x64.
Fixes a regression introduced by
efd3d31082.
2024-03-05 09:03:48 +01:00
Eric Pouech
c1b8db0c28 dbghelp: Don't search the passed path in SymFindFileInPath.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-04 22:52:13 +01:00
Eric Pouech
1648569fad dbghelp: Don't fail on loading 64bit modules on 32bit applications.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-04 22:52:13 +01:00
Eric Pouech
0ca1350a03 dbghelp/tests: Add tests about SymLoadModule and finding pdb files.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-04 22:52:13 +01:00
Eric Pouech
a56b018713 dbghelp/tests: Add tests for SymFindFileInPath for pdb files.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-04 22:52:13 +01:00
Eric Pouech
2abbee9540 dbghelp/tests: Add tests for image files lookup.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-03-04 22:52:13 +01:00
Zhiyi Zhang
058bfeed1d advapi32/tests: Test creating registry keys with a NULL return key pointer. 2024-03-04 22:50:27 +01:00
Zhiyi Zhang
d2045611b6 advapi32: Check NULL return key pointers when creating registry keys.
Fix Warlords Battlecry III (433280) crashes at launch.
2024-03-04 22:50:25 +01:00
Florian Will
8dc5242e29 ws2_32: Implement TCP_KEEP{ALIVE,CNT,INTVL} options. 2024-03-04 22:39:57 +01:00
Florian Will
26136fda8d ws2_32/tests: Test TCP_KEEP{ALIVE,CNT,INTVL} options. 2024-03-04 22:39:57 +01:00
Florian Will
6d2a900487 include: Add TCP_KEEPCNT and TCP_KEEPINTVL definitions. 2024-03-04 22:39:57 +01:00
Connor McAdams
eb06945b5b webservices/tests: Fix -Warray-bounds warning on gcc 13.2.0.
Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
2024-03-04 16:54:54 +01:00
Nikolay Sivov
2c9f67938f d3dcompiler: Enable semantic names mapping in compatibility mode.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-04 16:54:54 +01:00
Zebediah Figura
af7f11bb2a shell32: Implement Paste in the item menu.
Based on a patch by Michael Müller.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34319
2024-03-04 15:39:06 +01:00
Zebediah Figura
5744ef64a4 shell32: Respect the parent PIDL when pasting from CFSTR_SHELLIDLIST. 2024-03-04 15:39:06 +01:00
Zebediah Figura
c4b38894cd shell32: Reimplement pasting from CF_DROP directly.
Don't convert the source to PIDLs just to convert it back to paths.
2024-03-04 15:39:06 +01:00
Zebediah Figura
48bcf74678 shell32: Add a get_data_format() helper.
Make the logic in do_paste() a bit more idiomatic.
2024-03-04 15:39:06 +01:00
Zebediah Figura
35f5997075 shell32: Move DoPaste() up.
And simplify the control flow a bit while we're at it.
2024-03-04 15:39:06 +01:00
Zebediah Figura
0bc47920d3 shell32: Remove useless and commented out code. 2024-03-04 15:39:06 +01:00
Zebediah Figura
08219c02b3 shell32/tests: Add tests for context menu copy/paste. 2024-03-04 15:39:06 +01:00
Zebediah Figura
366398cc53 msi: Create the custom action server as an elevated process.
Dragon Naturally Speaking 12.5 manually validates that the custom action server
is elevated.

One might imagine that the right approach here is to add a manifest to msiexec;
however, msiexec does not always trigger a UAC prompt on Windows.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51143
2024-03-04 15:39:06 +01:00
Zebediah Figura
b381f9d095 wine.inf: Set the EnableLUA value to 1.
This signifies that UAC is active.

Foobar2000 checks this value, and won't even try to elevate itself otherwise.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50727
2024-03-04 15:39:06 +01:00
Zebediah Figura
8cc22a60c3 shell32: Elevate the child process for the "runas" verb.
Like all other verbs, the actual command line template is specified in the
registry. The elevation seems to be hardcoded into shell32 for this specific
verb.

The Foobar2000 installer requires administrator privileges, and elevates itself
in this way.

Based on a patch by Michael Müller.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50727
2024-03-04 15:39:06 +01:00
Philip Rebohle
ec6879b78e winevulkan: Update to VK spec version 1.3.279.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2024-03-04 15:39:06 +01:00
Hans Leidekker
90f31fbd0a netprofm/tests: Mark a test result as broken on Windows 11. 2024-03-04 15:39:06 +01:00
Shaun Ren
43220a6063 sapi: Implement ISpeechVoice::{get/putref}_Voice. 2024-03-04 15:39:06 +01:00
Shaun Ren
7c384f361a sapi: Implement ISpeechVoice::{get/put}_Volume. 2024-03-04 15:39:06 +01:00
Rémi Bernon
bf800b5e76 mfreadwrite/reader: Adjust min_buffer_size to be 1s of audio data. 2024-03-04 15:39:06 +01:00
Zhiyi Zhang
7865026f53 rtworkq: Avoid possible scenarios that an async callback could be called twice.
Consider a thread A running waiting_item_cancelable_callback() and a thread B running queue_cancel_item(),
which is the scenario from canceling a work item right after it gets submitted by RtwqPutWaitingWorkItem().
When the invoke_async_callback() call in queue_cancel_item() for item key with WAIT_ITEM_KEY_MASK in
thread B runs before the queue_release_pending_item() in waiting_item_cancelable_callback() in thread
A, the async callback is called the first time in queue_cancel_item() with RTWQ_E_OPERATION_CANCELLED,
then a second time in waiting_item_cancelable_callback(). We should check in queue_release_pending_item()
whether an item is already removed by queue_cancel_item() before calling async callbacks.

A different scenario could happen for scheduled_item_cancelable_callback() with the function ends
up calling its async callback even after it has been canceled by queue_cancel_item().
2024-03-04 15:39:06 +01:00
Zhiyi Zhang
f3bab6c5b7 rtworkq: Avoid closing a thread pool object while its callbacks are running.
Consider a thread A running scheduled_item_cancelable_callback() and a thread B running queue_cancel_item(),
which is the scenario from canceling a work item right after it gets submitted by RtwqScheduleWorkItem().
When the CloseThreadpoolTimer() call in queue_cancel_item() in thread B runs before the queue_release_pending_item()
in scheduled_item_cancelable_callback() in thread A, scheduled_item_cancelable_callback() ends up
calling work_item_Release() and CloseThreadpoolTimer() is called again for the same timer object. So
the thread pool timer object end up getting released while the scheduled_item_cancelable_callback()
is running, triggering the '!object->num_running_callbacks' assertion in tp_object_release(). This
is actually a double free but the assertion happens before the second free could happen. The same
thing could happen for thread pool wait objects as well.

Fix mf and mfmediaengine tests sometimes trigger the '!object->num_running_callbacks' assertion.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55724
2024-03-04 15:39:06 +01:00
Tim Clem
c5f9d9188a winebus.sys: Only attempt to open joysticks and gamepads in the IOHID backend.
An extension of 3985b7c5. Opening the device for the Touch Bar on
older MacBooks also triggers a permission prompt, so for now it makes
sense to restrict the devices we open.
2024-03-04 15:39:06 +01:00
Zebediah Figura
4a227c62a5 msi: Multiply by 512 in dialog_vcl_add_drives().
The main motivation here is to avoid overflow, and multiplying in one place seems simpler.
2024-03-04 15:39:06 +01:00
Zebediah Figura
d7bbe884ef msi: Store component cost in 512-byte units.
This avoids overflow when component costs exceed 4 GB.
2024-03-04 15:39:06 +01:00
Zebediah Figura
9725a2286a msi: Round costs up to 4096 bytes instead of clamping. 2024-03-04 15:39:05 +01:00
Zebediah Figura
674efeb1f7 msi/tests: Expand costing tests. 2024-03-04 15:39:05 +01:00
Alexandre Julliard
0c35e9adce ntdll: Use the correct structure for non-volatile registers on ARM. 2024-03-04 14:07:28 +01:00
Alexandre Julliard
42cebcca3c ntdll: Use the correct structure for non-volatile registers on ARM64. 2024-03-04 14:07:28 +01:00
Alexandre Julliard
a9671befc1 ntdll: Always use SEH support on ARM. 2024-03-03 23:10:35 +01:00
Alexandre Julliard
40bda46795 ntdll: Port the RtlRaiseException test to ARM. 2024-03-03 23:10:13 +01:00
Alexandre Julliard
077252f13b ntdll: Port the RtlRaiseException test to ARM64. 2024-03-03 23:10:13 +01:00
Tim Clem
0fb7c99c33 win32u: Don't mask keyboard scan codes when processing them for IME.
Fixes missed key up events on older macOS versions, which could
result in out-of-order input.

Fix via Rémi Bernon <rbernon@codeweavers.com>.
2024-03-01 23:14:22 +01:00
Tim Clem
93bc97e54f winemac.drv: Exclude the emoji Touch Bar when looking for input methods.
Fixes weird keyboard behavior on MacBooks with the Touch Bar.
2024-03-01 23:14:22 +01:00
Esme Povirk
55f71fd846 gdiplus: Implement font linking in GdipAddPathString. 2024-03-01 23:14:22 +01:00
Esme Povirk
3ca8204837 gdiplus: Fix use after free in GdipAddPathString. 2024-03-01 23:14:22 +01:00
Paul Gofman
02b68a0ac1 qcap: Force debug info in critical sections. 2024-03-01 23:14:22 +01:00
Paul Gofman
6e1e52cbc3 ole32: Force debug info in critical sections. 2024-03-01 23:14:22 +01:00
Paul Gofman
e02b3379eb mcicda: Force debug info in critical sections. 2024-03-01 23:14:22 +01:00
Paul Gofman
a7d3d574c0 comctl32: Force debug info in critical sections. 2024-03-01 23:14:22 +01:00
Paul Gofman
7c387c0b0e winexinput.sys: Force debug info in critical sections. 2024-03-01 23:14:22 +01:00
Michael Müller
cfab11e16a wine.inf: Register the New menu as a directory background context menu handler.
CDBurnerXP expects the ContextMenuHandlers key to exist, and apparently
enumerates it until it receives ERROR_NO_MORE_ITEMS. If it fails to open the
key, it will spin forever trying to call RegEnumKeyExW(NULL) and getting
ERROR_INVALID_HANDLE.

We could simply create an empty ContextMenuHandlers key here, but this will
allow the New menu to work in the builtin explorer view once shellex handlers
are implemented.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=29523
2024-03-01 23:14:22 +01:00
Yuxuan Shui
f0fc4a0d89 dmime: Parse MIDI Set Tempo meta events and generate a tempotrack. 2024-03-01 23:14:22 +01:00
Yuxuan Shui
1b1f216278 dmime: Implement setting TempoParam for tempotracks.
And add some tests.
2024-03-01 23:14:22 +01:00
Yuxuan Shui
6a3f067eca dmime: Use linked list for tempotrack.
Preparation for supporting setting TempoParam on tempotracks.
2024-03-01 23:14:22 +01:00
Henri Verbeet
9e79b9ffd9 wined3d: Pass "shader->function" as source to vkd3d_shader_scan() in shader_spirv_scan_shader().
Much like we do in shader_spirv_find_graphics_program_variant_vk() for
shader_spirv_compile_shader(). When compiling an Aon9 shader,
"shader->byte_code" points to the DXBC container, while
"shader->function" points to the contained d3dbc shader.
2024-03-01 23:14:22 +01:00
Rémi Bernon
440edde5e1 mfreadwrite/reader: Implement IMFSourceReaderEx_GetTransformForStream. 2024-03-01 23:14:22 +01:00
Rémi Bernon
ea4b9bafb2 mfreadwrite/reader: Create and append a converter transform.
This enables advanced color conversion in all cases, and thus allows
NV12 -> RGB32 conversion even when MF_SOURCE_READER_ENABLE_ADVANCED_VIDEO_PROCESSING
is not set. This should be harmless and makes the code simpler as we
can simply append a VideoProcessor transform in all cases.

The tests todos is tweaked to reflect cases where a single processor
is used, which outputs slightly different attributes to when it is
connected to an upstream decoder. Ultimately we could try to match
native here, but it shouldn't matter too much in the meantime.
2024-03-01 23:14:22 +01:00
Rémi Bernon
d6c9ac94d2 mfreadwrite/reader: Keep the stream transforms in a list. 2024-03-01 23:14:22 +01:00
Rémi Bernon
48cb5297e7 mfreadwrite/reader: Call SetOutputType directly on the decoder transform. 2024-03-01 23:14:22 +01:00
Rémi Bernon
ba3799527c mf/topology_loader: Only propagate some media type attributes. 2024-03-01 23:14:22 +01:00
Rémi Bernon
7325dd4a5a mfreadwrite/reader: Split source_reader_create_decoder_for_stream helper. 2024-03-01 23:14:22 +01:00
Alexandre Julliard
f9dd0fca4c qwave/tests: Remove todo from a succeeding test. 2024-03-01 23:14:22 +01:00
Alexandre Julliard
577c327a44 kernelbase: Implement RaiseException on ARM64EC. 2024-03-01 19:12:10 +01:00
Alexandre Julliard
f35e2d513d ntdll: Implement RtlRaiseException on ARM64EC. 2024-03-01 19:12:10 +01:00
Alexandre Julliard
462b27d87f ntdll/tests: Use a proper handler in the RtlRaiseException test on x86-64. 2024-03-01 19:12:10 +01:00
Alexandre Julliard
ca5984059c ntdll: Implement RtlVirtualUnwind2. 2024-03-01 11:16:54 +01:00
Alexandre Julliard
9ac8d63e22 include: Move unwinding functions definitions to rtlsupportapi.h. 2024-03-01 10:21:48 +01:00
Rémi Bernon
630d79439c winewayland: Remove unnecessary vkDestroySurfaceKHR NULL checks. 2024-03-01 10:21:32 +01:00
Rémi Bernon
a3adb19bef winemac: Remove unnecessary vkDestroySurfaceKHR NULL checks. 2024-03-01 10:21:32 +01:00
Rémi Bernon
e3e628247d winex11: Remove unnecessary vkDestroySurfaceKHR NULL checks. 2024-03-01 10:21:32 +01:00
Rémi Bernon
0dd1502f57 winemac: Remove unnecessary macdrv_get_vk_* helper. 2024-03-01 10:21:29 +01:00
Rémi Bernon
77f4d2207a winex11: Remove unnecessary X11DRV_get_vk_* helpers. 2024-03-01 10:21:29 +01:00
Rémi Bernon
6f122f48d3 winewayland: Remove now unnecessary vulkan function name mapping. 2024-03-01 10:21:29 +01:00
Rémi Bernon
684d51cebb winemac: Remove now unnecessary vulkan function name mapping. 2024-03-01 10:21:29 +01:00
Rémi Bernon
2b25f51e0d winex11: Remove now unnecessary vulkan function name mapping. 2024-03-01 10:21:29 +01:00
Rémi Bernon
f3d3b86668 winevulkan: Succeed VK_KHR_win32_surface procs queries when enabled. 2024-03-01 10:21:29 +01:00
Daniel Lehman
f4a91bcb8a oleaut32: Implement GetSizeMax for BMPs. 2024-03-01 10:12:38 +01:00
Aurimas Fišeras
e5085327ff po: Update Lithuanian translation. 2024-03-01 10:09:05 +01:00
Paul Gofman
1d3b312f22 amstream: Force debug info in critical sections. 2024-02-29 21:22:28 +01:00
Paul Gofman
ce2457d5a9 amstream: Avoid leaking critical section debug info in filter_Release(). 2024-02-29 21:22:27 +01:00
Paul Gofman
c064fdeb8d windows.security.credentials.ui.userconsentverifier: Force debug info in critical sections. 2024-02-29 21:22:26 +01:00
Paul Gofman
ee5828da6a winebus.sys: Force debug info in critical sections. 2024-02-29 21:22:24 +01:00
Paul Gofman
b466a40ffb winmm: Force debug info in critical sections. 2024-02-29 21:22:24 +01:00
Paul Gofman
497992c4ea mciavi32: Force debug info in critical sections. 2024-02-29 21:22:24 +01:00
Jacek Caban
1999e4f3f5 winevulkan: Use VK_EXT_map_memory_placed for memory mapping on wow64. 2024-02-29 21:22:18 +01:00
Jacek Caban
d8e0c8adea winevulkan: Refactor extra extensions handling in wine_vk_device_convert_create_info. 2024-02-29 21:22:18 +01:00
Jacek Caban
64914849ac winevulkan: Use handle map for memory objects. 2024-02-29 21:22:18 +01:00
Jacek Caban
84e4620706 winevulkan: Rename wine_device_memory mapping to vm_map.
To avoid conflict with handle mapping macros.
2024-02-29 21:22:16 +01:00
Jacek Caban
7995f3813c winevulkan: Remove no longer needed spec workarounds. 2024-02-29 21:22:13 +01:00
Jacek Caban
f380e34a5e winevulkan: Update to VK spec version 1.3.278.
The new spec uses length attribute for some static arrays. Change is_dynamic_array
to account account for that. Eventually we could use the new information to improve
conversion thunks.
2024-02-29 21:22:06 +01:00
Noah Berner
2dcc8ec08d comctl32/tests: Fix test that fails on Feb 29th. 2024-02-29 19:25:10 +01:00
Daniel Lehman
8c5b08d81c oleaut32: Implement GetSizeMax for empty picture. 2024-02-29 19:22:22 +01:00
Daniel Lehman
beececd101 oleaut32/tests: Add tests for IPersistStream::GetSizeMax. 2024-02-29 19:22:22 +01:00
Zebediah Figura
820b5ff0d1 shell32/tests: Add a few more tests for the New menu. 2024-02-29 19:21:50 +01:00
Zebediah Figura
9d9c3960ef shell32: Implement InvokeCommand() for the new menu. 2024-02-29 19:21:47 +01:00
Zebediah Figura
c2ee8627ff shell32: Enumerate the ShellNew key for Folder. 2024-02-29 19:21:37 +01:00
Zebediah Figura
227408c4fc wine.inf: Add ShellNew registry entries for Folder. 2024-02-29 19:21:08 +01:00
Zebediah Figura
e564b0d775 shell32: Return an initial "New" menu. 2024-02-29 19:19:28 +01:00
Alexandre Julliard
c67053bcce include: Remove the private definitions of the exception flags. 2024-02-29 18:14:48 +01:00
Alexandre Julliard
64b2e44697 widl: Use the official definitions for exception flags. 2024-02-29 18:14:48 +01:00
Alexandre Julliard
b0a7439b30 winedbg: Use the official definitions for exception flags. 2024-02-29 18:14:48 +01:00
Alexandre Julliard
18543523e8 wow64: Use the official definitions for exception flags. 2024-02-29 18:14:48 +01:00
Alexandre Julliard
8605708e02 winecrt0: Use the official definitions for exception flags. 2024-02-29 18:14:48 +01:00
Alexandre Julliard
3282eda525 win32u: Use the official definitions for exception flags. 2024-02-29 18:14:48 +01:00
Alexandre Julliard
8739aef4ff msvcrt: Use the official definitions for exception flags. 2024-02-29 18:14:48 +01:00
Alexandre Julliard
35ef1be8ef msvcp90: Use the official definitions for exception flags. 2024-02-29 18:14:48 +01:00
Alexandre Julliard
9c5df8004d krnl386.exe: Use the official definitions for exception flags. 2024-02-29 18:14:48 +01:00
Alexandre Julliard
0698f732af kernelbase: Use the official definitions for exception flags. 2024-02-29 18:14:48 +01:00
Alexandre Julliard
97259a3049 ntdll: Use the official definitions for exception flags. 2024-02-29 18:14:48 +01:00
Jacek Caban
7a66313cfb winebuild: Output load config on PE targets. 2024-02-29 08:39:30 +01:00
Brendan McGrath
57c2c41d75 mshtml: Don't handle special case when doc != node->doc. 2024-02-29 08:38:38 +01:00
Brendan McGrath
74ff9f2371 mshtml: Always use the event target dispex.
The event target may be from a different document to the document associated with the
event handler.
2024-02-29 08:38:36 +01:00
Brendan McGrath
34a8478da8 mshtml/tests: Add test for document mode after InitNew and Load. 2024-02-29 08:38:36 +01:00
Brendan McGrath
54980a7868 mshtml: Use generic event dispatcher for DOMContentLoaded.
Use generic event dispatcher instead of nsevent for the
DOMContentLoaded event.

Also allow processing before dispatching event.

Only update dom_content_loaded_event start/end time when the event is
trusted.
2024-02-29 08:38:35 +01:00
Brendan McGrath
277acf61d0 mshtml: Pass DOMEvent instead of nsIDOMEvent during handle_event. 2024-02-29 08:38:33 +01:00
Paul Gofman
6cbe072c37 kernelbase: Use KEY_WOW64_64KEY flag when 64 bit registry access is assumed. 2024-02-28 22:40:43 +01:00
Aida Jonikienė
61983465aa qwave: Add tests for QOSCloseHandle(). 2024-02-28 21:57:55 +01:00
Aida Jonikienė
d6f13d8e0c qwave: Add QOSCloseHandle() stub.
Discord calls this function when hanging up a call.
2024-02-28 21:57:52 +01:00
Piotr Caban
da84d77353 wininet: Fix memory leak when loading proxy information. 2024-02-28 21:57:35 +01:00
Yuxuan Shui
29f73d6669 dmime: Add a stub chordtrack for MIDI segments. 2024-02-28 21:56:24 +01:00
Yuxuan Shui
05347b9703 dmime: Parse MIDI program change events and generate a bandtrack. 2024-02-28 21:56:24 +01:00
Yuxuan Shui
aebcb1a996 dmime: Better MIDI parsing interface.
MIDI tracks don't map one-to-one to segment tracks, so it doesn't make sense to use a
"get_next_track()" interface.
2024-02-28 21:56:22 +01:00
Yuxuan Shui
09c6f48b12 dmband: Move band.c to dmusic. 2024-02-28 21:56:19 +01:00
Alexandros Frantzis
8e0a00db04 winex11.drv: Remove unused refresh_drawables field.
The field is set but no longer read from.
2024-02-28 21:56:10 +01:00
Rémi Bernon
72c228a3ab winevulkan: Remove unnecessary WINEVULKAN_QUIRK_ADJUST_MAX_IMAGE_COUNT quirk. 2024-02-28 21:55:25 +01:00
Esme Povirk
1ee1f2e9d7 gdiplus: Fix crash in GdipAddPathString.
Apparently, 1454ffe7dd introduced
the assumption that the font passed to gdip_format_string is
non-NULL, and GdipAddPathString wasn't passing it in.
2024-02-28 21:54:59 +01:00
Alexandre Julliard
ebaa47dcee winedump: Print the correct register names for exception info on ARM64. 2024-02-28 19:51:20 +01:00
Alexandre Julliard
3de0f99d4e ntdll: Remove no longer needed definitions from the private header. 2024-02-28 19:51:20 +01:00
Alexandre Julliard
9478e1f74c ntdll: Move RtlHashUnicodeString constants to a public header. 2024-02-28 19:51:20 +01:00
Alexandre Julliard
6a153ac33e ntdll: Use the exported structures for dll redirection data. 2024-02-28 19:51:20 +01:00
Alexandre Julliard
31e3c4316d ntdll: Implement RtlCaptureContext on ARM64EC. 2024-02-28 19:51:20 +01:00
Rémi Bernon
9591a36ee8 server: Dispatch rawinput messages using the rawinput process list. 2024-02-28 19:51:20 +01:00
Rémi Bernon
c43b1ecbc3 server: Keep a list of processes that can receive rawinput messages. 2024-02-28 19:51:20 +01:00
Rémi Bernon
f7303cf7b6 server: Keep a list of threads connected to each desktop. 2024-02-28 19:51:20 +01:00
Rémi Bernon
496eed7aaf server: Send hardware input to the visible input desktop.
When hwnd is specified, it is because it received a direct host input,
so switch the input desktop to match the one that is receiving it.

We don't validate that the sending thread uses the same desktop as the
target window: it may not even be the case for drivers with a separate
thread that listens on input events.
2024-02-28 19:51:20 +01:00
Rémi Bernon
a1d63d109d server: Keep track of the winstation input desktop. 2024-02-28 19:51:20 +01:00
Rémi Bernon
c77261dd5c win32u: Introduce new NtUserSwitchDesktop syscall stub. 2024-02-28 19:51:20 +01:00
Zhiyi Zhang
d287548c77 Revert "winex11.drv: Handle X error from vkGetRandROutputDisplayEXT()."
This reverts commit 6f9d20806e.

6f9d208 was committed to work around a Nvidia driver bug that can cause vkGetRandROutputDisplayEXT()
to generate an X exception and crash applications. The bug is later fixed in Nvidia driver 450.56.11
and newer. Thus 6f9d208 is no longer necessary on the newer Nvidia drivers.

Then after 18ae96e, another bug in the Nvidia driver can cause vkGetRandROutputDisplayEXT() to hang
forever when XLockDisplay() is called before vkGetRandROutputDisplayEXT() and this bug is still not
fixed and affects multiple applications. Reverting 6f9d208 allows us to work around the
vkGetRandROutputDisplayEXT() hang bug because then it no longer calls XLockDisplay() before
vkGetRandROutputDisplayEXT().

Nvidia driver 455 was released on September 9th 2020 so hopefully the fix is already widespread. We
could theoretically still keep 6f9d208 on older Nvidia drivers by doing version checks. But it's
more straightforward to remove the workaround since it's not a bug of Wine.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53428
2024-02-28 19:51:16 +01:00
Vijay Kiran Kamuju
c2a4f3810b taskschd: Implement TaskService_get_ConnectedDomain.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48110
2024-02-27 21:17:58 +01:00
Vijay Kiran Kamuju
e1e0db6ebe taskschd: Implement IRegistrationTrigger_getEnabled. 2024-02-27 21:17:58 +01:00
Vijay Kiran Kamuju
ea552a6f39 taskschd: Implement IRegistrationTrigger_putEnabled. 2024-02-27 21:17:58 +01:00
Vijay Kiran Kamuju
4b9e76914a taskschd: Add IRegistrationTrigger stub implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46773
2024-02-27 21:17:58 +01:00
Vijay Kiran Kamuju
c34159db39 include: Add IRegistrationTrigger definition. 2024-02-27 21:17:58 +01:00
Paul Gofman
f5ba517323 wined3d: Force debug info in critical sections. 2024-02-27 21:17:50 +01:00
Paul Gofman
c837cb3e77 rsaenh: Force debug info in critical sections. 2024-02-27 21:17:50 +01:00
Paul Gofman
ed8b7b5e2a netapi32: Force debug info in critical sections. 2024-02-27 21:17:50 +01:00
Paul Gofman
a02d35d386 msvcrt: Force debug info in critical sections. 2024-02-27 21:17:50 +01:00
Paul Gofman
bca7038692 msvcp: Force debug info in critical sections. 2024-02-27 21:17:50 +01:00
Paul Gofman
beec1b57fb ntdll: Support generic xstate config in context manipulation functions. 2024-02-27 18:52:46 +01:00
Paul Gofman
efd3d31082 ntdll: Don't copy xstate from / to syscall frame in usr1_handler(). 2024-02-27 18:52:46 +01:00
Paul Gofman
ba1e2d5dda ntdll: Mind context compaction mask in context_from_server(). 2024-02-27 18:52:46 +01:00
Alexandre Julliard
631a43c577 ntdll: Use a .seh handler in RtlUserThreadStart on ARM64EC. 2024-02-27 16:50:47 +01:00
Alexandre Julliard
8e26b7e007 ntdll: Use a .seh handler in DbgUiRemoteBreakin on ARM64EC. 2024-02-27 16:50:47 +01:00
Alexandre Julliard
58e68a1b8a ntdll: Always use .seh handlers on ARM. 2024-02-27 16:46:47 +01:00
Alexandre Julliard
89336772f8 wow64: Use a .seh handler for the simulation loop. 2024-02-27 16:20:55 +01:00
Alexandre Julliard
259b92d13e wow64: Update Wow64RaiseException behavior to match i386 hardware exceptions. 2024-02-27 16:02:18 +01:00
Alexandre Julliard
4e25c07689 winebuild: Remove some no longer used support for ELF ARM platforms. 2024-02-27 13:01:57 +01:00
Fabian Maurer
8351a45cb2 win32u: Sync dpi awareness changes from user32. 2024-02-27 11:47:42 +01:00
Fabian Maurer
c77d2e8a97 user32: Fix AreDpiAwarenessContextsEqual behavior for DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56360
2024-02-27 11:47:40 +01:00
Fabian Maurer
f541d947bb user32/tests: Add tests for AreDpiAwarenessContextsEqual. 2024-02-27 11:47:36 +01:00
Fabian Maurer
21bdc585f3 user32: Fix Set/GetThreadDpiAwarenessContext for DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56360
2024-02-27 11:47:33 +01:00
Fabian Maurer
9ccfac44d5 user32/tests: Add exhaustive tests for Get/SetThreadDpiAwarenessContext. 2024-02-27 11:47:29 +01:00
Fabian Maurer
cbcf609108 win32u: Refactor get_thread_dpi_awareness to use get_awareness_from_dpi_awareness_context. 2024-02-27 11:47:26 +01:00
Fabian Maurer
d96754213c win32u: Move get_awareness_from_dpi_awareness_context. 2024-02-27 11:42:20 +01:00
Zebediah Figura
777a9d0f51 shell32: Stub IObjectWithSite on the New menu.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=24812
2024-02-27 11:37:47 +01:00
Zebediah Figura
667eca5c0c shell32: Stub IContextMenu3 on the New menu.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=24812
2024-02-27 11:37:47 +01:00
Zebediah Figura
1662fa9ab1 shell32: Stub CLSID_NewMenu.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=24812
2024-02-27 11:37:46 +01:00
Brendan Shanks
fe4f138292 ntdll: Add native thread renaming for FreeBSD. 2024-02-27 11:37:06 +01:00
Jacek Caban
a542400d15 vcomp/tests: Use limits.h macros in for_static_i8_cb.
Fixes clang warning:
vcomp.c:1346:34: warning: overflow in expression; result is -9223372036854775808 with type 'long long' [-Winteger-overflow]
2024-02-27 11:36:41 +01:00
Jacek Caban
2a5acd3dda configure: Disable -Wmisleading-indentation warnings on GCC. 2024-02-27 11:31:45 +01:00
Zebediah Figura
ef6e9a6bb4 wined3d/atifs: Move fragment program compilation from set_tex_op_atifs() to atifs_apply_draw_state(). 2024-02-26 22:44:35 +01:00
Zebediah Figura
3d6c33f450 wined3d/atifs: Move FFP bumpenv constant loading to atifs_apply_draw_state(). 2024-02-26 22:44:35 +01:00
Zebediah Figura
0e0ee3e21b wined3d/atifs: Move texture constant loading to arbfp_apply_draw_state(). 2024-02-26 22:44:35 +01:00
Zebediah Figura
3153441f14 wined3d/atifs: Move TEXTUREFACTOR constant loading to arbfp_apply_draw_state(). 2024-02-26 22:44:35 +01:00
Vijay Kiran Kamuju
3db38ea7f4 taskschd: Return success from Principal_put_RunLevel.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49877
2024-02-26 22:44:35 +01:00
Vijay Kiran Kamuju
6ec977aa00 taskschd: Implement ITaskService_get_ConnectedUser.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48110
2024-02-26 22:44:35 +01:00
Paul Gofman
b9a2ff2558 mmdevapi: Force debug info in critical sections. 2024-02-26 22:44:35 +01:00
Paul Gofman
131918e4c2 itss: Force debug info in critical sections. 2024-02-26 22:44:35 +01:00
Paul Gofman
f4a3f573c2 browseui: Force debug info in critical sections. 2024-02-26 22:44:35 +01:00
Paul Gofman
03e3bd947f wmwcore: Force debug info in critical sections. 2024-02-26 22:44:35 +01:00
Paul Gofman
0d51cce2fb wbemprox: Force debug info in critical sections. 2024-02-26 22:44:35 +01:00
Hans Leidekker
4cc9ee7e67 wbemprox: Handle implicit property in object path.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55619
2024-02-26 22:44:35 +01:00
Hans Leidekker
d2df3c2c21 netprofm: Set return pointer to NULL in networks_enum_Next().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56271
2024-02-26 22:44:35 +01:00
Hans Leidekker
635e0566a3 netprofm: Support NLM_ENUM_NETWORK flags.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56271
2024-02-26 22:44:35 +01:00
Paul Gofman
fbd6b2583d iphlpapi: Partially fill Ipv4 / Ipv6 metric in GetAdaptersAddresses(). 2024-02-26 22:44:35 +01:00
Paul Gofman
ee06925319 nsiproxy.sys: Fix ipv6 route table parsing on Linux. 2024-02-26 22:44:35 +01:00
Eric Pouech
9897719562 server: Allow 0-write length in WriteProcessMemory().
Adapt to Win >= 10 behavior.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56357
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-26 22:44:35 +01:00
Alexandre Julliard
2aee2990c0 ntdll: Add SEH information to ARM64EC breakpoints. 2024-02-26 22:44:35 +01:00
Alexandre Julliard
0abbb467af include: Add SEH information to ARM64EC syscalls. 2024-02-26 22:44:35 +01:00
Alexandre Julliard
79b9b60914 win32u: Add a wrapper macro for ARM64EC syscalls. 2024-02-26 12:56:31 +01:00
Alexandre Julliard
0c59e8622b ntdll: Add a wrapper macro for ARM64EC syscalls. 2024-02-26 12:56:31 +01:00
Zebediah Figura
f7c665fd6e shell32: Also zero-initialize the background menu.
Fixes: 063a377df4
2024-02-26 09:55:41 +01:00
Esme Povirk
c37fea89e6 gdiplus: Restore hdc argument to gdip_format_string.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56345
2024-02-26 09:50:55 +01:00
Esme Povirk
0d0d37bbea gdiplus: Pass gdip_format_string_info to font link functions. 2024-02-26 09:50:55 +01:00
Esme Povirk
f2c92c68a2 gdiplus: Switch to a struct for gdip_format_string callback args. 2024-02-26 09:50:55 +01:00
Sven Baars
8a8d1dedcf oleaut32: Use scientific notation if it prevents a loss of accuracy. 2024-02-26 09:50:35 +01:00
Alexandre Julliard
1b32ac45f8 Release 9.3. 2024-02-23 22:19:13 +01:00
Hans Leidekker
9015eebf87 wbemprox: Protect tables with a critical section.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56334
2024-02-23 21:05:57 +01:00
Alex Henrie
ce6e298a68 advapi32/tests: Use CRT allocation functions. 2024-02-23 17:13:19 +01:00
Rémi Bernon
74bf784b29 server: Use the startup info to connect the process winstation.
This changes the todos in the tests as it fixes the thread input not
being attached, but then exposes a different todo.
2024-02-23 17:11:00 +01:00
Paul Gofman
c55f5d87db wininet: Force debug info in critical sections. 2024-02-23 17:09:41 +01:00
Paul Gofman
4e49c37028 windowscodecs: Force debug info in critical sections. 2024-02-23 17:09:41 +01:00
Paul Gofman
fae3b7a90f qmgr: Force debug info in critical sections. 2024-02-23 17:09:41 +01:00
Paul Gofman
27e70ba8ec ntdll: Force debug info in critical sections. 2024-02-23 17:09:41 +01:00
Paul Gofman
7c2f6be10e mscoree: Force debug info in critical sections. 2024-02-23 17:09:41 +01:00
Alexandre Julliard
2e6651cb36 ntdll/tests: Fix a test failure when exception information is missing. 2024-02-23 17:00:28 +01:00
Alexandre Julliard
af64a8bb5c winebuild: Remove ARM code generation option.
They are not needed for PE builds.
2024-02-23 12:02:17 +01:00
Alexandre Julliard
0c0d181551 winegcc: Stop passing ARM code generation options to winebuild.
They are not needed for PE builds.
2024-02-23 12:01:38 +01:00
Alexandre Julliard
71a2e64aee configure: Require floating point support on ARM targets.
PE code requires hardware floating point.
2024-02-23 11:42:08 +01:00
Alexandre Julliard
23218818ac configure: Stop passing ARM code generation options to winebuild.
They are not needed for PE builds.
2024-02-23 11:34:31 +01:00
Jinoh Kang
232b18d820 kernel32/tests: Fix console test with odd-sized consoles. 2024-02-22 22:37:10 +01:00
Louis Lenders
7a92a33b27 imm32: Update spec file.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56299
2024-02-22 22:35:06 +01:00
Alexandre Julliard
2778e45421 ntdll: Remove support for unwinding ELF dlls on ARM. 2024-02-22 22:35:06 +01:00
Alexandre Julliard
654c03d131 ntdll: Handle leaf functions in RtlVirtualUnwind on x86-64. 2024-02-22 22:35:06 +01:00
Alexandre Julliard
18b0473fe9 ntdll: Handle leaf functions in RtlVirtualUnwind on ARM. 2024-02-22 22:35:06 +01:00
Alexandre Julliard
9f555cde20 ntdll: Handle leaf functions in RtlVirtualUnwind on ARM64. 2024-02-22 22:35:06 +01:00
Alexandre Julliard
852e2ffc13 include: Add new idl files to the makefile. 2024-02-22 12:56:33 +01:00
Rémi Bernon
f7bff8802f winevulkan: Remove now unnecessary vkGetPhysicalDeviceSurfaceFormatsKHR driver entry. 2024-02-22 12:56:14 +01:00
Rémi Bernon
8a98408056 winevulkan: Remove now unnecessary vkGetPhysicalDeviceSurfaceFormats2KHR driver entry. 2024-02-22 12:47:25 +01:00
Rémi Bernon
64ced5a345 winevulkan: Implement vkGetPhysicalDeviceSurfaceFormats2KHR fallback. 2024-02-22 12:47:21 +01:00
Alex Henrie
73685eb080 msxml3: Use CRT allocation functions. 2024-02-22 12:46:06 +01:00
Yuxuan Shui
5613917974 dmime/tests: Improve error reporting from expect_track.
Include a line number of the call site.
2024-02-22 12:45:55 +01:00
Yuxuan Shui
8710a1cb0a dmime: Read through a MIDI file.
Add a dummy track parser, that reads through MIDI tracks and events. To make sure we understand the
file structure correctly, no actual tracks or events are generated.

Also add test cases to make sure we read through a MIDI file correctly.
2024-02-22 12:45:52 +01:00
Yuxuan Shui
813b35c9d1 dmime: Don't skip chunk for MIDI files.
MIDI files aren't RIFF, calling stream_skip_chunk on it is invalid.
2024-02-22 12:45:51 +01:00
Brendan McGrath
c65ac223a0 d2d1/tests: Increase timeout from 1 sec to 5 secs.
Fixes a test that is frequently failing on the GitLab CI.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56188
2024-02-22 12:44:01 +01:00
Alex Henrie
2e9a57a0b8 include: Add debugstr_time to wine/strmbase.h. 2024-02-22 12:30:47 +01:00
Rémi Bernon
d0eea21735 winevulkan: Remove now unnecessary vkGetPhysicalDevicePresentRectanglesKHR driver entry. 2024-02-21 22:30:34 +01:00
Rémi Bernon
b541b9661a winevulkan: Handle invalid window in vkGetPhysicalDevicePresentRectanglesKHR. 2024-02-21 22:30:31 +01:00
Rémi Bernon
9a1362695b winevulkan: Handle invalid window in vkCreateSwapchainKHR. 2024-02-21 22:30:31 +01:00
Rémi Bernon
0d969b1764 winex11: Remove now unnecessary create_info HWND checks. 2024-02-21 22:30:31 +01:00
Rémi Bernon
8ba1b27f23 winevulkan: Handle creation of surfaces with no HWND directly. 2024-02-21 22:30:31 +01:00
Ivo Ivanov
e24cf32f81 hidclass.sys: Use HID_DEVICE in the mfg_section to match the recent changes. 2024-02-21 22:30:03 +01:00
Rémi Bernon
437d304c72 winegstreamer: Rename struct h264_decoder to struct video_decoder. 2024-02-21 22:30:03 +01:00
Rémi Bernon
ae584ac620 winegstreamer: Use the H264 decoder to implement the IV50 decoder. 2024-02-21 22:30:03 +01:00
Rémi Bernon
e1b21bf1e9 ir50_32: Use the proper hr value for stream format change. 2024-02-21 22:30:03 +01:00
Rémi Bernon
9a591bf4fe winegstreamer: Use MFCalculateImageSize to compute output info size. 2024-02-21 22:30:03 +01:00
Paul Gofman
39e5926760 inetcomm: Force debug info in critical sections. 2024-02-21 22:30:03 +01:00
Paul Gofman
6fda28d030 dwrite: Force debug info in critical sections. 2024-02-21 22:30:03 +01:00
Paul Gofman
c63a990091 dsound: Force debug info in critical sections. 2024-02-21 22:30:03 +01:00
Paul Gofman
8268d4e017 dplayx: Force debug info in critical sections. 2024-02-21 22:30:03 +01:00
Paul Gofman
a485f6b4a3 dinput: Force debug info in critical sections. 2024-02-21 22:30:03 +01:00
Ivo Ivanov
2497a53484 hidclass.sys: Use the correct string for container_id. 2024-02-21 22:30:03 +01:00
Alexandre Julliard
8bd411da0a ntdll: Share exception dispatch implementation across platforms. 2024-02-21 21:55:04 +01:00
Alexandre Julliard
61564202b5 ntdll: Add a helper macro to dump a register context. 2024-02-21 21:55:04 +01:00
Alexandre Julliard
2e63272f2f ntdll: Default to the SEH channel on x86-64.
The unwind info is now printed from unwind.c.
2024-02-21 21:55:04 +01:00
Paul Gofman
9c1bc32fe9 winhttp: Mind read size when skipping async read in WinHttpReadData(). 2024-02-21 21:55:04 +01:00
Rémi Bernon
a3686eeb5e win32u: Don't assume that the primary adapter is always first. 2024-02-21 21:55:04 +01:00
Rémi Bernon
76326ed369 win32u: Only consider active monitors in monitor_from_rect. 2024-02-21 21:55:04 +01:00
Rémi Bernon
f7788fc7e7 win32u: Only consider active monitors for virtual screen rect. 2024-02-21 21:55:04 +01:00
Rémi Bernon
db391c37a9 win32u: Only consider active monitors for clone detection. 2024-02-21 21:55:04 +01:00
Rémi Bernon
e4ff578bcc win32u: Deduce monitor device flags from their adapter. 2024-02-21 21:55:04 +01:00
Brendan Shanks
e628eb2c6f ntdll: On x86_64, don't access %gs in signal_start_thread().
%gs is not set until call_init_thunk().
Also, adjust other TEB accesses to be consistent with the surrounding
functions.

Fixes a crash on macOS introduced by 7ae488a2bb
("ntdll: Don't hardcode xstate size in syscall frame.")
2024-02-21 11:09:21 +01:00
Alex Henrie
340a4b05b5 wined3d: Use CRT allocation functions. 2024-02-20 22:27:02 +01:00
Biswapriyo Nath
6ec9f446eb include: Add FaceDetector runtimeclass in windows.media.faceanalysis.idl. 2024-02-20 22:26:58 +01:00
Biswapriyo Nath
f0ab43fea2 include: Add DetectedFace runtimeclass in windows.media.faceanalysis.idl. 2024-02-20 22:26:57 +01:00
Biswapriyo Nath
fbe99509d6 include: Add SoftwareBitmap runtimeclass in windows.graphics.imaging.idl. 2024-02-20 22:26:57 +01:00
Biswapriyo Nath
af4838321e include: Add BitmapBuffer runtimeclass in windows.graphics.imaging.idl. 2024-02-20 22:26:57 +01:00
Biswapriyo Nath
fe4f7632a7 include: Add IDirect3DSurface in windows.graphics.directx.direct3d11.idl. 2024-02-20 22:26:57 +01:00
Daniel Lehman
fb5302c29b msvcrt: Use string sort for strcoll/wcscoll. 2024-02-20 22:26:29 +01:00
Daniel Lehman
188d880493 msvcrt/tests: Add tests for strcoll/wcscoll. 2024-02-20 22:26:29 +01:00
David Kahurani
386dbe1059 msi: Avoid leaking stream on DB update.
MSI_RecordGetIStream adds a reference to the stream. This
reference should be negated as we are done setting the stream.

Signed-off-by: David Kahurani <k.kahurani@gmail.com>
2024-02-20 22:26:13 +01:00
Zebediah Figura
9a614fefaf wined3d/arb: Move FFP bumpenv constant loading to arbfp_apply_draw_state(). 2024-02-20 22:26:01 +01:00
Zebediah Figura
088da327b5 wined3d/arb: Move texture constant loading to arbfp_apply_draw_state(). 2024-02-20 22:26:00 +01:00
Zebediah Figura
0f7ef9f47a wined3d/arb: Move color key constant loading to arbfp_apply_draw_state(). 2024-02-20 22:25:58 +01:00
Zebediah Figura
8faac9b94a wined3d/arb: Move TEXTUREFACTOR constant loading to arbfp_apply_draw_state(). 2024-02-20 22:25:56 +01:00
Zebediah Figura
6c1c917750 wined3d/arb: Move SPECULARENABLE constant loading to arbfp_apply_draw_state(). 2024-02-20 22:25:54 +01:00
Alexandre Julliard
f0584966c2 ntdll/tests: Run RtlVirtualUnwind tests on ARM64EC. 2024-02-20 11:05:13 +01:00
Alexandre Julliard
ec5e33cad6 ntdll/tests: Run dynamic unwind tests on ARM platforms. 2024-02-20 11:03:58 +01:00
Alexandre Julliard
510fc64140 ntdll/tests: Move unwinding tests to a separate file. 2024-02-20 10:58:13 +01:00
Eric Pouech
552bc893e1 dbghelp: Don't expected a fixed number of substreams in DBI header (PDB).
MSC no longer emits a fixed number of substreams (depending on version of
PDB file), but can emit less.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-20 10:51:37 +01:00
Eric Pouech
dee3be21a3 winedump: Don't expect a fixed number of substreams in DBI header (PDB).
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-20 10:51:36 +01:00
Shaun Ren
c72f0ec0f0 sapi: Implement ISpeechVoice::Invoke. 2024-02-20 10:47:11 +01:00
Shaun Ren
9d044669f3 sapi: Implement ISpeechVoice::GetIDsOfNames. 2024-02-20 10:47:11 +01:00
Shaun Ren
dd083a6195 sapi: Implement ISpeechVoice::GetTypeInfo. 2024-02-20 10:47:11 +01:00
Shaun Ren
58087358d1 sapi: Implement ISpeechVoice::GetTypeInfoCount. 2024-02-20 10:47:11 +01:00
Shaun Ren
62aec0318b sapi: Implement ISpeechVoice::GetVoices. 2024-02-20 10:47:11 +01:00
Shaun Ren
0f8b59a245 sapi: Introduce create_token_category helper in tts. 2024-02-20 10:47:11 +01:00
Shaun Ren
4bbfd83898 sapi: Handle zero-length attributes correctly in ISpObjectTokenCategory::EnumTokens. 2024-02-20 10:47:11 +01:00
Shaun Ren
5243f2e82c sapi: Implement ISpeechVoice::Speak. 2024-02-20 10:47:11 +01:00
Shaun Ren
afac7d7e3f sapi: Free typelib on DLL detach. 2024-02-20 10:47:11 +01:00
Paul Gofman
164520f593 crypt32: Force debug info in critical sections. 2024-02-20 10:44:14 +01:00
Paul Gofman
9149c7e999 combase: Force debug info in critical sections. 2024-02-20 10:44:14 +01:00
Paul Gofman
6ba603a03c kernelbase: Force debug info in critical sections. 2024-02-20 10:44:14 +01:00
Paul Gofman
431a483edc xaudio2: Force debug info in critical sections. 2024-02-20 10:44:14 +01:00
Paul Gofman
5e3cc88326 winhttp: Force debug info in critical sections. 2024-02-20 10:44:14 +01:00
Zhiyi Zhang
7c7b2e8e7e dsound: Reject WAVEFORMATEX formats with more than two channels.
Formats with more than two channels require WAVEFORMATEXTENSIBLE according to tests.

Fix Viking: Battle for Asgard (211160) audio cracking in its intro video.
2024-02-20 10:44:05 +01:00
Zhiyi Zhang
b3ec5bc7ea dsound/tests: Test that formats with more than two channels require WAVEFORMATEXTENSIBLE. 2024-02-20 10:44:05 +01:00
Aurimas Fišeras
89e3be4ee9 po: Update Lithuanian translation. 2024-02-20 10:43:08 +01:00
Kartavya Vashishtha
1e34842799 kernelbase: Implement CopyFile2(). 2024-02-20 10:42:57 +01:00
Jinoh Kang
1b0d8428df kernelbase: Replace FileAllInformation with FileStatInformation in GetFileInformationByHandle().
It also fixes the game Unity of Command II (same bug).

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46070
2024-02-19 21:28:42 +01:00
Jinoh Kang
152580cefe ntdll: Implement NtQueryInformationFile FileStatInformation. 2024-02-19 21:28:42 +01:00
Jinoh Kang
f5e7abb428 ntdll/tests: Add tests for NtQueryInformationFile FileStatInformation. 2024-02-19 21:28:42 +01:00
Jinoh Kang
4f61a8a1ab include: Add definition for FILE_STAT_INFORMATION. 2024-02-19 21:28:41 +01:00
Vijay Kiran Kamuju
08803bd136 include: Add msdelta header file. 2024-02-19 20:39:43 +01:00
Daniel Lehman
6a6263c8bd msvcrt/tests: Include locale in ok message. 2024-02-19 20:39:43 +01:00
Daniel Lehman
588db48be5 msvcrt: Use string sort for strncoll/wcsncoll. 2024-02-19 20:39:43 +01:00
Eric Pouech
65109c725d dbghelp: Implement SymFromIndex().
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-19 20:39:43 +01:00
Eric Pouech
989988a5ae winedbg: Use share attributes for opening command file.
(this fixes --command option when winedbg is relaunched in
wow64 case).

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-19 20:39:43 +01:00
Zebediah Figura
063a377df4 shell32: Properly implement context menu verbs.
Enumerate "shell" registry key entries instead of hardcoding a list.

Don't enumerate any entries unless all the files have the same type.

Pass the correct type to ShellExecuteEx().
2024-02-19 18:28:21 +01:00
Zebediah Figura
d1eed1c702 shell32: Separate a get_filetype() helper. 2024-02-19 18:26:52 +01:00
Zebediah Figura
6fd349c6e0 shell32: Do not set the default menu item from ShellView_DoContextMenu().
This was added in f045c9df81, with no explanation.

It does not affect any behaviour in Wine, since FWF_DESKTOP is never set.

It does not make sense, since "open" is already usually the default action on
Windows, and it's not obvious why FWF_DESKTOP would affect this.

It also leans on IContextMenu implementation details.
2024-02-19 18:26:52 +01:00
Zebediah Figura
d9c4f506fd shell32: Always use IContextMenu::InvokeCommand() when selecting an item from the context menu.
This reverts one of the changes included in d30dfd24d6.

Relying on FCIDM_SHVIEW_OPEN snoops into the internals of IContextMenu for no
good reason.

While I haven't tested whether ICommDlgBrowser::OnDefaultCommand() is triggered
in this case, the documentation states that it is "called when a user
double-clicks in the view or presses the ENTER key"; this is neither scenario.

Simply let the context menu call ShellExecuteEx().
2024-02-19 18:26:52 +01:00
Zebediah Figura
f27e4a4a29 shell32: Remove two unused strings.
These were never used. They were probably anticipating the context menu, but are
missing accelerators and otherwise redundant with the existing entries.
2024-02-19 18:26:47 +01:00
Alex Henrie
e7364e2165 include: Annotate NdrGetBuffer with __WINE_(ALLOC_SIZE|MALLOC).
It would be nice to annotate it with __WINE_DEALLOC(NdrFreeBuffer) too,
but that causes a bunch of spurious -Wfree-nonheap-object warnings.
2024-02-19 18:15:13 +01:00
Rémi Bernon
6599f2ff90 winegstreamer: Complete H264 current output type reported attributes. 2024-02-19 18:15:09 +01:00
Rémi Bernon
a6d77cfd06 winegstreamer: Use GUID arrays for H264 decoder media types. 2024-02-19 18:15:09 +01:00
Rémi Bernon
5bf6af0c39 winegstreamer: Remove unnecessary create_output_media_type checks. 2024-02-19 18:15:09 +01:00
Rémi Bernon
71f5bce785 winegstreamer: Use MFCreateVideoMediaTypeFromSubtype in GetOutputAvailableType. 2024-02-19 18:15:09 +01:00
Rémi Bernon
86d82c7334 winegstreamer: Use MFCreateVideoMediaTypeFromSubtype in GetInputAvailableType. 2024-02-19 18:15:08 +01:00
Rémi Bernon
bb872831de winevulkan: Remove now unnecessary vkGetPhysicalDeviceSurfaceCapabilitiesKHR driver entry. 2024-02-19 18:14:43 +01:00
Rémi Bernon
923f1d1b10 winevulkan: Remove now unnecessary vkGetPhysicalDeviceSurfaceCapabilities2KHR driver entry. 2024-02-19 18:14:43 +01:00
Rémi Bernon
c83f86bef5 winevulkan: Implement vkGetPhysicalDeviceSurfaceCapabilities2KHR fallback. 2024-02-19 18:14:43 +01:00
Rémi Bernon
32e56bd029 winewayland: Remove now unnecessary VkSurfaceCapabilitiesKHR fixups. 2024-02-19 18:14:43 +01:00
Rémi Bernon
5a4d3bad17 winevulkan: Adjust VkSurfaceCapabilitiesKHR image extents with client rect. 2024-02-19 18:14:43 +01:00
Rémi Bernon
6eab84685e winevulkan: Wrap host swapchain handles. 2024-02-19 18:14:43 +01:00
Piotr Caban
8314812354 wininet/tests: Add initial PAC script tests. 2024-02-19 18:13:28 +01:00
Piotr Caban
b049dad6fd inetcpl.cpl: Use wininet functions to set proxy settings. 2024-02-19 18:13:26 +01:00
Piotr Caban
a5ce5d637f wininet/tests: Add more INTERNET_OPTION_PER_CONNECTION_OPTION tests. 2024-02-19 18:13:26 +01:00
Piotr Caban
62027a9c4d wininet: Add support for INTERNET_OPTION_PER_CONNECTION_OPTION option on session handles. 2024-02-19 18:13:26 +01:00
Piotr Caban
9aa7f27d82 wininet: Fix INTERNET_PER_CONN_AUTOCONFIG_URL option when quering global proxy settings. 2024-02-19 18:13:26 +01:00
Piotr Caban
b16110f17b wininet: Add support for INTERNET_PER_CONN_AUTOCONFIG_URL in InternetSetOption. 2024-02-19 18:13:26 +01:00
Floris Renaud
7e0177e1e4 po: Update Dutch translation. 2024-02-18 14:15:15 +01:00
Alexandre Julliard
839fb09bf0 fluidsynth: Import upstream release 2.3.4. 2024-02-17 22:42:20 +01:00
Alexandre Julliard
7914be3ca5 zydis: Import upstream release 4.1.0.
With headers from Zycore version 1.5.0.
2024-02-17 22:18:47 +01:00
Alexandre Julliard
da62790584 xml2: Import upstream release 2.11.7. 2024-02-17 21:04:18 +01:00
Alexandre Julliard
f1454777a8 xslt: Import upstream release 1.1.39. 2024-02-17 20:54:51 +01:00
Alexandre Julliard
72b7866950 ldap: Import upstream release 2.5.17. 2024-02-17 20:54:51 +01:00
Alexandre Julliard
b15d0120cf lcms2: Import upstream release 2.16. 2024-02-17 20:54:51 +01:00
Alexandre Julliard
041167b20a zlib: Import upstream release 1.3.1. 2024-02-17 18:42:30 +01:00
Alexandre Julliard
73a8c06804 jpeg: Import upstream release 9f. 2024-02-17 18:36:56 +01:00
Alexandre Julliard
1e5cc509a7 png: Import upstream release 1.6.42. 2024-02-17 18:36:56 +01:00
Alexandre Julliard
3881edf6f3 mpg123: Import upstream release 1.32.5. 2024-02-17 18:36:56 +01:00
Alexandre Julliard
fa42210c49 faudio: Import upstream release 24.02. 2024-02-17 18:18:03 +01:00
Alexandre Julliard
6e9d214096 kernelbase: Update timezone data to version 2024a. 2024-02-17 18:18:03 +01:00
Alex Henrie
90103fa07e where: Implement search with default options.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55282
2024-02-16 23:32:06 +01:00
Daniel Lehman
7c6a50cc46 include: Add some msvcrt declarations. 2024-02-16 23:32:06 +01:00
Paul Gofman
1a4163b686 powershell: Read input command from stdin. 2024-02-16 23:32:06 +01:00
Rémi Bernon
75fa35ad7f mfreadwrite/reader: Repeat pushing / pulling samples while it succeeds. 2024-02-16 23:32:06 +01:00
Rémi Bernon
c20fc715e2 mfreadwrite/reader: Introduce new source_reader_(drain|flush)_transform_samples helpers. 2024-02-16 23:32:06 +01:00
Rémi Bernon
8946e6df7e mfreadwrite/reader: Introduce a new source_reader_allocate_stream_sample helper. 2024-02-16 23:32:06 +01:00
Rémi Bernon
dd6e8198e0 mfreadwrite/reader: Pass the transform to source_reader_pull_stream_samples. 2024-02-16 23:32:06 +01:00
Rémi Bernon
cbb343567a mfreadwrite/reader: Introduce source_reader_queue_sample helper. 2024-02-16 23:32:06 +01:00
Paul Gofman
dfe2b717a6 ntdll: Don't hardcode xstate size in exception stack layout. 2024-02-16 23:32:06 +01:00
Paul Gofman
7ae488a2bb ntdll: Don't hardcode xstate size in syscall frame. 2024-02-16 23:32:06 +01:00
Paul Gofman
1e0728c5d4 ntdll: Don't hardcode xstate feature mask. 2024-02-16 23:32:06 +01:00
Alexandre Julliard
af4ef5fa02 ntdll: Always set non-volatile pointers for ARM64 unwinding. 2024-02-16 23:32:06 +01:00
Alexandre Julliard
14a290e77d ntdll: Implement CLEAR_UNWOUND_TO_CALL unwinding operation on ARM64. 2024-02-16 23:30:34 +01:00
Alexandre Julliard
f4ac9b35c2 ntdll: Implement EC_CONTEXT unwinding operation on ARM64. 2024-02-16 23:30:34 +01:00
Alexandre Julliard
931c1a6887 ntdll: Move ARM64 context conversion functions to a new header. 2024-02-16 23:30:34 +01:00
Alexandre Julliard
41d7baa013 ntdll: Ignore home parameters saving when unwinding epilog on ARM64. 2024-02-16 23:30:08 +01:00
Alexandre Julliard
9cc5ed1802 ntdll/tests: Simplify testing of unwind register values on ARM64. 2024-02-16 16:43:18 +01:00
Alexandre Julliard
18bdd435f1 rpcrt4/tests: Fix some malloc/HeapAlloc mismatches.
Fixes regressions caused by a38e05636d.
2024-02-16 16:43:18 +01:00
Zebediah Figura
4e74e9dfa9 wined3d: Use dynamic state for depth/stencil state if possible. 2024-02-16 16:43:18 +01:00
Zebediah Figura
ee620f0277 wined3d: Enable EXT_extended_dynamic_state. 2024-02-16 16:43:18 +01:00
Zebediah Figura
a9c9d49a12 wined3d: Make the scissor state dynamic. 2024-02-16 16:43:18 +01:00
Zebediah Figura
e8a2f816f0 wined3d: Make the viewport state dynamic. 2024-02-16 16:43:18 +01:00
Zebediah Figura
3b59be59ae wined3d: Set the pipeline key viewport and scissor count at initialization.
It never changes.
2024-02-16 16:43:18 +01:00
Zebediah Figura
fabf45a9d8 wined3d/arb: Move fragment program compilation from fragment_prog_arbfp() to arbfp_apply_draw_state(). 2024-02-16 16:43:18 +01:00
Zebediah Figura
17b9c45311 wined3d: Pass a non-const wined3d_context pointer to the FFP *_apply_draw_state() methods. 2024-02-16 16:43:18 +01:00
Zebediah Figura
dfb1665b5f wined3d: Pass a wined3d_state pointer to the vp_enable() and fp_enable() methods.
Rename to *_apply_draw_state() per Henri's suggestion.
2024-02-16 16:43:18 +01:00
Zebediah Figura
b64cc15d61 wined3d: Introduce a separate fp_disable() method.
Analogous to shader_disable().

We'd like to pass a wined3d_state pointer to fp_enable() to let it handle
actually compiling the fragment pipeline, which doesn't mesh well conceptually
with its use in shader_disable().
2024-02-16 16:43:18 +01:00
Zebediah Figura
9880e29d69 wined3d: Introduce a separate vp_disable() method.
Analogous to shader_disable().

We'd like to pass a wined3d_state pointer to vp_enable() to let it handle
actually compiling the vertex pipeline, which doesn't mesh well conceptually
with its use in shader_disable().
2024-02-16 16:43:18 +01:00
Zebediah Figura
c8a98e03c8 wined3d: Merge shader_load_constants() into shader_select().
Arguably there is a benefit here in that it reduces shader backend state
application down to a single method, although whether that is an improvement may
be up for debate.

More saliently, we would like to move FFP state application out of the state
table and into a linear state function. In practice that function will probably
be vp_enable / fp_enable. In that case we will need those functions, and hence
also shader_select(), to be called when more states are dirty.

This does not in itself mean that shader_load_constants() needs to be merged
with shader_select(), but it does remove the primary impetus for keeping them
separate.

Rename to shader_apply_draw_state() to reflect the adjusted purpose, as
suggested by Henri Verbeet.
2024-02-16 16:43:18 +01:00
Eric Pouech
5efab11752 kernel32/tests: Check if thread is suspended in debugger attachment tests.
Looks like thread is suspended until DBG_CONTINUE is sent on thread
creation debug event.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-16 11:36:58 +01:00
Zebediah Figura
a97a4af0dd dinput/tests: Return void from test_winmm_joystick(). 2024-02-16 11:36:45 +01:00
Paul Gofman
95e12689e6 webservices: Force debug info in critical sections. 2024-02-16 11:36:30 +01:00
Paul Gofman
c65d0a0770 vcomp: Force debug info in critical sections. 2024-02-16 11:36:30 +01:00
Paul Gofman
139d624787 rpcrt4: Force debug info in critical sections. 2024-02-16 11:36:30 +01:00
Paul Gofman
67bea281cc propsys: Force debug info in critical sections. 2024-02-16 11:36:30 +01:00
Paul Gofman
0efd48113e mapi32: Force debug info in critical sections. 2024-02-16 11:36:29 +01:00
Piotr Caban
bbf222ca72 wininet: Add support for reading connection settings binary blobs from registry. 2024-02-15 22:01:15 +01:00
Piotr Caban
fac555fe68 wininet: Add support for writing connection settings binary blobs from registry. 2024-02-15 22:01:15 +01:00
Piotr Caban
707685642c wininet/tests: Cleanup INTERNET_OPTION_PER_CONNECTION_OPTION tests. 2024-02-15 22:01:15 +01:00
Piotr Caban
9ea0a1072d wininet: Use GlobalAlloc in InternetQueryOption(INTERNET_OPTION_PER_CONNECTION_OPTION).
So the allocator matches with documentation.
2024-02-15 22:01:12 +01:00
Piotr Caban
7dcdfd7bf2 wininet: Fix buffer size calculation in InternetQueryOption(INTERNET_OPTION_PER_CONNECTION_OPTION). 2024-02-15 22:01:12 +01:00
Piotr Caban
f54acf3de0 wininet: Test INTERNET_OPTION_PER_CONNECTION_OPTION on process settings.
Setting invalid proxy server has some side effects.
2024-02-15 22:01:10 +01:00
Eric Pouech
9119e3102b winedump: Don't crash on non-effective runtime function entries.
MSVC generates zeroed out entries when EditAndContinue (aka HotPatch)
is enabled.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-15 20:41:49 +01:00
Gabriel Ivăncescu
8a71a4a304 explorer: Set layered style on systray icons before calling into the driver.
Fixes a regression introduced by b5c57b9a62,
which broke the systray integration outside of virtual desktops on some
DEs like XFCE.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-15 20:40:55 +01:00
Krzysztof Bogacki
223292da02 win32u: Implement NtGdiDdDDIEnumAdapters2.
Signed-off-by: Krzysztof Bogacki <krzysztof.bogacki@leancode.pl>
2024-02-15 20:39:48 +01:00
Krzysztof Bogacki
800b5e44fc win32u: Maintain a list of GPUs in cache.
Signed-off-by: Krzysztof Bogacki <krzysztof.bogacki@leancode.pl>
2024-02-15 20:39:48 +01:00
Krzysztof Bogacki
10db5b67b8 gdi32: Add D3DKMTEnumAdapters2() stub.
Signed-off-by: Krzysztof Bogacki <krzysztof.bogacki@leancode.pl>
2024-02-15 20:39:46 +01:00
Krzysztof Bogacki
842461979c gdi32/tests: Add D3DKMTEnumAdapters2 tests.
Signed-off-by: Krzysztof Bogacki <krzysztof.bogacki@leancode.pl>
2024-02-15 20:39:46 +01:00
Nikola Kuburović
fddea5da01 kernelbase: Reduce FIXME to TRACE if params is null.
If CREATEFILE2_EXTENDED_PARAMS struct pointer is null, we just forward
to CreateFileW and we don't need FIXME's.
2024-02-15 20:37:07 +01:00
Fabian Maurer
231670e899 mmdevapi/tests: Add test for invalid format with exclusive mode. 2024-02-15 20:36:37 +01:00
Fabian Maurer
c62ca5fced winealsa: Remove superflous check. 2024-02-15 20:36:30 +01:00
Fabian Maurer
e75d1b38b5 wineoss: Remove superflous check. 2024-02-15 20:36:28 +01:00
Daniel Lehman
4d1ad4f975 oleaut32: Use scientific notation only for larger numbers in VarBstrFromR[48]. 2024-02-15 20:35:49 +01:00
Daniel Lehman
55e4aa7a31 oleaut32/tests: Add tests for number of digits. 2024-02-15 20:35:49 +01:00
Jinoh Kang
b74e1a570b ntdll: Remove stale comment from set_async_direct_result() documentation.
The supplied async handle passed to set_async_direct_result() cannot be
NULL.
2024-02-15 20:35:00 +01:00
Alexandre Julliard
2601a8a2f1 ntdll: Don't count custom stack frames as part of the prolog on ARM64. 2024-02-15 20:31:49 +01:00
Alexandre Julliard
1abebca6dc ntdll: Ignore end_c when processing ARM64 unwind codes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55584
2024-02-15 20:31:49 +01:00
Alexandre Julliard
a271fc9e19 ntdll: Add support for the save_any_reg ARM64 unwind code.
Based on a patch by Billy Laws.
2024-02-15 20:31:49 +01:00
Alexandre Julliard
7c4ca6ff74 winedump: Add dumping of the save_any_reg ARM64 unwind code. 2024-02-15 15:08:55 +01:00
Paul Gofman
17f94ab563 dmsynth: Force debug info in critical sections. 2024-02-15 11:23:57 +01:00
Paul Gofman
bbe1c7532a dmime: Force debug info in critical sections. 2024-02-15 11:23:57 +01:00
Paul Gofman
fb64ea8675 strmbase: Force debug info in critical sections. 2024-02-15 11:23:57 +01:00
Jacek Caban
3f421410c1 winebuild: Move target filtering to assign_exports. 2024-02-15 11:23:52 +01:00
Jacek Caban
3c9ede8abc winebuild: Use exports struct in assign_names. 2024-02-15 11:23:51 +01:00
Jacek Caban
1bc06138f4 winebuild: Use exports struct in assign_ordinals. 2024-02-15 11:23:51 +01:00
Jacek Caban
f5ed0de392 winebuild: Use exports struct for exports handling. 2024-02-15 11:23:51 +01:00
Jacek Caban
6ee0583546 winebuild: Use exports struct for 16-bit modules handlign. 2024-02-15 11:23:51 +01:00
Jacek Caban
499c6be734 winebuild: Use exports struct for imports handling. 2024-02-15 11:23:51 +01:00
Jacek Caban
73f0bbc731 winebuild: Introduce exports struct. 2024-02-15 11:23:49 +01:00
Geoffrey McRae
b8c75f3d2a include: Add interfaces for ID3D11On12Device1 and ID3D11On12Device2. 2024-02-14 23:23:25 +01:00
Marc-Aurel Zent
1eb8f41e54 server: Improve formatting in mach init_tracing_mechanism(). 2024-02-14 23:17:23 +01:00
Marc-Aurel Zent
dee10199cc server: Use bootstrap_register2() instead of bootstrap_register(). 2024-02-14 23:17:23 +01:00
Marc-Aurel Zent
52f34cf976 server: Use __pthread_kill() syscall wrapper. 2024-02-14 23:17:23 +01:00
Brendan Shanks
455086e295 ntdll: Assume process-private futexes are always present on Linux. 2024-02-14 21:00:44 +01:00
Yuxuan Shui
d93275c6ca dmime: Parse MIDI headers. 2024-02-14 20:54:23 +01:00
Yuxuan Shui
4434c17c94 dmime/tests: Add MIDI loading test.
Besides a seq track and a tempo track, Windows also adds a "fake" band
track to segments loaded from MIDI files, which handles soundfont
loading etc.
2024-02-14 20:54:18 +01:00
Alexandre Julliard
cb2013e7b4 ntdll: Implement RtlVirtualUnwind for ARM64EC. 2024-02-14 19:19:33 +01:00
Alexandre Julliard
3b85ab31a9 ntdll: Move RtlUnwind to unwind.c. 2024-02-14 19:19:33 +01:00
Alexandre Julliard
8602a1c24e ntdll: Move the dynamic unwind tables to unwind.c. 2024-02-14 19:19:33 +01:00
Alexandre Julliard
a5a253820f ntdll: Move exception unwinding code to a separate file. 2024-02-14 19:19:33 +01:00
Rémi Bernon
d88f92eb4e mouhid.sys: Parse HID reports to track contact points. 2024-02-14 19:19:32 +01:00
Rémi Bernon
683710fbc7 mouhid.sys: Read reports from the underlying HID device. 2024-02-14 19:19:32 +01:00
Rémi Bernon
a05b67b7e5 mouhid.sys: Request preparsed data and inspect device caps. 2024-02-14 19:19:32 +01:00
Rémi Bernon
0ed830eac5 mouhid.sys: Introduce a new HID pointer device driver.
This only matches with digitizer devices for now, it could later be
used for HID mice but for now we use a different path for that.
2024-02-14 19:19:32 +01:00
Rémi Bernon
8db5dec9d2 hidclass: Only access Tail.Overlay.OriginalFileObject when needed. 2024-02-14 19:19:32 +01:00
Rémi Bernon
677107956f hidclass: Make HID hardware ids more similar to windows. 2024-02-14 19:19:32 +01:00
Aurimas Fišeras
998111eca1 po: Update Lithuanian translation. 2024-02-14 19:19:32 +01:00
Alex Henrie
a38e05636d rpcrt4/tests: Use CRT allocation functions. 2024-02-14 19:19:32 +01:00
Rastislav Stanik
1bab7ea25e iphlpapi: Add stub for GetAnycastIpAddressTable().
This change adds an implementation of Win32 API function
GetAnycastIpAddressTable() that does not return real information, it
just says "no entries found".

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56065
2024-02-14 19:19:32 +01:00
Alex Henrie
fb2ebbbb40 ntdll: Include alloc_type argument in NtMapViewOfSection(Ex) traces.
LANCommander calls NtMapViewOfSectionEx with
alloc_type=MEM_REPLACE_PLACEHOLDER, but you couldn't tell from the
trace.
2024-02-14 19:19:32 +01:00
Marc-Aurel Zent
cd2570c28d iphlpapi: Implement GetRTTAndHopCount(). 2024-02-14 19:19:32 +01:00
Zhiyi Zhang
ca97cb8700 server: Inherit internal desktop flags when creating desktops.
Based on Rémi's idea.

CEF applications create their own desktops and so is_virtual_desktop() could incorrectly
report that virtual desktop is off if DF_WINE_VIRTUAL_DESKTOP is not inherited.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55810
2024-02-13 22:37:50 +01:00
Zhiyi Zhang
2990a4f8c3 include: Rename DF_WINE_CREATE_DESKTOP to DF_WINE_VIRTUAL_DESKTOP. 2024-02-13 22:37:50 +01:00
Shaun Ren
6e8d450804 sapi: Implement ISpeechObjectTokens::Invoke. 2024-02-13 22:37:50 +01:00
Shaun Ren
6f2a0c412f sapi: Implement IEnumVARIANT::Next for ISpeechObjectTokens. 2024-02-13 22:37:50 +01:00
Shaun Ren
261d7c3de4 sapi: Implement ISpeechObjectTokens::get_Count. 2024-02-13 22:37:50 +01:00
Shaun Ren
59a7ee1a2c sapi: Implement ISpeechObjectToken::GetIDsOfNames. 2024-02-13 22:37:50 +01:00
Shaun Ren
001d1a4319 sapi: Implement ISpeechObjectToken::Invoke. 2024-02-13 22:37:50 +01:00
Shaun Ren
b6c1760727 sapi: Implement ISpeechObjectToken::GetDescription. 2024-02-13 22:37:50 +01:00
Mohamad Al-Jaf
23f360b1db windows.security.authentication.onlineid: Implement IOnlineIdSystemAuthenticatorStatics::get_Default().
Called by Minecraft Education Edition.
2024-02-13 22:37:50 +01:00
Mohamad Al-Jaf
df9b41afcb windows.security.authentication.onlineid: Add IOnlineIdServiceTicketRequestFactory stub interface. 2024-02-13 22:37:50 +01:00
Mohamad Al-Jaf
a3ef7d7487 windows.security.authentication.onlineid: Add IOnlineIdSystemAuthenticatorStatics stub interface. 2024-02-13 22:37:50 +01:00
Mohamad Al-Jaf
9809102897 windows.security.authentication.onlineid: Add stub DLL. 2024-02-13 22:37:50 +01:00
Mohamad Al-Jaf
f0b32fa541 include: Add windows.security.authentication.onlineid.idl file. 2024-02-13 22:37:50 +01:00
Daniel Lehman
834558245b oleaut32: Handle exponent in VarBstrFromR[48] in non-English locales. 2024-02-13 22:37:50 +01:00
Fabian Maurer
5ffed8830c user32/sysparams: Handle more contexts in GetAwarenessFromDpiAwarenessContext.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55630
2024-02-13 22:37:50 +01:00
Fabian Maurer
d34cbe61db user32/sysparams: Only allow dpi awareness tests to return invalid on windows.
We can't use IsValidDpiAwarenessContext since this uses
GetAwarenessFromDpiAwarenessContext which we're testing
2024-02-13 22:37:50 +01:00
Zebediah Figura
f74f8b9ef3 shlwapi/tests: Add many more tests for UrlCanonicalize(). 2024-02-13 22:37:50 +01:00
Zebediah Figura
5ca8e4b00d kernelbase: Use scheme_is_opaque() in UrlIs(). 2024-02-13 22:37:50 +01:00
Zebediah Figura
37aabda67e kernelbase: Reimplement UrlCanonicalize().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=23166
2024-02-13 22:37:50 +01:00
Zebediah Figura
80a92c07f5 kernelbase: Do not canonicalize the relative part in UrlCombine(). 2024-02-13 22:37:50 +01:00
Zebediah Figura
13d48ed315 kernelbase: Do not use isalnum() with Unicode characters.
It does not expect code points higher than U+00FF and will read past the end of the ctypes[] array.
2024-02-13 22:37:50 +01:00
Zebediah Figura
ca29c3a422 shlwapi/tests: Move UrlCombine() error tests out of the loop.
And expand them a bit while we're at it.
2024-02-13 22:37:50 +01:00
Zebediah Figura
a4ac824fe5 shlwapi/tests: Use winetest_push_context() in test_UrlCanonicalizeA(). 2024-02-13 22:37:50 +01:00
Zebediah Figura
fc0c738f9d shlwapi/tests: Remove the unused "wszExpectUrl" variable from check_url_canonicalize(). 2024-02-13 22:37:50 +01:00
Zebediah Figura
dc800b56b6 shlwapi/tests: Move the UrlCanonicalize() tests into test_UrlCanonicalizeA(). 2024-02-13 22:37:50 +01:00
Zebediah Figura
6ff5c3b500 urlmon/tests: Add basic tests for CoInternetParseUrl(PARSE_CANONICALIZE). 2024-02-13 22:37:50 +01:00
Alexandre Julliard
8f278f89df ntdll: Make APCs alertable by default on ARM platforms. 2024-02-13 22:37:49 +01:00
Alexandre Julliard
0b3d3ad2b7 ntdll: Support ARM64EC code in RtlLookupFunctionEntry. 2024-02-13 22:37:49 +01:00
Alexandre Julliard
ab69f71912 ntdll: Move RtlAddFunctionTable() to the CPU backends. 2024-02-13 21:57:05 +01:00
Alexandre Julliard
02ebacca0c ntdll: Move find_function_info() to the CPU backends. 2024-02-13 21:57:05 +01:00
Alexandre Julliard
215a8e68d3 ntdll: Move RtlLookupFunctionEntry() to the CPU backends. 2024-02-13 21:57:02 +01:00
Alexandre Julliard
b9a985a677 include: Add some public exception handling structures. 2024-02-13 17:59:38 +01:00
Paul Gofman
0b441c4c8f kernel32/tests: Add tests for critical section debug info presence. 2024-02-13 15:46:24 +01:00
Gabriel Ivăncescu
e8f4909ac3 kernelbase: Copy the read-only attribute from the source.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-12 23:02:03 +01:00
Bernhard Übelacker
267a5658fb wininet: Avoid crash in InternetCreateUrl with scheme unknown.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=33050
2024-02-12 23:02:03 +01:00
Bernhard Übelacker
ceea01b165 wininet: Add missing assignment of return value. 2024-02-12 23:02:03 +01:00
Santino Mazza
ba4681e776 gdiplus: Implement font linking for gdiplus. 2024-02-12 23:02:03 +01:00
Santino Mazza
d68a9d1213 gdiplus/tests: Add interactive test for font linking. 2024-02-12 23:02:03 +01:00
Santino Mazza
1454ffe7dd gdiplus: Replace HDC with GpGraphics in parameters. 2024-02-12 23:02:03 +01:00
Santino Mazza
b549ae11fb mlang: Fix bug with codepage priority in GetStrCodePages. 2024-02-12 23:02:03 +01:00
Santino Mazza
bc62314811 mlang/tests: Test codepages priority bug in GetStrCodepages. 2024-02-12 23:02:03 +01:00
Santino Mazza
8293074558 mlang: Implement GetGlobalFontLinkObject. 2024-02-12 23:02:03 +01:00
Santino Mazza
6360992dea mlang/tests: Test for GetGlobalFontLinkObject. 2024-02-12 23:02:03 +01:00
Gabriel Ivăncescu
e00270a8b2 jscript: Implement ArrayBuffer.prototype.slice.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-12 23:02:03 +01:00
Gabriel Ivăncescu
aa2bd097d6 jscript: Implement DataView getters.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-12 23:02:03 +01:00
Gabriel Ivăncescu
556e3349ab jscript: Implement DataView setters.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-12 23:02:02 +01:00
Gabriel Ivăncescu
00f04ef3ce jscript: Add initial implementation of DataView.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-12 23:02:02 +01:00
Gabriel Ivăncescu
88c0f72bbf jscript: Add initial implementation of ArrayBuffer.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-12 23:02:02 +01:00
Eric Pouech
52b9f8a9fa kernel32/tests: Remove todo scaffolding for CreateProcess() tests.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-12 23:02:02 +01:00
Eric Pouech
233074ded0 msvcrt: Don't reset invalid std handle in init.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-12 23:02:02 +01:00
Eric Pouech
35bea75647 msvcrt/tests: Extend test for invalid std handle on msvcrt init.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-12 23:02:02 +01:00
Eric Pouech
4121a29b50 kernelbase: Don't use INVALID_HANDLE_VALUE as std handle in CreateProcess.
And don't infer detached console state from std handle values, but rely
on a NULL console handle.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-12 23:02:02 +01:00
Eric Pouech
eba8b54870 kernel32/tests: Add tests for CreateProcess with invalid handles.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-12 23:02:02 +01:00
Bernhard Übelacker
c418771a43 cmd: Avoid execution if block misses closing brackets. 2024-02-12 23:02:02 +01:00
Bernhard Übelacker
d7edf3e651 cmd: Handle lines with just spaces in bracket blocks.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51599
2024-02-12 23:02:02 +01:00
Piotr Caban
1d479df4e8 wininet: Set AutoConfigURL registry key when saving proxy information. 2024-02-12 23:02:02 +01:00
Piotr Caban
666a472f06 wininet: Set ProxyOverride registry key when saving proxy information. 2024-02-12 23:02:02 +01:00
Piotr Caban
17d8cb24d4 wininet: Store whole ProxyServer string so it's not lost while saving settings to registry. 2024-02-12 23:02:02 +01:00
Piotr Caban
40b5e767d4 wininet: Add support for reading AutoConfigURL from registry. 2024-02-12 23:02:02 +01:00
Piotr Caban
132da0e0ee wininet: Return process-wide proxy settings from INTERNET_GetProxySettings.
Use INTERNET_LoadProxySettings when settings from registry are needed.
2024-02-12 23:02:02 +01:00
Piotr Caban
5fe477767a wininet: Move reading proxy settings from registry to separate function. 2024-02-12 23:02:02 +01:00
Piotr Caban
1a53e28cc8 wininet: Don't allocate global_proxy structure dynamically. 2024-02-12 23:02:02 +01:00
Piotr Caban
c17b0d6a3f wininet: Store proxy type in proxyinfo_t. 2024-02-12 23:02:02 +01:00
Alexandre Julliard
df8d907fb4 ntdll/tests: Don't use x86-64 assembly on ARM64EC. 2024-02-12 23:01:55 +01:00
Alexandre Julliard
de492f9a34 ntdll: Implement RtlLookupFunctionTable. 2024-02-12 22:53:21 +01:00
Rémi Bernon
165830c317 winex11: Simplify XInput2 device valuator lookup.
Valuator names aren't well specified, and although they are usually
named "Rel X/Y" or "Abs X/Y", there are cases where the names are
different.

Lets just assume that the first two valuators are the X/Y axes, as it
seems to be generally the case.
2024-02-12 12:32:23 +01:00
Rémi Bernon
51e99345de winex11: Always listen to XInput2 device changes events. 2024-02-12 12:32:22 +01:00
Rémi Bernon
b7867059ce winex11: Initialize XInput2 extension on every thread. 2024-02-12 12:32:22 +01:00
Rémi Bernon
1a757a0146 winex11: Advertise XInput2 version 2.2 support.
This is the required version for XInput2 touch events. It also allows
to greatly simplify the code by listening to master device events only
and get rid of device id tracking:

Under XInput2 protocol version < 2.1, RawEvents are not supposed to be
sent if a pointer grab is active. However slave device events are still
received regardless of this specification and Wine implemented a
workaround to receive RawEvents during pointer grabs by listening to
these slave device events.

By advertising the support of XInput2 version >= 2.1, where RawEvents
are sent even during pointer grabs, we ensure to receive the RawMotion
even if a mouse grab is active.
2024-02-12 12:32:20 +01:00
Rémi Bernon
b341688dbd winex11: Process XInput2 events with QS_INPUT filter. 2024-02-12 12:32:20 +01:00
Yuxuan Shui
e9e8ab1392 dmband: Implement getting/setting GUID_BandParam on band tracks. 2024-02-12 12:26:34 +01:00
Alexandre Julliard
39d8b25938 Release 9.2. 2024-02-09 22:46:52 +01:00
Gabriel Ivăncescu
b5c57b9a62 explorer: Set layered style on systray icons only when it's actually layered.
Fixes a regression introduced by 229b4561d9,
which caused the icons to not be visible initially in the virtual desktop
systray.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-09 18:21:09 +01:00
Gabriel Ivăncescu
5e7a8f4db0 explorer: Don't activate the systray icon when showing it.
Fixes a regression introduced by 62c6646d8f,
because SetParent will unconditionally activate the window, causing newly
added icons to deactivate the foreground window.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-09 18:21:06 +01:00
Shaun Ren
26498d93cf sapi: Add stub implementation for ISpeechObjectTokens::get__NewEnum. 2024-02-09 18:00:04 +01:00
Shaun Ren
ca6f3a7af8 sapi: Add ISpeechObjectTokens stub. 2024-02-09 18:00:04 +01:00
Shaun Ren
c45bedbf23 sapi: Add ISpeechObjectToken stub. 2024-02-09 18:00:04 +01:00
Jacek Caban
4e54087fab dsound: Simplify f_to_32. 2024-02-09 18:00:04 +01:00
Jacek Caban
92f9c58e6d d3d10/tests: Avoid implicit cast changing value. 2024-02-09 18:00:04 +01:00
Alexandre Julliard
13b0f22cf9 ntdll/tests: Mark a failing test as todo. 2024-02-09 18:00:04 +01:00
Alexandre Julliard
7e2f44210b user32/tests: Fix some sysparams results on recent Windows. 2024-02-09 16:21:54 +01:00
Alexandre Julliard
525835897b gdi32/tests: Fix the expected GetTextMetrics() results on recent Windows. 2024-02-09 12:34:04 +01:00
Alexandre Julliard
3bd1d1c60d uxtheme: Use BOOLEAN instead of BOOL in ordinal functions.
This should fix test failures on Windows.
2024-02-09 11:48:46 +01:00
Rémi Bernon
87e5bdaa4a win32u: Get rid of the rawinput thread data and buffer. 2024-02-09 11:14:07 +01:00
Rémi Bernon
1664ad7d50 server: Fix rawinput buffer sizes and alignment on WoW64. 2024-02-09 11:14:07 +01:00
Rémi Bernon
2eb8950392 server: Move rawinput message conversion from win32u.
Appending the entire RAWMOUSE / RAWKEYBOARD / RAWHID + report structs
after the hardware message data, instead of using a custom intermediate
structure.
2024-02-09 11:14:07 +01:00
Ivo Ivanov
9a0e244d51 winebus.sys: Prefer hidraw if it is the only backend enabled. 2024-02-09 11:13:44 +01:00
Hans Leidekker
8cb68e43de msxml3: Enable XPath object cache.
This gives a 30% performance increase in a local test with a very large document.
2024-02-08 23:31:25 +01:00
Yuxuan Shui
97d4c7fe3f mf: Only preroll when starting from stopped state.
Stream sink such as evr can't be prerolled a second time, and when we are
restarting from a paused state, those stream sink will already be prerolled
so don't preroll them again. Otherwise we will be waiting for Prerolled
events that will never come.
2024-02-08 23:31:25 +01:00
Marc-Aurel Zent
51b6a0fe12 ntdll: Fix DW_OP_abs absolute value warning on labs() for clang. 2024-02-08 23:31:25 +01:00
Alex Henrie
48440d2446 explorer: Handle the back and forward buttons of a 5-button mouse. 2024-02-08 23:31:25 +01:00
Alexandros Frantzis
26e3d2eced win32u: Use consistent locking order for display related mutexes.
Most paths that hold both the display_lock and the display_devices_init
mutex acquire them in the order just mentioned. However, there are two
cases where these are acquired in the opposite order, which with
unfortunate thread interactions and timings can lead to a deadlock. Fix
these cases to use the same order as the rest of the code.
2024-02-08 23:31:24 +01:00
Rémi Bernon
c8bf3ba2da server: Stop using hardware_msg_data in rawinput_message. 2024-02-08 23:31:24 +01:00
Rémi Bernon
f86cca3897 server: Stop using union rawinput in hw_input_t. 2024-02-08 23:31:24 +01:00
Rémi Bernon
c62ca2e1aa server: Combine HID usage page and usage together. 2024-02-08 23:31:24 +01:00
Rémi Bernon
3c64448037 mfreadwrite/tests: Test source reader transforms with MF_SOURCE_READER_ENABLE_ADVANCED_VIDEO_PROCESSING. 2024-02-08 23:31:24 +01:00
Rémi Bernon
b37a16c7f3 mfreadwrite/tests: Test source reader transforms with MF_SOURCE_READER_ENABLE_VIDEO_PROCESSING. 2024-02-08 23:31:24 +01:00
Rémi Bernon
f5daee4a2f mfreadwrite/tests: Test source reader exposed transforms and types. 2024-02-08 23:31:24 +01:00
Rémi Bernon
5122f6ad9f mfreadwrite/tests: Initialize test source stream types from descriptors. 2024-02-08 23:31:24 +01:00
Alexandre Julliard
cf7c48e036 ntdll: Fix RtlWow64GetCurrentMachine() result on ARM64EC. 2024-02-08 23:31:24 +01:00
Alexandre Julliard
1456b31eec ntdll: Use the current machine by default to create an ARM64X process. 2024-02-08 17:07:23 +01:00
Alexandre Julliard
de988eeea0 server: Add hybrid flag in image mapping information. 2024-02-08 17:07:22 +01:00
Alexandre Julliard
8c703f3e2f ntdll: Redirect the module entry point for ARM64EC modules. 2024-02-08 17:07:22 +01:00
Alexandre Julliard
e05c6c8211 server: Don't update the entry point in the image information for ARM64EC modules. 2024-02-08 17:07:22 +01:00
Alexandre Julliard
bd703632fd server: Don't update the machine in the image information for ARM64EC modules. 2024-02-08 13:05:28 +01:00
Esme Povirk
ce4636e510 user32/tests: Fix flags on expected EM_GETPASSWORDCHAR message.
I missed that a few of these had the defwinproc flag when
initially adding them.
2024-02-07 22:50:29 +01:00
Arkadiusz Hiler
f67279c57f wbemprox: Reimplement LIKE.
Current implementation handles correctly % only at the end of the
string. Nothing else matches.

The new implementation while naïve and recursive handles both _ and *
correctly.
2024-02-07 22:50:14 +01:00
Arkadiusz Hiler
332d48364f wbemprox/tests: Test LIKE queries. 2024-02-07 22:50:14 +01:00
Helix Graziani
4efbcae5e8 windows.globalization: Add IIterable_HSTRING impl to IVectorView_HSTRING. 2024-02-07 22:39:58 +01:00
Louis Lenders
0edcc9b1d6 wbemprox: Add property 'Caption' to Win32_DiskDrive.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56291
2024-02-07 22:39:49 +01:00
Eric Pouech
36d6fe591b dmime: Use sent duration in loop's playback.
When playing a loop, and if no end of loop point has been defined
(meaning = play whole segment), don't rely on segment's length for
wave tracks as their length is always 1.  Compute segment length in
this case by grabbing each track's playback length in segment state's
internal graph.  This feature is only activated for messages generated
by wave tracks, but could be extended if needed to other types of
messages.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-07 22:34:25 +01:00
Eric Pouech
ef2830b620 dmime: Generate track flags while in loop.
Store track_flags inside segment state so that they can be reused in
subsequent calls.  The start/seek/loop flags are now properly set when
calling IDirectMusicTrack_Play().

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-07 22:34:18 +01:00
Eric Pouech
dfaa45069e dmime: Add IDirectMusicGraph interface to segment state.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-07 22:34:18 +01:00
Eric Pouech
425c270d27 dmime: Add tests about segment state's graph interface.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-07 22:34:17 +01:00
Eric Pouech
ed92095f28 dmime: Fully implement IDirectMusicSegmentState::GetRepeats().
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-07 22:34:17 +01:00
Alexandre Julliard
c129595381 ntdll: Use the correct machine when loading ntdll on ARM64EC. 2024-02-07 22:28:00 +01:00
Alexandre Julliard
0d37cc1d06 ntdll: Update the image information when loading a builtin dll. 2024-02-07 22:28:00 +01:00
Alexandre Julliard
4022fb9ba3 server: Don't report alternate 64-bit machines as supported. 2024-02-07 22:28:00 +01:00
Alexandre Julliard
818b577727 ntdll/tests: Add some process machine tests for ARM64X. 2024-02-07 15:46:01 +01:00
Alexandre Julliard
b41566fb31 ntdll: Fix stack layout for ARM syscalls. 2024-02-07 11:57:15 +01:00
Zhiyi Zhang
6b853a9354 mf/tests: Test IMFMediaSession::Start().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2024-02-06 22:56:50 +01:00
Zhiyi Zhang
9c82ce962b mf: Support seeking while a session is started. 2024-02-06 22:56:50 +01:00
Zhiyi Zhang
c1223d0be0 mf/tests: Add a create_test_topology() helper.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2024-02-06 22:56:50 +01:00
Zhiyi Zhang
8173d3b0ab mf: Add a session_flush_nodes() helper.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2024-02-06 22:56:50 +01:00
Zhiyi Zhang
a00b30bfbf mf: Make session_get_node_object() more robust.
It's possible that a state object pointer not in the topology node collection gets passed to
session_get_node_object(). Instead of returning the last node when the object is not found, we
should return a NULL so that the state of the last node is not changed by mistake.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2024-02-06 22:56:48 +01:00
Giovanni Mascellani
06482e324c d2d1: Compile vertex shaders with D3DCompile(). 2024-02-06 22:56:42 +01:00
Yuxuan Shui
fa145fd517 dmusic: Fix loading wave data from soundfont. 2024-02-06 22:56:02 +01:00
Georg Lehmann
05a0da8ab9 winevulkan: Enable VK_ARM_render_pass_striped. 2024-02-06 22:54:21 +01:00
Georg Lehmann
ea890c4733 winevulkan: Update to VK spec version 1.3.277. 2024-02-06 22:54:21 +01:00
Georg Lehmann
db03d2be88 winevulkan: Prepare for VK_KHR_calibrated_timestamps. 2024-02-06 22:54:21 +01:00
Paul Gofman
16dafed08b msvcrt: Adjust _gmtime64_s() accepted time limits. 2024-02-06 22:54:21 +01:00
Tim Clem
3985b7c599 winebus.sys: Do not attempt to open keyboard and mouse HID devices on macOS.
Doing so triggers a permissions prompt for input monitoring.

Patch originally by Rémi Bernon.
2024-02-06 22:54:21 +01:00
Paul Gofman
5da459f1f2 explorer: Don't pop start menu on "undo minimize all windows" systray command. 2024-02-06 22:54:21 +01:00
Paul Gofman
d66fe6206d explorer: Don't pop start menu on "minimize all windows" systray command. 2024-02-06 22:54:21 +01:00
Louis Lenders
988253a69b wbemprox: Add property 'ClassGuid' to Win32_PnPEntity.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56291
2024-02-06 22:54:21 +01:00
Zebediah Figura
de5a07b20b wined3d/arb: Compare the fragment pipe ops in shader_arb_select() instead of using an extra field.
Matches what's done in the GLSL shader backend.
2024-02-06 16:36:19 +01:00
Zebediah Figura
37d909e007 wined3d/arb: Always disable the fragment pipeline in shader_arb_select().
The original intent here seems to have been to avoid disabling
GL_FRAGMENT_PROGRAM_ARB only to reënable it again. There is not actually any
harm in this, however.
2024-02-06 16:36:19 +01:00
Zebediah Figura
4ed7bb35ed wined3d/glsl: Pass through the specular varying when SPECULARENABLE is FALSE. 2024-02-06 16:36:19 +01:00
Zebediah Figura
b5a252bcec wined3d/glsl: Always set WINED3D_SHADER_CONST_FFP_LIGHTS in FFP constant update masks.
It is possible (if somewhat artificial) to use lighting without using ambient
lighting. In this case ffp_light_ambient may not be an active uniform.

We could be more sophisticated here, and add lighting to the mask if we use any
lighting uniform, but this is simpler and probably good enough.
2024-02-06 16:36:19 +01:00
Zebediah Figura
4171fdf4d7 d3d8/tests: Add more tests for SPECULARENABLE.
Show that it affects both the vertex and fragment FFP pipelines.
2024-02-06 16:36:19 +01:00
Rémi Bernon
604bc7ccf9 mf/tests: Add some tests with video processor aperture handling. 2024-02-06 16:36:19 +01:00
Rémi Bernon
5a12be3a9a mf/tests: Report more transform current type mismatches. 2024-02-06 16:36:19 +01:00
Alexandre Julliard
4141a14443 kernel32: Don't export RtlRaiseException on ARM64. 2024-02-06 16:36:19 +01:00
Alexandre Julliard
9088506029 kernel32: Move Wow64Get/SetThreadContext implementation to kernelbase. 2024-02-06 16:36:19 +01:00
Aida Jonikienė
124ea59b8d configure: Use YEAR2038 macro when it's available.
autoconf 2.72 disabled the time size increase when LARGEFILE macro is being
used: https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=cf09f48841b66fe76f606dd6018bb3a93242a7c9

That change can cause 32-bit Wine to return EOVERFLOW when running
stat() on a file in certain edge cases (which causes some files to
be skipped leading to applications failing to run properly).

This change was tested with both autoconf 2.71 and 2.72 to make sure
nothing broke there.
2024-02-06 16:34:09 +01:00
Marc-Aurel Zent
c0bffa823d ntdll: Reimplement set_native_thread_name() for macOS. 2024-02-06 16:34:09 +01:00
Eric Pouech
626b2f1898 server: Preserve handle flags when inheriting a std handle.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-06 11:39:58 +01:00
Eric Pouech
1c7e1f1fc6 server: Implement support for DUPLICATE_SAME_ATTRIBUTES in DuplicateHandle().
This flag is documented on MSDN in ZwDuplicateObject() but not in
DuplicateHandle(). Yet functional on both.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-06 11:39:58 +01:00
Eric Pouech
d68a0e650a kernel32/tests: Test DUPLICATE_SAME_ATTRIBUTES flag in DuplicateHandle().
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-06 11:39:58 +01:00
Eric Pouech
da9210e038 kernel32/tests: Added tests about std handle flags inheritance.
Adding support for protect-from-close handle flag to CreateProcess
test infrastructure.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-06 11:35:47 +01:00
Esme Povirk
23f98e9663 gdiplus/tests: Thoroughly test region combines. 2024-02-05 22:35:10 +01:00
Esme Povirk
13b2755d4d gdiplus: Fix some degenerate cases combining infinite regions. 2024-02-05 22:35:10 +01:00
Jacek Caban
3c19b29ce6 include: Add RtlRestoreContext declaration. 2024-02-05 21:50:12 +01:00
Gabriel Ivăncescu
681d34d784 mshtml/tests: Test builtin function default value getter with custom IOleCommandTarget.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-05 21:45:20 +01:00
Gabriel Ivăncescu
330d8cd998 mshtml: Expose the IHTMLEventObj5 props to scripts.
It's mostly implemented, and issession isn't even exposed.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-05 21:45:20 +01:00
Gabriel Ivăncescu
ae0e5ee901 mshtml: Implement initMessageEvent for MessageEvents.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-05 21:45:20 +01:00
Gabriel Ivăncescu
497e9d617e mshtml: Implement origin prop for MessageEvents.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-05 21:45:20 +01:00
Gabriel Ivăncescu
266ac9a809 mshtml: Implement data getter for MessageEvent objs.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-05 21:45:19 +01:00
Gabriel Ivăncescu
69d4be9ff0 mshtml: Return E_ABORT from postMessage called without a caller ServiceProvider.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-05 21:45:19 +01:00
Gabriel Ivăncescu
b9e4680dea mshtml: Implement source prop for MessageEvents.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-05 21:45:19 +01:00
Gabriel Ivăncescu
22214ec357 mshtml: Use a hook to implement postMessage.
We need the caller ServiceProvider to obtain the source.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-02-05 21:45:19 +01:00
Alexandre Julliard
7c7544aba1 winebuild: Add .seh annotations on ARM. 2024-02-05 21:45:19 +01:00
Alexandre Julliard
e25b1ab7e9 winebuild: Remove some no longer used code for ARM platforms. 2024-02-05 21:06:00 +01:00
Fabian Maurer
bbce5d014d msi: Don't write past end of string when selecting parent directory. 2024-02-05 13:25:36 +01:00
Zhiyi Zhang
d6dc917232 user32/tests: Fix test_recursive_messages() test failures on win7.
Windows 7 has a lower maximum depth for recursive hooks.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56293
2024-02-05 13:25:36 +01:00
Louis Lenders
2b01a64ff2 wbemprox: Add property 'Caption' to Win32_PnPEntity.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56291
2024-02-05 13:25:36 +01:00
Esme Povirk
afacbe53ba user32/tests: Accept EM_GETPASSWORDCHAR when edit is focused. 2024-02-05 13:25:36 +01:00
Piotr Caban
7ab46f03b1 winhttp: Add support for WINHTTP_AUTOPROXY_HOST_LOWERCASE flag in WinHttpGetProxyForUrl. 2024-02-05 12:39:15 +01:00
Piotr Caban
9eb644fa13 winhttp/tests: Add more WinHttpGetProxyForUrl tests. 2024-02-05 12:39:15 +01:00
Rémi Bernon
6979a9f059 winegstreamer: Allow wg_transform size changes with an explicit attribute. 2024-02-05 12:39:10 +01:00
Rémi Bernon
98b8ab9b88 winegstreamer: Ignore wg_transform input / output video format fps.
Decoders might output some fps information and encoders might input fps,
but otherwise is unnecessary and may prevent compatible caps matching.
2024-02-05 12:39:08 +01:00
Rémi Bernon
62955f2229 winegstreamer: Use GST_PTR_FORMAT to trace GStreamer objects. 2024-02-05 12:39:08 +01:00
Rémi Bernon
4f349d442a winegstreamer: Handle sink event caps in a separate helper. 2024-02-05 12:39:08 +01:00
Rémi Bernon
f39156ee6a winegstreamer: Handle sink caps query in a separate helper. 2024-02-05 12:39:08 +01:00
Rémi Bernon
ec759079a5 winegstreamer: Handle allocation query in a separate helper. 2024-02-05 12:39:08 +01:00
Rémi Bernon
6dae92cfb9 winegstreamer: Trace wg_transform input and output caps. 2024-02-05 12:39:08 +01:00
Esme Povirk
e891073c9e mscoree: Update Wine Mono to 9.0.0. 2024-02-05 12:39:02 +01:00
Zebediah Figura
0b4ad32c16 wined3d: Move sampler_texdim() and texture_activate_dimensions() to ffp_gl.c. 2024-02-05 12:38:46 +01:00
Zebediah Figura
4a30ab299a wined3d: Rename state.c to ffp_gl.c.
Better reflect its contents.

There is still a small amount of code in this file not directly related to the
FFP:

 - compile_state_table(), which should eventually go away;

 - states like state_so() and indexbuffer(), which should eventually be moved to
   context_gl.c with the rest of the resource loading/binding code.
2024-02-05 12:38:43 +01:00
Zebediah Figura
7181ef4052 wined3d: Move state objects from state.c to device.c.
The entire rest of state.c is concerned with the GL fixed-function pipeline.

device.c seems the most fitting place for these, since they're associated with
the device and stored in the device. device.c is also one of the few files that
contains client-side code, which these functions are.
2024-02-05 12:38:41 +01:00
Rémi Bernon
303717f45f dinput/tests: Test rawinput with the virtual HID touchscreen. 2024-02-02 13:02:13 +01:00
Rémi Bernon
e3c61ba74c dinput/tests: Use a polled HID touchscreen device.
Looks like touches are automatically released if the device doesn't send
updates regularly.
2024-02-02 13:02:11 +01:00
Rémi Bernon
e25d23d5dc dinput/tests: Test rawinput messages with non-input desktop. 2024-02-02 13:02:11 +01:00
Rémi Bernon
5d7bf639e8 dinput/tests: Add more tests for HID rawinput buffer. 2024-02-02 13:02:11 +01:00
Rémi Bernon
bd2b89806a dinput/tests: Add a helper to wait on HID input reads. 2024-02-02 13:02:11 +01:00
Rémi Bernon
a4d2e62a2f user32/tests: Rewrite the rawinput buffer test with keyboard input.
This should be more reliable than mouse moves and it exhibits more
issues with the rawinput buffer struct sizes on new WoW64.
2024-02-02 13:02:09 +01:00
Rémi Bernon
9e8a8b5246 user32/tests: Run rawinput device tests in the separate desktop. 2024-02-02 13:02:09 +01:00
Paul Gofman
da6e707850 server: Check if we have waiting asyncs in sock_dispatch_asyncs() before clearing POLLOUT. 2024-02-02 13:02:04 +01:00
Paul Gofman
aac0998262 server: Check if we have waiting asyncs in (send_socket) before enforcing blocking send. 2024-02-02 13:01:55 +01:00
Esme Povirk
294efcdf44 gdiplus: Prefer Tahoma for generic sans serif font.
Partial revert of 413fc34be7.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55421
2024-02-02 13:00:56 +01:00
Louis Lenders
c3918f2a82 shcore: Add stub for RegisterScaleChangeNotifications.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56244
2024-02-01 22:52:20 +01:00
Nikolay Sivov
68ab4c4849 d3d10/effect: Clarify constant buffer flags field meaning.
It makes more sense to have it matching fx_5_0 format, which
uses the same flag for TBUFFER case, and also keeps 'single' modifier in there.
This modifier is ignored on fx_4_x, so it's only needed to be implemented
in the compiler.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-02-01 22:14:19 +01:00
Vibhav Pant
36fa4da337 configure: Correctly derive the target from CC if it's set to an absolute path.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56279
2024-02-01 22:13:25 +01:00
Eric Pouech
9bca18e796 dbghelp: Implement SymSrvGetFileIndexInfo() for PDB/JG files.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-01 21:47:17 +01:00
Eric Pouech
767fc14ef7 dbghelp: Implement SymSrvGetFileIndexInfo() for .dbg files.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-01 21:47:17 +01:00
Eric Pouech
34128f1ae7 dbghelp/tests: Test SymSrvGetFileIndexInfo() on .dbg files.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-01 21:47:17 +01:00
Eric Pouech
27003f8329 dbghelp/tests: Use Unicode encoding for generated PDB filenames.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-02-01 21:47:17 +01:00
Paul Gofman
f8ee879002 ntdll/tests: Fix test_user_shared_data() for a more generic set of present features. 2024-02-01 21:47:17 +01:00
Daniel Lehman
50bfe00968 msvcrt/tests: Add sprintf tests. 2024-02-01 21:47:17 +01:00
Daniel Lehman
9c136a470c ucrtbase/tests: Add sprintf tests. 2024-02-01 21:47:17 +01:00
Piotr Caban
53faf7bda8 jsproxy: Don't ignore hostname and url length in InternetGetProxyInfo. 2024-02-01 21:47:17 +01:00
Felix Münchhalfen
1cbff7c8d6 kernelbase/tests: Add a test for MapViewOfFile3 with MEM_REPLACE_PLACEHOLDER. 2024-02-01 21:47:17 +01:00
Felix Münchhalfen
2f88259a44 ntdll: Use pagesize alignment if MEM_REPLACE_PLACEHOLDER is set in flags of NtMapViewOfSection(Ex). 2024-02-01 21:47:17 +01:00
Brendan Shanks
f5c00e3870 winebuild: As a last resort, search for tools un-prefixed using clang. 2024-02-01 21:47:17 +01:00
Brendan Shanks
d292c7ec74 winebuild: Refactor find_tool(). 2024-02-01 21:47:17 +01:00
Alexandre Julliard
b1ab51b508 winebuild: Default to plain "clang" in find_clang_tool(). 2024-02-01 21:47:17 +01:00
Alexandre Julliard
a97b3f640c winedump: Handle ARM64 exception unwind info with flag==3. 2024-02-01 21:47:17 +01:00
Alexandre Julliard
3825af6041 winedump: Make the ARM exception information more compact. 2024-02-01 21:47:17 +01:00
Rémi Bernon
d352b852a9 winevulkan: Remove now unnecessary vkGetDeviceGroupSurfacePresentModesKHR driver entry. 2024-02-01 11:02:40 +01:00
Rémi Bernon
4a16bcf9ab winevulkan: Remove now unnecessary vkGetPhysicalDeviceSurfacePresentModesKHR driver entry. 2024-02-01 11:02:37 +01:00
Rémi Bernon
70469abc05 winevulkan: Remove now unnecessary vkGetPhysicalDeviceSurfaceSupportKHR driver entry. 2024-02-01 11:02:33 +01:00
Rémi Bernon
19eba8d991 winewayland: Remove now unnecessary VK_ERROR_SURFACE_LOST_KHR checks. 2024-02-01 11:02:33 +01:00
Rémi Bernon
844d4cd206 winevulkan: Return VK_ERROR_SURFACE_LOST_KHR from surface functions. 2024-02-01 11:02:33 +01:00
Rémi Bernon
982c2ede7a winevulkan: Keep the create_info HWND on the surface wrappers. 2024-02-01 11:02:33 +01:00
Daniel Lehman
62536d1645 oleaut32/tests: Add tests for VarBstrFromR4. 2024-02-01 11:02:29 +01:00
Daniel Lehman
53f81aa1dd oleaut32/tests: Add tests for VarBstrFromR8. 2024-02-01 11:02:28 +01:00
Rémi Bernon
e607da943a win32u: Only queue a single IME update during ImeProcessKey. 2024-01-31 16:55:13 +01:00
Rémi Bernon
d8a075dc91 imm32/tests: Fix some spurious failures with Windows ko_KR IME.
Still fails spuriously from time to time as the IME sometimes doesn't
kick in, but hopefully less often.
2024-01-31 16:55:13 +01:00
Rémi Bernon
8b04d34583 imm32/tests: Also ignore NotifyIME calls when ignoring WM_IME_NOTIFY. 2024-01-31 16:55:13 +01:00
Alexandre Julliard
8fe95d29d3 ntdll: Only call TEB handlers for frames inside the current stack. 2024-01-31 12:13:55 +01:00
Alexandre Julliard
202e0b2953 ntdll: Share the is_valid_frame() helper function. 2024-01-31 12:12:51 +01:00
Alexandre Julliard
9b8409fce4 configure: Require a PE compiler for 32-bit ARM. 2024-01-31 12:09:02 +01:00
Jacek Caban
e3af07501a mfmediaengine: Avoid implicit casts in IMFAttributes_GetUINT32 calls. 2024-01-31 12:04:32 +01:00
Jacek Caban
2bbc4e17a5 mfmediaengine/tests: Use MF_MEDIA_ENGINE_CANPLAY type in IMFMediaEngine_CanPlayType call. 2024-01-31 12:04:32 +01:00
Jacek Caban
b8326ad4de mfplat: Introduce media_type_get_uint32 helper. 2024-01-31 12:04:32 +01:00
Jacek Caban
2e89cb4040 mfplat/tests: Use MF_ATTRIBUTE_TYPE type in IMFMediaType_GetItemType call. 2024-01-31 12:04:32 +01:00
Jacek Caban
e935c242c3 mfplat: Avoid implicit cast in IMFAttributes_GetUINT32 call. 2024-01-31 12:04:32 +01:00
Jacek Caban
b4fa0147e3 mf: Avoid implicit enum to int pointer casts. 2024-01-31 12:04:32 +01:00
Daniel Lehman
452b59bb4f advapi32/tests: Add some more EventLog tests. 2024-01-31 11:31:51 +01:00
Daniel Lehman
8c91e484cb advapi32/tests: Reduce reallocations. 2024-01-31 11:31:51 +01:00
Rémi Bernon
2de6cd5dc5 vulkan-1/tests: Test VK_KHR_win32_surface WSI with swapchain functions. 2024-01-31 11:04:47 +01:00
Rémi Bernon
85e2072243 vulkan-1/tests: Add more VK_KHR_win32_surface surface formats tests. 2024-01-31 11:04:47 +01:00
Rémi Bernon
7c0ddacd3e vulkan-1/tests: Test VK_KHR_win32_surface with windows in various states. 2024-01-31 11:04:47 +01:00
Rémi Bernon
beb75c50b0 vulkan-1/tests: Create surface and device before calling test_null_hwnd. 2024-01-31 11:04:47 +01:00
Rémi Bernon
69b6a92978 vulkan-1/tests: Enable VK_VERSION_1_1 as requested by validation layers. 2024-01-31 11:04:47 +01:00
Shaun Ren
2a56d4e6e9 sapi: Create a new engine only when needed in ISpVoice.
Instead of creating the TTS voice engine directly in SetVoice, we save
the specified voice token, and only create them in ISpVoice::Speak when
necessary.
2024-01-31 11:04:41 +01:00
Louis Lenders
a24039ad09 ntdll: Add stub for RtlGetDeviceFamilyInfoEnum.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56259
2024-01-31 11:04:29 +01:00
Arkadiusz Hiler
e3431a02e1 winebus.sys: Use 4 bits for hat switches.
Declaring them as 8 bits crashes game due to how Unity's native hid
support parses the data.
2024-01-30 23:03:38 +01:00
Arkadiusz Hiler
94a7b32a55 winebus.sys: Fix units used for hat switches.
The 0xe nibble value is reserved and makes hid-decode from hid-tools
crash while tryign to parse the descriptor.

0x0 is the correct way of expressing no special units are used.
2024-01-30 23:03:38 +01:00
Daniel Lehman
ee1e15ac9d glu32: Return GLU_INVALID_ENUM for illegal pixel types. 2024-01-30 23:03:38 +01:00
Daniel Lehman
3b61019b8c glu32: Return GL_OUT_OF_MEMORY from gluScaleImage if no context. 2024-01-30 23:03:38 +01:00
Daniel Lehman
ac36348179 glu32/tests: Add a few tests for gluScaleImage. 2024-01-30 23:03:38 +01:00
Rémi Bernon
02921e4900 winegstreamer: Ask GStreamer to stop messing with signal handlers. 2024-01-30 23:03:38 +01:00
Piotr Caban
268f3adce9 winedump: Sync demangling code with msvcrt. 2024-01-30 23:03:38 +01:00
Zhiyi Zhang
a128ad5c5b winex11.drv: Translate whole_rect to x11 root coordinates in set_size_hints().
whole_rect is in win32 virtual screen coordinates. It needs to be converted to x11 root
coordinates for XSetWMNormalHints().
2024-01-30 23:03:38 +01:00
Alexandre Julliard
5a26d87bab Revert "loader: Associate folder with explorer".
This reverts commit 7a941fd59a.
It doesn't work properly since explorer fails to launch, and it breaks
the tests.
2024-01-30 22:41:17 +01:00
Alexandre Julliard
87a21586a8 dbghelp/tests: Mark failing tests as todo. 2024-01-30 22:41:17 +01:00
Alexandre Julliard
08f4705e44 ntdll: Use a .seh handler for DbgUiRemoteBreakin(). 2024-01-30 22:41:17 +01:00
Alexandre Julliard
d0e02b67eb kernel32/tests: Fix some test failures on ARM platforms. 2024-01-30 22:41:17 +01:00
Alexandre Julliard
982e323070 ntdll: Report the correct address for breakpoint exception on ARM platforms. 2024-01-30 22:41:17 +01:00
Alexandre Julliard
008f64557d include: Include cfg.h from cfgmgr32.h. 2024-01-30 22:41:17 +01:00
Helix Graziani
91d60983ac cfgmgr32: Add CM_Get_Device_Interface_PropertyW stub. 2024-01-30 22:41:17 +01:00
Nikolay Sivov
e450bf42ab mfplat/tests: Skip tests that require d3d9 support. 2024-01-30 17:40:44 +01:00
Gabriel Ivăncescu
9373ec4c3c jscript: Implement IActiveScriptSite service.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-30 11:06:16 +01:00
Gabriel Ivăncescu
384d5bfde9 vbscript: Implement IActiveScriptSite service.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-30 11:06:16 +01:00
Gabriel Ivăncescu
62000c28c9 mshtml: Implement Exec for CGID_ScriptSite's CMDID_SCRIPTSITE_SECURITY_WINDOW.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-30 11:06:16 +01:00
Gabriel Ivăncescu
a0624a7e18 mshtml: Implement IActiveScriptSite service.
With IOleCommandTarget stub, since it's the interface used.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-30 11:06:14 +01:00
Gabriel Ivăncescu
370a339055 mshtml: Forward SID_SInternetHostSecurityManager of the document obj to the doc node.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-30 11:06:10 +01:00
Gabriel Ivăncescu
24c3ce6f81 mshtml: Forward the script site's QueryService to the document's.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-30 11:06:10 +01:00
Rémi Bernon
6aca31f1a1 winegstreamer: Implement H264 decoder GetInputCurrentType. 2024-01-30 11:06:00 +01:00
Rémi Bernon
2d88c57716 mf/topology_loader: Try to connect transform nodes with their current types first.
And only if that fails try again by enumerating types.
2024-01-30 11:05:58 +01:00
Rémi Bernon
d95d113230 mf/topology_loader: Initialize transform output type before adding converter.
Otherwise the next topology_branch_connect call will fail when it will
try to lookup the upstream element media type.
2024-01-30 11:05:57 +01:00
Rémi Bernon
2a185126ca mf/topology_loader: Ignore SetOutputType errors when doing indirect connect.
It only succeeds with converters, or if a decoder can directly output
the downstream media type.

If it fails we may have to add a converter after the decoder, and we
will call topology_branch_connect on the downstream branch for that.
2024-01-30 11:05:56 +01:00
Rémi Bernon
0dab1ffdf9 mf/topology_loader: Use a local variable for the indirect connection method.
Instead of modifying the method_mask parameter, in case we need to retry
with another transform.
2024-01-30 11:05:54 +01:00
Rémi Bernon
56b1f80210 mf/tests: Check inserted topology loader transforms explicitly. 2024-01-30 11:05:54 +01:00
Jacek Caban
6e49ff99eb windowscodecs: Pass result as void pointer to ComponentInfo_GetUINTValue. 2024-01-30 11:05:45 +01:00
Piotr Caban
fdd9e257e2 msvcrt: Remove no longer used parameters reference arguments from _unDname helpers. 2024-01-29 21:19:13 +01:00
Piotr Caban
779ba03bcd msvcrt: Store _unDName function parameter backreferences in parsed_symbol structure.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53934
2024-01-29 21:19:13 +01:00
Rémi Bernon
852c4d0a8a explorer: Restore a per-desktop ShowSystray registry setting.
With a global fallback setting under HKCU\Software\Wine\Explorer.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56243
2024-01-29 21:16:06 +01:00
Nikolay Sivov
75b9c221b2 mfplat/tests: Skip device manager test if d3d11 device can't be created.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-29 21:15:35 +01:00
Jacek Caban
0db8c0184e ncrypt/tests: Don't use uninitialized variable in test_get_property. 2024-01-29 21:15:20 +01:00
David Kahurani
1580c1133a msvcrt: Free previous environment variable when clearing.
Shifting the rest of the variables by one towards indices of lesser value
overwrites the variable being cleared and effectively leaks it.

Signed-off-by: David Kahurani <k.kahurani@gmail.com>
2024-01-29 21:15:09 +01:00
David Kahurani
9164cf8fd9 gdiplus: Use path_list to path helper in GdipWidenPath.
The data is the path is invalid and therefore caution has to be
taken when adding data to this path to avoid lengthening it
unnecessarily. Also, don't assume there's a head node on the list
while counting number of nodes.

Signed-off-by: David Kahurani <k.kahurani@gmail.com>
2024-01-29 21:15:04 +01:00
David Kahurani
ccc3568567 gdiplus: Use path_list to path helper in GdipFlattenPath.
This avoids a situation where the lengthening code, assuming the
data in the path is valid proceeds to lengthen the path further
while transforming data from a path_list into a path.

Signed-off-by: David Kahurani <k.kahurani@gmail.com>
2024-01-29 21:15:03 +01:00
David Kahurani
a430702b41 gdiplus: Use GdipCreatePath2 when serializing paths.
This seems like a better interface and avoids duplicating code.

Signed-off-by: David Kahurani <k.kahurani@gmail.com>
2024-01-29 21:15:02 +01:00
David Kahurani
90fb47489e gdiplus: Use GdipCreatePath2 in GdipClonePath.
This seems like a more effective interface and avoids
code duplication.

Signed-off-by: David Kahurani <k.kahurani@gmail.com>
2024-01-29 21:15:00 +01:00
Alexandre Julliard
ba6a6d5781 ntdll: Move DbgUiRemoteBreakin() to the CPU backends. 2024-01-29 17:18:58 +01:00
Alexandre Julliard
d1836e226c ntdll: Avoid calling DbgBreakPoint() in process_breakpoint(). 2024-01-29 17:18:58 +01:00
Alexandre Julliard
f704b80a26 ntdll: Use a .seh handler for the unwind exception handler. 2024-01-29 17:18:58 +01:00
Alexandre Julliard
658a0665d4 ntdll: Use the system setjmp/longjmp for exceptions in Unix libs. 2024-01-29 17:18:58 +01:00
Alex Henrie
b87bd5e9b0 krnl386: Emulate the VGA status register.
Sega Bug uses it as a timer.
2024-01-29 17:08:10 +01:00
Alexandros Frantzis
fe1f3e277d winewayland.drv: Track and apply latest window cursor on pointer enter.
Keep track of the window cursor set for each surface and apply it when
the pointer enters the corresponding surface. This fixes a problem where
due to transient disagreements between win32 pointer focus and Wayland
pointer focus a cursor update may be lost. For example:

1. Assume existing cursor C1.
2. Window is created beneath cursor.
3. The SetCursor(hwnd, C2) driver callback is called, but because the
   wl_pointer hasn't entered the Wayland surface yet we don't update
   the wl_pointer cursor.
4. wl_pointer enters the surface, we apply the latest cursor we know
   about, which is C1.
5. Since no change in cursor window occurs, we don't get any
   further SetCursor(hwnd, C2) callbacks, so we get stuck with C1.

This commit fixes the problem by tracking the per-surface HCURSOR in
step 3, regardless of whether the cursor is actually applied. So, in
step 4 we can use that HCURSOR for the surface.

This change also fixes some cases of our mouselook heuristics not
kicking in properly due to missing a SetCursor(hwnd, NULL) in the
manner described above.
2024-01-29 17:08:10 +01:00
Eric Pouech
8169c4d040 dmime/tests: Add some tests about end-points.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-29 10:42:48 +01:00
Eric Pouech
7d1cfb9e01 dmime: Remove unused fields in segment.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-29 10:42:48 +01:00
Eric Pouech
1bdf94a409 dmime: Fix IDirectMusicAudioPath::GetObjectInPath() prototype.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-29 10:42:48 +01:00
Eric Pouech
b2441ad699 dmime/tests: Add some tests for loops on wave tracks.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-29 10:42:48 +01:00
Eric Pouech
7aef55a996 dmime/tests: Fix copy & paste errors.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-29 10:42:48 +01:00
Alexandre Julliard
2e9da0ba24 winsta: Start time is an input parameter in WinStationGetProcessSid.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56256
2024-01-29 10:42:48 +01:00
Alexandre Julliard
e5becbf6a8 configure: Reset host flags in all cross-compiler error paths. 2024-01-29 10:42:48 +01:00
Alexandre Julliard
c963c4141a Release 9.1. 2024-01-26 23:56:23 +01:00
Zebediah Figura
34232874ad wined3d: Collapse some trivially nested ifs into a single condition. 2024-01-26 23:47:16 +01:00
Zebediah Figura
d219903c61 wined3d: Check for WINED3DUSAGE_LEGACY_CUBEMAP instead of checking the GL texture target.
This check was introduced in 4640be8dc8. At that point the only way for that
condition to be false was for a cube map texture.

It's not clear why cube maps are relevant here; we have no tests for this, but
it seems most expedient to just preserve the intent of the check.
2024-01-26 23:47:14 +01:00
Zebediah Figura
df70800b12 wined3d: Set the tex_type field of the FFP fragment settings from the resource's GL type. 2024-01-26 23:47:13 +01:00
Zebediah Figura
36597df656 wined3d: Check the wined3d resource type and usage in find_ps_compile_args(). 2024-01-26 23:47:13 +01:00
Zebediah Figura
dc15413585 d3d11/tests: Add a test for shader stencil export.
Ported from b8ab71e4dc in vkd3d by Conor McCarthy.
2024-01-26 23:47:05 +01:00
Zebediah Figura
775812ab11 d3d11: Report support for shader stencil export if available. 2024-01-26 23:47:04 +01:00
Zebediah Figura
5efd4b64f6 wined3d: Implement shader stencil export for GL. 2024-01-26 23:47:04 +01:00
Zebediah Figura
0ef730529a wined3d: Report VK_EXT_shader_stencil_export availability to vkd3d_shader_compile(). 2024-01-26 23:47:04 +01:00
Zebediah Figura
a586fd080d d3d11: Implement D3D11_FEATURE_D3D11_OPTIONS2. 2024-01-26 23:47:04 +01:00
Jacek Caban
4d2d6666db devenum: Use switch statements for moniker type handling.
Fixes -Wsometimes-uninitialized clang warnings by using DEFAULT_UNREACHABLE.
2024-01-26 18:30:07 +01:00
Rémi Bernon
68f8b53d69 winegstreamer: Use an array for the audio decoder input types. 2024-01-26 18:30:01 +01:00
Rémi Bernon
c65703eac7 winegstreamer: Use MFCreateAudioMediaType in the AAC decoder. 2024-01-26 18:30:01 +01:00
Rémi Bernon
42c96b9c8f winegstreamer: Fix reading MF_MT_USER_DATA into HEAACWAVEFORMAT.
Fixes 681d201462. The winegstreamer
private declaration of HEAACWAVEINFO previously didn't include the
WAVEFORMATEX member as it should.
2024-01-26 18:29:59 +01:00
Giovanni Mascellani
54217dab6d wined3d: Expose the image view usage for non-default views. 2024-01-26 18:11:51 +01:00
Giovanni Mascellani
7663be90ff wined3d: Expose the image view usage for null views. 2024-01-26 18:11:51 +01:00
Rémi Bernon
52a4d9e321 user32/tests: Tests clicking through window with SetWindowRgn. 2024-01-26 18:11:05 +01:00
Rémi Bernon
71201815bc user32/tests: Test clicking through attribute-layered windows. 2024-01-26 18:11:05 +01:00
Rémi Bernon
c5e16d2090 user32/tests: Filter the ll-hook messages with accept_message.
Wine sends spurious mouse move messages in some cases, let's ignore
them as it makes tests unreliable otherwise.
2024-01-26 18:11:02 +01:00
Nikolay Sivov
3724385c86 d3d10/effect: Use bitfields for numeric type descriptions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-26 17:54:33 +01:00
Martin Storsjö
11128e236f wineps.drv: Avoid invalid unaligned accesses.
While armv7 generally tolerates unaligned loads/stores in most
cases, the compiler is free to use the ldrd/strd instructions,
for loading/storing two consecutive 32 bit registers, and this
requires the destination to be aligned to a 4 byte boundary.

When packing a number of variable length structures, make sure
that each actual struct gets aligned at the right address
boundary.

This fixes crashes in DllMain of wineps.drv, when built for
armv7, since 351e58dc2d.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-01-26 17:54:33 +01:00
Alexandre Julliard
adf5f5fd30 ntdll/tests: Port the exception unwinding tests to ARM. 2024-01-26 17:54:33 +01:00
Alexandre Julliard
32f5efcdb2 ntdll/tests: Port the exception unwinding tests to ARM64. 2024-01-26 17:54:33 +01:00
Alexandre Julliard
35c1cc6c81 ntdll: Clear CONTEXT_UNWOUND_TO_CALL in signal frames. 2024-01-26 17:54:33 +01:00
Aida Jonikienė
81e9ae96f1 localspl: Fix a maybe-uninitialized warning in fill_builtin_form_info(). 2024-01-26 11:02:41 +01:00
Paul Gofman
bd2a2c25f5 winhttp: Always return result at once if available in WinHttpReadData(). 2024-01-26 11:01:50 +01:00
Paul Gofman
fd2534422b winhttp: Always return result at once if available in WinHttpQueryDataAvailable(). 2024-01-26 11:01:50 +01:00
Aida Jonikienė
5529b00a44 opengl32: Add a FIXME when doing a mapped buffer copy.
The copies of mapped buffers introduce significant performance overhead.
2024-01-26 11:00:56 +01:00
Aurimas Fišeras
ebb5bd64a0 po: Update Lithuanian translation. 2024-01-26 10:59:47 +01:00
Brendan McGrath
1e79217fb0 d2d1: Fix double free bug when d2d_geometry_sink_Close fails.
geometry->fill.bezier_vertices was being freed on the failed path in
d2d_geometry_sink_Close and then again when the path geometry was
released (in d2d_geometry_cleanup).

By setting it to NULL after freeing it initially, all other calls
to free it are a no-op.
2024-01-26 10:59:42 +01:00
Brendan McGrath
6d8489a0bb d2d1: Use 24-bit FP precision for triangulate.
This fixes a rendering issue (and ultimately a crash) in PowerPoint when
compiling with GCC 8.

GCC8 doesn't support the `excess-precision=standard` option under the
`#pragma GCC optimize` directive.

This results in unpredictable floating point rounding leading to errors
when inserting segments (with missing edges and/or triangles).

Using 24-bit precision ensures we don't have any excess precision.
2024-01-26 10:59:40 +01:00
Paul Gofman
eb5993a7c6 winex11.drv: Fix wglSwapBuffers() with NULL current context with child window rendering. 2024-01-25 21:59:42 +01:00
Dāvis Mosāns
e5aafd9eed ntdll/tests: Test NtContinue on x86-64.
Co-authored-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
2024-01-25 21:06:51 +01:00
Gabriel Brand
12141ad6c5 kernel32: Add string for WSAEADDRNOTAVAIL error. 2024-01-25 21:00:06 +01:00
Gabriel Brand
6361a20c52 server: Return failure in bind if the address is not found. 2024-01-25 21:00:06 +01:00
Gabriel Brand
b7f06a4a19 ws2_32/tests: Test binding UDP socket to invalid address. 2024-01-25 20:55:58 +01:00
Russell Greene
c2d683488e powrprof: Add PowerWriteACValueIndex stub. 2024-01-25 20:48:33 +01:00
Daniel Hill
054678aad0 winex11.drv: Add Dvorak with phantom keys layout.
Signed-off-by: Daniel Hill <daniel@gluo.nz>
2024-01-25 20:30:56 +01:00
Daniel Hill
b5359b7da0 winex11.drv: Improve DetectLayout heuristics.
Dvorak detection would sometimes fallback to Phantom keys, because we
only use seq as a tie breaker greater emphasis on locality is required
for layouts using the same language.

Signed-off-by: Daniel Hill <daniel@gluo.nz>
2024-01-25 20:30:56 +01:00
Daniel Hill
4fb14b5656 winex11.drv: Dvorak should use QWERTY scancodes.
This make dvorak more consistent with X11/Wayland/Windows, qwertz and
azerty layouts having the same physical scancode layout as a qwerty
keyboard and only differing in the labels on the keycaps.

Signed-off-by: Daniel Hill <daniel@gluo.nz>
2024-01-25 20:30:56 +01:00
Bernhard Übelacker
26e383c8df server: Avoid unloading of HKU .Default registry branch.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55000
2024-01-25 20:30:53 +01:00
Alistair Leslie-Hughes
d6a6e1f186 include: Correct KMTQAITYPE values.
Windows SDK skips the value 14 and KMTQAITYPE_DISPLAY_UMDRIVERNAME was assigned
a value of 71 in the SDK but wasn't in the correct order.
2024-01-25 18:01:40 +01:00
Jacek Caban
91d7b084ba kernelbase: Silence -Warray-bounds clang warning. 2024-01-25 17:58:54 +01:00
Jacek Caban
2765825c9e kernelbase: Silence -Wsometimes-uninitialized clang warning. 2024-01-25 17:58:54 +01:00
Jacek Caban
df0726e359 winevdm: Use char type for max length assignment. 2024-01-25 17:58:54 +01:00
Martin Storsjö
6d0fcf64d2 ntdll: Remove dwarf unwinding support for aarch64.
Since recently, unwinding never should need to look at the
unix libs any longer, and as aarch64 requires PE builds, there
should be no need to unwind through any .dll.so files any
longer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-01-25 17:46:10 +01:00
Alexandre Julliard
7a5e92124f ntdll: Use a .seh handler for nested exceptions. 2024-01-25 17:43:06 +01:00
Alexandre Julliard
014f020e34 ntdll: Share the nested exception handler across platforms. 2024-01-25 16:17:52 +01:00
Rémi Bernon
6ba584d1e0 user32/tests: Run the mouse hook tests in the separate desktop.
And run SetCursorPos / ClipCursor tests in a separate function, they
don't need hooks or windows.
2024-01-25 11:13:11 +01:00
Rémi Bernon
07d522426a user32/tests: Cleanup the mouse input WM_NCHITTEST / SetCapture tests.
And run them in the dedicated desktop.
2024-01-25 11:13:10 +01:00
Rémi Bernon
2b3b900490 user32/tests: Add an optional hwnd to input messages tests.
And rename keyboard tests to avoid conflicts with mouse tests.
2024-01-25 11:13:08 +01:00
Bernhard Übelacker
ab28825ace ntdll: Fix structure layout in RtlQueryProcessDebugInformation for 64-bit.
This is to avoid crash in Process Explorer 17.05.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56235
2024-01-24 21:36:23 +01:00
Alexandre Julliard
976e715b86 configure: Only check for libunwind on x86-64. 2024-01-24 17:34:30 +01:00
Martin Storsjö
4e9838fbc2 ntdll: Remove libunwind support for ARM.
Building for ARM with libunwind available has been broken
since 89f3c59739, due to
references to raise_func_trampoline that were left behind.

In Linux builds, libunwind isn't practically needed since
a27b202a4d (which implemented an
internal EHABI unwinder). That unwinder currently only supports
Linux, due to relying on dl_iterate_phdr, but if necessary, we
could also try to detect support for dl_iterate_phdr in configure
for other OSes.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-01-24 17:34:30 +01:00
Martin Storsjö
57b8d4c019 ntdll: Remove libunwind support for aarch64.
Libunwind hasn't been necessary for unwinding through the ELF
bits since 03d4ba67f4.

This reduces the number of potential build configurations to
keep track of.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-01-24 17:34:30 +01:00
Martin Storsjö
e772113071 ntdll: Reduce fixme logging for large numbers of cores.
Once we've reached the condition for skipping a core, we will
skip all other cores in the same range as well - don't print
a fixme message for each of them.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-01-24 17:34:30 +01:00
Rémi Bernon
46c5c2d41a imm32: Complete the composition string when the IME is closed. 2024-01-24 12:19:51 +01:00
Rémi Bernon
0d9e6adada imm32/tests: Test the effect of CPS_CANCEL and CPS_COMPLETE. 2024-01-24 12:19:51 +01:00
Rémi Bernon
faa342a2f1 win32u: Also pass WM_KEYUP messages to ImmProcessKey.
And to ImmTranslateMessage if they have been processed.
2024-01-24 12:19:49 +01:00
Rémi Bernon
08bfeeeb0d imm32/tests: Test that WM_KEYUP are passed to ImeProcessKey. 2024-01-24 12:19:49 +01:00
Rémi Bernon
f522c58ce6 imm32: Mask the scancode before passing it to ImeToAsciiEx. 2024-01-24 12:19:49 +01:00
Rémi Bernon
961e01e517 imm32/tests: Adjust todo_wine for the new Wine CJK keyboard layouts.
We don't return 0xe001 high word anymore, so the tests are now failing.
2024-01-24 12:19:45 +01:00
Rémi Bernon
e2b637c8dc windows.gaming.input: Stub IRawGameController2 interface. 2024-01-24 12:17:35 +01:00
Rémi Bernon
3dce01a204 dinput/tests: Add some IRawGameController2 interface tests. 2024-01-24 12:17:35 +01:00
Rémi Bernon
dcfba0a2aa dinput/tests: Relax the mouse move count test.
It is prone to spurious failures and we don't really care about it
being precise yet.
2024-01-24 12:17:32 +01:00
Brendan Shanks
c98d0eaac8 ntdll: Only build the main module and ntdll once on Wow64.
Fixes +relay for applications that use multiple threads when running in
new Wow64.
2024-01-24 12:16:44 +01:00
Brendan Shanks
fe880597a1 ntdll: Remove unnecessary NtQueryVirtualMemory call. 2024-01-24 12:16:42 +01:00
Tim Clem
d81c4ce1ba winemac.drv: Detect active handwriting and panel IMEs.
Allows such IMEs that process keyboard input to do so. For instance,
fixes backspace and escape for handwriting methods.
2024-01-23 22:56:53 +01:00
Paul Gofman
7bd070ae86 ntdll: Return STATUS_DEBUGGER_INACTIVE from NtSystemDebugControl() stub. 2024-01-23 22:56:53 +01:00
Tyson Whitehead
9dc1ddf801 dinput: Implement DIPROP_AUTOCENTER.
Autocenter is a default effect playing on the device following power
up or reset. It is disabled by stopping all effects. On at least
some devices (all?) it is a spring effect playing in slot 1.
Capturing Windows USB packets reveals it dinput acquire does (1) a
reset (this enabled autocenter) and, if autocenter is disabled, (2)
a stop all effects (this disabled autocenter).

This logic works regardless of whether autocenter is a spring effect
playing in slot 1 or not. It does mean autocenter can only be set
when the device is not acquired. Testing on Windows reveals setting
autocenter properties while acquired returns DIERR_ACQUIRED even
if the device is exclusively acquired, so this is consistent.
2024-01-23 22:56:53 +01:00
Tyson Whitehead
63562c05f6 dinput/tests: Update tests for DIPROP_AUTOCENTER. 2024-01-23 22:56:53 +01:00
Rémi Bernon
96b823c2d4 dinput/tests: Differentiate missing from broken HID reports. 2024-01-23 22:56:53 +01:00
Rémi Bernon
6c44228c1f winex11: Sync with gdi_display before closing the threads display. 2024-01-23 22:56:53 +01:00
Gabriel Ivăncescu
1571c12129 mshtml: Implement document.lastModified.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-23 22:56:53 +01:00
Alexandre Julliard
5113e55139 ntdll/tests: Update todos in context tests for new wow64 mode. 2024-01-23 22:56:49 +01:00
Alexandre Julliard
6085ab8822 ntdll: Use a .seh handler for the process breakpoint. 2024-01-23 16:27:31 +01:00
Alexandre Julliard
1414adfa46 ntdll: Move the process breakpoint to the CPU backends. 2024-01-23 15:53:58 +01:00
Brendan McGrath
9b02ac6d42 gdi32: Ignore Datatype when StartDoc is called. 2024-01-23 15:31:51 +01:00
Martin Storsjö
f6b66e4f87 ntdll: Fix KiUserCallbackDispatcher on arm.
This was broken in 78c2b7dfe2.

Signed-off-by: Martin Storsjö <martin@martin.st>
2024-01-23 15:30:47 +01:00
Rémi Bernon
4f95ad1ad1 dinput/tests: Add a test with a virtual HID touch screen. 2024-01-23 12:20:46 +01:00
Rémi Bernon
aaf34e3f7e include: Add more HID digitizer usage definitions. 2024-01-23 12:20:45 +01:00
Rémi Bernon
abee0d4502 dinput/tests: Add a test with a virtual HID keyboard. 2024-01-23 12:20:45 +01:00
Rémi Bernon
e2f2f680d4 dinput/tests: Add a test with a virtual HID mouse. 2024-01-23 12:20:45 +01:00
Rémi Bernon
3e79b8d6eb dinput/tests: Enforce ordering of concurrent read IRPs. 2024-01-23 12:20:45 +01:00
Rémi Bernon
e2dffb8eb0 dinput/tests: Introduce a new helper to create a foreground window. 2024-01-23 12:20:45 +01:00
Hans Leidekker
1d0551ca49 dssenh: Finalize the hash if necessary in CPVerifySignature(). 2024-01-23 12:20:17 +01:00
Hans Leidekker
7231d4586d bcrypt: Fix private data size in wow64 thunks. 2024-01-23 12:20:10 +01:00
Zhiyi Zhang
28a829a1da win32u: Don't set the high word of keyboard layout to 0xe001 in CJK locales.
The high word of the keyboard layout in CJK locale on Vista+ is the same as the low word, even when
IME is on according to tests in user32 and manual tests on Windows 10.

Fix Super Robo Wars 30 (SteamID: 898750) crash on start when CJK locales are used.
2024-01-23 12:19:13 +01:00
Zhiyi Zhang
0b19f8b2ff user32/tests: Test keyboard layout in CJK locales.
Also tested manually on Windows 10 with Korean, Chinese, and Japanese IME activated.
2024-01-23 12:19:11 +01:00
Rémi Bernon
35ac0e7ac0 setupapi: Don't clobber the original filename if .inf is found. 2024-01-22 21:59:58 +01:00
Piotr Caban
dd44e2e6d6 winex11.drv: Fix xim_set_focus no IC condition check.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56236
2024-01-22 21:59:58 +01:00
Dmitry Timoshkov
a9cc6f0218 oleaut32: Implement OleLoadPictureFile.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-01-22 21:37:33 +01:00
Dmitry Timoshkov
176fa9ad27 oleaut32: Factor out stream creation from OleLoadPicturePath.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-01-22 21:37:33 +01:00
Dmitry Timoshkov
d451842d16 oleaut32: Do not reimplement OleLoadPicture in OleLoadPicturePath.
punkCaller is ignored by StdPicture ClassFactory implementation anyway.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-01-22 21:37:33 +01:00
Rémi Bernon
d5cfbf5da4 user32/tests: Test that WH_KEYBOARD_LL are blocking SendInput. 2024-01-22 16:49:57 +01:00
Rémi Bernon
ee74d202cd user32/tests: Move KEYEVENTF_UNICODE to test_SendInput_keyboard_messages. 2024-01-22 16:49:57 +01:00
Rémi Bernon
a823177ccb win32u: Avoid truncating ToUnicodeEx result if there's room. 2024-01-22 16:49:57 +01:00
Vijay Kiran Kamuju
0d137ddb72 msvcr100: Add _ReaderWriterLock constructor implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46074
2024-01-22 16:49:37 +01:00
Gabriel Ivăncescu
64009b9c9f jscript: Allow garbage collection between different jscript contexts.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-22 14:25:54 +01:00
Gabriel Ivăncescu
bc45b43a49 jscript: Make the garbage collector thread-wide rather than per-ctx.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-22 14:25:54 +01:00
Gabriel Ivăncescu
39c7950aae jscript: Don't use atomic compare exchange when setting the script ctx.
It already bails out early if the thread_data was already populated, so
only one thread can reach here at one time.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-22 14:25:51 +01:00
Gabriel Ivăncescu
f55db65292 jscript: Move thread_id from JScript struct to TLS data.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-22 14:25:51 +01:00
Alex Henrie
cba29adf06 ntoskrnl: Reimplement ExAllocatePool* on top of ExAllocatePool2.
Microsoft deprecated all of these functions except ExAllocatePool2 and
ExAllocatePool3, so it's a safe bet that in Windows the old functions
are just wrappers around the new ones now.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54362
2024-01-22 14:22:21 +01:00
Alex Henrie
87761a8a92 include: Add POOL_FLAGS and POOL_FLAG_*. 2024-01-22 14:22:20 +01:00
Eric Pouech
46ab4f0ce7 include: Avoid redefining _InterlockedCompareExchange128 as inline.
Note the _InterlockedCompareExchange128 for a x86_64 machine is only
defined as intrinsic when -mcx16 option is enabled.
But we use always use the intrinsic definition on x86_64 so that
compilation done without the -mcx16 could be detected (on C++ only).
And the intrinsic has been added recently to aarch64 machine for clang.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-22 14:16:07 +01:00
Eric Pouech
72c4adc036 include: Avoid defining intrinsic functions as inline.
Now clang provides intrinsic variant of Interlocked*64 family on i386
machine.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-22 14:15:43 +01:00
Daniel Lehman
8536af685a msvcp140: Pad _Mtx_t struct to match Windows. 2024-01-22 14:15:13 +01:00
Daniel Lehman
c3ee5751d5 msvcp120/tests: Add some tests for _Mtx_t fields. 2024-01-22 14:15:13 +01:00
Fabian Maurer
d9c4b56e71 windows.ui: Add stubs for InputPane class. 2024-01-22 14:15:13 +01:00
Fabian Maurer
5de5ae4eb1 include: Add Windows.UI.ViewManagement.InputPane definitions. 2024-01-22 14:15:13 +01:00
Alexandre Julliard
78c2b7dfe2 ntdll: Use a .seh handler for KiUserCallbackDispatcher exceptions. 2024-01-22 14:01:24 +01:00
Alexandre Julliard
47aebf67a5 ntdll: Export KiUserCallbackDispatcherReturn. 2024-01-22 11:46:50 +01:00
Alexandre Julliard
7344a124d7 ntdll: Report failure in KiUserCallbackDispatcher when catching an exception. 2024-01-22 11:46:50 +01:00
Alexandre Julliard
d89037a826 ntdll: Share KiUserCallbackDispatcher implementation across platforms. 2024-01-22 11:46:25 +01:00
Alexandre Julliard
3031f15784 include: Add a typedef for user callback function pointers. 2024-01-22 11:26:56 +01:00
Alexandre Julliard
c7c8624250 msvcp: Consistently use __int64 types in number conversion functions.
This avoids unaligned access warnings with clang.
2024-01-22 11:26:56 +01:00
Nikolay Sivov
d46021bab9 d2d1/effect: Recreate transform graph when input count changes. 2024-01-22 10:14:54 +01:00
Nikolay Sivov
1671031143 d2d1/effect: Use XML description for builtin effects. 2024-01-22 10:14:53 +01:00
Nikolay Sivov
9b32b18b08 d2d1/effect: Handle variable input count attributes in the description. 2024-01-22 10:14:51 +01:00
Nikolay Sivov
69870ee88b d2d1/tests: Add some tests for minimum/maximum input count in effect description. 2024-01-22 10:14:51 +01:00
Rémi Bernon
a634c30f00 mfplat: Support compressed WAVEFORMATEX in MFCreateWaveFormatExFromMFMediaType. 2024-01-22 10:14:33 +01:00
Rémi Bernon
1939bfff9f mfplat: Support AAC format attributes in MFInitMediaTypeFromWaveFormatEx. 2024-01-22 10:14:33 +01:00
Rémi Bernon
96346d24c1 mfplat/tests: Test MFWaveFormatExConvertFlag_ForceExtensible with HEAACWAVEFORMAT. 2024-01-22 10:14:33 +01:00
Rémi Bernon
aa648beec8 mfplat/tests: Add MFInitMediaTypeFromWaveFormatEx tests with HEAACWAVEFORMAT. 2024-01-22 10:14:33 +01:00
Rémi Bernon
2155817a36 mfplat/tests: Test MFInitMediaTypeFromWaveFormatEx wrt MF_MT_FIXED_SIZE_SAMPLES. 2024-01-22 10:14:33 +01:00
Rémi Bernon
681d201462 include: Add HEAACWAVEINFO and HEAACWAVEFORMAT definitions. 2024-01-22 10:14:32 +01:00
Vijay Kiran Kamuju
f24b20f01e include: Add Windows.Storage.Streams.InMemoryRandomAccessStream runtimeclass definition.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54963
2024-01-22 10:13:28 +01:00
Fabian Maurer
51b9d8ae65 winegstreamer: Don't check event for NULL, gstreamer already does that. 2024-01-22 10:13:12 +01:00
Yuxuan Shui
8daf207bf7 dmime: Semi-support creating an audio path from config. 2024-01-22 10:12:47 +01:00
Yuxuan Shui
e9a52308bb dmime: IDirectMusicPerformance::CreateAudioPath should fail when config is NULL. 2024-01-22 10:12:47 +01:00
Yuxuan Shui
289dfacfd4 dmime: Parse AudioPathConfig. 2024-01-22 10:12:46 +01:00
Yuxuan Shui
a300815c0f dmime: AudioPathConfig is not AudioPath.
AudioPaths are created from IDirectMusicPerformance::CreateAudioPath and CreateStandardAudioPath, and
don't have an IDirectMusicObject or an IPersistStream interface. On the other hand AudioPathConfigs
are loaded from files, and do have IDirectMusicObject and IPersistStream.

They were somehow confused with each other and implemented in the same struct, this commit fixes that.
2024-01-22 10:12:44 +01:00
Piotr Caban
12e8d3bd48 msvcp140: Recognize no error case in _Syserror_map. 2024-01-22 10:12:06 +01:00
Piotr Caban
c0598baa87 msvcp140/tests: Fix _Syserror_map(0) test failure in newest msvcp140. 2024-01-22 10:12:06 +01:00
Piotr Caban
1d917529f1 msvcp140: Add _XGetLastError implementation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46904
2024-01-22 10:12:06 +01:00
Vijay Kiran Kamuju
b6199254be msvcp140: Add stub for _XGetLastError. 2024-01-22 10:12:05 +01:00
Vijay Kiran Kamuju
f51b4d014e wine.inf: Create security directory.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52399
2024-01-22 10:11:27 +01:00
Bernhard Übelacker
c3ef1a6c67 dbghelp: Return early if HeapAlloc failed.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56223
2024-01-22 10:10:23 +01:00
Zhiyi Zhang
b89d9f3145 ncrypt/tests: Add NCryptExportKey() tests. 2024-01-19 21:18:04 +01:00
Zhiyi Zhang
663bce9de9 ncrypt: Add some missing RSA key properties. 2024-01-19 21:18:04 +01:00
Zhiyi Zhang
1144efbc47 ncrypt/tests: Test default RSA key properties. 2024-01-19 21:18:04 +01:00
Zhiyi Zhang
032834fd6c include: Add some bcrypt definitions. 2024-01-19 21:18:04 +01:00
Zhiyi Zhang
2021959538 include: Add some ncrypt definitions. 2024-01-19 21:18:04 +01:00
Zebediah Figura
504d1a45e0 wined3d/spirv: Hook up sm1 interface matching. 2024-01-19 21:18:04 +01:00
Fan Wenjie
1474f5cc47 wined3d: Compile sm1 bytecode to spirv. 2024-01-19 21:17:35 +01:00
Zebediah Figura
9e094def75 wined3d: Hook up push constants for Vulkan. 2024-01-19 21:17:35 +01:00
Brendan Shanks
f201a609a0 wined3d: Update reported AMD driver version.
Satisfies driver version check in Counter Strike 2.
2024-01-19 21:17:31 +01:00
Nikolay Sivov
21bbd34d35 mf/tests: Fully cleanup when skipping tests. 2024-01-19 18:01:34 +01:00
Alexandre Julliard
7aa982f88b ntdll: Add NtCompareTokens syscall for ARM64EC. 2024-01-19 16:24:23 +01:00
Alexandre Julliard
4b5b478de9 opengl32: Return a proper NTSTATUS in the debug callback. 2024-01-19 14:36:56 +01:00
Alexandre Julliard
b26d127897 user32: Return a proper NTSTATUS in all user callbacks. 2024-01-19 14:30:59 +01:00
Alexandre Julliard
621bcd0db2 user32: Return a proper NTSTATUS in the post DDE message callback. 2024-01-19 14:28:26 +01:00
Alexandre Julliard
d06192afe9 user32: Return a proper NTSTATUS in the load driver callback. 2024-01-19 14:23:24 +01:00
Alexandre Julliard
a5d73ae427 winemac.drv: Return result through NtCallbackReturn for the drag and drop callbacks. 2024-01-19 13:48:32 +01:00
Alexandre Julliard
5cd3861438 winex11.drv: Return result through NtCallbackReturn for the drag and drop callbacks. 2024-01-19 13:46:34 +01:00
Alexandre Julliard
be44253c94 wineandroid.drv: Return result through NtCallbackReturn for the start device callback. 2024-01-19 13:43:10 +01:00
Alexandre Julliard
643538a836 winevulkan: Return result through NtCallbackReturn for the debug callbacks. 2024-01-19 13:42:14 +01:00
Piotr Caban
bcda5979be concrt140: Add _Cancellation_beacon::_Confirm_cancel() implementation. 2024-01-19 12:47:44 +01:00
Vijay Kiran Kamuju
05a1062f95 concrt140: Add stub for _Cancellation_beacon::_Confirm_cancel().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56174
2024-01-19 12:47:41 +01:00
Hans Leidekker
54c7df15bb sxs: Skip file copy when assembly is already installed. 2024-01-19 12:42:18 +01:00
Hans Leidekker
499fa1d907 sxs/tests: Update QueryAssemblyInfo() test for Windows 10. 2024-01-19 12:42:18 +01:00
Hans Leidekker
b62d7e7a66 sxs/tests: Get rid of workarounds for old Windows versions. 2024-01-19 12:42:18 +01:00
Hans Leidekker
72dc82c033 sxs/tests: Use wide character string literals. 2024-01-19 12:42:18 +01:00
Hans Leidekker
755f6a0a2b sxs: Use wide character string literals. 2024-01-19 12:42:17 +01:00
Nicholas Tay
4f8939e1d9 win32u: Preserve rawinput device instance ID case in add_device().
In ntoskrnl.exe, when a PnP device interface is registered, the
interface path casing is retained, with only the hardware ID being upper
case. Thus, this patch looks to align the behaviour between PnP and
rawinput, particularly for games that seem to rely on these two strings
being consistent for hotplug.

This updated behaviour also seems consistent with Windows.
2024-01-19 12:41:51 +01:00
Etaash Mathamsetty
a1129ed23b xinput: Reimplement XInputGetCapabilities. 2024-01-19 12:41:02 +01:00
Etaash Mathamsetty
aea7918433 xinput: Implement XInputGetCapabilitiesEx. 2024-01-19 12:41:02 +01:00
Paul Gofman
39304daf4d ntdll: Fix exception list offset in call_user_mode_callback / user_mode_callback_return. 2024-01-18 22:53:56 +01:00
Gabriel Ivăncescu
c086a7eb31 msvcirt: Use proper operator_new and operator_delete types.
msvcirt's PARENTSRC imports exception.c from msvcp90, but it uses a function
pointer for these functions, resulting in a type mismatch.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-18 22:50:55 +01:00
Piotr Caban
816c35e0ee msvcp140_t/tests: Add __std_smf_hypot3 tests. 2024-01-18 22:50:54 +01:00
Piotr Caban
ff88ec624c msvcp140_2: Implement __std_smf_hypot3f. 2024-01-18 22:49:04 +01:00
Alex Henrie
fca71b6ef8 msvcp140_2: Implement __std_smf_hypot3.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56078
2024-01-18 22:49:03 +01:00
Piotr Caban
4240c8180e msvcp140_2: Fix i386 export names. 2024-01-18 22:49:03 +01:00
Hans Leidekker
0ceb41a5fd crypt32: Pad R/S values with zeroes if smaller than their counterpart.
Fixes certificate verification in Brawlhalla.
2024-01-18 18:09:09 +01:00
Hans Leidekker
47349f3422 bcrypt/tests: Add DH tests.
Mostly written by Paul Gofman.
2024-01-18 18:08:54 +01:00
Hans Leidekker
c6974c6b46 bcrypt: Set dh_params in key_import_dh/_public(). 2024-01-18 18:08:54 +01:00
Hans Leidekker
f067283f9b bcrypt: Assume we have a public key in key_export_dh_public(). 2024-01-18 18:08:54 +01:00
Hans Leidekker
dfbbfd6f24 bcrypt: Make sure key_asymmetric_derive_key() returns correct size. 2024-01-18 18:08:54 +01:00
Hans Leidekker
7f41d5059e bcrypt: Add support for generating DH keys from known parameters. 2024-01-18 18:08:54 +01:00
Hans Leidekker
0d95ae4252 bcrypt: Reject DH keys smaller than 512 bits. 2024-01-18 18:08:54 +01:00
Hans Leidekker
3ef933c08f bcrypt: Make DH blob size validation more strict in key_import_pair(). 2024-01-18 18:08:54 +01:00
Hans Leidekker
4becbefe5d bcrypt: Add helpers to create a public/private key pair. 2024-01-18 18:08:54 +01:00
Hans Leidekker
b82faa2697 bcrypt: Allow or disallow some operations based on whether keys are finalized. 2024-01-18 18:08:54 +01:00
Hans Leidekker
3bfccbc7e4 bcrypt: Add support for retrieving DH parameters. 2024-01-18 18:08:53 +01:00
Hans Leidekker
a9193a200f bcrypt: Add support for setting DH parameters. 2024-01-18 18:08:53 +01:00
Alexandre Julliard
2c8b60af43 user32: Return result through NtCallbackReturn for the window hook callback. 2024-01-18 18:08:49 +01:00
Alexandre Julliard
3f9de12980 user32: Return result through NtCallbackReturn for the enum monitors callback. 2024-01-18 18:08:49 +01:00
Alexandre Julliard
a9e42169ca user32: Return result through NtCallbackReturn for the draw text callback. 2024-01-18 18:08:49 +01:00
Alexandre Julliard
ee106102c5 user32: Return result through NtCallbackReturn for the load sys menu callback. 2024-01-18 18:08:49 +01:00
Alexandre Julliard
33793446c4 user32: Return result through NtCallbackReturn for the load image callback. 2024-01-18 18:08:48 +01:00
Alexandre Julliard
a60747c755 user32: Return result through NtCallbackReturn for the copy image callback. 2024-01-18 18:08:48 +01:00
Alexandre Julliard
cdf7b1bb77 user32: Return result through NtCallbackReturn for the thunk lock callback. 2024-01-18 18:08:48 +01:00
Alexandre Julliard
85e351abaf user32: Return result through NtCallbackReturn for the DDE message callback. 2024-01-18 18:08:48 +01:00
Zhiyi Zhang
386e9fef2b user32/tests: Add recursive WM_SETCURSOR message tests.
This test show that WM_SETCURSOR gets handled recursively, so in process_mouse_message(),
accept_hardware_message() can be called after sending WM_SETCURSOR and no changes are needed there.
2024-01-18 18:08:48 +01:00
Zhiyi Zhang
f110dc58ba win32u: Avoid calling WH_CBT HCBT_CLICKSKIPPED hooks recursively.
Previously, accept_hardware_message() is called after WH_CBT HCBT_CLICKSKIPPED hooks. So when
these hooks call PeekMessage(), they will be called recursively. Note that WH_MOUSE hooks do
get called recursively according to tests.
2024-01-18 18:08:48 +01:00
Zhiyi Zhang
a676f094f6 win32u: Avoid calling WH_KEYBOARD and WH_CBT HCBT_KEYSKIPPED hooks recursively.
Previously, accept_hardware_message() is called after WH_KEYBOARD and WH_CBT HCBT_KEYSKIPPED hooks.
So when PeekMessage() gets called in WH_KEYBOARD and WH_CBT HCBT_KEYSKIPPED hooks, the hooks will be
called recursively because the message is still in the server message queue.

Fix Toad for Oracle F3 find next function not working properly because its WH_KEYBOARD hook gets
called too many times.
2024-01-18 18:08:48 +01:00
Zhiyi Zhang
3c9e57d57f user32/tests: Add recursive keyboard and mouse hook tests. 2024-01-18 18:08:48 +01:00
Alex Henrie
98e14329dd mgmtapi: AddSnmpMgrOpen stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56062
2024-01-18 18:08:48 +01:00
Alex Henrie
3fbdd41297 include: Add mgmtapi.h and LPSNMP_MGR_SESSION. 2024-01-18 18:08:48 +01:00
Jinoh Kang
015434d24c ntdll/tests: Restore x86-64 #AC exception test in test_exceptions(). 2024-01-18 18:08:48 +01:00
Jinoh Kang
b07ce09982 ntdll/tests: Avoid misaligned load in exception handler code in run_exception_test_flags().
This is required for testing EH behavior on alignment check (#AC)
exceptions.
2024-01-18 18:08:48 +01:00
Bernhard Übelacker
702aeb3acb server: Allow VirtualQueryEx on "limited" handle.
A handle created with just PROCESS_QUERY_LIMITED_INFORMATION
should allow VirtualQueryEx / APC_VIRTUAL_QUERY.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56093
2024-01-18 18:08:48 +01:00
Zhiyi Zhang
6164432aa7 compstui: Fix a possible out-of-bounds write (Coverity).
When len is 256, (ARRAY_SIZE(title) - len) is 0. When LoadStringW() is called with the last parameter
being zero, a WCHAR string pointer is stored at 'title + 256', writing title out of bounds.
2024-01-18 18:08:48 +01:00
Alex Henrie
2b323dbad7 advapi32: Add TreeSetNamedSecurityInfoW stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56055
2024-01-18 18:08:48 +01:00
Alex Henrie
2586ddc5dc tbs: Add GetDeviceIDString stub.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56054
2024-01-18 18:08:48 +01:00
Haidong Yu
7a941fd59a loader: Associate folder with explorer.
Signed-off-by: Haidong Yu <yuhaidong@uniontech.com>
2024-01-18 18:08:48 +01:00
Alex Henrie
53724c2eb6 uiautomationcore/tests: Use CRT allocation functions. 2024-01-18 18:08:48 +01:00
Bartosz Kosiorek
b12078d928 gdiplus: Partially implement GdipDrawImageFX.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55945
2024-01-18 18:08:48 +01:00
Bartosz Kosiorek
bc56fc1b87 gdiplus/tests: Add GdipDrawImageFX tests except effects or attributes. 2024-01-18 18:08:48 +01:00
Rémi Bernon
aa92cabd67 windows.gaming.input: Add a description to the monitor thread. 2024-01-18 18:08:48 +01:00
Rémi Bernon
4885bdda95 dinput: Add a description to the dinput worker thread. 2024-01-18 18:08:48 +01:00
Rémi Bernon
c43d3964e3 winebus: Demote BusContainerId FIXME message to WARN. 2024-01-18 18:08:48 +01:00
Rémi Bernon
08a422bf17 winexinput: Demote BusContainerId FIXME message to WARN. 2024-01-18 18:08:48 +01:00
Rémi Bernon
173ed7e61b winebus: Prefer hidraw backends for DS4 and DS5 gamepads. 2024-01-18 18:08:48 +01:00
Rémi Bernon
13d8571b08 winebus: Move device identification helpers to unixlib.h. 2024-01-18 18:08:48 +01:00
Rémi Bernon
814d2c176d winebus: Allow specific devices to prefer hidraw backend.
And use SDL otherwise in priority over evdev for abstracted HID device
implementation.
2024-01-18 18:08:48 +01:00
Rémi Bernon
ef31616393 winebus: Append is_gamepad to the device instance id. 2024-01-18 18:08:48 +01:00
Brendan Shanks
1932c3a251 combase: Make RoGetActivationFactory hookable. 2024-01-17 21:55:07 +01:00
Rémi Bernon
746de31897 win32u: Remove now unnecessary ImeToAsciiEx driver entry. 2024-01-17 21:54:59 +01:00
Rémi Bernon
f341b8003c winemac: Use the default ImeToAsciiEx implementation.
And support updates pushed from the host IME directly.
2024-01-17 21:54:58 +01:00
Rémi Bernon
2d6fa95217 win32u: Support posting IME updates while processing keys. 2024-01-17 21:54:57 +01:00
Rémi Bernon
5f313c0fdb win32u: Move ImeToAsciiEx implementation from winex11.
Using a new WINE_IME_POST_UPDATE NtUserMessageCall call for the drivers.
2024-01-17 21:54:55 +01:00
Rémi Bernon
59820f0efb winex11: Return STATUS_NOT_FOUND when IME update isn't found. 2024-01-17 21:54:55 +01:00
Bernhard Übelacker
0f6a66e919 wing32: Avoid crash in WinGGetDIBPointer when called with NULL bitmap info.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56135
2024-01-17 12:26:28 +01:00
Bernhard Übelacker
edf0635ed4 wing32: Add tests. 2024-01-17 12:26:28 +01:00
Alexandre Julliard
fad3e416f8 ntdll/tests: Add exception test for int 2d on x86-64. 2024-01-17 12:16:37 +01:00
Brendan Shanks
1f8bba0f74 opengl32: Make wglSwapLayerBuffers hookable. 2024-01-17 11:33:01 +01:00
Dmitry Timoshkov
16d2f3c8a7 ntdll: Add NtCompareTokens() stub.
SQL Native Client ODBC driver fails to load if GetProcAddress("NtCompareTokens")
returns NULL, however it never calls it.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
2024-01-17 11:30:55 +01:00
Nikolay Sivov
ba664e108e evr/dshow: Handle YUY2 sample copy.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53810
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-17 11:07:00 +01:00
Sven Baars
a1adaaca27 advapi32/tests: Skip WoW64 tests on 32-bit in test_reg_create_key.
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=54613
2024-01-17 11:07:00 +01:00
Sven Baars
7565d61403 advapi32/tests: Introduce a new has_wow64 helper. 2024-01-17 11:07:00 +01:00
David Kahurani
760bcdcb4e gdiplus: Avoid use of temporary variable.
A temporary variable is used here to assist with assignment
but this does not conform to the coding style in the rest of
gdiplus and introduces an unnecessary variable.

Signed-off-by: David Kahurani <k.kahurani@gmail.com>
2024-01-17 11:07:00 +01:00
Zhiyi Zhang
d91eab24d2 win32u: Fix a possible out-of-bounds write (Coverity). 2024-01-17 11:07:00 +01:00
Eric Pouech
20b4cdde55 user32: Load dynamically wine_get_version().
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-17 11:07:00 +01:00
Eric Pouech
d40a0d8a1d appwiz.cpl: Load dynamically wine_get_version().
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-17 11:07:00 +01:00
Nikolay Sivov
564b796e36 scrrun/dictionary: Handle VT_EMPTY/VT_NULL keys. 2024-01-17 11:07:00 +01:00
Nikolay Sivov
e89bedb70b scrrun/dictionary: Add support for hashing VT_NULL keys. 2024-01-17 11:07:00 +01:00
Nikolay Sivov
92e2626e9d scrrun/dictionary: Add support for hashing VT_EMPTY keys. 2024-01-17 11:07:00 +01:00
Alistair Leslie-Hughes
7ea0a3609c include: Add more D3D_FEATURE_LEVEL_ defines. 2024-01-17 11:07:00 +01:00
Zhiyi Zhang
fe7e7c62ee bcrypt: Fix an possible out-of-bounds read (Coverity). 2024-01-17 11:07:00 +01:00
Zhiyi Zhang
4afca1787f msi: Fix a memory leak (Coverity). 2024-01-17 11:07:00 +01:00
Zhiyi Zhang
b0de71f214 wldap32: Fix a possible memory leak (Coverity). 2024-01-17 11:07:00 +01:00
Biswapriyo Nath
e031a0d0da include: Add missing macros in devenum.idl. 2024-01-17 11:07:00 +01:00
Biswapriyo Nath
407bfcf985 include: Add D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT in d3d12video.idl. 2024-01-17 11:01:34 +01:00
Biswapriyo Nath
51e1f5e43d include: Add D3D12_VIDEO_ENCODER_ENCODE_ERROR_FLAGS in d3d12video.idl. 2024-01-17 11:01:34 +01:00
Biswapriyo Nath
e63a998420 include: Add D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOLUTION_SUPPORT_LIMITS in d3d12video.idl. 2024-01-17 11:01:34 +01:00
Biswapriyo Nath
0c2cdfffd9 include: Add D3D12_FEATURE_DATA_VIDEO_ENCODER_RESOURCE_REQUIREMENTS in d3d12video.idl. 2024-01-17 11:01:34 +01:00
Fabian Maurer
31f340edfd wow64win: Add missing break inside packed_result_32to64 (Coverity). 2024-01-17 11:01:18 +01:00
Fabian Maurer
1fc50847e0 winedbg: Add missing break inside fetch_value (Coverity). 2024-01-17 11:01:16 +01:00
Fabian Maurer
ed18b66ceb wmiutils: Always zero path->namespaces in parse_text (Coverity).
When the malloc for len_namespaces should fail namespaces
would be uninitialized and passed to free.
2024-01-17 11:00:56 +01:00
Fabian Maurer
83bcb752a2 localspl: In fpScheduleJob leave critical section in error case (Coverity). 2024-01-17 11:00:37 +01:00
Fabian Maurer
0459802ac1 dmsynth: Leave critical section when out of memory (Coverity). 2024-01-17 11:00:27 +01:00
Eric Pouech
1d53204ebf winedbg: Print all pid and tid with 4 hex characters.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-17 10:59:15 +01:00
Eric Pouech
edb38d15c5 winedbg: Make some internal data 'static const'.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-17 10:59:10 +01:00
Nikolay Sivov
a8f5b292c3 ntdll/tests: Add some tests for creating custom heaps. 2024-01-17 10:58:39 +01:00
Nikolay Sivov
73647adaef ntdll: Update RTL_HEAP_PARAMETERS definition. 2024-01-17 10:58:39 +01:00
Rémi Bernon
416fc8067b vulkan/tests: Add gitlab Win10 VM results. 2024-01-17 10:57:59 +01:00
Rémi Bernon
ee51d536f0 dinput/tests: Make some failing keyboard test flaky_wine. 2024-01-17 10:57:55 +01:00
Rémi Bernon
5f7094ffd4 imm32/tests: Add todo_himc to some ImmTranslateMessage expected calls.
Wine-Bug: https://bugs.winehq.org//show_bug.cgi?id=55491
2024-01-17 10:57:48 +01:00
Rémi Bernon
28b75e9f1d user32/tests: Test SendInput messages with other keyboard layouts. 2024-01-17 10:57:41 +01:00
Rémi Bernon
0601b4eef2 user32/tests: Test SendInput messages with KEYEVENTF_SCANCODE flag. 2024-01-17 10:57:41 +01:00
Rémi Bernon
998003bda1 user32/tests: Cleanup SendInput keyboard message sequence tests. 2024-01-17 10:57:41 +01:00
Rémi Bernon
a02acadc44 user32/tests: Run SendInput tests in a separate desktop. 2024-01-17 10:57:41 +01:00
Rémi Bernon
85dac24e64 user32/tests: Add flaky_wine to some SetActiveWindow tests.
They are constantly failing on Gitlab, and may be caused various race
conditions around window focus, both in Wine and in Fvwm. It would be
nice to fix them but it's been going for many years now and unlikely to
be the case soon.
2024-01-17 10:57:39 +01:00
Zebediah Figura
d6204ccd54 ddraw: Use the sysmem wined3d texture for sysmem surfaces if possible. 2024-01-17 10:57:32 +01:00
Zebediah Figura
b712d6c846 ddraw: Sync to sysmem after performing a color fill.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56119
2024-01-17 10:57:32 +01:00
Zebediah Figura
48ecde18e0 ddraw/tests: Add tests for map pointer coherency. 2024-01-17 10:57:32 +01:00
Eric Pouech
585e9d4985 dbghelp: Support redefinition of a range statement.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56168
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-17 10:57:12 +01:00
Rémi Bernon
0ab411a047 user32/tests: Fix cursoricon tests on recent Windows versions.
This will now fail on older, unsupported versions, but the
test_monochrome_icon test would be pointless otherwise.
2024-01-17 10:57:01 +01:00
Rémi Bernon
edc41d6db5 user32/tests: Remove old Windows versions broken cursoricon results.
They most of the time let any result pass and defeat the purpose of
the test.
2024-01-17 10:57:00 +01:00
Nikolay Sivov
8e82b56a7e mf/tests: Skip tests if video renderer can't be created. 2024-01-17 10:56:47 +01:00
Alexandre Julliard
fd1153552d Release 9.0. 2024-01-16 21:55:47 +01:00
Rémi Bernon
3d4ee138ec gitlab: Add key to the jobs ccache cache config.
To avoid jobs with different compilers overwriting each other.
2024-01-15 20:03:01 +01:00
Rémi Bernon
2d9f5bea79 gitlab: Use a common configure cache key prefix.
Partially reverts commit 67f2da2a8d which
broke ccache cache as the job configurations were overriding the default
cache configuration from .wine-build instead of extending it.
2024-01-15 20:02:59 +01:00
Rémi Bernon
a6b58a2c1f gitlab: Force WINETEST_ARGS to always be a string array.
Fixes the test name passed to winetest.exe which is otherwise split
into a character array when there's a single line in the winetest.args
file, and then causes it to miss the test and always return success.
2024-01-15 20:02:54 +01:00
Alexandre Julliard
ff1642f32c Release 9.0-rc5. 2024-01-12 21:59:55 +01:00
Bernhard Übelacker
3481d165d1 msvcrt: Protect setlocale against concurrent accesses.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55467
2024-01-12 20:44:55 +01:00
Elizabeth Figura
bed2495e50 wined3d: Only suballocate dynamic buffers.
I don't know for sure that this is why iris (or nvidia) performs badly, but it
seems perfectly plausible, and I don't think we lose anything by letting the
driver allocate here.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54223
2024-01-12 18:59:15 +01:00
Elizabeth Figura
52a0e36aee wined3d: Avoid WARN() when failing to allocate a GL BO without a context.
This is normal and expected, and only a concern for performance. Avoid polluting
warn+d3d logs.
2024-01-12 18:59:12 +01:00
Gabriel Ivăncescu
44aa651dc5 winex11: Move the update_desktop_fullscreen callsite to update_net_wm_states.
It's simpler to just use the same sequence as normal fullscreen windows
and avoid headaches with virtual desktops.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56149
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-11 23:01:46 +01:00
Rémi Bernon
d0a317e98a winewayland: Add missing breaks in keyboard layout switch. 2024-01-11 20:30:52 +01:00
Hans Leidekker
60843dbb3e wininet/tests: Update expected winehq.org certificate. 2024-01-11 14:00:37 +01:00
Rémi Bernon
866f17c147 ntoskrnl.exe/tests: Use SUOI_FORCEDELETE when uninstalling the driver.
Avoids conflicts with the dinput tests somehow.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52962
2024-01-10 21:07:27 +01:00
Hans Leidekker
928d73d4ef wldap32/tests: Skip tests when the server can't be reached.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55784
2024-01-10 15:39:23 +01:00
Akihiro Sagawa
98b053a5b8 d3d9: Update presentation parameters when creating a swap chain.
Fixes regression introduced by 215a32d643.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56070
2024-01-10 10:35:00 +01:00
Akihiro Sagawa
059b3ac77f d3d9/tests: Test the presentation parameters after creating an additional swap chain. 2024-01-10 10:35:00 +01:00
Akihiro Sagawa
8eefd729ec d3d8/tests: Test the presentation parameters after creating an additional swap chain. 2024-01-10 10:35:00 +01:00
Akihiro Sagawa
45ea10c71f d3d9/tests: Test the presentation parameters after creating a device. 2024-01-10 10:35:00 +01:00
Akihiro Sagawa
beefff0002 d3d8/tests: Test the presentation parameters after creating a device. 2024-01-10 10:35:00 +01:00
Enol Puente
7a9fba29d6 po: Update Asturian translation. 2024-01-10 10:25:21 +01:00
Gabriel Ivăncescu
4054795ff1 winex11: Update Virtual Desktop fullscreen WM state after setting window pos.
To make sure the hints are set up properly first.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56149
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-09 23:59:59 +01:00
Gabriel Ivăncescu
75a774f90a winex11: Set MWM_FUNC_RESIZE for fullscreen desktop windows.
Same workaround as used in is_window_resizable, except it's on a different
code path. This also affects other WMs (e.g. Kwin, compiz).

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56149
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-09 23:59:59 +01:00
Gabriel Ivăncescu
d9b5bf9a71 Revert "winex11: Use the correct root window for virtual desktops.".
This reverts commit 790133e950.

It was incorrect, sorry about that. The issue was weirder in a different place (MWM_FUNC_RESIZE not set before setting fullscreen).

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56149
2024-01-09 23:59:59 +01:00
Rémi Bernon
1b75341346 dmusic: Clone streams instead of allocating wave data.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56117
2024-01-09 23:59:59 +01:00
Jacek Caban
67f2da2a8d gitlab: Cache config.cache in Clang builds. 2024-01-09 23:59:59 +01:00
Alex Henrie
20e3b7b859 winspool: Keep driver_9x in scope while it is in use.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54387
2024-01-08 20:52:27 +01:00
Nikolay Sivov
7e30b44367 mf/tests: Skip tests if D3D9 is unusable.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-08 20:52:27 +01:00
Nikolay Sivov
dcd8551142 mfreadwrite/tests: Skip tests if D3D9 is unusable.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-08 20:52:27 +01:00
Alexandre Julliard
7748c76e35 krnl386: Align the stack before calling the entry point.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56152
2024-01-08 20:52:27 +01:00
Alexandre Julliard
de3bc7d511 krnl386: Use NtContinue to restore the full context.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56152
2024-01-08 20:52:27 +01:00
Jinoh Kang
9fa27defd7 ntdll/tests: Fix xstate tests failing on Windows 11 and CPU with more XSAVE features. 2024-01-08 20:52:27 +01:00
Jinoh Kang
835f99bdce ntdll/tests: Don't hard code the maximum XState length in test_extended_context().
This is required to support systems with a larger XSAVE area.
2024-01-08 20:52:27 +01:00
Jinoh Kang
7ba9dea999 ntdll/tests: Fix incorrect calculation of context length in test_copy_context().
`(BYTE *)dst_ex - (BYTE *)dst` is the size of the legacy context, but
`dst_ex->All` already contains the legacy context.  Therefore,
`context_length` has the legacy context size added *twice*.

This becomes a problem when `context_length` exceeds
`sizeof(src_context_buffer)`.  This confuses `check_changes_in_range()`,
causing out-of-bounds read and unpredictable test results.
2024-01-08 10:18:26 +01:00
Jinoh Kang
3995ff240a ntdll/tests: Fix x86-32 extended context end offset in test_copy_context().
The penultimate element of `ranges_x86` array has an incorrect value: it
should be *at least* 0x2f0, which is the minimum size of an extended
context.

Fix this by setting it to 0x440, which is the minimum size of an
extended context *with* CONTEXT_I386_XSTATE.  This is consistent with
`ranges_amd64`, the penultimate element of which has the minimum size of
an extended context *with* CONTEXT_AMD64_XSTATE.

Note that the incorrect value does not always lead to a test failure,
since check_changes_in_range_() effectively ignores range `start`s that
are not in order.  Reproducing the failure requires a system with a
sufficiently large XSAVE area; specifically, the following condition is
necessary for check_changes_in_range_() to pick up the wrong value:

    0x2cc < 0x294 + src_ex->XState.Length - sizeof(XSTATE).
2024-01-08 10:18:26 +01:00
Alexandre Julliard
d56fc6d318 Release 9.0-rc4. 2024-01-05 22:20:29 +01:00
André Zwing
532418b091 ntoskrnl/tests: Use RtlNtStatusToDosErrorNoTeb() for stateless conversion. 2024-01-05 18:46:07 +01:00
André Zwing
2ce7cee4fc mscoree/tests: Don't test function directly when reporting GetLastError(). 2024-01-05 18:46:07 +01:00
Zsolt Vadasz
56a666d563 msvcrt/tests: Test case insensitivity of getenv() and _wgetenv(). 2024-01-05 18:46:07 +01:00
Zsolt Vadasz
1f01dd1230 msvcrt: Compare environment variable names case insensitively.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56134
2024-01-05 18:46:07 +01:00
Zebediah Figura
a79db19fdc wined3d: Set fixed_function_usage_map to 0 for an sm4 draw without a PS.
Fixes: 5b60f4649b
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56113
2024-01-05 18:46:07 +01:00
Alexandre Julliard
0900d919e2 ntdll: Determine the available address space dynamically on ARM64.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56130
2024-01-05 18:46:02 +01:00
Bernhard Kölbl
def5e1a61d windows.media.speech/tests: Remove obsolete workarounds.
These got obsolete with eaca0f44be.

Signed-off-by: Bernhard Kölbl <bkoelbl@codeweavers.com>
2024-01-04 23:04:46 +01:00
Zebediah Figura
f377723773 wined3d: Do not remove invalid BO users from the list when destroying views.
Fixes: b2f13103d7
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55540
2024-01-04 20:45:01 +01:00
Rémi Bernon
68325b3858 dmloader: Avoid caching DMUS_OBJ_STREAM objects we can't load from cache.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56117
2024-01-04 20:44:46 +01:00
Rémi Bernon
e7ded5ddc1 dmime: Avoid leaking track references in segment Clone and Load.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56117
2024-01-04 20:44:46 +01:00
Zebediah Figura
a0669a2761 wined3d: Reference FFP resources in reference_shader_resources().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56110
2024-01-04 20:44:26 +01:00
Eric Pouech
b12c1eaea6 winedbg: Wait for gdb to terminate before exiting (proxy mode).
This mainly allows Wine to reset the tty settings upon
termination and not let gdb do it (cf bug report).

Change: user is now required to explicitely terminate gdb
('quit' command) upon debuggee termination.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56032
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-04 12:19:01 +01:00
Eric Pouech
eed778467a quartz: Delay import ddraw.
So that ddraw isn't always loaded, esp. for app not requesting vmr7.
Could lower memory pressure on 32bit.

Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-03 21:00:09 +01:00
Gabriel Ivăncescu
790133e950 winex11: Use the correct root window for virtual desktops.
Fixes a regression introduced by 7255f63a65,
which effectively made the taskbar always visible even when virtual desktop
was supposed to be fullscreen.

Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
2024-01-03 18:46:30 +01:00
Alexandre Julliard
62cb2bcdc3 announce: Convert to Markdown. 2024-01-03 16:35:29 +01:00
Alexandre Julliard
158e9e7636 readme: Convert to Markdown. 2024-01-03 13:56:21 +01:00
Eric Pouech
a2f98478c3 winedump: Better align fields in EXPORT table.
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
2024-01-02 22:17:54 +01:00
Esme Povirk
24bc422c7d mscoree/tests: Add debug code for RemoveDirectory failure. 2024-01-02 21:54:41 +01:00
Byeongsik Jeon
c6d45b3143 po: Update Korean translation. 2024-01-02 21:54:41 +01:00
Alexandre Julliard
8d628b1254 loader: Remove absolute paths references from the man page.
All paths are relative to the installation directory by default.
2024-01-02 21:54:41 +01:00
Alexandre Julliard
1d81a5cb4c server: Remove WINESERVER documentation from the man page.
That variable is not used by the server.
2024-01-02 14:04:29 +01:00
Alexandre Julliard
06bfde3bff Update copyright info for 2024. 2024-01-01 20:15:23 +01:00
Yuxuan Shui
91a29134ff dmime: Fix handling of curve PMSG.
DMUS_PMSG::dwType is the type of the message, but we are comparing it to
curve types. We should be using DMUS_CURVE_PMSG::bType instead.
2023-12-27 14:59:49 +01:00
Lauri Kenttä
46030d41fd readme: Update Finnish translation. 2023-12-27 12:14:19 +01:00
Lauri Kenttä
eca7de021b po: Update Finnish translation. 2023-12-27 12:14:19 +01:00
Brendan Shanks
6b4eae4088 server: Fix compile error on FreeBSD/NetBSD.
F_GETPATH is currently only implemented on macOS.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56047
2023-12-27 12:14:14 +01:00
Brendan Shanks
2c14e0777a include: Assert that the debug channel name will be null-terminated and is not too long. 2023-12-27 12:12:14 +01:00
Fan WenJie
857ce7eeb5 wineandroid: Fix incorrect checking reason.
Signed-off-by: Fan WenJie <fanwj@mail.ustc.edu.cn>
2023-12-27 12:11:55 +01:00
1355 changed files with 120020 additions and 59694 deletions

View file

@ -18,7 +18,7 @@ Charles Davis <cdavis@codeweavers.com>
Charles Davis <cdavis5x@gmail.com>
Christopher Gautier <krys@via.ecp.fr>
David A. Cuthbert <dacut@ece.cmu.edu>
David Heidelberger <david@ixit.cz>
David Heidelberg <david@ixit.cz>
Dennis Björklund <db@zigo.dhs.org>
Dennis Björklund <dennisb@cs.chalmers.se>
Dimitrie O. Paun <dimi@bigfoot.com>
@ -30,6 +30,7 @@ Erich Hoover <erich.e.hoover@wine-staging.com>
Erwin Wolff <erwinwolffnl@microformatica.com>
Esme Povirk <vincent@codeweavers.com>
Evgeny Putin <evcalipt@etersoft.ru>
Fan WenJie <fanwj@mail.ustc.edu.cn>
Fatih Aşıcı <fasici@linux-sevenler.org>
Fernando Martins <fernando@cmartins.nl>
François Gouget <fgouget@codeweavers.com>

142
ANNOUNCE
View file

@ -1,142 +0,0 @@
The Wine development release 9.0-rc3 is now available.
What's new in this release:
- Bug fixes only, we are in code freeze.
The source is available at:
https://dl.winehq.org/wine/source/9.0/wine-9.0-rc3.tar.xz
Binary packages for various distributions will be available from:
https://www.winehq.org/download
You will find documentation on https://www.winehq.org/documentation
You can also get the current source directly from the git
repository. Check https://www.winehq.org/git for details.
Wine is available thanks to the work of many people. See the file
AUTHORS in the distribution for the complete list.
----------------------------------------------------------------
Bugs fixed in 9.0-rc3 (total 35):
- #51314 vulkan-1:vulkan crashes on Windows with recent Radeon drivers
- #51478 dinput:device8 breaks user32:input's test_keyboard_layout_name() in some locales ()
- #52971 HardWest 2 (playtest) is broken with OpenGL/Vulkan backend
- #53166 Star Wars : Fallen Order crashes at launch
- #53726 Silent Hill 4: The Room low res videos are not played (needs CLSID_CMpegVideoCodec)
- #54381 tightvnc viewer crashes on connection
- #54878 WinSCP 5.21.1.12643 doesn't list files when Windows version is set to 10
- #55005 Program Treecomp - some widgets are not drawn
- #55061 Starcraft Remastered: blurry graphics / low resolution
- #55161 IrfanView full screen mode creates an unneeded and uncalled for permanent overlaying panel
- #55288 advapi32:registry & ntdll:reg - The 32-bit test_redirection() fails if run after the 64 WineTest
- #55306 Cannot double click in the server browser in Worms Armageddon
- #55327 user32:input - test_ActivateKeyboardLayout() fails on Windows 7 for the Spanish locale
- #55328 user32:input - test_keyboard_layout_name() fails on Windows 7 for the Spanish locale
- #55394 comctl32:listbox - test_LBS_NODATA() fails in Wine for the Hindi locale
- #55439 RPG Maker game crashes
- #55446 Using C run-time for unicode strings comparison breaks case insensitive LB_FINDSTRING
- #55578 kernel32:loader - test_section_access() sometimes fails on Windows 8
- #55582 Civilization 2 crashes when setting up new game
- #55655 user32:dialog - test_IsDialogMessageA_proc() fails in the Hindi locale on Wine
- #55667 kernel32:file - test_MapFile() fails on macOS
- #55773 Railroad Tycoon 2 Platinum (Steam, GOG) crashes when changing to 800X600 resolution
- #55903 Falcon BMS 4.37u3: game randomly fails to load 3D models
- #55942 Crazy Chicken Approaching - Nebula Assertion and Visual C++ Runtime Library Errors
- #55962 Program that mixes 32-bit and 64-bit typelibs fails to find a referenced typelib
- #55967 app regression; SWATH stops working at all as of 8.18
- #56001 Some shortcut keys don't work with winewayland when focus is lost and restored
- #56015 SysTray doesn't work for (and crashes) WiseReminder
- #56022 Wine 9.0-rc1 wayland: Cursor does not move on some surfaces
- #56026 Wine 9.0-rc1 Wayland: Mouse buttons 3-6 do not work
- #56033 winewayland.drv: Alt-shift to change the input language appears like Shift is pressed all the time
- #56039 winecfg does no longer run after export WINEARCH=win32
- #56046 Pegasus Mail 4.80 regression: Pointer does not change
- #56048 winedbg --auto: shows incomplete modules list
- #56053 Regression on fallout 3 in the new wow64 mode
----------------------------------------------------------------
Changes since 9.0-rc2:
Akihiro Sagawa (1):
po: Update Japanese translation.
Alex Henrie (2):
po: Update Catalan translation.
comctl32/listview: Ignore the lParam to WM_PRINTCLIENT and add tests.
Alexandre Julliard (5):
wow64: Initialize the syscall dispatcher in the 32-bit TEB.
user32: Fix string comparison for listbox inexact matches.
ntdll: Add a more explicit failure for 32-bit prefix in wow64 mode.
winecfg: Support all Windows versions also in 64-bit mode.
comctl32: Fix string comparison for listbox inexact matches.
Alistair Leslie-Hughes (1):
msdasql/tests: Add missing carriage returns.
Bernhard Übelacker (1):
winedbg: Retrieve module architecture before sorting.
Brendan McGrath (1):
server: Always release internal hardware messages.
Eric Pouech (7):
riched20: Don't crash when no OLE obj is present.
riched20: Don't write past end of buffer.
dbghelp/tests: Extend tests for module loading.
dbghelp: Fix some tests for SymLoadModule*().
winmm: Fill in pIOProc field in MMIOINFO.
dbghelp/tests: Wait for child window to be up before testing.
winedbg: Fix main module detection in 'info share' command.
Fabian Maurer (1):
wineps: Don't leak memory in error case (Coverity).
Georg Lehmann (1):
vulkan-1/tests: Enable feature in private data test.
Huw D. M. Davies (2):
dnsapi: Update the array ptr in the insufficient buffer case.
dnsapi: Free the buffer in the early return paths.
Jacek Caban (1):
win32u: Use 32-bit window extra size on wow64.
Nikolay Sivov (1):
oleaut32/typelib: Add a missing break (Coverity).
Paul Gofman (3):
ntdll: Use position independent syscall thunk for NtQueryInformationProcess on i386.
include: Fix boolean return value definition in IIterator<T> methods.
dxdiagn: Check ICreateDevEnum_CreateClassEnumerator result for S_OK.
Rémi Bernon (16):
user32/tests: Dynamically resize the keyboard layout preload list.
user32/tests: Skip some keyboard layout tests on broken VMs.
dinput/tests: Avoid calling UnloadKeyboardLayout.
user32/tests: Avoid calling UnloadKeyboardLayout.
server: Always queue mouse messages delivered to another window.
server: Ignore the capture window wrt desktop cursor changes.
imm32/tests: Fix HKL comparison when cleaning up preload list.
wined3d: Add more padding to resource memory allocations.
wined3d: Store the resource heap memory pointer separately.
server: Introduce a new get_desktop_cursor_thread_input helper.
server: Change desktop cursor only when inside the thread's windows.
dmime/tests: Check reference time and allow 0.5 tick difference.
dmime/tests: Allow small time variation in test_performance_time.
dmime/tests: Allow small time variation in test_segment_state.
dmime/tests: Add optional notification sequence on segment stop.
dmime/tests: Remove some unnecessary and spuriously failing waits.
Zebediah Figura (1):
qcap/audiorecord: Do not leak the sample when pausing or stopping.
Zhiyi Zhang (2):
user32/tests: Add more display DC tests.
win32u: Create a real bitmap object for display DCs.

390
ANNOUNCE.md Normal file
View file

@ -0,0 +1,390 @@
The Wine development release 9.5 is now available.
What's new in this release:
- Initial SLTG-format typelib support in widl.
- Exception handling on ARM64EC.
- Improvements to Minidump support.
- Various bug fixes.
The source is available at <https://dl.winehq.org/wine/source/9.x/wine-9.5.tar.xz>
Binary packages for various distributions will be available
from <https://www.winehq.org/download>
You will find documentation on <https://www.winehq.org/documentation>
Wine is available thanks to the work of many people.
See the file [AUTHORS][1] for the complete list.
[1]: https://gitlab.winehq.org/wine/wine/-/raw/wine-9.5/AUTHORS
----------------------------------------------------------------
### Bugs fixed in 9.5 (total 27):
- #25207 SHFileOperation does not create new directory on FO_MOVE
- #29523 CDBurnerXP hangs on right-clicking empty space in the file browser
- #40613 Multiple applications require UAC implementation to run installer/app as a normal user instead of administrator (WhatsApp Desktop, Smartflix, Squirrel Installers, OneDrive)
- #44514 Elder Scrolls Online (Dragon Bones update) requires more than 32 samplers in pixel shaders with D3D11 renderer
- #45862 Multiple applications need MFCreateSinkWriterFromURL() implementation (Overwatch highlights, RadiAnt DICOM Viewer, Grand Theft Auto V Rockstar Editor)
- #48085 Wine error trying to install Mono after a version update
- #51957 Program started via HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths should also be started if extension ".exe" is missing
- #52352 YI Home installer crashes on unimplemented urlmon.dll.414
- #52622 windows-rs 'lib' test crashes on unimplemented function d3dcompiler_47.dll.D3DCreateLinker
- #53613 Visual novel RE:D Cherish! logo video and opening movie does not play
- #53635 Alune Klient 14.03.2022 crashes on unimplemented function urlmon.dll.414
- #54155 WeCom (aka WeChat Work) 4.x failed to launch.
- #55421 Fallout Tactics launcher has graphics glitches
- #55876 Acrom Controller Updater broken due to oleaut32 install
- #56318 Totem Arts Launcher.exe does not open
- #56367 Tomb Raider 3 GOG crashes at start
- #56379 d2d1 unable to build
- #56380 Rocket League crashes with Wine 9.3 after BakkesMod (trainer app) injects into the game
- #56400 SSPI authentication does not work when connecting to sql server
- #56406 wineserver crashes in set_input_desktop()
- #56411 Failure to build wine 9.4 due to EGL 64-bit development files not found
- #56433 QQ8.9.6 Installer crashes at very beginning due to a change in server/process.c
- #56434 WScript.Network does not implement UserName, ComputerName, and UserDomain properties
- #56435 capture mouse dont work in virtual desktop (work on wine 9.3)
- #56445 d3d1-9 applications run out of memory after f6a1844dbe (ArmA: Cold War Assault, Final Fantasy XI Online, Far Cry 3)
- #56450 Non-input USB HID devices stopped working in 9.1
- #56458 ntdll tests skipped on win7 & win8: missing entry point kernel32.RtlPcToFileHeader
### Changes since 9.4:
```
Akihiro Sagawa (2):
dsound/tests: Add tests for implicit MTA creation in IDirectSound::Initialize().
dsound: Initialize MTA in IDirectSound::Initialize().
Alexandre Julliard (42):
configure: Check the correct variable for the Wayland EGL library.
ntdll: Implement RtlRestoreContext on ARM64EC.
ntdll: Implement RtlWalkFrameChain on x86-64.
ntdll: Implement RtlWalkFrameChain on i386.
ntdll: Implement RtlWalkFrameChain on ARM.
ntdll: Implement RtlWalkFrameChain on ARM64.
ntdll: Implement RtlWalkFrameChain on ARM64EC.
ntdll: Export RtlVirtualUnwind2 and RtlWalkFrameChain.
ntdll: Share RtlCaptureStackBackTrace implementation across platforms.
secur32/tests: Update count for new winehq.org certificate.
ws2_32/tests: Fix a couple of failures on Windows.
include: Define setjmpex prototype even when it's a builtin.
ntdll/tests: Directly link to setjmp().
ntdll/tests: Fix a backtrace test failure on Windows ARM64.
ntdll: Add test for non-volatile regs in consolidated unwinds.
ntdll: Port the RtlRestoreContext test to ARM64.
ntdll: Port the RtlRestoreContext test to ARM.
ntdll: Implement RtlUnwindEx on ARM64EC.
ntdll: Move __C_specific_handler implementation to unwind.c.
ntdll: Implement __C_specific_handler on ARM64EC.
ntdll: Always use SEH support on ARM64.
ntdll/tests: Skip segment register tests on ARM64EC.
ntdll/tests: Fix debug register tests on ARM64EC.
ntdll/tests: Fix a few more test failures on ARM64EC.
ntdll: Implement RtlGetCallersAddress.
kernelbase: Remove no longer needed DllMainCRTStartup function.
include: Add some new error codes.
include: Add some new status codes.
ntdll: Add mappings for more status codes.
jscript: Use the correct facility for JScript errors.
netprofm: Use the correct symbols for error codes.
msvcrt: Use floating point comparison builtins also in MSVC mode.
ntdll/tests: Fix exception address checks in child process on ARM64EC.
ntdll/tests: Update the KiUserExceptionDispatcher test for ARM64EC.
configure: Don't build wow64 support in non-PE builds.
wow64: Use a .seh handler in raise_exception().
wow64: Always use a .seh handler in cpu_simulate().
wow64: Access the BTCpuSimulate backend function pointer directly.
wow64: Use a .seh handler for system calls.
wow64cpu: Save non-volatile registers before switching to 32-bit code.
wow64: Use setjmp/longjmp from ntdll.
server: Add a helper to trace uint64 arrays.
Alexandros Frantzis (5):
winewayland.drv: Implement wglCreateContextAttribsARB.
winewayland.drv: Implement wglShareLists.
winewayland.drv: Implement wgl(Get)SwapIntervalEXT.
win32u: Cancel auto-repeat only if the repeat key is released.
win32u: Cancel previous key auto-repeat when starting a new one.
Andrew Nguyen (3):
ddraw: Reserve extra space in the reference device description buffer.
oleaut32: Bump version resource to Windows 10.
ddraw: Release only valid texture parents on ddraw_texture_init failure.
Andrew Wesie (1):
wined3d: Use bindless textures for GLSL shaders if possible.
Brendan McGrath (5):
comdlg32: Use values from DeviceCapabilities in combobox.
comdlg32: Add resolutions to PRINTDLG_ChangePrinterW.
comdlg32: Populate printer name on the print dialogs.
comdlg32: Use ANSI functions in ANSI WMCommandA.
comdlg32: Don't treat cmb1 as the printer list unless in PRINT_SETUP.
Brendan Shanks (6):
ntdll: Remove support for msg_accrights FD passing.
server: Remove support for msg_accrights FD passing.
mountmgr: Replace sprintf with snprintf to avoid deprecation warnings on macOS.
mountmgr: Replace some malloc/sprintf/strcpy calls with asprintf.
opengl32: Replace sprintf with snprintf/asprintf to avoid deprecation warnings on macOS.
secur32: Replace sprintf with snprintf to avoid deprecation warnings on macOS.
Daniel Lehman (2):
oleaut32/tests: Add tests for GetSizeMax after dirty flag cleared.
oleaut32: Return success from GetSizeMax if not dirty.
David Gow (1):
evr/dshow: Support NV12 in evr_render.
David Heidelberg (2):
d3d9/tests: Replace LPDWORD cast with float_to_int function.
mailmap: Add a mailmap entry for myself with the proper name.
Dmitry Timoshkov (6):
d2d1: Make some strings const.
wineps.drv: Return default resolution if PPD doesn't provide the list of supported resolutions.
kerberos: Allocate memory for the output token if requested.
comctl32/tests: Add more tests for IImageList2 interface.
comctl32: Implement IImageList2::Initialize().
widl: Add initial implementation of SLTG typelib generator.
Eric Pouech (18):
include: Update minidumpapiset.h.
dbghelp/tests: Add tests for minidumps.
dbghelp/tests: Add tests about generated memory chunks.
dbghelp/tests: Add tests about minidump's callback.
dbghelp/tests: Test exception information in minidump.
dbghelp/tests: Add tests for function table lookup.
dbghelp: Use an intermediate buffer in SymFunctionTableAccess (x86_64).
dbghelp: Don't write minidump from running thread.
dbghelp: Simplify thread info generation in minidump.
dbghelp: Add support for V2 unwind info (x86_64).
winedbg: Fallback to PE image when reading memory (minidump).
winedbg: Reload module without virtual flag.
dbghelp: No longer embed unwind information in minidump (x86_64).
winedbg: Add ability to set executable name.
winedbg: Extend 'attach' command to load minidump files.
winedbg: Flush expr buffer upon internal exception.
winedbg: Update the CPU information displayed when reloading a minidump.
winedbg: Don't reload a minidump for a different machine.
Esme Povirk (7):
user32/tests: Accept HCBT_ACTIVATE in TrackPopupMenu.
gdiplus: Check bounding box in GdipIsVisibleRegionPoint.
user32/tests: Add another missing message for TrackPopupMenu.
gdiplus/tests: Region bounds aren't rounded.
gdiplus: Calculate region bounding box without generating HRGN.
user32/tests: Accept WM_ACTIVATE in TrackPopupMenu.
user32/tests: Further updates for win11 TrackPopupMenu failures.
Gabriel Ivăncescu (1):
shell32: Construct the proper path target for UnixFolder.
Giovanni Mascellani (1):
d2d1: Compile the pixel shader with D3DCompile().
Hans Leidekker (3):
dnsapi/tests: Skip tests if no CNAME records are returned.
ntdll/tests: Fix a test failure.
ntdll/tests: Load NtMakeTemporaryObject() dynamically.
Henri Verbeet (1):
wined3d: Do not check the input signature element count for sm4+ shaders in shader_spirv_compile_arguments_init().
Jacek Caban (2):
configure: Don't explicitly enable -Wenum-conversion on Clang.
widl: Always close parsed input file.
Jinoh Kang (10):
tools/gitlab: Run make_specfiles before building.
ntdll/tests: Add tests for OBJ_PERMANENT object attribute.
ntdll/tests: Add tests for NtMakeTemporaryObject.
server: Generalize server request make_temporary to set_object_permanence.
ntdll: Implement NtMakePermanentObject.
ntdll/tests: Don't import kernel32.RtlPcToFileHeader.
Revert "ntdll/tests: Load NtMakeTemporaryObject() dynamically."
server: Check for DELETE access in NtMakeTemporaryObject().
kernelbase: Open object with DELETE access for NtMakeTemporaryObject().
gitlab: Output collapsible section markers in test stage script.
Kyrylo Babikov (1):
dbghelp: Fix PDB processing using the FPO stream instead of FPOEXT.
Louis Lenders (1):
shell32: Try appending .exe when looking up an App Paths key.
Marcus Meissner (1):
ntdll/tests: Fix size passed to GetModuleFileNameW.
Mark Jansen (1):
kernel32/tests: Add tests for job object accounting.
Nikolay Sivov (16):
include: Add ID2D1Factory7 definition.
include: Add ID2D1DeviceContext6 definition.
d3dcompiler: Set correct compilation target for effects profiles.
d3dcompiler: Wrap fx_4_x output in a dxbc container.
d3d10/tests: Add a small effect compilation test.
wshom/network: Use TRACE() for implemented method.
wshom/network: Implement GetTypeInfo().
wshom/network: Implement ComputerName() property.
wshom/network: Check pointer argument in get_UserName().
d3dx10/tests: Remove todo's from now passing tests.
d3d10_1/tests: Remove todo from now passing test.
wshom/network: Implement UserDomain property.
msxml6/tests: Add some tests for MXWriter60.
msxml/tests: Move some of the validation tests to their modules.
msxml/tests: Move version-specific schema tests to corresponding modules.
include: Remove XMLSchemaCache60 from msxml2.idl.
Noah Berner (1):
advapi32/tests: Add todo_wine to tests that are currently failing.
Paul Gofman (11):
imm32: Set lengths to 0 for NULL strings in ImmSetCompositionString().
cryptowinrt: Force debug info in critical sections.
diasymreader: Force debug info in critical sections.
dsdmo: Force debug info in critical sections.
qasf: Force debug info in critical sections.
services: Force debug info in critical sections.
explorer: Force debug info in critical sections.
ntdll: Only allocate debug info in critical sections with RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO.
server: Ignore some ICMP-originated socket errors for connectionless sockets.
strmbase: Fallback to InitializeCriticalSection() if RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO is unsupported.
ntdll: Don't use debug info presence to detect critical section global status.
Pavel Ondračka (1):
d3d9/tests: Define enums outside of struct.
Piotr Caban (6):
ntdll: Workaround sendmsg bug on macOS.
winedump: Fix REG_DWORD dumping with no data.
advapi32/tests: Merge RegLoadKey and RegUnLoadKey tests.
advapi32/tests: Remove all files created by RegLoadKey tests.
advapi32/tests: Test if modifications are saved in RegUnLoadKey.
advapi32/tests: Remove all files created by RegLoadAppKey tests.
Robin Kertels (1):
d3d9/tests: Skip desktop window tests if device creation fails.
Rémi Bernon (74):
win32u: Move D3DKMT functions to a new d3dkmt.c source.
win32u: Move D3DKMT VidPn* functions out of winex11.
win32u: Add an adapter struct to the device manager context.
win32u: Split writing monitor to registry to a separate helper.
win32u: Get rid of the monitor display_device.
win32u: Get rid of the monitor state_flags.
win32u: Get rid of the adapter display_device.
win32u: Get rid of the monitor flags.
win32u: Enumerate monitors from their device keys.
mfreadwrite/reader: Handle MF_E_TRANSFORM_STREAM_CHANGE results.
win32u: Fix incorrect ascii key name in get_config_key.
winevulkan: Use an rb_tree and allocate entries for handle mappings.
winevulkan: Use a single allocation for device and queues.
winevulkan: Pass VkDeviceQueueCreateInfo to wine_vk_device_init_queues.
winevulkan: Rename wine_vk_physical_device_alloc parameters and variables.
winevulkan: Use a single allocation for instance and physical devices.
winevulkan: Get rid of the wine_vk_device_free helper.
winevulkan: Simplify wine_vk_instance_free helper.
winevulkan: Add handle mappings on creation success only.
winevulkan: Get rid of the wine_vk_instance_free helper.
mfplat/tests: Test each VIDEOINFOHEADER field conversion separately.
mfplat/mediatype: Implement implicit MFInitMediaTypeFromVideoInfoHeader subtype.
mfplat/mediatype: Implement MFInitMediaTypeFromVideoInfoHeader2.
mfplat/tests: Add tests for MFInitMediaTypeFromVideoInfoHeader2.
mfplat/mediatype: Implement MFInitAMMediaTypeFromMFMediaType for FORMAT_VideoInfo2.
mfplat/tests: Test aperture to VIDEOINFOHEADER fields mapping.
mfplat/mediatype: Support FORMAT_VideoInfo2 in MFInitMediaTypeFromAMMediaType.
mfplat/mediatype: Set MF_MT_SAMPLE_SIZE from bmiHeader.biSizeImage.
mfplat/mediatype: Map rcSource to MF_MT_(PAN_SCAN|MINIMUM_DISPLAY)_APERTURE.
mfplat/mediatype: Set rcSource and rcTarget if stride differs from width.
mfplat/tests: Add more MFAverageTimePerFrameToFrameRate tests.
mfplat: Support flexible frame time in MFAverageTimePerFrameToFrameRate.
mfplat/mediatype: Implement MF_MT_FRAME_RATE from VIDEOINFOHEADER2.
mfplat/mediatype: Implement VIDEOINFOHEADER2 dwControlFlags conversion.
mfplat/mediatype: Implement some VIDEOINFOHEADER2 dwInterlaceFlags conversion.
mfplat/tests: Test that aperture is dropped with VIDEOINFOHEADER2.
mfplat/tests: Test that MFCreateMFVideoFormatFromMFMediaType appends user data.
mfplat/mediatype: Append user data in MFCreateMFVideoFormatFromMFMediaType.
mfplat/tests: Check the conditions for the MFVideoFlag_BottomUpLinearRep flags.
mfplat/mediatype: Stub MFInitMediaTypeFromMFVideoFormat.
mfplat/tests: Add tests for MFInitMediaTypeFromMFVideoFormat.
mfplat/mediatype: Implement MFInitMediaTypeFromMFVideoFormat.
winebus: Add HID usages in the device descriptor when possible.
winebus: Read hidraw device usages from their report descriptors.
winebus: Prefer hidraw for everything that is not a game controller.
winebus: Remove devices that are ignored wrt hidraw preferences.
winevulkan: Allow only one vulkan surface at a time for an HWND.
win32u: Avoid a crash when cleaning up a monitor without an adapter.
winegstreamer: Release sink caps in the error path.
winegstreamer: Append an optional parser before decoders.
mfplat/tests: Add some broken results for Win7.
mfplat/tests: Test initializing mediatype from AAC WAVEFORMATEXTENSIBLE.
mfplat/tests: Check how AAC attributes are copied from user data.
mfplat/mediatype: Check format pointers and sizes in MFInitMediaTypeFromAMMediaType.
mfplat/mediatype: Support audio major type in MFInitMediaTypeFromAMMediaType.
mfplat/mediatype: Force WAVEFORMATEXTENSIBLE in MFCreateWaveFormatExFromMFMediaType in some cases.
mfplat/mediatype: Implement MFCreateMediaTypeFromRepresentation.
mfplat/mediatype: Use MFCreateWaveFormatExFromMFMediaType in init_am_media_type_audio_format.
ntoskrnl.exe: Open symbolic link with DELETE before making them temporary.
server: Avoid removing thread twice from its desktop thread list.
winex11: Accept key and mouse events with QS_RAWINPUT.
server: Send WM_WINE_CLIPCURSOR message only when necessary.
server: Send WM_WINE_SETCURSOR message only when necessary.
win32u: Use a structure to pass peek_message arguments.
server: Check for internal hardware messages before others.
server: Process internal messages when checking queue status.
user32/tests: Add missing winetest_pop_context.
user32/tests: Add some LoadKeyboardLayoutEx tests.
winemac: Use SONAME_LIBVULKAN as an alias for MoltenVK.
win32u: Move vulkan loading and init guard out of the drivers.
win32u: Move vkGet(Instance|Device)ProcAddr out the drivers.
winevulkan: Stop generating the wine/vulkan_driver.h header.
win32u: Move vkGet(Device|Instance)ProcAddr helpers inline.
mfplat: Append MFVIDEOFORMAT user data after the structure padding.
Santino Mazza (2):
mf/test: Check the topologies id's in topo loader.
mf/topoloader: Preserve input topology id.
Vijay Kiran Kamuju (4):
include: Add Windows.UI.ViewManagement.UIViewSettings definitions.
urlmon: Add stub for ordinal 414.
d3dcompiler: Add D3DCreateLinker stub.
user32: Add LoadKeyboardLayoutEx stub.
Yuxuan Shui (8):
shell32/tests: Check FindExecutable is looking in the correct current directory.
shell32/tests: Check ShellExecute is looking in the correct current directory.
shell32: PathResolve(file, NULL, ...) should not look in the current directory.
shell32: Make sure PathResolve can find files in the current directory.
shell32: PathResolve should be able to find files that already have extensions.
shell32: PathResolve should remove trailing dot.
shell32: Fix FindExecutable search path.
shell32: Rely solely on SHELL_FindExecutable for ShellExecute.
Zebediah Figura (12):
ntdll: Assign a primary token in elevate_token().
d3d9/tests: Remove a no longer accurate comment.
d3d11/tests: Add a test for using a large number of SRV resources.
wined3d: Rename the shader_select_compute method to shader_apply_compute_state.
wined3d: Move checking shader_update_mask to shader_glsl_apply_compute_state().
shell32/tests: Remove obsolete workarounds from test_move().
quartz: Implement SetVideoClippingWindow() and PresentImage() in the VMR7 presenter.
quartz: Reimplement the VMR7 using the VMR7 presenter.
quartz: Implement IVMRSurfaceAllocatorNotify::AdviseSurfaceAllocator().
quartz: Return S_OK from IVMRSurfaceAllocator_PrepareSurface().
quartz/tests: Add some tests for VMR7 renderless mode.
wined3d: Avoid leaking string buffers in shader_glsl_load_bindless_samplers().
Zhenbo Li (1):
shell32: Create nonexistent destination directories in FO_MOVE.
Zhiyi Zhang (5):
mfreadwrite: Fix a memory leak (Coverity).
win32u: Support HiDPI for the non-client close button in WS_EX_TOOLWINDOW windows.
win32u: Fix a possible condition that makes EnumDisplayMonitors() not reporting any monitors.
win32u: Don't enumerate mirrored monitor clones for GetSystemMetrics(SM_CMONITORS).
win32u: Don't enumerate mirrored monitor clones when unnecessary.
```

18
AUTHORS
View file

@ -360,6 +360,7 @@ Dan Hipschman
Daniel Ansorregui
Daniel Beitler
Daniel Gudbjartsson
Daniel Hill
Daniel Jelinski
Daniel Lehman
Daniel Lund
@ -404,7 +405,7 @@ David Gow
David Grant
David Hammerton
David Hedberg
David Heidelberger
David Heidelberg
David Hemmo
David Howells
David Kahurani
@ -431,6 +432,7 @@ David Welch
David White
David Woodhouse
Davin McCall
Dāvis Mosāns
Dean M Greer
Denil Verghese
Denis Baranov
@ -539,6 +541,7 @@ Fatih Aşıcı
Federico Schwindt
Felix Hädicke
Felix Janda
Felix Münchhalfen
Felix Nawothnig
Ferenc Wagner
Fergal Daly
@ -573,6 +576,7 @@ Freddie Tilley
Frederic Boulanger
Frédéric Delanoy
Frédéric Fauberteau
Gabriel Brand
Gabriel Buades Rubio
Gabriele Giorgetti
Gabriele Moabiti
@ -587,6 +591,7 @@ Gavriel State
Gediminas Jakutis
Geoff Clare
Geoffrey Hausheer
Geoffrey McRae
Geoff Thorpe
Georg Beyerle
George Gov
@ -969,6 +974,7 @@ Karl Lessard
Karl Relton
Karol Herbst
Karsten Elfenbein
Kartavya Vashishtha
Kasper Sandberg
Katarzyna Caban
K.B.Dharun Krishna
@ -1030,12 +1036,14 @@ Kristian Nielsen
Kristján Gerhardsson
Kristofer Henriksson
Kristoffer Gleditsch
Krzysztof Bogacki
Krzysztof Foltman
Krzysztof Kotlenga
Krzysztof Nowicki
Kurt Kartaltepe
Kusanagi Kouichi
Kyle Luna
Kyrylo Babikov
Lance Jackson
Lars-Ake Fredlund
Lars Heete
@ -1289,6 +1297,7 @@ Nerijus Baliunas
Nguyễn Chính Hữu
Nicholas Fraser
Nicholas Niro
Nicholas Tay
Nick Bowler
Nick Burns
Nick Fox
@ -1304,6 +1313,7 @@ Niels Kristian Bech Jensen
Nigel Liang
Nikita Morozkin
Nikita V. Youshchenko
Nikola Kuburović
Nikola Pavlica
Nikolas Zimmermann
Nikolay Bogoychev
@ -1311,6 +1321,7 @@ Nikolay Sivov
Nikolay Stefanov
Nils Kuhnhenn
Nix N. Nix
Noah Berner
Noel Borthwick
Noomen Hamza
Norman Stevens
@ -1378,6 +1389,7 @@ Paul van Schayck
Paul Vriens
Pavel Borecki
Pavel Kankovsky
Pavel Ondračka
Pavel Roskin
Pavel Semerad
Pavel Troller
@ -1474,6 +1486,7 @@ Ralf S. Engelschall
Ramon Garcia
Randy Weems
Raphael Junqueira
Rastislav Stanik
Raul Dias
Raul Fernandes
Raul Metsma
@ -1560,6 +1573,7 @@ Rudolf Mayerhofer
Ruei-Yuan Lu
Ruslan Kabatsayev
Russ Andersson
Russell Greene
Rustam Chernotkach
Ryan Cumming
Ryan Hendrickson
@ -1778,6 +1792,7 @@ Valery Kartel
Vasily I. Volchenko
Vasudev Mulchandani
Vedran Rodic
Vibhav Pant
Vicki Pfau
Victor Chiletto
Victor Hermann Chiletto
@ -1888,4 +1903,5 @@ Zixing Liu
Zoltan Kovacs
Zoltan Nagy
Zoran Dzelajlija
Zsolt Vadasz
Zygo Blaxell

View file

@ -1,4 +1,4 @@
Copyright (c) 1993-2023 the Wine project authors (see the file AUTHORS
Copyright (c) 1993-2024 the Wine project authors (see the file AUTHORS
for a complete list)
Wine is free software; you can redistribute it and/or modify it under

View file

@ -169,6 +169,7 @@ P: Aric Stewart <aric@codeweavers.com>
F: dlls/hid/
F: dlls/hidclass.sys/
F: dlls/hidparse.sys/
F: dlls/mouhid.sys/
F: dlls/winehid.sys/
HTTP server
@ -217,7 +218,6 @@ P: Zebediah Figura <z.figura12@gmail.com>
F: dlls/mf/tests/transform.c
F: dlls/winegstreamer/aac_decoder.c
F: dlls/winegstreamer/color_convert.c
F: dlls/winegstreamer/h264_decoder.c
F: dlls/winegstreamer/media_source.c
F: dlls/winegstreamer/mfplat.c
F: dlls/winegstreamer/resampler.c

View file

@ -1,4 +1,4 @@
1. INTRODUCTION
## INTRODUCTION
Wine is a program which allows running Microsoft Windows programs
(including DOS, Windows 3.x, Win32, and Win64 executables) on Unix.
@ -11,76 +11,79 @@ Wine is free software, released under the GNU LGPL; see the file
LICENSE for the details.
2. QUICK START
## QUICK START
From the top-level directory of the Wine source (which contains this file),
run:
```
./configure
make
```
Then either install Wine:
```
make install
```
Or run Wine directly from the build directory:
```
./wine notepad
```
Run programs as "wine program". For more information and problem
Run programs as `wine program`. For more information and problem
resolution, read the rest of this file, the Wine man page, and
especially the wealth of information found at https://www.winehq.org.
3. REQUIREMENTS
## REQUIREMENTS
To compile and run Wine, you must have one of the following:
Linux version 2.0.36 or later
FreeBSD 12.4 or later
Solaris x86 9 or later
NetBSD-current
Mac OS X 10.8 or later
- Linux version 2.6.22 or later
- FreeBSD 12.4 or later
- Solaris x86 9 or later
- NetBSD-current
- Mac OS X 10.8 or later
As Wine requires kernel-level thread support to run, only the operating
systems mentioned above are supported. Other operating systems which
support kernel threads may be supported in the future.
FreeBSD info:
**FreeBSD info**:
See https://wiki.freebsd.org/Wine for more information.
Solaris info:
**Solaris info**:
You will most likely need to build Wine with the GNU toolchain
(gcc, gas, etc.). Warning : installing gas does *not* ensure that it
will be used by gcc. Recompiling gcc after installing gas or
symlinking cc, as and ld to the gnu tools is said to be necessary.
NetBSD info:
**NetBSD info**:
Make sure you have the USER_LDT, SYSVSHM, SYSVSEM, and SYSVMSG options
turned on in your kernel.
Mac OS X info:
**Mac OS X info**:
You need Xcode/Xcode Command Line Tools or Apple cctools. The
minimum requirements for compiling Wine are clang 3.8 with the
MacOSX10.10.sdk and mingw-w64 v8. The MacOSX10.14.sdk and later can
only build wine64.
Supported file systems:
**Supported file systems**:
Wine should run on most file systems. A few compatibility problems
have also been reported using files accessed through Samba. Also,
NTFS does not provide all the file system features needed by some
applications. Using a native Unix file system is recommended.
Basic requirements:
**Basic requirements**:
You need to have the X11 development include files installed
(called xorg-dev in Debian and libX11-devel in Red Hat).
Of course you also need "make" (most likely GNU make).
Of course you also need make (most likely GNU make).
You also need flex version 2.5.33 or later and bison.
Optional support libraries:
**Optional support libraries**:
Configure will display notices when optional libraries are not found
on your system. See https://wiki.winehq.org/Recommended_Packages for
hints about the packages you should install. On 64-bit platforms,
@ -88,80 +91,80 @@ Optional support libraries:
libraries.
4. COMPILATION
## COMPILATION
To build Wine, do:
```
./configure
make
```
This will build the program "wine" and numerous support libraries/binaries.
The program "wine" will load and run Windows executables.
The library "libwine" ("Winelib") can be used to compile and link
Windows source code under Unix.
To see compile configuration options, do ./configure --help.
To see compile configuration options, do `./configure --help`.
For more information, see https://wiki.winehq.org/Building_Wine
5. SETUP
## SETUP
Once Wine has been built correctly, you can do "make install"; this
Once Wine has been built correctly, you can do `make install`; this
will install the wine executable and libraries, the Wine man page, and
other needed files.
Don't forget to uninstall any conflicting previous Wine installation
first. Try either "dpkg -r wine" or "rpm -e wine" or "make uninstall"
first. Try either `dpkg -r wine` or `rpm -e wine` or `make uninstall`
before installing.
Once installed, you can run the "winecfg" configuration tool. See the
Once installed, you can run the `winecfg` configuration tool. See the
Support area at https://www.winehq.org/ for configuration hints.
6. RUNNING PROGRAMS
## RUNNING PROGRAMS
When invoking Wine, you may specify the entire path to the executable,
or a filename only.
For example: to run Notepad:
For example, to run Notepad:
wine notepad (using the search Path as specified in
wine notepad.exe the registry to locate the file)
```
wine notepad (using the search Path as specified in
wine notepad.exe the registry to locate the file)
wine c:\\windows\\notepad.exe (using DOS filename syntax)
wine c:\\windows\\notepad.exe (using DOS filename syntax)
wine ~/.wine/drive_c/windows/notepad.exe (using Unix filename syntax)
wine ~/.wine/drive_c/windows/notepad.exe (using Unix filename syntax)
wine notepad.exe readme.txt (calling program with parameters)
wine notepad.exe readme.txt (calling program with parameters)
```
Wine is not perfect, so some programs may crash. If that happens you
will get a crash log that you should attach to your report when filing
a bug.
7. GETTING MORE INFORMATION
## GETTING MORE INFORMATION
WWW: A great deal of information about Wine is available from WineHQ at
- **WWW**: A great deal of information about Wine is available from WineHQ at
https://www.winehq.org/ : various Wine Guides, application database,
bug tracking. This is probably the best starting point.
FAQ: The Wine FAQ is located at https://www.winehq.org/FAQ
- **FAQ**: The Wine FAQ is located at https://www.winehq.org/FAQ
Wiki: The Wine Wiki is located at https://wiki.winehq.org
- **Wiki**: The Wine Wiki is located at https://wiki.winehq.org
Gitlab: Wine development is hosted at https://gitlab.winehq.org
- **Gitlab**: Wine development is hosted at https://gitlab.winehq.org
Mailing lists:
- **Mailing lists**:
There are several mailing lists for Wine users and developers;
see https://www.winehq.org/forums for more information.
Bugs: Report bugs to Wine Bugzilla at https://bugs.winehq.org
- **Bugs**: Report bugs to Wine Bugzilla at https://bugs.winehq.org
Please search the bugzilla database to check whether your
problem is already known or fixed before posting a bug report.
IRC: Online help is available at channel #WineHQ on irc.libera.chat.
--
Alexandre Julliard
julliard@winehq.org
- **IRC**: Online help is available at channel `#WineHQ` on irc.libera.chat.

View file

@ -1 +1 @@
Wine version 9.0-rc3
Wine version 9.5

495
configure vendored
View file

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.71 for Wine 9.0-rc3.
# Generated by GNU Autoconf 2.71 for Wine 9.5.
#
# Report bugs to <wine-devel@winehq.org>.
#
@ -611,8 +611,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Wine'
PACKAGE_TARNAME='wine'
PACKAGE_VERSION='9.0-rc3'
PACKAGE_STRING='Wine 9.0-rc3'
PACKAGE_VERSION='9.5'
PACKAGE_STRING='Wine 9.5'
PACKAGE_BUGREPORT='wine-devel@winehq.org'
PACKAGE_URL='https://www.winehq.org'
@ -702,6 +702,10 @@ INOTIFY_LIBS
INOTIFY_CFLAGS
PCSCLITE_LIBS
PCAP_LIBS
WAYLAND_EGL_LIBS
WAYLAND_EGL_CFLAGS
EGL_LIBS
EGL_CFLAGS
XKBREGISTRY_LIBS
XKBREGISTRY_CFLAGS
XKBCOMMON_LIBS
@ -929,7 +933,6 @@ with_capi
with_coreaudio
with_cups
with_dbus
with_float_abi
with_fontconfig
with_freetype
with_gettext
@ -1233,6 +1236,7 @@ enable_midimap
enable_mlang
enable_mmcndmgr
enable_mmdevapi
enable_mouhid_sys
enable_mountmgr_sys
enable_mp3dmod
enable_mpr
@ -1493,6 +1497,7 @@ enable_windows_media
enable_windows_networking_hostname
enable_windows_networking
enable_windows_perception_stub
enable_windows_security_authentication_onlineid
enable_windows_security_credentials_ui_userconsentverifier
enable_windows_storage_applicationdata
enable_windows_system_profile_systemmanufacturers
@ -1802,6 +1807,10 @@ XKBCOMMON_CFLAGS
XKBCOMMON_LIBS
XKBREGISTRY_CFLAGS
XKBREGISTRY_LIBS
EGL_CFLAGS
EGL_LIBS
WAYLAND_EGL_CFLAGS
WAYLAND_EGL_LIBS
INOTIFY_CFLAGS
INOTIFY_LIBS
DBUS_CFLAGS
@ -2388,7 +2397,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures Wine 9.0-rc3 to adapt to many kinds of systems.
\`configure' configures Wine 9.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -2458,7 +2467,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of Wine 9.0-rc3:";;
short | recursive ) echo "Configuration of Wine 9.5:";;
esac
cat <<\_ACEOF
@ -2487,7 +2496,6 @@ Optional Packages:
--without-coreaudio do not use the CoreAudio sound support
--without-cups do not use CUPS
--without-dbus do not use DBus (dynamic device support)
--with-float-abi=abi specify the ABI (soft|softfp|hard) for ARM platforms
--without-fontconfig do not use fontconfig
--without-freetype do not use the FreeType library
--without-gettext do not use gettext
@ -2629,6 +2637,12 @@ Some influential environment variables:
C compiler flags for xkbregistry, overriding pkg-config
XKBREGISTRY_LIBS
Linker flags for xkbregistry, overriding pkg-config
EGL_CFLAGS C compiler flags for egl, overriding pkg-config
EGL_LIBS Linker flags for egl, overriding pkg-config
WAYLAND_EGL_CFLAGS
C compiler flags for wayland-egl, overriding pkg-config
WAYLAND_EGL_LIBS
Linker flags for wayland-egl, overriding pkg-config
INOTIFY_CFLAGS
C compiler flags for libinotify, overriding pkg-config
INOTIFY_LIBS
@ -2756,7 +2770,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
Wine configure 9.0-rc3
Wine configure 9.5
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@ -3207,7 +3221,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by Wine $as_me 9.0-rc3, which was
It was created by Wine $as_me 9.5, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@ -4271,13 +4285,6 @@ then :
fi
# Check whether --with-float-abi was given.
if test ${with_float_abi+y}
then :
withval=$with_float_abi;
fi
# Check whether --with-fontconfig was given.
if test ${with_fontconfig+y}
then :
@ -6322,7 +6329,6 @@ printf "%s\n" "$wine_cv_cc_m32" >&6; }
TARGETFLAGS="$TARGETFLAGS -m32"
PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib32/pkgconfig:/usr/lib/pkgconfig}
export PKG_CONFIG_LIBDIR
with_unwind=${with_unwind:-no}
else
CC="$CC -m64"
CXX="$CXX -m64"
@ -6363,24 +6369,11 @@ printf "%s\n" "$wine_cv_thumb2" >&6; }
if test x"$wine_cv_thumb2" = xyes
then
CFLAGS="$CFLAGS -mthumb"
TARGETFLAGS="$TARGETFLAGS -mthumb"
else
CFLAGS="$CFLAGS -marm"
TARGETFLAGS="$TARGETFLAGS -marm"
fi
case $with_float_abi in
soft|softfp|hard)
float_abi=$with_float_abi ;;
*)
case $host_os in
*eabihf)
float_abi=hard ;;
*)
float_abi=softfp
saved_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -mfloat-abi=$float_abi"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -mfloat-abi=$float_abi" >&5
printf %s "checking whether $CC supports -mfloat-abi=$float_abi... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports floating point instructions" >&5
printf %s "checking whether $CC supports floating point instructions... " >&6; }
if test ${wine_cv_float_abi+y}
then :
printf %s "(cached) " >&6
@ -6407,41 +6400,10 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam \
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $wine_cv_float_abi" >&5
printf "%s\n" "$wine_cv_float_abi" >&6; }
if test $wine_cv_float_abi = no
then
float_abi=soft
as_fn_append wine_warnings "|Floating point is not supported for this target. The resulting build won't be compatible with Windows ARM binaries."
fi
CFLAGS=$saved_CFLAGS
esac
;;
esac
CFLAGS="$CFLAGS -mfloat-abi=$float_abi"
TARGETFLAGS="$TARGETFLAGS -mfloat-abi=$float_abi"
;;
i[3456789]86*)
with_unwind=${with_unwind:-no}
test $wine_cv_float_abi != no || as_fn_error $? "The ARM target needs to support floating point instructions." "$LINENO" 5
;;
esac
enable_win16=${enable_win16:-i386}
enable_win64=${enable_win64:-no}
enable_wow64=${enable_wow64:-aarch64,x86_64}
enable_wow64win=${enable_wow64win:-aarch64,x86_64}
enable_wow64cpu=${enable_wow64cpu:-x86_64}
enable_vcruntime140_1=${enable_vcruntime140_1:-x86_64,arm64ec}
enable_cmd=${enable_cmd:-yes}
enable_dllhost=${enable_dllhost:-yes}
enable_dpnsvr=${enable_dpnsvr:-i386,x86_64,arm64ec}
enable_dxdiag=${enable_dxdiag:-yes}
enable_msiexec=${enable_msiexec:-yes}
enable_netsh=${enable_netsh:-yes}
enable_regsvr32=${enable_regsvr32:-yes}
enable_rundll32=${enable_rundll32:-yes}
enable_winetest=${enable_winetest:-$enable_tests}
if test "x$enable_win64" = "xyes"
then
test -z "$with_wine64" || as_fn_error $? "--enable-win64 and --with-wine64 are mutually exclusive.
@ -7865,6 +7827,9 @@ rm -rf conftest*
fi
fi
test "$ac_cv_sys_file_offset_bits" = 64 &&
printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
ac_header= ac_cache=
for ac_item in $ac_header_c_list
@ -10109,9 +10074,6 @@ fi
printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h
test "$ac_cv_sys_file_offset_bits" = 64 &&
printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h
if test $HOST_ARCH = i386
then
DLLFLAGS="$DLLFLAGS -fno-PIC"
@ -10344,6 +10306,10 @@ else $as_nop
fi
fi
saved_CC=$CC
saved_CFLAGS=$CFLAGS
saved_LDFLAGS=$LDFLAGS
for wine_arch in $cross_archs
do
case "x$with_mingw" in
@ -10607,10 +10573,6 @@ test -n "$x86_64_CC" || x86_64_CC="false"
esac
fi
saved_CC=$CC
saved_CFLAGS=$CFLAGS
saved_LDFLAGS=$LDFLAGS
CFLAGS=${CROSSCFLAGS:-"-g -O2"}
LDFLAGS=$CROSSLDFLAGS
eval CC=\$${wine_arch}_CC
@ -10661,6 +10623,8 @@ then :
while test $# -ge 1
do
case "$1" in
*/*-gcc) target=`expr "$1" : '.*/\(.*\)-gcc'` ;;
*/*-clang) target=`expr "$1" : '.*/\(.*\)-clang'` ;;
*-gcc) target=`expr "$1" : '\(.*\)-gcc'` ;;
*-clang) target=`expr "$1" : '\(.*\)-clang'` ;;
esac
@ -10769,12 +10733,9 @@ fi
then
if test ${enable_archs+y}
then :
as_fn_error $? "MinGW $wine_arch compiler not found.
as_fn_error $? "$wine_arch PE cross-compiler not found.
This is an error since --enable-archs=$wine_arch was requested." "$LINENO" 5
fi
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
continue
fi
@ -10818,12 +10779,9 @@ fi
printf "%s\n" "none needed" >&6; } ;;
xno) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
printf "%s\n" "unsupported" >&6; }
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
if test ${enable_archs+y}
then :
as_fn_error $? "MinGW $wine_arch compiler supporting C99 not found.
as_fn_error $? "$wine_arch PE cross-compiler supporting C99 not found.
This is an error since --enable-archs=$wine_arch was requested." "$LINENO" 5
fi
continue
@ -10875,7 +10833,7 @@ then :
else $as_nop
if test ${enable_archs+y}
then :
as_fn_error $? "The $wine_arch cross-compiler doesn't support SEH directives.
as_fn_error $? "The $wine_arch PE cross-compiler doesn't support SEH directives.
This is an error since --enable-archs=$wine_arch was requested." "$LINENO" 5
fi
continue
@ -11529,7 +11487,41 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"
then :
as_fn_append ${wine_arch}_EXTRACFLAGS " -Wabsolute-value"
fi }
{ as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-Wenum-conversion" | $as_tr_sh`
{ as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-Wenum-enum-conversion" | $as_tr_sh`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wenum-enum-conversion" >&5
printf %s "checking whether $CC supports -Wenum-enum-conversion... " >&6; }
if eval test \${$as_ac_var+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_wine_try_cflags_saved=$CFLAGS
ac_wine_try_cflags_saved_exeext=$ac_exeext
CFLAGS="$CFLAGS -nostdlib -nodefaultlibs -Wenum-enum-conversion"
ac_exeext=".exe"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
void *__os_arm64x_dispatch_ret = 0;
int __cdecl mainCRTStartup(void) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
eval "$as_ac_var=yes"
else $as_nop
eval "$as_ac_var=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
ac_exeext=$ac_wine_try_cflags_saved_exeext
fi
eval ac_res=\$$as_ac_var
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_var"\" = x"yes"
then :
:
else $as_nop
{ as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-Wenum-conversion" | $as_tr_sh`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -Wenum-conversion" >&5
printf %s "checking whether $CC supports -Wenum-conversion... " >&6; }
if eval test \${$as_ac_var+y}
@ -11563,6 +11555,42 @@ if eval test \"x\$"$as_ac_var"\" = x"yes"
then :
as_fn_append ${wine_arch}_EXTRACFLAGS " -Wenum-conversion"
fi }
fi }
{ as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-flarge-source-files -Wmisleading-indentation" | $as_tr_sh`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -flarge-source-files -Wmisleading-indentation" >&5
printf %s "checking whether $CC supports -flarge-source-files -Wmisleading-indentation... " >&6; }
if eval test \${$as_ac_var+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_wine_try_cflags_saved=$CFLAGS
ac_wine_try_cflags_saved_exeext=$ac_exeext
CFLAGS="$CFLAGS -nostdlib -nodefaultlibs -flarge-source-files -Wmisleading-indentation"
ac_exeext=".exe"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
void *__os_arm64x_dispatch_ret = 0;
int __cdecl mainCRTStartup(void) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
eval "$as_ac_var=yes"
else $as_nop
eval "$as_ac_var=no"
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
ac_exeext=$ac_wine_try_cflags_saved_exeext
fi
eval ac_res=\$$as_ac_var
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
printf "%s\n" "$ac_res" >&6; }
if eval test \"x\$"$as_ac_var"\" = x"yes"
then :
as_fn_append ${wine_arch}_EXTRACFLAGS " -Wno-misleading-indentation"
fi }
case $wine_arch in
i386) { as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_-fno-omit-frame-pointer" | $as_tr_sh`
@ -11968,16 +11996,17 @@ then :
as_fn_append ${wine_arch}_LDFLAGS " -Wl,--build-id"
fi }
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
done
if test $HOST_ARCH = aarch64
then
test "x$PE_ARCHS" != x || as_fn_error $? "PE cross-compilation is required for ARM64, please install clang/llvm-dlltool/lld, or llvm-mingw." "$LINENO" 5
DLLEXT=""
fi
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
case $HOST_ARCH in
arm|aarch64)
test "x$PE_ARCHS" != x || as_fn_error $? "PE cross-compilation is required for $HOST_ARCH, please install clang/llvm-dlltool/lld, or llvm-mingw." "$LINENO" 5
DLLEXT="" ;;
esac
if test "x$with_system_dllpath" != "x" -a -n "$PE_ARCHS"
@ -13293,8 +13322,8 @@ then :
else $as_nop
:
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for vkd3d_shader_serialize_dxbc in MinGW -lvkd3d-shader" >&5
printf %s "checking for vkd3d_shader_serialize_dxbc in MinGW -lvkd3d-shader... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for vkd3d_shader_build_varying_map in MinGW -lvkd3d-shader" >&5
printf %s "checking for vkd3d_shader_build_varying_map in MinGW -lvkd3d-shader... " >&6; }
if test ${ac_cv_mingw_lib_vkd3d_shader+y}
then :
printf %s "(cached) " >&6
@ -13311,11 +13340,11 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
char vkd3d_shader_serialize_dxbc ();
char vkd3d_shader_build_varying_map ();
int
main (void)
{
return vkd3d_shader_serialize_dxbc ();
return vkd3d_shader_build_varying_map ();
;
return 0;
}
@ -13577,7 +13606,7 @@ then :
MPG123_PE_LIBS=mpg123
if ${MPG123_PE_CFLAGS:+false} :
then :
MPG123_PE_CFLAGS="-I\$(top_srcdir)/libs/mpg123/src/libmpg123"
MPG123_PE_CFLAGS="-I\$(top_srcdir)/libs/mpg123/src/include"
else $as_nop
enable_mpg123=no
fi
@ -16174,6 +16203,188 @@ fi
CPPFLAGS=$ac_save_CPPFLAGS
if test "x$with_opengl" != "xno"
then
rm -f conftest.err
if ${EGL_CFLAGS:+false} :
then :
if test ${PKG_CONFIG+y}
then :
EGL_CFLAGS=`$PKG_CONFIG --cflags egl 2>conftest.err`
fi
fi
if ${EGL_LIBS:+false} :
then :
if test ${PKG_CONFIG+y}
then :
EGL_LIBS=`$PKG_CONFIG --libs egl 2>/dev/null`
fi
fi
EGL_LIBS=${EGL_LIBS:-"-lEGL"}
printf "%s\n" "$as_me:${as_lineno-$LINENO}: egl cflags: $EGL_CFLAGS" >&5
printf "%s\n" "$as_me:${as_lineno-$LINENO}: egl libs: $EGL_LIBS" >&5
if test -s conftest.err; then
printf %s "$as_me:${as_lineno-$LINENO}: egl errors: " >&5
cat conftest.err >&5
fi
rm -f conftest.err
ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $EGL_CFLAGS"
ac_fn_c_check_header_compile "$LINENO" "EGL/egl.h" "ac_cv_header_EGL_egl_h" "$ac_includes_default"
if test "x$ac_cv_header_EGL_egl_h" = xyes
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for -lEGL" >&5
printf %s "checking for -lEGL... " >&6; }
if test ${ac_cv_lib_soname_EGL+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_check_soname_save_LIBS=$LIBS
LIBS="-lEGL $EGL_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
char eglGetProcAddress ();
int
main (void)
{
return eglGetProcAddress ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
case "$LIBEXT" in
dll) ac_cv_lib_soname_EGL=`$ac_cv_path_LDD conftest.exe | grep "EGL" | sed -e "s/dll.*/dll/"';2,$d'` ;;
dylib) ac_cv_lib_soname_EGL=`$OTOOL -L conftest$ac_exeext | grep "libEGL\\.[0-9A-Za-z.]*dylib" | sed -e "s/^.*\/\(libEGL\.[0-9A-Za-z.]*dylib\).*$/\1/"';2,$d'` ;;
*) ac_cv_lib_soname_EGL=`$READELF -d conftest$ac_exeext | grep "NEEDED.*libEGL\\.$LIBEXT" | sed -e "s/^.*\\[\\(libEGL\\.$LIBEXT[^ ]*\\)\\].*$/\1/"';2,$d'`
if ${ac_cv_lib_soname_EGL:+false} :
then :
ac_cv_lib_soname_EGL=`$LDD conftest$ac_exeext | grep "libEGL\\.$LIBEXT" | sed -e "s/^.*\(libEGL\.$LIBEXT[^ ]*\).*$/\1/"';2,$d'`
fi ;;
esac
else $as_nop
ac_cv_lib_soname_EGL=
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_soname_save_LIBS
fi
if ${ac_cv_lib_soname_EGL:+false} :
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5
printf "%s\n" "not found" >&6; }
else $as_nop
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_soname_EGL" >&5
printf "%s\n" "$ac_cv_lib_soname_EGL" >&6; }
printf "%s\n" "#define SONAME_LIBEGL \"$ac_cv_lib_soname_EGL\"" >>confdefs.h
fi
fi
CPPFLAGS=$ac_save_CPPFLAGS
rm -f conftest.err
if ${WAYLAND_EGL_CFLAGS:+false} :
then :
if test ${PKG_CONFIG+y}
then :
WAYLAND_EGL_CFLAGS=`$PKG_CONFIG --cflags wayland-egl 2>conftest.err`
fi
fi
if ${WAYLAND_EGL_LIBS:+false} :
then :
if test ${PKG_CONFIG+y}
then :
WAYLAND_EGL_LIBS=`$PKG_CONFIG --libs wayland-egl 2>/dev/null`
fi
fi
printf "%s\n" "$as_me:${as_lineno-$LINENO}: wayland-egl cflags: $WAYLAND_EGL_CFLAGS" >&5
printf "%s\n" "$as_me:${as_lineno-$LINENO}: wayland-egl libs: $WAYLAND_EGL_LIBS" >&5
if test -s conftest.err; then
printf %s "$as_me:${as_lineno-$LINENO}: wayland-egl errors: " >&5
cat conftest.err >&5
fi
rm -f conftest.err
ac_save_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $WAYLAND_EGL_CFLAGS"
ac_fn_c_check_header_compile "$LINENO" "wayland-egl.h" "ac_cv_header_wayland_egl_h" "$ac_includes_default"
if test "x$ac_cv_header_wayland_egl_h" = xyes
then :
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wl_egl_window_create in -lwayland-egl" >&5
printf %s "checking for wl_egl_window_create in -lwayland-egl... " >&6; }
if test ${ac_cv_lib_wayland_egl_wl_egl_window_create+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_check_lib_save_LIBS=$LIBS
LIBS="-lwayland-egl $WAYLAND_EGL_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
char wl_egl_window_create ();
int
main (void)
{
return wl_egl_window_create ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_lib_wayland_egl_wl_egl_window_create=yes
else $as_nop
ac_cv_lib_wayland_egl_wl_egl_window_create=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_wayland_egl_wl_egl_window_create" >&5
printf "%s\n" "$ac_cv_lib_wayland_egl_wl_egl_window_create" >&6; }
if test "x$ac_cv_lib_wayland_egl_wl_egl_window_create" = xyes
then :
printf "%s\n" "#define HAVE_LIBWAYLAND_EGL 1" >>confdefs.h
else $as_nop
WAYLAND_EGL_LIBS=""
fi
fi
CPPFLAGS=$ac_save_CPPFLAGS
if test "x$with_wayland" != "x"
then
if test -z "$ac_cv_lib_soname_EGL" -o "$ac_cv_lib_wayland_egl_wl_egl_window_create" != yes
then :
case "x$with_opengl" in
x) as_fn_append wine_notices "|EGL ${notice_platform}development files not found, the Wayland driver won't support OpenGL" ;;
xno) ;;
*) as_fn_error $? "EGL ${notice_platform}development files not found, the Wayland driver won't support OpenGL
This is an error since --with-opengl was requested." "$LINENO" 5 ;;
esac
fi
fi
fi
fi
if test -z "$WAYLAND_CLIENT_LIBS" -o -z "$WAYLAND_SCANNER" -o -z "$XKBCOMMON_LIBS" -o -z "$XKBREGISTRY_LIBS" -o "$ac_cv_header_linux_input_h" = "no"
then :
@ -17862,8 +18073,10 @@ esac
fi
if test "x$with_unwind" != xno
if test $HOST_ARCH = x86_64
then
if test "x$with_unwind" != xno
then
rm -f conftest.err
if ${UNWIND_CFLAGS:+false} :
then :
@ -17965,9 +18178,9 @@ printf "%s\n" "#define HAVE_LIBUNWIND 1" >>confdefs.h
fi
CPPFLAGS=$ac_save_CPPFLAGS
fi
case $host in
aarch64*|*-darwin*)
fi
case $host in
*-darwin*)
if test "x$wine_cv_have_unw_step$wine_cv_have_libunwind_unw_step" = xnono
then :
case "x$with_unwind" in
@ -17978,7 +18191,8 @@ This is an error since --with-unwind was requested." "$LINENO" 5 ;;
esac
fi ;;
esac
esac
fi
if test "x$with_sdl" != "xno"
then
@ -18953,6 +19167,7 @@ printf "%s\n" "$ac_cv_lib_soname_MoltenVK" >&6; }
printf "%s\n" "#define SONAME_LIBMOLTENVK \"$ac_cv_lib_soname_MoltenVK\"" >>confdefs.h
printf "%s\n" "#define SONAME_LIBVULKAN \"$ac_cv_lib_soname_MoltenVK\"" >>confdefs.h
fi
fi
@ -19507,6 +19722,35 @@ then :
EXTRACFLAGS="$EXTRACFLAGS -Wwrite-strings"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -flarge-source-files -Wmisleading-indentation" >&5
printf %s "checking whether the compiler supports -flarge-source-files -Wmisleading-indentation... " >&6; }
if test ${ac_cv_cflags__flarge_source_files__Wmisleading_indentation+y}
then :
printf %s "(cached) " >&6
else $as_nop
ac_wine_try_cflags_saved=$CFLAGS
CFLAGS="$CFLAGS -flarge-source-files -Wmisleading-indentation"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int main(int argc, char **argv) { return 0; }
_ACEOF
if ac_fn_c_try_link "$LINENO"
then :
ac_cv_cflags__flarge_source_files__Wmisleading_indentation=yes
else $as_nop
ac_cv_cflags__flarge_source_files__Wmisleading_indentation=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.beam \
conftest$ac_exeext conftest.$ac_ext
CFLAGS=$ac_wine_try_cflags_saved
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__flarge_source_files__Wmisleading_indentation" >&5
printf "%s\n" "$ac_cv_cflags__flarge_source_files__Wmisleading_indentation" >&6; }
if test "x$ac_cv_cflags__flarge_source_files__Wmisleading_indentation" = xyes
then :
EXTRACFLAGS="$EXTRACFLAGS -Wno-misleading-indentation"
fi
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wpointer-arith" >&5
printf %s "checking whether the compiler supports -Wpointer-arith... " >&6; }
if test ${ac_cv_cflags__Wpointer_arith+y}
@ -20788,19 +21032,6 @@ printf "%s\n" "#define HAVE_LINUX_GETHOSTBYNAME_R_6 1" >>confdefs.h
fi
ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_accrights" "ac_cv_member_struct_msghdr_msg_accrights" "#include <sys/types.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_UN_H
# include <sys/un.h>
#endif
"
if test "x$ac_cv_member_struct_msghdr_msg_accrights" = xyes
then :
printf "%s\n" "#define HAVE_STRUCT_MSGHDR_MSG_ACCRIGHTS 1" >>confdefs.h
fi
ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_len" "ac_cv_member_struct_sockaddr_un_sun_len" "#include <sys/types.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_UN_H
@ -21558,6 +21789,32 @@ fi ;;
esac
enable_win16=${enable_win16:-i386}
enable_vcruntime140_1=${enable_vcruntime140_1:-x86_64,arm64ec}
if test -n "$PE_ARCHS"
then
enable_wow64=${enable_wow64:-aarch64,x86_64}
enable_wow64win=${enable_wow64win:-aarch64,x86_64}
enable_wow64cpu=${enable_wow64cpu:-x86_64}
else
enable_wow64=${enable_wow64:-no}
enable_wow64win=${enable_wow64win:-no}
enable_wow64cpu=${enable_wow64cpu:-no}
fi
enable_cmd=${enable_cmd:-yes}
enable_dllhost=${enable_dllhost:-yes}
enable_dpnsvr=${enable_dpnsvr:-i386,x86_64,arm64ec}
enable_dxdiag=${enable_dxdiag:-yes}
enable_msiexec=${enable_msiexec:-yes}
enable_netsh=${enable_netsh:-yes}
enable_regsvr32=${enable_regsvr32:-yes}
enable_rundll32=${enable_rundll32:-yes}
enable_winetest=${enable_winetest:-$enable_tests}
@ -21867,6 +22124,7 @@ wine_fn_config_makefile dlls/gdiplus/tests enable_tests
wine_fn_config_makefile dlls/geolocation enable_geolocation
wine_fn_config_makefile dlls/geolocation/tests enable_tests
wine_fn_config_makefile dlls/glu32 enable_glu32
wine_fn_config_makefile dlls/glu32/tests enable_tests
wine_fn_config_makefile dlls/gphoto2.ds enable_gphoto2_ds
wine_fn_config_makefile dlls/gpkcsp enable_gpkcsp
wine_fn_config_makefile dlls/graphicscapture enable_graphicscapture
@ -21978,6 +22236,7 @@ wine_fn_config_makefile dlls/mmdevapi/tests enable_tests
wine_fn_config_makefile dlls/mmdevldr.vxd enable_win16
wine_fn_config_makefile dlls/mmsystem.dll16 enable_win16
wine_fn_config_makefile dlls/monodebg.vxd enable_win16
wine_fn_config_makefile dlls/mouhid.sys enable_mouhid_sys
wine_fn_config_makefile dlls/mountmgr.sys enable_mountmgr_sys
wine_fn_config_makefile dlls/mouse.drv16 enable_win16
wine_fn_config_makefile dlls/mp3dmod enable_mp3dmod
@ -22059,6 +22318,7 @@ wine_fn_config_makefile dlls/msvcp140/tests enable_tests
wine_fn_config_makefile dlls/msvcp140_1 enable_msvcp140_1
wine_fn_config_makefile dlls/msvcp140_1/tests enable_tests
wine_fn_config_makefile dlls/msvcp140_2 enable_msvcp140_2
wine_fn_config_makefile dlls/msvcp140_2/tests enable_tests
wine_fn_config_makefile dlls/msvcp140_atomic_wait enable_msvcp140_atomic_wait
wine_fn_config_makefile dlls/msvcp140_atomic_wait/tests enable_tests
wine_fn_config_makefile dlls/msvcp140_codecvt_ids enable_msvcp140_codecvt_ids
@ -22407,6 +22667,8 @@ wine_fn_config_makefile dlls/windows.networking.hostname/tests enable_tests
wine_fn_config_makefile dlls/windows.networking enable_windows_networking
wine_fn_config_makefile dlls/windows.perception.stub enable_windows_perception_stub
wine_fn_config_makefile dlls/windows.perception.stub/tests enable_tests
wine_fn_config_makefile dlls/windows.security.authentication.onlineid enable_windows_security_authentication_onlineid
wine_fn_config_makefile dlls/windows.security.authentication.onlineid/tests enable_tests
wine_fn_config_makefile dlls/windows.security.credentials.ui.userconsentverifier enable_windows_security_credentials_ui_userconsentverifier
wine_fn_config_makefile dlls/windows.security.credentials.ui.userconsentverifier/tests enable_tests
wine_fn_config_makefile dlls/windows.storage.applicationdata enable_windows_storage_applicationdata
@ -22440,6 +22702,7 @@ wine_fn_config_makefile dlls/winex11.drv enable_winex11_drv
wine_fn_config_makefile dlls/winexinput.sys enable_winexinput_sys
wine_fn_config_makefile dlls/wing.dll16 enable_win16
wine_fn_config_makefile dlls/wing32 enable_wing32
wine_fn_config_makefile dlls/wing32/tests enable_tests
wine_fn_config_makefile dlls/winhttp enable_winhttp
wine_fn_config_makefile dlls/winhttp/tests enable_tests
wine_fn_config_makefile dlls/wininet enable_wininet
@ -23361,7 +23624,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by Wine $as_me 9.0-rc3, which was
This file was extended by Wine $as_me 9.5, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -23425,7 +23688,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
Wine config.status 9.0-rc3
Wine config.status 9.5
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
@ -23766,6 +24029,10 @@ XKBCOMMON_CFLAGS = $XKBCOMMON_CFLAGS
XKBCOMMON_LIBS = $XKBCOMMON_LIBS
XKBREGISTRY_CFLAGS = $XKBREGISTRY_CFLAGS
XKBREGISTRY_LIBS = $XKBREGISTRY_LIBS
EGL_CFLAGS = $EGL_CFLAGS
EGL_LIBS = $EGL_LIBS
WAYLAND_EGL_CFLAGS = $WAYLAND_EGL_CFLAGS
WAYLAND_EGL_LIBS = $WAYLAND_EGL_LIBS
PCAP_LIBS = $PCAP_LIBS
PCSCLITE_LIBS = $PCSCLITE_LIBS
INOTIFY_CFLAGS = $INOTIFY_CFLAGS

View file

@ -29,7 +29,6 @@ AC_ARG_WITH(capi, AS_HELP_STRING([--without-capi],[do not use CAPI (ISDN su
AC_ARG_WITH(coreaudio, AS_HELP_STRING([--without-coreaudio],[do not use the CoreAudio sound support]))
AC_ARG_WITH(cups, AS_HELP_STRING([--without-cups],[do not use CUPS]))
AC_ARG_WITH(dbus, AS_HELP_STRING([--without-dbus],[do not use DBus (dynamic device support)]))
AC_ARG_WITH(float-abi, AS_HELP_STRING([--with-float-abi=abi],[specify the ABI (soft|softfp|hard) for ARM platforms]))
AC_ARG_WITH(fontconfig,AS_HELP_STRING([--without-fontconfig],[do not use fontconfig]))
AC_ARG_WITH(freetype, AS_HELP_STRING([--without-freetype],[do not use the FreeType library]))
AC_ARG_WITH(gettext, AS_HELP_STRING([--without-gettext],[do not use gettext]))
@ -131,7 +130,6 @@ case $host in
TARGETFLAGS="$TARGETFLAGS -m32"
PKG_CONFIG_LIBDIR=${PKG_CONFIG_LIBDIR:-/usr/lib/i386-linux-gnu/pkgconfig:/usr/lib32/pkgconfig:/usr/lib/pkgconfig}
export PKG_CONFIG_LIBDIR
with_unwind=${with_unwind:-no}
else
CC="$CC -m64"
CXX="$CXX -m64"
@ -147,61 +145,15 @@ case $host in
if test x"$wine_cv_thumb2" = xyes
then
CFLAGS="$CFLAGS -mthumb"
TARGETFLAGS="$TARGETFLAGS -mthumb"
else
CFLAGS="$CFLAGS -marm"
TARGETFLAGS="$TARGETFLAGS -marm"
fi
case $with_float_abi in
soft|softfp|hard)
float_abi=$with_float_abi ;;
*)
case $host_os in
*eabihf)
float_abi=hard ;;
*)
float_abi=softfp
saved_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -mfloat-abi=$float_abi"
AC_CACHE_CHECK([whether $CC supports -mfloat-abi=$float_abi],wine_cv_float_abi,
[WINE_TRY_ASM_LINK(["vmrs r2,fpscr"],,,[wine_cv_float_abi=yes],[wine_cv_float_abi=no])])
if test $wine_cv_float_abi = no
then
float_abi=soft
WINE_WARNING([Floating point is not supported for this target. The resulting build won't be compatible with Windows ARM binaries.])
fi
CFLAGS=$saved_CFLAGS
esac
;;
esac
CFLAGS="$CFLAGS -mfloat-abi=$float_abi"
TARGETFLAGS="$TARGETFLAGS -mfloat-abi=$float_abi"
;;
i[[3456789]]86*)
with_unwind=${with_unwind:-no}
AC_CACHE_CHECK([whether $CC supports floating point instructions],wine_cv_float_abi,
[WINE_TRY_ASM_LINK(["vmrs r2,fpscr"],,,[wine_cv_float_abi=yes],[wine_cv_float_abi=no])])
test $wine_cv_float_abi != no || AC_MSG_ERROR([The ARM target needs to support floating point instructions.])
;;
esac
enable_win16=${enable_win16:-i386}
enable_win64=${enable_win64:-no}
enable_wow64=${enable_wow64:-aarch64,x86_64}
enable_wow64win=${enable_wow64win:-aarch64,x86_64}
enable_wow64cpu=${enable_wow64cpu:-x86_64}
enable_vcruntime140_1=${enable_vcruntime140_1:-x86_64,arm64ec}
dnl Explicitly enable some programs for arm64ec
enable_cmd=${enable_cmd:-yes}
enable_dllhost=${enable_dllhost:-yes}
enable_dpnsvr=${enable_dpnsvr:-i386,x86_64,arm64ec}
enable_dxdiag=${enable_dxdiag:-yes}
enable_msiexec=${enable_msiexec:-yes}
enable_netsh=${enable_netsh:-yes}
enable_regsvr32=${enable_regsvr32:-yes}
enable_rundll32=${enable_rundll32:-yes}
dnl Disable winetest too if tests are disabled
enable_winetest=${enable_winetest:-$enable_tests}
dnl Some special cases for the 64-bit build
if test "x$enable_win64" = "xyes"
then
@ -408,6 +360,7 @@ AC_SUBST(OPENGL_LIBS,"")
dnl **** Check for header files ****
AC_SYS_LARGEFILE()
m4_ifdef([AC_SYS_YEAR2038],[AC_SYS_YEAR2038()],[test "$ac_cv_sys_file_offset_bits" = 64 && AC_DEFINE(_TIME_BITS,64,[Define to 64 to enable 64-bit time_t])])
AC_CHECK_HEADERS(\
CL/cl.h \
@ -758,7 +711,6 @@ case $host_os in
*)
AC_DEFINE(_GNU_SOURCE,1,[Define to 1 to enable GNU extensions on Linux])
test "$ac_cv_sys_file_offset_bits" = 64 && AC_DEFINE(_TIME_BITS,64,[Define to 64 to enable 64-bit time_t on Linux])
if test $HOST_ARCH = i386
then
DLLFLAGS="$DLLFLAGS -fno-PIC"
@ -837,6 +789,10 @@ AS_VAR_SET_IF([enable_archs],
test $HOST_ARCH = unknown || cross_archs=$HOST_ARCH
fi])
saved_CC=$CC
saved_CFLAGS=$CFLAGS
saved_LDFLAGS=$LDFLAGS
for wine_arch in $cross_archs
do
case "x$with_mingw" in
@ -863,10 +819,6 @@ do
;;
esac])
saved_CC=$CC
saved_CFLAGS=$CFLAGS
saved_LDFLAGS=$LDFLAGS
CFLAGS=${CROSSCFLAGS:-"-g -O2"}
LDFLAGS=$CROSSLDFLAGS
AS_VAR_COPY([CC],[${wine_arch}_CC])
@ -886,6 +838,8 @@ do
while test $# -ge 1
do
case "$1" in
*/*-gcc) target=`expr "$1" : '.*/\(.*\)-gcc'` ;;
*/*-clang) target=`expr "$1" : '.*/\(.*\)-clang'` ;;
*-gcc) target=`expr "$1" : '\(.*\)-gcc'` ;;
*-clang) target=`expr "$1" : '\(.*\)-clang'` ;;
esac
@ -926,11 +880,8 @@ do
if test -z "$target"
then
AS_VAR_SET_IF([enable_archs],
[AC_MSG_ERROR([MinGW $wine_arch compiler not found.
[AC_MSG_ERROR([$wine_arch PE cross-compiler not found.
This is an error since --enable-archs=$wine_arch was requested.])])
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
continue
fi
@ -952,11 +903,8 @@ This is an error since --enable-archs=$wine_arch was requested.])])
case "x$res" in
x) AC_MSG_RESULT([none needed]) ;;
xno) AC_MSG_RESULT([unsupported])
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
AS_VAR_SET_IF([enable_archs],
[AC_MSG_ERROR([MinGW $wine_arch compiler supporting C99 not found.
[AC_MSG_ERROR([$wine_arch PE cross-compiler supporting C99 not found.
This is an error since --enable-archs=$wine_arch was requested.])])
continue
;;
@ -973,7 +921,7 @@ This is an error since --enable-archs=$wine_arch was requested.])])
AS_VAR_POPDEF([wine_cv_seh_support])
AS_VAR_IF([res],[yes],[],
[AS_VAR_SET_IF([enable_archs],
[AC_MSG_ERROR([The $wine_arch cross-compiler doesn't support SEH directives.
[AC_MSG_ERROR([The $wine_arch PE cross-compiler doesn't support SEH directives.
This is an error since --enable-archs=$wine_arch was requested.])])
continue])])
@ -998,7 +946,10 @@ This is an error since --enable-archs=$wine_arch was requested.])])
WINE_TRY_PE_CFLAGS([-Wpointer-arith])
WINE_TRY_PE_CFLAGS([-Wlogical-op])
WINE_TRY_PE_CFLAGS([-Wabsolute-value])
WINE_TRY_PE_CFLAGS([-Wenum-conversion])
WINE_TRY_PE_CFLAGS([-Wenum-enum-conversion],[:],WINE_TRY_PE_CFLAGS([-Wenum-conversion]))
dnl GCC can't handle large files when -Wmisleading-indentation is enabled (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549)
WINE_TRY_PE_CFLAGS([-flarge-source-files -Wmisleading-indentation],[AS_VAR_APPEND(${wine_arch}_EXTRACFLAGS,[" -Wno-misleading-indentation"])])
case $wine_arch in
i386) WINE_TRY_PE_CFLAGS([-fno-omit-frame-pointer])
@ -1044,16 +995,17 @@ This is an error since --enable-archs=$wine_arch was requested.])])
[AS_VAR_APPEND([${wine_arch}_CFLAGS],[" -Wl,--build-id"])
AS_VAR_APPEND([${wine_arch}_LDFLAGS],[" -Wl,--build-id"])])
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
done
if test $HOST_ARCH = aarch64
then
test "x$PE_ARCHS" != x || AC_MSG_ERROR([PE cross-compilation is required for ARM64, please install clang/llvm-dlltool/lld, or llvm-mingw.])
DLLEXT=""
fi
CC=$saved_CC
CFLAGS=$saved_CFLAGS
LDFLAGS=$saved_LDFLAGS
case $HOST_ARCH in
arm|aarch64)
test "x$PE_ARCHS" != x || AC_MSG_ERROR([PE cross-compilation is required for $HOST_ARCH, please install clang/llvm-dlltool/lld, or llvm-mingw.])
DLLEXT="" ;;
esac
dnl **** External libraries ****
@ -1161,7 +1113,7 @@ then
if test "$ac_cv_mingw_header_vkd3d_h" = "yes" -a "$ac_cv_mingw_header_vkd3d_shader_h" = "yes"
then
WINE_CHECK_MINGW_LIB(vkd3d,vkd3d_set_log_callback,[:],[:],[$VKD3D_PE_LIBS])
WINE_CHECK_MINGW_LIB(vkd3d-shader,vkd3d_shader_serialize_dxbc,[:],[:],[$VKD3D_PE_LIBS])
WINE_CHECK_MINGW_LIB(vkd3d-shader,vkd3d_shader_build_varying_map,[:],[:],[$VKD3D_PE_LIBS])
if test "$ac_cv_mingw_lib_vkd3d" = "no" -o "$ac_cv_mingw_lib_vkd3d_shader" = "no"
then
VKD3D_PE_CFLAGS=""
@ -1193,7 +1145,7 @@ WINE_EXTLIB_FLAGS(JPEG, jpeg, jpeg, "-I\$(top_srcdir)/libs/jpeg")
WINE_EXTLIB_FLAGS(JXR, jxr, jxr, "-I\$(top_srcdir)/libs/jxr/jxrgluelib -I\$(top_srcdir)/libs/jxr/image/sys")
WINE_EXTLIB_FLAGS(LCMS2, lcms2, lcms2, "-I\$(top_srcdir)/libs/lcms2/include")
WINE_EXTLIB_FLAGS(LDAP, ldap, ldap, "-I\$(top_srcdir)/libs/ldap/include")
WINE_EXTLIB_FLAGS(MPG123, mpg123, mpg123, "-I\$(top_srcdir)/libs/mpg123/src/libmpg123")
WINE_EXTLIB_FLAGS(MPG123, mpg123, mpg123, "-I\$(top_srcdir)/libs/mpg123/src/include")
WINE_EXTLIB_FLAGS(MUSL, musl, musl)
WINE_EXTLIB_FLAGS(PNG, png, "png \$(ZLIB_PE_LIBS)", "-I\$(top_srcdir)/libs/png")
WINE_EXTLIB_FLAGS(TIFF, tiff, "tiff \$(ZLIB_PE_LIBS)", "-I\$(top_srcdir)/libs/tiff/libtiff")
@ -1408,6 +1360,22 @@ then
WINE_PACKAGE_FLAGS(XKBREGISTRY,[xkbregistry],,,,
[AC_CHECK_HEADERS([xkbcommon/xkbregistry.h])
AC_CHECK_LIB(xkbregistry,rxkb_context_new,[:],[XKBREGISTRY_LIBS=""],[$XKBREGISTRY_LIBS])])
if test "x$with_opengl" != "xno"
then
WINE_PACKAGE_FLAGS(EGL,[egl],[-lEGL],,,
[AC_CHECK_HEADER([EGL/egl.h],
[WINE_CHECK_SONAME(EGL,eglGetProcAddress,,,[$EGL_LIBS])])])
WINE_PACKAGE_FLAGS(WAYLAND_EGL,[wayland-egl],,,,
[AC_CHECK_HEADER([wayland-egl.h],
[AC_CHECK_LIB(wayland-egl,wl_egl_window_create,
[AC_DEFINE(HAVE_LIBWAYLAND_EGL, 1, [Define if we have the wayland-egl development environment])],
[WAYLAND_EGL_LIBS=""],[$WAYLAND_EGL_LIBS])])])
if test "x$with_wayland" != "x"
then
WINE_NOTICE_WITH(opengl, [test -z "$ac_cv_lib_soname_EGL" -o "$ac_cv_lib_wayland_egl_wl_egl_window_create" != yes],
[EGL ${notice_platform}development files not found, the Wayland driver won't support OpenGL])
fi
fi
fi
WINE_NOTICE_WITH(wayland, [test -z "$WAYLAND_CLIENT_LIBS" -o -z "$WAYLAND_SCANNER" -o -z "$XKBCOMMON_LIBS" -o -z "$XKBREGISTRY_LIBS" -o "$ac_cv_header_linux_input_h" = "no"],
[Wayland ${notice_platform}development files not found, the Wayland driver won't be supported.],
@ -1698,8 +1666,10 @@ WINE_NOTICE_WITH(udev,[test "x$UDEV_LIBS" = "x"],
[libudev ${notice_platform}development files not found, plug and play won't be supported.])
dnl **** Check for libunwind ****
if test "x$with_unwind" != xno
if test $HOST_ARCH = x86_64
then
if test "x$with_unwind" != xno
then
WINE_PACKAGE_FLAGS(UNWIND,[libunwind],[-lunwind],,,
[AC_CACHE_CHECK([for unw_step],wine_cv_have_unw_step,
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#define UNW_LOCAL_ONLY
@ -1725,12 +1695,13 @@ then
then
AC_DEFINE(HAVE_LIBUNWIND,1,[Define to 1 if you have the `unwind' library (-lunwind).])
fi])
fi
case $host in
aarch64*|*-darwin*)
fi
case $host in
*-darwin*)
WINE_NOTICE_WITH(unwind,[test "x$wine_cv_have_unw_step$wine_cv_have_libunwind_unw_step" = xnono],
[libunwind ${notice_platform}development files not found, stack unwinding won't work.]) ;;
esac
esac
fi
dnl **** Check for libSDL2 ****
if test "x$with_sdl" != "xno"
@ -1856,7 +1827,7 @@ then
WINE_CHECK_SONAME(vulkan, vkGetInstanceProcAddr)
if test "x$ac_cv_lib_soname_vulkan" = "x"
then
WINE_CHECK_SONAME(MoltenVK, vkGetInstanceProcAddr)
WINE_CHECK_SONAME(MoltenVK, vkGetInstanceProcAddr, [AC_DEFINE_UNQUOTED(SONAME_LIBVULKAN,["$ac_cv_lib_soname_MoltenVK"])])
fi
fi
WINE_NOTICE_WITH(vulkan,[test "x$ac_cv_lib_soname_vulkan" = "x" -a "x$ac_cv_lib_soname_MoltenVK" = "x"],
@ -1891,6 +1862,9 @@ then
WINE_TRY_CFLAGS([-Wvla])
WINE_TRY_CFLAGS([-Wwrite-strings])
dnl GCC can't handle large files when -Wmisleading-indentation is enabled (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89549)
WINE_TRY_CFLAGS([-flarge-source-files -Wmisleading-indentation],[EXTRACFLAGS="$EXTRACFLAGS -Wno-misleading-indentation"])
dnl Check for noisy string.h
WINE_TRY_CFLAGS([-Wpointer-arith],
[saved_string_h_CFLAGS=$CFLAGS
@ -2169,7 +2143,7 @@ AC_CACHE_CHECK([whether we can use re-entrant gethostbyname_r Linux style],
fi
dnl Check for socket structure members
AC_CHECK_MEMBERS([struct msghdr.msg_accrights, struct sockaddr_un.sun_len],,,
AC_CHECK_MEMBERS([struct sockaddr_un.sun_len],,,
[#include <sys/types.h>
#include <sys/socket.h>
#ifdef HAVE_SYS_UN_H
@ -2377,6 +2351,35 @@ case $host_vendor in
*sun*) WINE_CHECK_DEFINE([__sun__]) ;;
esac
dnl *** Check for modules to disable by default
enable_win16=${enable_win16:-i386}
enable_vcruntime140_1=${enable_vcruntime140_1:-x86_64,arm64ec}
if test -n "$PE_ARCHS"
then
enable_wow64=${enable_wow64:-aarch64,x86_64}
enable_wow64win=${enable_wow64win:-aarch64,x86_64}
enable_wow64cpu=${enable_wow64cpu:-x86_64}
else
enable_wow64=${enable_wow64:-no}
enable_wow64win=${enable_wow64win:-no}
enable_wow64cpu=${enable_wow64cpu:-no}
fi
dnl Explicitly enable some programs for arm64ec
enable_cmd=${enable_cmd:-yes}
enable_dllhost=${enable_dllhost:-yes}
enable_dpnsvr=${enable_dpnsvr:-i386,x86_64,arm64ec}
enable_dxdiag=${enable_dxdiag:-yes}
enable_msiexec=${enable_msiexec:-yes}
enable_netsh=${enable_netsh:-yes}
enable_regsvr32=${enable_regsvr32:-yes}
enable_rundll32=${enable_rundll32:-yes}
dnl Disable winetest too if tests are disabled
enable_winetest=${enable_winetest:-$enable_tests}
dnl **** Generate output files ****
AH_TOP([#ifndef __WINE_CONFIG_H
@ -2684,6 +2687,7 @@ WINE_CONFIG_MAKEFILE(dlls/gdiplus/tests)
WINE_CONFIG_MAKEFILE(dlls/geolocation)
WINE_CONFIG_MAKEFILE(dlls/geolocation/tests)
WINE_CONFIG_MAKEFILE(dlls/glu32)
WINE_CONFIG_MAKEFILE(dlls/glu32/tests)
WINE_CONFIG_MAKEFILE(dlls/gphoto2.ds)
WINE_CONFIG_MAKEFILE(dlls/gpkcsp)
WINE_CONFIG_MAKEFILE(dlls/graphicscapture)
@ -2795,6 +2799,7 @@ WINE_CONFIG_MAKEFILE(dlls/mmdevapi/tests)
WINE_CONFIG_MAKEFILE(dlls/mmdevldr.vxd,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/mmsystem.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/monodebg.vxd,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/mouhid.sys)
WINE_CONFIG_MAKEFILE(dlls/mountmgr.sys)
WINE_CONFIG_MAKEFILE(dlls/mouse.drv16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/mp3dmod)
@ -2876,6 +2881,7 @@ WINE_CONFIG_MAKEFILE(dlls/msvcp140/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_1)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_1/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_2)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_2/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_atomic_wait)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_atomic_wait/tests)
WINE_CONFIG_MAKEFILE(dlls/msvcp140_codecvt_ids)
@ -3224,6 +3230,8 @@ WINE_CONFIG_MAKEFILE(dlls/windows.networking.hostname/tests)
WINE_CONFIG_MAKEFILE(dlls/windows.networking)
WINE_CONFIG_MAKEFILE(dlls/windows.perception.stub)
WINE_CONFIG_MAKEFILE(dlls/windows.perception.stub/tests)
WINE_CONFIG_MAKEFILE(dlls/windows.security.authentication.onlineid)
WINE_CONFIG_MAKEFILE(dlls/windows.security.authentication.onlineid/tests)
WINE_CONFIG_MAKEFILE(dlls/windows.security.credentials.ui.userconsentverifier)
WINE_CONFIG_MAKEFILE(dlls/windows.security.credentials.ui.userconsentverifier/tests)
WINE_CONFIG_MAKEFILE(dlls/windows.storage.applicationdata)
@ -3257,6 +3265,7 @@ WINE_CONFIG_MAKEFILE(dlls/winex11.drv)
WINE_CONFIG_MAKEFILE(dlls/winexinput.sys)
WINE_CONFIG_MAKEFILE(dlls/wing.dll16,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/wing32)
WINE_CONFIG_MAKEFILE(dlls/wing32/tests)
WINE_CONFIG_MAKEFILE(dlls/winhttp)
WINE_CONFIG_MAKEFILE(dlls/winhttp/tests)
WINE_CONFIG_MAKEFILE(dlls/wininet)

View file

@ -27,4 +27,4 @@
threading(both),
uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */
]
coclass PSFactoryBuffer { interface IFactoryBuffer; }
coclass PSFactoryBuffer { interface IPSFactoryBuffer; }

View file

@ -27,4 +27,4 @@
threading(both),
uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */
]
coclass PSFactoryBuffer { interface IFactoryBuffer; }
coclass PSFactoryBuffer { interface IPSFactoryBuffer; }

View file

@ -27,4 +27,4 @@
threading(both),
uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */
]
coclass PSFactoryBuffer { interface IFactoryBuffer; }
coclass PSFactoryBuffer { interface IPSFactoryBuffer; }

View file

@ -27,4 +27,4 @@
threading(both),
uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */
]
coclass PSFactoryBuffer { interface IFactoryBuffer; }
coclass PSFactoryBuffer { interface IPSFactoryBuffer; }

View file

@ -27,4 +27,4 @@
threading(both),
uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */
]
coclass PSFactoryBuffer { interface IFactoryBuffer; }
coclass PSFactoryBuffer { interface IPSFactoryBuffer; }

View file

@ -27,4 +27,4 @@
threading(both),
uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */
]
coclass PSFactoryBuffer { interface IFactoryBuffer; }
coclass PSFactoryBuffer { interface IPSFactoryBuffer; }

View file

@ -27,4 +27,4 @@
threading(both),
uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */
]
coclass PSFactoryBuffer { interface IFactoryBuffer; }
coclass PSFactoryBuffer { interface IPSFactoryBuffer; }

View file

@ -27,4 +27,4 @@
threading(both),
uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */
]
coclass PSFactoryBuffer { interface IFactoryBuffer; }
coclass PSFactoryBuffer { interface IPSFactoryBuffer; }

View file

@ -7,4 +7,4 @@
threading(both),
uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */
]
coclass PSFactoryBuffer { interface IFactoryBuffer; }
coclass PSFactoryBuffer { interface IPSFactoryBuffer; }

View file

@ -27,4 +27,4 @@
threading(both),
uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */
]
coclass PSFactoryBuffer { interface IFactoryBuffer; }
coclass PSFactoryBuffer { interface IPSFactoryBuffer; }

View file

@ -27,4 +27,4 @@
threading(both),
uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */
]
coclass PSFactoryBuffer { interface IFactoryBuffer; }
coclass PSFactoryBuffer { interface IPSFactoryBuffer; }

View file

@ -27,4 +27,4 @@
threading(both),
uuid(b8da6310-e19b-11d0-933c-00a0c90dcaa9) /* IActiveScriptStats */
]
coclass PSFactoryBuffer { interface IFactoryBuffer; }
coclass PSFactoryBuffer { interface IPSFactoryBuffer; }

View file

@ -824,7 +824,7 @@
# @ stub TreeResetNamedSecurityInfoA
@ stdcall TreeResetNamedSecurityInfoW(wstr long long ptr ptr ptr ptr long ptr long ptr)
# @ stub TreeSetNamedSecurityInfoA
# @ stub TreeSetNamedSecurityInfoW
@ stdcall TreeSetNamedSecurityInfoW(wstr long long ptr ptr ptr ptr long ptr long ptr)
# @ stub TrusteeAccessToObjectA
# @ stub TrusteeAccessToObjectW
# @ stub UninstallApplication

View file

@ -70,6 +70,9 @@ LSTATUS WINAPI RegOverridePredefKey( HKEY hkey, HKEY override )
*/
LSTATUS WINAPI RegCreateKeyW( HKEY hkey, LPCWSTR lpSubKey, PHKEY phkResult )
{
if (!phkResult)
return ERROR_INVALID_PARAMETER;
return RegCreateKeyExW( hkey, lpSubKey, 0, NULL, REG_OPTION_NON_VOLATILE,
MAXIMUM_ALLOWED, NULL, phkResult, NULL );
}
@ -82,6 +85,9 @@ LSTATUS WINAPI RegCreateKeyW( HKEY hkey, LPCWSTR lpSubKey, PHKEY phkResult )
*/
LSTATUS WINAPI RegCreateKeyA( HKEY hkey, LPCSTR lpSubKey, PHKEY phkResult )
{
if (!phkResult)
return ERROR_INVALID_PARAMETER;
return RegCreateKeyExA( hkey, lpSubKey, 0, NULL, REG_OPTION_NON_VOLATILE,
MAXIMUM_ALLOWED, NULL, phkResult, NULL );
}

View file

@ -3101,6 +3101,19 @@ BOOL WINAPI SaferCloseLevel(SAFER_LEVEL_HANDLE handle)
return TRUE;
}
/******************************************************************************
* TreeSetNamedSecurityInfoW [ADVAPI32.@]
*/
DWORD WINAPI TreeSetNamedSecurityInfoW(WCHAR *name, SE_OBJECT_TYPE type, SECURITY_INFORMATION info,
SID *owner, SID *group, ACL *dacl, ACL *sacl, DWORD action,
FN_PROGRESS progress, PROG_INVOKE_SETTING pis, void *args)
{
FIXME("(%s, %d, %lu, %p, %p, %p, %p, %lu, %p, %d, %p) stub\n",
debugstr_w(name), type, info, owner, group, dacl, sacl, action, progress, pis, args);
return ERROR_CALL_NOT_IMPLEMENTED;
}
/******************************************************************************
* TreeResetNamedSecurityInfoW [ADVAPI32.@]
*/

View file

@ -1260,10 +1260,10 @@ static void test_container_sd(void)
ok(err == ERROR_INSUFFICIENT_BUFFER || broken(err == ERROR_INVALID_PARAMETER), "got %lu\n", err);
ok(len, "expected len > 0\n");
sd = HeapAlloc(GetProcessHeap(), 0, len);
sd = malloc(len);
ret = CryptGetProvParam(prov, PP_KEYSET_SEC_DESCR, (BYTE *)sd, &len, OWNER_SECURITY_INFORMATION);
ok(ret, "got %lu\n", GetLastError());
HeapFree(GetProcessHeap(), 0, sd);
free(sd);
ret = CryptReleaseContext(prov, 0);
ok(ret, "got %lu\n", GetLastError());

View file

@ -445,14 +445,14 @@ static void test_read(void)
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD));
buf = malloc(sizeof(EVENTLOGRECORD));
SetLastError(0xdeadbeef);
ret = ReadEventLogA(NULL, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_HANDLE, "Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
HeapFree(GetProcessHeap(), 0, buf);
free(buf);
handle = OpenEventLogA(NULL, "Application");
if (!handle && (GetLastError() == ERROR_ACCESS_DENIED || GetLastError() == RPC_S_SERVER_UNAVAILABLE))
@ -463,7 +463,7 @@ static void test_read(void)
ok(handle != NULL, "OpenEventLogA(Application) failed : %ld\n", GetLastError());
/* Show that we need the proper dwFlags with a (for the rest) proper call */
buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD));
buf = malloc(sizeof(EVENTLOGRECORD));
SetLastError(0xdeadbeef);
ret = ReadEventLogA(handle, 0, 0, buf, sizeof(EVENTLOGRECORD), &read, &needed);
@ -504,7 +504,7 @@ static void test_read(void)
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
HeapFree(GetProcessHeap(), 0, buf);
free(buf);
/* First check if there are any records (in practice only on Wine: FIXME) */
count = 0;
@ -517,7 +517,7 @@ static void test_read(void)
}
/* Get the buffer size for the first record */
buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD));
buf = malloc(sizeof(EVENTLOGRECORD));
read = needed = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
@ -529,7 +529,7 @@ static void test_read(void)
/* Read the first record */
toread = needed;
buf = HeapReAlloc(GetProcessHeap(), 0, buf, toread);
buf = realloc(buf, toread);
read = needed = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, buf, toread, &read, &needed);
@ -538,7 +538,7 @@ static void test_read(void)
broken(read < toread), /* NT4 wants a buffer size way bigger than just 1 record */
"Expected the requested size to be read\n");
ok(needed == 0, "Expected no extra bytes to be read\n");
HeapFree(GetProcessHeap(), 0, buf);
free(buf);
CloseEventLog(handle);
}
@ -785,7 +785,7 @@ static void test_readwrite(void)
if (pCreateWellKnownSid)
{
sidsize = SECURITY_MAX_SID_SIZE;
user = HeapAlloc(GetProcessHeap(), 0, sidsize);
user = malloc(sidsize);
SetLastError(0xdeadbeef);
pCreateWellKnownSid(WinInteractiveSid, NULL, user, &sidsize);
sidavailable = TRUE;
@ -846,12 +846,12 @@ static void test_readwrite(void)
ok(ret, "Expected success : %ld\n", GetLastError());
/* Needed to catch earlier Vista (with no ServicePack for example) */
buf = HeapAlloc(GetProcessHeap(), 0, sizeof(EVENTLOGRECORD));
buf = malloc(sizeof(EVENTLOGRECORD));
if (!(ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
0, buf, sizeof(EVENTLOGRECORD), &read, &needed)) &&
GetLastError() == ERROR_INSUFFICIENT_BUFFER)
{
buf = HeapReAlloc(GetProcessHeap(), 0, buf, needed);
buf = realloc(buf, needed);
ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
0, buf, needed, &read, &needed);
}
@ -865,7 +865,7 @@ static void test_readwrite(void)
if (record->EventType == EVENTLOG_SUCCESS)
on_vista = TRUE;
}
HeapFree(GetProcessHeap(), 0, buf);
free(buf);
}
/* This will clear the eventlog. The record numbering for new
@ -949,13 +949,13 @@ static void test_readwrite(void)
size = 0;
SetLastError(0xdeadbeef);
pGetComputerNameExA(ComputerNameDnsFullyQualified, NULL, &size);
localcomputer = HeapAlloc(GetProcessHeap(), 0, size);
localcomputer = malloc(size);
pGetComputerNameExA(ComputerNameDnsFullyQualified, localcomputer, &size);
}
else
{
size = MAX_COMPUTERNAME_LENGTH + 1;
localcomputer = HeapAlloc(GetProcessHeap(), 0, size);
localcomputer = malloc(size);
GetComputerNameA(localcomputer, &size);
}
@ -964,7 +964,7 @@ static void test_readwrite(void)
ok(handle != NULL, "OpenEventLogA(%s) failed : %ld\n", eventlogname, GetLastError());
i = 0;
size = sizeof(EVENTLOGRECORD) + 128;
buf = HeapAlloc(GetProcessHeap(), 0, size);
buf = malloc(size);
for (;;)
{
DWORD read, needed;
@ -989,9 +989,9 @@ static void test_readwrite(void)
if (needed > size)
{
HeapFree(GetProcessHeap(), 0, buf);
free(buf);
size = needed;
buf = HeapAlloc(GetProcessHeap(), 0, size);
buf = malloc(size);
}
ret = ReadEventLogA(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ,
0, buf, needed, &read, &needed);
@ -1069,7 +1069,7 @@ static void test_readwrite(void)
winetest_pop_context();
i++;
}
HeapFree(GetProcessHeap(), 0, buf);
free(buf);
CloseEventLog(handle);
/* Test clearing a real eventlog */
@ -1088,8 +1088,8 @@ static void test_readwrite(void)
CloseEventLog(handle);
cleanup:
HeapFree(GetProcessHeap(), 0, localcomputer);
HeapFree(GetProcessHeap(), 0, user);
free(localcomputer);
free(user);
}
/* Before Vista:
@ -1240,7 +1240,7 @@ static void test_start_trace(void)
LONG ret;
buffersize = sizeof(EVENT_TRACE_PROPERTIES) + sizeof(sessionname) + sizeof(filepath);
properties = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, buffersize);
properties = calloc(1, buffersize);
properties->Wnode.BufferSize = buffersize;
properties->Wnode.Flags = WNODE_FLAG_TRACED_GUID;
properties->LogFileMode = EVENT_TRACE_FILE_MODE_NONE;
@ -1317,25 +1317,27 @@ static void test_start_trace(void)
/* clean up */
ControlTraceA(handle, sessionname, properties, EVENT_TRACE_CONTROL_STOP);
done:
HeapFree(GetProcessHeap(), 0, properties);
free(properties);
DeleteFileA(filepath);
}
static BOOL read_record(HANDLE handle, DWORD flags, DWORD offset, EVENTLOGRECORD **record, DWORD *size)
{
DWORD read;
DWORD read, needed;
BOOL ret;
SetLastError(0xdeadbeef);
memset(*record, 0, *size);
if (!(ret = ReadEventLogW(handle, flags, offset, *record, *size, &read, size)) &&
needed = 0;
if (!(ret = ReadEventLogW(handle, flags, offset, *record, *size, &read, &needed)) &&
GetLastError() == ERROR_INSUFFICIENT_BUFFER)
{
free(*record);
*record = malloc(*size);
*record = malloc(needed);
SetLastError(0xdeadbeef);
memset(*record, 0, *size);
ret = ReadEventLogW(handle, flags, offset, *record, *size, &read, size);
memset(*record, 0, needed);
*size = needed;
ret = ReadEventLogW(handle, flags, offset, *record, *size, &read, &needed);
}
return ret;
@ -1345,8 +1347,8 @@ static void test_eventlog_start(void)
{
BOOL ret, found;
HANDLE handle, handle2;
EVENTLOGRECORD *record;
DWORD size, count, read, needed;
EVENTLOGRECORD *record, *record2;
DWORD size, size2, count, count2, read, needed;
WCHAR *sourcename, *computername, *localcomputer;
char *sourcenameA, *computernameA, *localcomputerA;
@ -1545,6 +1547,14 @@ static void test_eventlog_start(void)
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
count = 0xdeadbeef;
ret = GetNumberOfEventLogRecords(handle, &count);
ok(ret, "Expected success : %ld\n", GetLastError());
ret = read_record(handle, EVENTLOG_SEEK_READ | EVENTLOG_FORWARDS_READ, count + 1, &record, &size);
ok(!ret, "Expected failure\n");
todo_wine
ok(GetLastError() == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %ld\n", GetLastError());
todo_wine {
ret = read_record(handle, EVENTLOG_SEEK_READ | EVENTLOG_FORWARDS_READ, 2, &record, &size);
ok(ret, "Expected success : %ld\n", GetLastError());
@ -1560,7 +1570,8 @@ static void test_eventlog_start(void)
/* change how */
ret = read_record(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 100, &record, &size);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(record->RecordNumber == 4, "Expected 4, got %lu\n", record->RecordNumber);
ok(record->RecordNumber == 4 || broken(record->RecordNumber == 5) /* some win10 22h2 */,
"Expected 4, got %lu\n", record->RecordNumber);
/* change direction */
ret = read_record(handle, EVENTLOG_SEEK_READ | EVENTLOG_BACKWARDS_READ, 10, &record, &size);
ok(ret, "Expected success : %ld\n", GetLastError());
@ -1591,7 +1602,8 @@ static void test_eventlog_start(void)
/* change how */
ret = read_record(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_BACKWARDS_READ, 100, &record, &size);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(record->RecordNumber == 3, "Expected 3, got %lu\n", record->RecordNumber);
ok(record->RecordNumber == 3 || broken(record->RecordNumber == 2) /* some win10 22h2 */,
"Expected 3, got %lu\n", record->RecordNumber);
/* change direction */
ret = read_record(handle, EVENTLOG_SEEK_READ | EVENTLOG_FORWARDS_READ, 10, &record, &size);
ok(ret, "Expected success : %ld\n", GetLastError());
@ -1599,6 +1611,44 @@ static void test_eventlog_start(void)
}
CloseEventLog(handle);
/* reading same log with different handles */
handle = OpenEventLogW(0, L"System");
handle2 = OpenEventLogW(0, L"SYSTEM");
todo_wine {
ret = read_record(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, &record, &size);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(record->RecordNumber == 1, "Expected 1, got %lu\n", record->RecordNumber);
ret = read_record(handle2, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, &record, &size);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(record->RecordNumber == 1, "Expected 1, got %lu\n", record->RecordNumber);
}
CloseEventLog(handle2);
CloseEventLog(handle);
/* using source name */
size2 = size;
record2 = malloc(size2);
handle = OpenEventLogW(0, L"System");
handle2 = OpenEventLogW(0, L"EventLog");
todo_wine {
ret = read_record(handle, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, &record, &size);
ok(ret, "Expected success : %ld\n", GetLastError());
ret = read_record(handle2, EVENTLOG_SEQUENTIAL_READ | EVENTLOG_FORWARDS_READ, 0, &record2, &size2);
ok(ret, "Expected success : %ld\n", GetLastError());
}
ok(size == size2, "Expected %lu, got %lu\n", size, size2);
ok(!memcmp(record, record2, min(size, size2)), "Records miscompare\n");
count = 0xdeadbeef;
count2 = 0xdeadbeef;
ret = GetNumberOfEventLogRecords(handle, &count);
ok(ret, "Expected success : %ld\n", GetLastError());
ret = GetNumberOfEventLogRecords(handle2, &count2);
ok(ret, "Expected success : %ld\n", GetLastError());
ok(count == count2, "Expected %lu, got %lu\n", count, count2);
CloseEventLog(handle2);
CloseEventLog(handle);
free(record2);
free(record);
}

View file

@ -243,15 +243,15 @@ static void test_LsaLookupNames2(void)
return;
}
name[0].Buffer = HeapAlloc(GetProcessHeap(), 0, sizeof(n1));
name[0].Buffer = malloc(sizeof(n1));
name[0].Length = name[0].MaximumLength = sizeof(n1);
memcpy(name[0].Buffer, n1, sizeof(n1));
name[1].Buffer = HeapAlloc(GetProcessHeap(), 0, sizeof(n1));
name[1].Buffer = malloc(sizeof(n1));
name[1].Length = name[1].MaximumLength = sizeof(n1) - sizeof(WCHAR);
memcpy(name[1].Buffer, n1, sizeof(n1) - sizeof(WCHAR));
name[2].Buffer = HeapAlloc(GetProcessHeap(), 0, sizeof(n2));
name[2].Buffer = malloc(sizeof(n2));
name[2].Length = name[2].MaximumLength = sizeof(n2);
memcpy(name[2].Buffer, n2, sizeof(n2));
@ -307,9 +307,9 @@ static void test_LsaLookupNames2(void)
LsaFreeMemory(sids);
LsaFreeMemory(domains);
HeapFree(GetProcessHeap(), 0, name[0].Buffer);
HeapFree(GetProcessHeap(), 0, name[1].Buffer);
HeapFree(GetProcessHeap(), 0, name[2].Buffer);
free(name[0].Buffer);
free(name[1].Buffer);
free(name[2].Buffer);
status = LsaClose(handle);
ok(status == STATUS_SUCCESS, "LsaClose() failed, returned 0x%08lx\n", status);

View file

@ -64,6 +64,17 @@ static DWORD (WINAPI *pEnumDynamicTimeZoneInformation)(const DWORD,
static BOOL limited_user;
static const BOOL is_64bit = sizeof(void *) > sizeof(int);
static BOOL has_wow64(void)
{
if (!is_64bit)
{
BOOL is_wow64;
if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 ) || !is_wow64)
return FALSE;
}
return TRUE;
}
static const char *dbgstr_SYSTEMTIME(const SYSTEMTIME *st)
{
return wine_dbg_sprintf("%02d-%02d-%04d %02d:%02d:%02d.%03d",
@ -184,7 +195,7 @@ static void _test_hkey_main_Value_A(int line, LPCSTR name, LPCSTR string,
lok(type == REG_SZ, "RegQueryValueExA/1 returned type %ld\n", type);
lok(cbData == full_byte_len, "cbData=%ld instead of %ld or %ld\n", cbData, full_byte_len, str_byte_len);
value = HeapAlloc(GetProcessHeap(), 0, cbData+1);
value = malloc(cbData+1);
memset(value, 0xbd, cbData+1);
type=0xdeadbeef;
ret = RegQueryValueExA(hkey_main, name, NULL, &type, value, &cbData);
@ -202,7 +213,7 @@ static void _test_hkey_main_Value_A(int line, LPCSTR name, LPCSTR string,
debugstr_an(string, full_byte_len), full_byte_len);
lok(*(value+cbData) == 0xbd, "RegQueryValueExA/2 overflowed at offset %lu: %02x != bd\n", cbData, *(value+cbData));
}
HeapFree(GetProcessHeap(), 0, value);
free(value);
}
#define test_hkey_main_Value_W(name, string, full_byte_len) _test_hkey_main_Value_W(__LINE__, name, string, full_byte_len)
@ -232,7 +243,7 @@ static void _test_hkey_main_Value_W(int line, LPCWSTR name, LPCWSTR string,
"cbData=%ld instead of %ld\n", cbData, full_byte_len);
/* Give enough space to overflow by one WCHAR */
value = HeapAlloc(GetProcessHeap(), 0, cbData+2);
value = malloc(cbData+2);
memset(value, 0xbd, cbData+2);
type=0xdeadbeef;
ret = RegQueryValueExW(hkey_main, name, NULL, &type, value, &cbData);
@ -247,7 +258,7 @@ static void _test_hkey_main_Value_W(int line, LPCWSTR name, LPCWSTR string,
/* This implies that when cbData == 0, RegQueryValueExW() should not modify the buffer */
lok(*(value+cbData) == 0xbd, "RegQueryValueExW/2 overflowed at %lu: %02x != bd\n", cbData, *(value+cbData));
lok(*(value+cbData+1) == 0xbd, "RegQueryValueExW/2 overflowed at %lu+1: %02x != bd\n", cbData, *(value+cbData+1));
HeapFree(GetProcessHeap(), 0, value);
free(value);
}
static void test_set_value(void)
@ -1207,7 +1218,7 @@ static void test_reg_open_key(void)
ok(ret == ERROR_SUCCESS,
"Expected SetEntriesInAclA to return ERROR_SUCCESS, got %lu, last error %lu\n", ret, GetLastError());
sd = HeapAlloc(GetProcessHeap(), 0, SECURITY_DESCRIPTOR_MIN_LENGTH);
sd = malloc(SECURITY_DESCRIPTOR_MIN_LENGTH);
bRet = InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION);
ok(bRet == TRUE,
"Expected InitializeSecurityDescriptor to return TRUE, got %d, last error %lu\n", bRet, GetLastError());
@ -1245,7 +1256,7 @@ static void test_reg_open_key(void)
RegCloseKey(hkResult);
}
HeapFree(GetProcessHeap(), 0, sd);
free(sd);
LocalFree(key_acl);
FreeSid(world_sid);
RegDeleteKeyA(hkRoot64, "");
@ -1268,6 +1279,19 @@ static void test_reg_create_key(void)
PACL key_acl;
SECURITY_DESCRIPTOR *sd;
/* NULL return key check */
ret = RegCreateKeyA(hkey_main, "Subkey1", NULL);
ok(ret == ERROR_INVALID_PARAMETER, "Got unexpected ret %ld.\n", ret);
ret = RegCreateKeyW(hkey_main, L"Subkey1", NULL);
ok(ret == ERROR_INVALID_PARAMETER, "Got unexpected ret %ld.\n", ret);
ret = RegCreateKeyExA(hkey_main, "Subkey1", 0, NULL, 0, KEY_NOTIFY, NULL, NULL, NULL);
ok(ret == ERROR_BADKEY, "Got unexpected ret %ld.\n", ret);
ret = RegCreateKeyExW(hkey_main, L"Subkey1", 0, NULL, 0, KEY_NOTIFY, NULL, NULL, NULL);
ok(ret == ERROR_BADKEY, "Got unexpected ret %ld.\n", ret);
ret = RegCreateKeyExA(hkey_main, "Subkey1", 0, NULL, 0, KEY_NOTIFY, NULL, &hkey1, NULL);
ok(!ret, "RegCreateKeyExA failed with error %ld\n", ret);
/* should succeed: all versions of Windows ignore the access rights
@ -1327,9 +1351,9 @@ static void test_reg_create_key(void)
* the registry access check is performed correctly. Redirection isn't
* being tested, so the tests don't care about whether the process is
* running under WOW64. */
if (!pIsWow64Process)
if (!has_wow64())
{
win_skip("WOW64 flags are not recognized\n");
skip("WOW64 flags are not recognized\n");
return;
}
@ -1369,7 +1393,7 @@ static void test_reg_create_key(void)
ok(dwRet == ERROR_SUCCESS,
"Expected SetEntriesInAclA to return ERROR_SUCCESS, got %lu, last error %lu\n", dwRet, GetLastError());
sd = HeapAlloc(GetProcessHeap(), 0, SECURITY_DESCRIPTOR_MIN_LENGTH);
sd = malloc(SECURITY_DESCRIPTOR_MIN_LENGTH);
bRet = InitializeSecurityDescriptor(sd, SECURITY_DESCRIPTOR_REVISION);
ok(bRet == TRUE,
"Expected InitializeSecurityDescriptor to return TRUE, got %d, last error %lu\n", bRet, GetLastError());
@ -1407,7 +1431,7 @@ static void test_reg_create_key(void)
RegCloseKey(hkey1);
}
HeapFree(GetProcessHeap(), 0, sd);
free(sd);
LocalFree(key_acl);
FreeSid(world_sid);
RegDeleteKeyA(hkRoot64, "");
@ -1518,62 +1542,68 @@ static BOOL set_privileges(LPCSTR privilege, BOOL set)
return TRUE;
}
static void test_reg_save_key(void)
static void delete_dir(const char *path)
{
DWORD ret;
char file[2 * MAX_PATH], *p;
WIN32_FIND_DATAA fd;
HANDLE hfind;
BOOL r;
if (!set_privileges(SE_BACKUP_NAME, TRUE) ||
!set_privileges(SE_RESTORE_NAME, FALSE))
strcpy(file, path);
p = file + strlen(file);
p[0] = '\\';
p[1] = '*';
p[2] = 0;
hfind = FindFirstFileA(file, &fd);
if (hfind != INVALID_HANDLE_VALUE)
{
win_skip("Failed to set SE_BACKUP_NAME privileges, skipping tests\n");
return;
do
{
if (!strcmp(fd.cFileName, ".") || !strcmp(fd.cFileName, ".."))
continue;
strcpy(p + 1, fd.cFileName);
r = DeleteFileA(file);
ok(r, "DeleteFile failed on %s: %ld\n", debugstr_a(file), GetLastError());
} while(FindNextFileA(hfind, &fd));
FindClose(hfind);
}
ret = RegSaveKeyA(hkey_main, "saved_key", NULL);
ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
set_privileges(SE_BACKUP_NAME, FALSE);
r = RemoveDirectoryA(path);
ok(r, "RemoveDirectory failed: %ld\n", GetLastError());
}
static void test_reg_load_key(void)
{
DWORD ret;
HKEY hkHandle;
if (!set_privileges(SE_RESTORE_NAME, TRUE) ||
!set_privileges(SE_BACKUP_NAME, FALSE))
{
win_skip("Failed to set SE_RESTORE_NAME privileges, skipping tests\n");
return;
}
ret = RegLoadKeyA(HKEY_LOCAL_MACHINE, "Test", "saved_key");
ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
set_privileges(SE_RESTORE_NAME, FALSE);
ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Test", &hkHandle);
ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
RegCloseKey(hkHandle);
}
static void test_reg_unload_key(void)
{
char saved_key[2 * MAX_PATH], buf[16], *p;
UNICODE_STRING key_name;
OBJECT_ATTRIBUTES attr;
NTSTATUS status;
DWORD ret;
DWORD ret, size;
HKEY key;
if (!set_privileges(SE_RESTORE_NAME, TRUE) ||
!set_privileges(SE_BACKUP_NAME, FALSE))
!set_privileges(SE_BACKUP_NAME, TRUE))
{
win_skip("Failed to set SE_RESTORE_NAME privileges, skipping tests\n");
return;
}
ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Test", 0, KEY_READ, &key);
GetTempPathA(MAX_PATH, saved_key);
strcat(saved_key, "\\wine_reg_test");
CreateDirectoryA(saved_key, NULL);
strcat(saved_key, "\\saved_key");
ret = RegSaveKeyA(hkey_main, saved_key, NULL);
ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegLoadKeyA(HKEY_LOCAL_MACHINE, "Test", saved_key);
ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Test", &key);
ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
ret = RegSetValueExA(key, "test", 0, REG_SZ, (BYTE *)"value", 6);
ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
/* try to unload though the key handle is live */
@ -1587,10 +1617,41 @@ static void test_reg_unload_key(void)
ret = RegUnLoadKeyA(HKEY_LOCAL_MACHINE, "Test");
ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
set_privileges(SE_RESTORE_NAME, FALSE);
/* check if modifications are saved */
ret = RegLoadKeyA(HKEY_LOCAL_MACHINE, "Test", saved_key);
ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
DeleteFileA("saved_key");
DeleteFileA("saved_key.LOG");
ret = RegOpenKeyA(HKEY_LOCAL_MACHINE, "Test", &key);
ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
size = sizeof(buf);
ret = RegGetValueA(key, NULL, "test", RRF_RT_REG_SZ, NULL, buf, &size);
todo_wine ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
if (ret == ERROR_SUCCESS)
{
ok(size == 6, "size = %ld\n", size);
ok(!strcmp(buf, "value"), "buf = %s\n", buf);
}
RegCloseKey(key);
ret = RegUnLoadKeyA(HKEY_LOCAL_MACHINE, "Test");
ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
pRtlInitUnicodeString(&key_name, L"\\REGISTRY\\User\\.Default");
InitializeObjectAttributes(&attr, &key_name, OBJ_CASE_INSENSITIVE, NULL, NULL);
status = pNtUnloadKey(&attr);
ok(status == STATUS_ACCESS_DENIED, "expected STATUS_ACCESS_DENIED, got %08lx\n", status);
ret = RegUnLoadKeyA(HKEY_USERS, ".Default");
ok(ret == ERROR_ACCESS_DENIED, "expected ERROR_ACCESS_DENIED, got %ld\n", ret);
set_privileges(SE_RESTORE_NAME, FALSE);
set_privileges(SE_BACKUP_NAME, FALSE);
p = strrchr(saved_key, '\\');
*p = 0;
delete_dir(saved_key);
}
/* Helper function to wait for a file blocked by the registry to be available */
@ -1612,31 +1673,26 @@ static void wait_file_available(char *path)
static void test_reg_load_app_key(void)
{
DWORD ret, size;
char temppath[MAX_PATH], hivefilepath[MAX_PATH];
char hivefilepath[2 * MAX_PATH], *p;
const BYTE test_data[] = "Hello World";
BYTE output[sizeof(test_data)];
HKEY appkey = NULL;
GetTempPathA(sizeof(temppath), temppath);
GetTempFileNameA(temppath, "key", 0, hivefilepath);
DeleteFileA(hivefilepath);
if (!set_privileges(SE_BACKUP_NAME, TRUE) ||
!set_privileges(SE_RESTORE_NAME, FALSE))
if (!set_privileges(SE_BACKUP_NAME, TRUE))
{
win_skip("Failed to set SE_BACKUP_NAME privileges, skipping tests\n");
return;
}
GetTempPathA(MAX_PATH, hivefilepath);
strcat(hivefilepath, "\\wine_reg_test");
CreateDirectoryA(hivefilepath, NULL);
strcat(hivefilepath, "\\saved_key");
ret = RegSaveKeyA(hkey_main, hivefilepath, NULL);
if (ret != ERROR_SUCCESS)
{
win_skip("Failed to save test key 0x%lx\n", ret);
return;
}
ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %ld\n", ret);
set_privileges(SE_BACKUP_NAME, FALSE);
set_privileges(SE_RESTORE_NAME, FALSE);
/* Test simple key load */
/* Check if the changes are saved */
@ -1665,8 +1721,10 @@ static void test_reg_load_app_key(void)
RegCloseKey(appkey);
wait_file_available(hivefilepath);
ret = DeleteFileA(hivefilepath);
ok(ret, "couldn't delete hive file %ld\n", GetLastError());
p = strrchr(hivefilepath, '\\');
*p = 0;
delete_dir(hivefilepath);
}
/* tests that show that RegConnectRegistry and
@ -2406,7 +2464,7 @@ static void test_symlinks(void)
pRtlFormatCurrentUserKeyPath( &target_str );
target_len = target_str.Length + sizeof(targetW);
target = HeapAlloc( GetProcessHeap(), 0, target_len );
target = malloc( target_len );
memcpy( target, target_str.Buffer, target_str.Length );
memcpy( target + target_str.Length/sizeof(WCHAR), targetW, sizeof(targetW) );
@ -2511,7 +2569,7 @@ static void test_symlinks(void)
ok( !status, "NtDeleteKey failed: 0x%08lx\n", status );
RegCloseKey( link );
HeapFree( GetProcessHeap(), 0, target );
free( target );
pRtlFreeUnicodeString( &target_str );
}
@ -2575,14 +2633,10 @@ static void test_redirection(void)
HKEY key, key32, key64, root, root32, root64;
DWORD subkeys, subkeys32, subkeys64;
if (ptr_size != 64)
if (!has_wow64())
{
BOOL is_wow64;
if (!pIsWow64Process || !pIsWow64Process( GetCurrentProcess(), &is_wow64 ) || !is_wow64)
{
skip( "Not on Wow64, no redirection\n" );
return;
}
skip( "Not on Wow64, no redirection\n" );
return;
}
if (limited_user)
@ -2763,6 +2817,28 @@ static void test_redirection(void)
RegCloseKey( root32 );
RegCloseKey( root64 );
err = RegCreateKeyExW( HKEY_LOCAL_MACHINE, L"Software\\WOW6432Node\\test1\\test2", 0, NULL, 0,
KEY_WRITE | KEY_WOW64_32KEY, NULL, &key, NULL );
ok(!err, "got %#lx.\n", err);
RegCloseKey(key);
err = RegCreateKeyExW( HKEY_LOCAL_MACHINE, L"Software\\test1\\test2", 0, NULL, 0, KEY_WRITE | KEY_WOW64_32KEY,
NULL, &key, NULL );
ok(!err, "got %#lx.\n", err);
RegCloseKey(key);
err = RegOpenKeyExW( HKEY_LOCAL_MACHINE, L"Software\\test1\\test2", 0, KEY_WRITE | KEY_WOW64_32KEY, &key );
ok(!err, "got %#lx.\n", err);
RegCloseKey(key);
if (pRegDeleteTreeA)
{
err = pRegDeleteTreeA(HKEY_LOCAL_MACHINE, "Software\\WOW6432Node\\test1");
ok(!err, "got %#lx.\n", err);
err = pRegDeleteTreeA(HKEY_LOCAL_MACHINE, "Software\\test1");
ok(err == ERROR_FILE_NOT_FOUND, "got %#lx.\n", err);
}
/* Software\Classes is shared/reflected so behavior is different */
err = RegCreateKeyExA( HKEY_LOCAL_MACHINE, "Software\\Classes\\Wine",
@ -4936,9 +5012,7 @@ START_TEST(registry)
test_classesroot();
test_classesroot_enum();
test_classesroot_mask();
test_reg_save_key();
test_reg_load_key();
test_reg_unload_key();
test_reg_load_app_key();
test_reg_copy_tree();
test_reg_delete_tree();

File diff suppressed because it is too large Load diff

View file

@ -1000,14 +1000,14 @@ static void test_query_svc(void)
}
/* Pass a correct buffer and buffersize but a NULL handle */
statusproc = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_STATUS_PROCESS));
statusproc = malloc(sizeof(SERVICE_STATUS_PROCESS));
bufsize = needed;
SetLastError(0xdeadbeef);
ret = pQueryServiceStatusEx(NULL, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, &needed);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INVALID_HANDLE,
"Expected ERROR_INVALID_HANDLE, got %ld\n", GetLastError());
HeapFree(GetProcessHeap(), 0, statusproc);
free(statusproc);
/* Correct handle and info level */
SetLastError(0xdeadbeef);
@ -1023,21 +1023,21 @@ static void test_query_svc(void)
}
/* All parameters are OK but we don't have enough rights */
statusproc = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_STATUS_PROCESS));
statusproc = malloc(sizeof(SERVICE_STATUS_PROCESS));
bufsize = sizeof(SERVICE_STATUS_PROCESS);
SetLastError(0xdeadbeef);
ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, &needed);
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_ACCESS_DENIED,
"Expected ERROR_ACCESS_DENIED, got %ld\n", GetLastError());
HeapFree(GetProcessHeap(), 0, statusproc);
free(statusproc);
/* Open the service with just enough rights. */
CloseServiceHandle(svc_handle);
svc_handle = OpenServiceA(scm_handle, spooler, SERVICE_QUERY_STATUS);
/* Everything should be fine now. */
statusproc = HeapAlloc(GetProcessHeap(), 0, sizeof(SERVICE_STATUS_PROCESS));
statusproc = malloc(sizeof(SERVICE_STATUS_PROCESS));
bufsize = sizeof(SERVICE_STATUS_PROCESS);
SetLastError(0xdeadbeef);
ret = pQueryServiceStatusEx(svc_handle, SC_STATUS_PROCESS_INFO, (BYTE*)statusproc, bufsize, &needed);
@ -1056,7 +1056,7 @@ static void test_query_svc(void)
ok(broken(GetLastError() == ERROR_INVALID_PARAMETER) /* NT4 */ ||
GetLastError() == ERROR_INVALID_ADDRESS, "got %ld\n", GetLastError());
HeapFree(GetProcessHeap(), 0, statusproc);
free(statusproc);
CloseServiceHandle(svc_handle);
CloseServiceHandle(scm_handle);
@ -1274,14 +1274,14 @@ static BOOL test_enum_svc(int attempt)
tempneeded = needed;
/* Allocate the correct needed bytes */
services = HeapAlloc(GetProcessHeap(), 0, needed);
services = malloc(needed);
bufsize = needed;
needed = 0xdeadbeef;
returned = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL,
services, bufsize, &needed, &returned, NULL);
HeapFree(GetProcessHeap(), 0, services);
free(services);
if (!ret && GetLastError() == ERROR_MORE_DATA && attempt)
goto retry; /* service start race condition */
ok(ret, "Expected success, got error %lu\n", GetLastError());
@ -1291,14 +1291,14 @@ static BOOL test_enum_svc(int attempt)
/* Store the number of returned services */
tempreturned = returned;
servicesA = HeapAlloc(GetProcessHeap(), 0, neededA);
servicesA = malloc(neededA);
bufsize = neededA;
neededA = 0xdeadbeef;
returnedA = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = EnumServicesStatusA(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL,
servicesA, bufsize, &neededA, &returnedA, NULL);
HeapFree(GetProcessHeap(), 0, servicesA);
free(servicesA);
if (!ret && GetLastError() == ERROR_MORE_DATA && attempt)
goto retry; /* service start race condition */
if (!ret && GetLastError() == ERROR_NOT_ENOUGH_MEMORY && GetACP() == CP_UTF8)
@ -1314,7 +1314,7 @@ static BOOL test_enum_svc(int attempt)
* More than one service will be missing because of the space needed for
* the strings.
*/
services = HeapAlloc(GetProcessHeap(), 0, tempneeded);
services = malloc(tempneeded);
bufsize = (tempreturned - 1) * sizeof(ENUM_SERVICE_STATUSW);
needed = 0xdeadbeef;
returned = 0xdeadbeef;
@ -1323,7 +1323,7 @@ static BOOL test_enum_svc(int attempt)
services, bufsize, &needed, &returned, NULL);
if (ret && needed == 0 && attempt)
{
HeapFree(GetProcessHeap(), 0, services);
free(services);
goto retry; /* service stop race condition */
}
ok(!ret, "Expected failure\n");
@ -1346,7 +1346,7 @@ static BOOL test_enum_svc(int attempt)
services, bufsize, &needed, &returned, &resume);
if (ret && needed == 0 && attempt)
{
HeapFree(GetProcessHeap(), 0, services);
free(services);
goto retry; /* service stop race condition */
}
ok(!ret, "Expected failure\n");
@ -1365,7 +1365,7 @@ static BOOL test_enum_svc(int attempt)
SetLastError(0xdeadbeef);
ret = EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL,
services, bufsize, &needed, &returned, &resume);
HeapFree(GetProcessHeap(), 0, services);
free(services);
if (!ret && GetLastError() == ERROR_MORE_DATA && attempt)
goto retry; /* service start race condition */
ok(ret, "Expected success, got error %lu\n", GetLastError());
@ -1390,10 +1390,10 @@ static BOOL test_enum_svc(int attempt)
/* Get the number of active win32 services */
EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_ACTIVE, NULL, 0,
&needed, &returned, NULL);
services = HeapAlloc(GetProcessHeap(), 0, needed);
services = malloc(needed);
ret = EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_ACTIVE,
services, needed, &needed, &returned, NULL);
HeapFree(GetProcessHeap(), 0, services);
free(services);
if (!ret && GetLastError() == ERROR_MORE_DATA && attempt)
goto retry; /* service start race condition */
@ -1402,10 +1402,10 @@ static BOOL test_enum_svc(int attempt)
/* Get the number of inactive win32 services */
EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_INACTIVE, NULL, 0,
&needed, &returned, NULL);
services = HeapAlloc(GetProcessHeap(), 0, needed);
services = malloc(needed);
ret = EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_INACTIVE,
services, needed, &needed, &returned, NULL);
HeapFree(GetProcessHeap(), 0, services);
free(services);
if (!ret && GetLastError() == ERROR_MORE_DATA && attempt)
goto retry; /* service start race condition */
@ -1414,10 +1414,10 @@ static BOOL test_enum_svc(int attempt)
/* Get the number of win32 services */
EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL, NULL, 0,
&needed, &returned, NULL);
services = HeapAlloc(GetProcessHeap(), 0, needed);
services = malloc(needed);
ret = EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL,
services, needed, &needed, &returned, NULL);
HeapFree(GetProcessHeap(), 0, services);
free(services);
if (!ret && GetLastError() == ERROR_MORE_DATA && attempt)
goto retry; /* service start race condition */
@ -1435,7 +1435,7 @@ static BOOL test_enum_svc(int attempt)
*/
EnumServicesStatusW(scm_handle, SERVICE_DRIVER | SERVICE_WIN32, SERVICE_STATE_ALL,
NULL, 0, &needed, &returned, NULL);
services = HeapAlloc(GetProcessHeap(), 0, needed);
services = malloc(needed);
ret = EnumServicesStatusW(scm_handle, SERVICE_DRIVER | SERVICE_WIN32, SERVICE_STATE_ALL,
services, needed, &needed, &returned, NULL);
if (!ret && GetLastError() == ERROR_MORE_DATA && attempt)
@ -1482,7 +1482,7 @@ static BOOL test_enum_svc(int attempt)
}
}
}
HeapFree(GetProcessHeap(), 0, services);
free(services);
if ((servicecountactive || servicecountinactive) && attempt)
goto retry; /* service start|stop race condition */
@ -1695,11 +1695,11 @@ static BOOL test_enum_svc_ex(int attempt)
/* Show the Ex call returns the same service count as the regular enum */
EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL,
NULL, 0, &needed, &returned, NULL);
services = HeapAlloc(GetProcessHeap(), 0, needed);
services = malloc(needed);
returned = 0xdeadbeef;
ret = EnumServicesStatusW(scm_handle, SERVICE_WIN32, SERVICE_STATE_ALL,
services, needed, &needed, &returned, NULL);
HeapFree(GetProcessHeap(), 0, services);
free(services);
if (!ret && GetLastError() == ERROR_MORE_DATA && attempt)
goto retry; /* service start race condition */
ok(ret, "Expected success, got error %lu\n", GetLastError());
@ -1710,14 +1710,14 @@ static BOOL test_enum_svc_ex(int attempt)
tempreturned = returned;
/* Allocate the correct needed bytes */
exservices = HeapAlloc(GetProcessHeap(), 0, tempneeded);
exservices = malloc(tempneeded);
bufsize = tempneeded;
needed = 0xdeadbeef;
returned = 0xdeadbeef;
SetLastError(0xdeadbeef);
ret = pEnumServicesStatusExW(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL,
(BYTE*)exservices, bufsize, &needed, &returned, NULL, NULL);
HeapFree(GetProcessHeap(), 0, exservices);
free(exservices);
if (!ret && GetLastError() == ERROR_MORE_DATA && attempt)
goto retry; /* service start race condition */
ok(ret, "Expected success, got error %lu\n", GetLastError());
@ -1731,7 +1731,7 @@ static BOOL test_enum_svc_ex(int attempt)
* More than one service will be missing because of the space needed for
* the strings.
*/
exservices = HeapAlloc(GetProcessHeap(), 0, tempneeded);
exservices = malloc(tempneeded);
bufsize = (tempreturned - 1) * sizeof(ENUM_SERVICE_STATUSW);
needed = 0xdeadbeef;
returned = 0xdeadbeef;
@ -1740,7 +1740,7 @@ static BOOL test_enum_svc_ex(int attempt)
(BYTE*)exservices, bufsize, &needed, &returned, NULL, NULL);
if (ret && needed == 0 && attempt)
{
HeapFree(GetProcessHeap(), 0, exservices);
free(exservices);
goto retry; /* service stop race condition */
}
ok(!ret, "Expected failure\n");
@ -1763,7 +1763,7 @@ static BOOL test_enum_svc_ex(int attempt)
(BYTE*)exservices, bufsize, &needed, &returned, &resume, NULL);
if (ret && needed == 0 && attempt)
{
HeapFree(GetProcessHeap(), 0, exservices);
free(exservices);
goto retry; /* service stop race condition */
}
ok(!ret, "Expected failure\n");
@ -1782,7 +1782,7 @@ static BOOL test_enum_svc_ex(int attempt)
SetLastError(0xdeadbeef);
ret = pEnumServicesStatusExW(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL,
(BYTE*)exservices, bufsize, &needed, &returned, &resume, NULL);
HeapFree(GetProcessHeap(), 0, exservices);
free(exservices);
if (!ret && GetLastError() == ERROR_MORE_DATA && attempt)
goto retry; /* service start race condition */
ok(ret, "Expected success, got error %lu\n", GetLastError());
@ -1795,10 +1795,10 @@ static BOOL test_enum_svc_ex(int attempt)
/* Get the number of active win32 services */
pEnumServicesStatusExW(scm_handle, 0, SERVICE_WIN32, SERVICE_ACTIVE,
NULL, 0, &needed, &returned, NULL, NULL);
exservices = HeapAlloc(GetProcessHeap(), 0, needed);
exservices = malloc(needed);
ret = pEnumServicesStatusExW(scm_handle, 0, SERVICE_WIN32, SERVICE_ACTIVE,
(BYTE*)exservices, needed, &needed, &returned, NULL, NULL);
HeapFree(GetProcessHeap(), 0, exservices);
free(exservices);
if (!ret && GetLastError() == ERROR_MORE_DATA && attempt)
goto retry; /* service start race condition */
@ -1807,10 +1807,10 @@ static BOOL test_enum_svc_ex(int attempt)
/* Get the number of inactive win32 services */
pEnumServicesStatusExW(scm_handle, 0, SERVICE_WIN32, SERVICE_INACTIVE,
NULL, 0, &needed, &returned, NULL, NULL);
exservices = HeapAlloc(GetProcessHeap(), 0, needed);
exservices = malloc(needed);
ret = pEnumServicesStatusExW(scm_handle, 0, SERVICE_WIN32, SERVICE_INACTIVE,
(BYTE*)exservices, needed, &needed, &returned, NULL, NULL);
HeapFree(GetProcessHeap(), 0, exservices);
free(exservices);
if (!ret && GetLastError() == ERROR_MORE_DATA && attempt)
goto retry; /* service start race condition */
@ -1819,10 +1819,10 @@ static BOOL test_enum_svc_ex(int attempt)
/* Get the number of win32 services */
pEnumServicesStatusExW(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL,
NULL, 0, &needed, &returned, NULL, NULL);
exservices = HeapAlloc(GetProcessHeap(), 0, needed);
exservices = malloc(needed);
ret = pEnumServicesStatusExW(scm_handle, 0, SERVICE_WIN32, SERVICE_STATE_ALL,
(BYTE*)exservices, needed, &needed, &returned, NULL, NULL);
HeapFree(GetProcessHeap(), 0, exservices);
free(exservices);
if (!ret && GetLastError() == ERROR_MORE_DATA && attempt)
goto retry; /* service start race condition */
@ -1837,7 +1837,7 @@ static BOOL test_enum_svc_ex(int attempt)
ret = pEnumServicesStatusExW(scm_handle, 0, SERVICE_WIN32 | SERVICE_DRIVER,
SERVICE_STATE_ALL, NULL, 0, &needed, &returned, NULL, NULL);
ok(!ret, "Expected failure\n");
exservices = HeapAlloc(GetProcessHeap(), 0, needed);
exservices = malloc(needed);
ret = pEnumServicesStatusExW(scm_handle, 0, SERVICE_WIN32 | SERVICE_DRIVER,
SERVICE_STATE_ALL, (BYTE*)exservices, needed, &needed, &returned, NULL, NULL);
if (!ret && GetLastError() == ERROR_MORE_DATA && attempt)
@ -1908,7 +1908,7 @@ static BOOL test_enum_svc_ex(int attempt)
}
}
}
HeapFree(GetProcessHeap(), 0, exservices);
free(exservices);
if ((servicecountactive || servicecountinactive) && attempt)
goto retry; /* service start|stop race condition */
@ -2154,7 +2154,7 @@ static void test_sequence(void)
ok(!ret, "Expected failure\n");
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "Expected ERROR_INSUFFICIENT_BUFFER, got %ld\n", GetLastError());
config = HeapAlloc(GetProcessHeap(), 0, needed);
config = malloc(needed);
given = needed;
SetLastError(0xdeadbeef);
ret = QueryServiceConfigA(svc_handle, config, given, &needed);
@ -2182,7 +2182,7 @@ static void test_sequence(void)
ok(ret, "ChangeServiceConfig failed (err=%ld)\n", GetLastError());
QueryServiceConfigA(svc_handle, NULL, 0, &needed);
config = HeapReAlloc(GetProcessHeap(), 0, config, needed);
config = realloc(config, needed);
ok(QueryServiceConfigA(svc_handle, config, needed, &needed), "QueryServiceConfig failed\n");
ok(config->lpBinaryPathName && config->lpLoadOrderGroup && config->lpDependencies && config->lpServiceStartName &&
config->lpDisplayName, "Expected all string struct members to be non-NULL\n");
@ -2201,7 +2201,7 @@ static void test_sequence(void)
ok(ret, "Expected success, got error %lu\n", GetLastError());
CloseServiceHandle(svc_handle);
CloseServiceHandle(scm_handle);
HeapFree(GetProcessHeap(), 0, config);
free(config);
}
static void test_queryconfig2(void)
@ -2890,7 +2890,7 @@ static void test_EventLog(void)
ok(!ret, "QueryServiceConfig should fail\n");
ok(GetLastError() == ERROR_INSUFFICIENT_BUFFER, "got %lu\n", GetLastError());
config = HeapAlloc(GetProcessHeap(), 0, size);
config = malloc(size);
ret = QueryServiceConfigA(svc_handle, config, size, &size);
ok(ret, "QueryServiceConfig error %lu\n", GetLastError());
@ -2912,7 +2912,7 @@ static void test_EventLog(void)
!strcmp(config->lpDisplayName, "Event Log") /* XP */ ||
!strcmp(config->lpDisplayName, "Windows Event Log") /* Vista+ */, "got %s\n", config->lpDisplayName);
HeapFree(GetProcessHeap(), 0, config);
free(config);
memset(&status, 0, sizeof(status));
size = sizeof(status);

View file

@ -254,6 +254,8 @@ static ULONG WINAPI filter_Release(IMediaStreamFilter *iface)
free(filter->streams);
if (filter->clock)
IReferenceClock_Release(filter->clock);
if (filter->cs.DebugInfo)
filter->cs.DebugInfo->Spare[0] = 0;
DeleteCriticalSection(&filter->cs);
free(filter);
}
@ -1100,7 +1102,7 @@ HRESULT filter_create(IUnknown *outer, void **out)
object->refcount = 1;
list_init(&object->free_events);
list_init(&object->used_events);
InitializeCriticalSection(&object->cs);
InitializeCriticalSectionEx(&object->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
object->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": MediaStreamFilter.cs");
TRACE("Created media stream filter %p.\n", object);

View file

@ -56,10 +56,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(appwizcpl);
#define GECKO_SHA "???"
#endif
#define MONO_VERSION "8.1.0"
#define MONO_VERSION "9.0.0"
#if defined(__i386__) || defined(__x86_64__)
#define MONO_ARCH "x86"
#define MONO_SHA "0ed3ec533aef79b2f312155931cf7b1080009ac0c5b4c2bcfeb678ac948e0810"
#define MONO_SHA "79f6c43100675566c112f4199b9ea7b944d338164b34bd91fa11b0b0a414e1c4"
#else
#define MONO_ARCH ""
#define MONO_SHA "???"
@ -108,8 +108,7 @@ static LPWSTR url = NULL;
static IBinding *dwl_binding;
static WCHAR *msi_file;
extern const char * CDECL wine_get_version(void);
static const char * (CDECL *p_wine_get_version)(void);
static WCHAR * (CDECL *p_wine_get_dos_file_name)(const char*);
static BOOL sha_check(const WCHAR *file_name)
@ -610,7 +609,7 @@ static void append_url_params( WCHAR *url )
len += MultiByteToWideChar(CP_ACP, 0, addon->version, -1, url+len, size/sizeof(WCHAR)-len)-1;
lstrcpyW(url+len, L"&winev=");
len += lstrlenW(L"&winev=");
MultiByteToWideChar(CP_ACP, 0, wine_get_version(), -1, url+len, size/sizeof(WCHAR)-len);
MultiByteToWideChar(CP_ACP, 0, p_wine_get_version() ? p_wine_get_version() : 0, -1, url+len, size/sizeof(WCHAR)-len);
}
static LPWSTR get_url(void)
@ -751,6 +750,7 @@ BOOL install_addon(addon_t addon_type)
addon = addons_info+addon_type;
p_wine_get_dos_file_name = (void *)GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "wine_get_dos_file_name");
p_wine_get_version = (void *)GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "wine_get_version");
/*
* Try to find addon .msi file in following order:

View file

@ -122,7 +122,7 @@ coclass WAVFile { interface IAVIFile; }
threading(both),
uuid(0002000d-0000-0000-c000-000000000046)
]
coclass PSFactoryBuffer { interface IFactoryBuffer; }
coclass PSFactoryBuffer { interface IPSFactoryBuffer; }
[
helpstring("ACM Compressed Audio Stream"),

View file

@ -254,6 +254,8 @@ static LPVOID WINAPI IGetFrame_fnGetFrame(IGetFrame *iface, LONG lPos)
} /* for (lNext < lPos) */
} /* if (This->lCurrentFrame != lPos) */
This->lCurrentFrame = lPos;
return (This->hic == NULL ? This->lpInFormat : This->lpOutFormat);
}

View file

@ -175,6 +175,7 @@ struct key_symmetric
};
#define KEY_FLAG_LEGACY_DSA_V2 0x00000001
#define KEY_FLAG_FINALIZED 0x00000002
struct key_asymmetric
{
@ -183,11 +184,12 @@ struct key_asymmetric
DSSSEED dss_seed;
};
#define PRIVATE_DATA_SIZE 3
struct key
{
struct object hdr;
enum alg_id alg_id;
UINT64 private[2]; /* private data for backend */
UINT64 private[PRIVATE_DATA_SIZE]; /* private data for backend */
union
{
struct key_symmetric s;
@ -239,19 +241,23 @@ struct key_asymmetric_decrypt_params
struct key *key;
UCHAR *input;
unsigned input_len;
void *padding;
UCHAR *output;
ULONG output_len;
ULONG *ret_len;
ULONG flags;
};
struct key_asymmetric_encrypt_params
{
struct key *key;
UCHAR *input;
unsigned input_len;
unsigned input_len;
void *padding;
UCHAR *output;
ULONG output_len;
ULONG output_len;
ULONG *ret_len;
ULONG flags;
};
struct key_asymmetric_duplicate_params
@ -283,8 +289,10 @@ struct key_asymmetric_verify_params
unsigned flags;
};
#define KEY_EXPORT_FLAG_PUBLIC 0x00000001
#define KEY_EXPORT_FLAG_RSA_FULL 0x00000002
#define KEY_EXPORT_FLAG_PUBLIC 0x00000001
#define KEY_EXPORT_FLAG_RSA_FULL 0x00000002
#define KEY_EXPORT_FLAG_DH_PARAMETERS 0x00000004
struct key_asymmetric_export_params
{
struct key *key;
@ -294,7 +302,9 @@ struct key_asymmetric_export_params
ULONG *ret_len;
};
#define KEY_IMPORT_FLAG_PUBLIC 0x00000001
#define KEY_IMPORT_FLAG_PUBLIC 0x00000001
#define KEY_IMPORT_FLAG_DH_PARAMETERS 0x00000002
struct key_asymmetric_import_params
{
struct key *key;

View file

@ -272,7 +272,7 @@ static struct object *get_object( BCRYPT_HANDLE handle, ULONG magic )
}
idx = (ULONG_PTR)handle >> 4;
if (idx > ARRAY_SIZE(pseudo_algorithms) || !pseudo_algorithms[idx].hdr.magic)
if (idx >= ARRAY_SIZE(pseudo_algorithms) || !pseudo_algorithms[idx].hdr.magic)
{
FIXME( "pseudo-handle %p not supported\n", handle );
return NULL;
@ -732,7 +732,7 @@ static NTSTATUS get_rsa_property( enum chain_mode mode, const WCHAR *prop, UCHAR
{
*ret_size = sizeof(ULONG);
if (size < sizeof(ULONG)) return STATUS_BUFFER_TOO_SMALL;
if (buf) *(ULONG *)buf = BCRYPT_SUPPORTED_PAD_PKCS1_SIG;
if (buf) *(ULONG *)buf = BCRYPT_SUPPORTED_PAD_PKCS1_SIG | BCRYPT_SUPPORTED_PAD_OAEP;
return STATUS_SUCCESS;
}
@ -887,6 +887,22 @@ static NTSTATUS set_key_property( struct key *key, const WCHAR *prop, UCHAR *val
key->u.a.bitlen = *(DWORD*)value;
return STATUS_SUCCESS;
}
else if (!wcscmp( prop, BCRYPT_DH_PARAMETERS ))
{
BCRYPT_DH_PARAMETER_HEADER *hdr = (BCRYPT_DH_PARAMETER_HEADER *)value;
struct key_asymmetric_import_params params;
if (key->u.a.flags & KEY_FLAG_FINALIZED) return STATUS_INVALID_HANDLE;
if (key->alg_id != ALG_ID_DH || size < sizeof(*hdr) || hdr->cbLength != size ||
hdr->dwMagic != BCRYPT_DH_PARAMETERS_MAGIC || hdr->cbKeyLength != key->u.a.bitlen / 8)
return STATUS_INVALID_PARAMETER;
params.key = key;
params.flags = KEY_IMPORT_FLAG_DH_PARAMETERS;
params.buf = value;
params.len = size;
return UNIX_CALL( key_asymmetric_import, &params );
}
FIXME( "unsupported key property %s\n", debugstr_w(prop) );
return STATUS_NOT_IMPLEMENTED;
@ -902,6 +918,21 @@ static NTSTATUS get_hash_property( const struct hash *hash, const WCHAR *prop, U
return status;
}
static NTSTATUS get_dh_property( const struct key *key, const WCHAR *prop, UCHAR *buf, ULONG size, ULONG *ret_size )
{
struct key_asymmetric_export_params params;
if (wcscmp( prop, BCRYPT_DH_PARAMETERS )) return STATUS_NOT_SUPPORTED;
if (!(key->u.a.flags & KEY_FLAG_FINALIZED)) return STATUS_INVALID_HANDLE;
params.key = (struct key *)key;
params.flags = KEY_EXPORT_FLAG_DH_PARAMETERS;
params.buf = buf;
params.len = size;
params.ret_len = ret_size;
return UNIX_CALL( key_asymmetric_export, &params );
}
static NTSTATUS get_key_property( const struct key *key, const WCHAR *prop, UCHAR *buf, ULONG size, ULONG *ret_size )
{
if (!wcscmp( prop, BCRYPT_KEY_STRENGTH ))
@ -925,6 +956,9 @@ static NTSTATUS get_key_property( const struct key *key, const WCHAR *prop, UCHA
if (!wcscmp( prop, BCRYPT_AUTH_TAG_LENGTH )) return STATUS_NOT_SUPPORTED;
return get_aes_property( key->u.s.mode, prop, buf, size, ret_size );
case ALG_ID_DH:
return get_dh_property( key, prop, buf, size, ret_size );
default:
FIXME( "unsupported algorithm %u\n", key->alg_id );
return STATUS_NOT_IMPLEMENTED;
@ -1176,6 +1210,8 @@ static NTSTATUS key_asymmetric_create( enum alg_id alg_id, ULONG bitlen, struct
return STATUS_NOT_IMPLEMENTED;
}
if (alg_id == ALG_ID_DH && bitlen < 512) return STATUS_INVALID_PARAMETER;
if (!(key = calloc( 1, sizeof(*key) ))) return STATUS_NO_MEMORY;
key->hdr.magic = MAGIC_KEY;
key->alg_id = alg_id;
@ -1703,9 +1739,6 @@ static NTSTATUS key_import_pair( struct algorithm *alg, const WCHAR *type, BCRYP
key_destroy( key );
return status;
}
*ret_key = key;
return STATUS_SUCCESS;
}
else if (!wcscmp( type, BCRYPT_ECCPRIVATE_BLOB ))
{
@ -1750,9 +1783,6 @@ static NTSTATUS key_import_pair( struct algorithm *alg, const WCHAR *type, BCRYP
key_destroy( key );
return status;
}
*ret_key = key;
return STATUS_SUCCESS;
}
else if (!wcscmp( type, BCRYPT_RSAPUBLIC_BLOB ))
{
@ -1775,9 +1805,6 @@ static NTSTATUS key_import_pair( struct algorithm *alg, const WCHAR *type, BCRYP
key_destroy( key );
return status;
}
*ret_key = key;
return STATUS_SUCCESS;
}
else if (!wcscmp( type, BCRYPT_RSAPRIVATE_BLOB ) || !wcscmp( type, BCRYPT_RSAFULLPRIVATE_BLOB ))
{
@ -1797,9 +1824,6 @@ static NTSTATUS key_import_pair( struct algorithm *alg, const WCHAR *type, BCRYP
key_destroy( key );
return status;
}
*ret_key = key;
return STATUS_SUCCESS;
}
else if (!wcscmp( type, LEGACY_RSAPRIVATE_BLOB ))
{
@ -1832,9 +1856,6 @@ static NTSTATUS key_import_pair( struct algorithm *alg, const WCHAR *type, BCRYP
key_destroy( key );
return status;
}
*ret_key = key;
return STATUS_SUCCESS;
}
else if (!wcscmp( type, LEGACY_DSA_V2_PRIVATE_BLOB ))
{
@ -1872,9 +1893,6 @@ static NTSTATUS key_import_pair( struct algorithm *alg, const WCHAR *type, BCRYP
key_destroy( key );
return status;
}
*ret_key = key;
return STATUS_SUCCESS;
}
else if (!wcscmp( type, LEGACY_DSA_V2_PUBLIC_BLOB )) /* not supported on native */
{
@ -1908,15 +1926,12 @@ static NTSTATUS key_import_pair( struct algorithm *alg, const WCHAR *type, BCRYP
key_destroy( key );
return status;
}
*ret_key = key;
return STATUS_SUCCESS;
}
else if (!wcscmp( type, BCRYPT_DH_PRIVATE_BLOB ))
{
BCRYPT_DH_KEY_BLOB *dh_blob = (BCRYPT_DH_KEY_BLOB *)input;
if (input_len < sizeof(*dh_blob)) return STATUS_INVALID_PARAMETER;
if (input_len != sizeof(*dh_blob) + dh_blob->cbKey * 4) return STATUS_INVALID_PARAMETER;
if (alg->id != ALG_ID_DH || dh_blob->dwMagic != BCRYPT_DH_PRIVATE_MAGIC)
return STATUS_NOT_SUPPORTED;
@ -1930,15 +1945,12 @@ static NTSTATUS key_import_pair( struct algorithm *alg, const WCHAR *type, BCRYP
key_destroy( key );
return status;
}
*ret_key = key;
return STATUS_SUCCESS;
}
else if (!wcscmp( type, BCRYPT_DH_PUBLIC_BLOB ))
{
BCRYPT_DH_KEY_BLOB *dh_blob = (BCRYPT_DH_KEY_BLOB *)input;
if (input_len < sizeof(*dh_blob)) return STATUS_INVALID_PARAMETER;
if (input_len != sizeof(*dh_blob) + dh_blob->cbKey * 3) return STATUS_INVALID_PARAMETER;
if (alg->id != ALG_ID_DH || dh_blob->dwMagic != BCRYPT_DH_PUBLIC_MAGIC)
return STATUS_NOT_SUPPORTED;
@ -1952,13 +1964,19 @@ static NTSTATUS key_import_pair( struct algorithm *alg, const WCHAR *type, BCRYP
key_destroy( key );
return status;
}
*ret_key = key;
return STATUS_SUCCESS;
}
else
{
FIXME( "unsupported key type %s\n", debugstr_w(type) );
return STATUS_NOT_SUPPORTED;
}
FIXME( "unsupported key type %s\n", debugstr_w(type) );
return STATUS_NOT_SUPPORTED;
if (!status)
{
key->u.a.flags |= KEY_FLAG_FINALIZED;
*ret_key = key;
}
return status;
}
NTSTATUS WINAPI BCryptGenerateSymmetricKey( BCRYPT_ALG_HANDLE handle, BCRYPT_KEY_HANDLE *ret_handle,
@ -1999,11 +2017,14 @@ NTSTATUS WINAPI BCryptGenerateKeyPair( BCRYPT_ALG_HANDLE handle, BCRYPT_KEY_HAND
NTSTATUS WINAPI BCryptFinalizeKeyPair( BCRYPT_KEY_HANDLE handle, ULONG flags )
{
struct key *key = get_key_object( handle );
NTSTATUS ret;
TRACE( "%p, %#lx\n", key, flags );
if (!key) return STATUS_INVALID_HANDLE;
return UNIX_CALL( key_asymmetric_generate, key );
if (!key || key->u.a.flags & KEY_FLAG_FINALIZED) return STATUS_INVALID_HANDLE;
if (!(ret = UNIX_CALL( key_asymmetric_generate, key ))) key->u.a.flags |= KEY_FLAG_FINALIZED;
return ret;
}
NTSTATUS WINAPI BCryptImportKey( BCRYPT_ALG_HANDLE handle, BCRYPT_KEY_HANDLE decrypt_key, const WCHAR *type,
@ -2233,7 +2254,7 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
}
else
{
if (flags & BCRYPT_PAD_NONE || flags & BCRYPT_PAD_OAEP)
if (flags & BCRYPT_PAD_NONE)
{
FIXME( "flags %#lx not implemented\n", flags );
return STATUS_NOT_IMPLEMENTED;
@ -2242,10 +2263,12 @@ NTSTATUS WINAPI BCryptEncrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
asymmetric_params.input = input;
asymmetric_params.input_len = input_len;
asymmetric_params.padding = padding;
asymmetric_params.key = key;
asymmetric_params.output = output;
asymmetric_params.output_len = output_len;
asymmetric_params.ret_len = ret_len;
asymmetric_params.flags = flags;
ret = UNIX_CALL(key_asymmetric_encrypt, &asymmetric_params);
}
@ -2278,7 +2301,7 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
}
else
{
if (flags & BCRYPT_PAD_NONE || flags & BCRYPT_PAD_OAEP)
if (flags & BCRYPT_PAD_NONE)
{
FIXME( "flags %#lx not implemented\n", flags );
return STATUS_NOT_IMPLEMENTED;
@ -2288,9 +2311,11 @@ NTSTATUS WINAPI BCryptDecrypt( BCRYPT_KEY_HANDLE handle, UCHAR *input, ULONG inp
params.key = key;
params.input = input;
params.input_len = input_len;
params.padding = padding;
params.output = output;
params.output_len = output_len;
params.ret_len = ret_len;
params.flags = flags;
ret = UNIX_CALL(key_asymmetric_decrypt, &params);
}

View file

@ -79,13 +79,18 @@ typedef enum
typedef struct gnutls_x509_spki_st *gnutls_x509_spki_t;
#endif
#if GUTLS_VERSION_MAJOR < 3 || (GNUTLS_VERSION_MAJOR == 3 && GNUTLS_VERSION_MINOR < 8)
#define GNUTLS_KEYGEN_DH 4
#endif
union key_data
{
gnutls_cipher_hd_t cipher;
struct
{
gnutls_privkey_t privkey;
gnutls_pubkey_t pubkey;
gnutls_privkey_t privkey;
gnutls_pubkey_t pubkey;
gnutls_dh_params_t dh_params;
} a;
};
C_ASSERT( sizeof(union key_data) <= sizeof(((struct key *)0)->private) );
@ -131,11 +136,14 @@ static int (*pgnutls_privkey_export_rsa_raw)(gnutls_privkey_t, gnutls_datum_t *,
gnutls_datum_t *);
static int (*pgnutls_privkey_export_dsa_raw)(gnutls_privkey_t, gnutls_datum_t *, gnutls_datum_t *, gnutls_datum_t *,
gnutls_datum_t *, gnutls_datum_t *);
static int (*pgnutls_privkey_generate)(gnutls_privkey_t, gnutls_pk_algorithm_t, unsigned int, unsigned int);
static int (*pgnutls_privkey_import_rsa_raw)(gnutls_privkey_t, const gnutls_datum_t *, const gnutls_datum_t *,
const gnutls_datum_t *, const gnutls_datum_t *, const gnutls_datum_t *,
const gnutls_datum_t *, const gnutls_datum_t *, const gnutls_datum_t *);
/* Not present in gnutls version < 3.5.0 */
static int (*pgnutls_privkey_generate2)(gnutls_privkey_t, gnutls_pk_algorithm_t, unsigned int, unsigned int,
const gnutls_keygen_data_st *, unsigned);
/* Not present in gnutls version < 3.6.0 */
static int (*pgnutls_decode_rs_value)(const gnutls_datum_t *, gnutls_datum_t *, gnutls_datum_t *);
static int (*pgnutls_x509_spki_init)(gnutls_x509_spki_t *);
@ -154,6 +162,9 @@ static int (*pgnutls_privkey_import_dh_raw)(gnutls_privkey_t, const gnutls_dh_pa
const gnutls_datum_t *);
static int (*pgnutls_pubkey_import_dh_raw)(gnutls_pubkey_t, const gnutls_dh_params_t, const gnutls_datum_t *);
/* Not present in gnutls version < 3.8.4 */
static int (*pgnutls_x509_spki_set_rsa_oaep_params)(gnutls_x509_spki_t, gnutls_digest_algorithm_t, gnutls_datum_t *);
static void *libgnutls_handle;
#define MAKE_FUNCPTR(f) static typeof(f) * p##f
MAKE_FUNCPTR(gnutls_cipher_decrypt2);
@ -262,12 +273,6 @@ static int compat_gnutls_pubkey_import_dsa_raw(gnutls_pubkey_t key, const gnutls
return GNUTLS_E_UNKNOWN_PK_ALGORITHM;
}
static int compat_gnutls_privkey_generate(gnutls_privkey_t key, gnutls_pk_algorithm_t algo, unsigned int bits,
unsigned int flags)
{
return GNUTLS_E_UNKNOWN_PK_ALGORITHM;
}
static int compat_gnutls_decode_rs_value(const gnutls_datum_t * sig_value, gnutls_datum_t * r, gnutls_datum_t * s)
{
return GNUTLS_E_INTERNAL_ERROR;
@ -301,6 +306,12 @@ static void compat_gnutls_x509_spki_deinit(gnutls_x509_spki_t spki)
{
}
static int compat_gnutls_x509_spki_set_rsa_oaep_params(gnutls_x509_spki_t spki, gnutls_digest_algorithm_t dig,
gnutls_datum_t *label)
{
return GNUTLS_E_UNKNOWN_PK_ALGORITHM;
}
static void compat_gnutls_x509_spki_set_rsa_pss_params(gnutls_x509_spki_t spki, gnutls_digest_algorithm_t dig,
unsigned int salt_size)
{
@ -346,6 +357,12 @@ static int compat_gnutls_pubkey_import_dh_raw(gnutls_pubkey_t pubkey, const gnut
return GNUTLS_E_UNKNOWN_PK_ALGORITHM;
}
static int compat_gnutls_privkey_generate2(gnutls_privkey_t privkey, gnutls_pk_algorithm_t alg, unsigned int bits,
unsigned int flags, const gnutls_keygen_data_st *data, unsigned data_size)
{
return GNUTLS_E_UNKNOWN_PK_ALGORITHM;
}
static void gnutls_log( int level, const char *msg )
{
TRACE( "<%d> %s", level, msg );
@ -418,7 +435,7 @@ static NTSTATUS gnutls_process_attach( void *args )
LOAD_FUNCPTR_OPT(gnutls_privkey_export_dsa_raw)
LOAD_FUNCPTR_OPT(gnutls_privkey_export_ecc_raw)
LOAD_FUNCPTR_OPT(gnutls_privkey_export_rsa_raw)
LOAD_FUNCPTR_OPT(gnutls_privkey_generate)
LOAD_FUNCPTR_OPT(gnutls_privkey_generate2)
LOAD_FUNCPTR_OPT(gnutls_privkey_import_dh_raw)
LOAD_FUNCPTR_OPT(gnutls_privkey_import_ecc_raw)
LOAD_FUNCPTR_OPT(gnutls_privkey_import_rsa_raw)
@ -436,6 +453,7 @@ static NTSTATUS gnutls_process_attach( void *args )
LOAD_FUNCPTR_OPT(gnutls_pubkey_verify_hash2)
LOAD_FUNCPTR_OPT(gnutls_x509_spki_deinit)
LOAD_FUNCPTR_OPT(gnutls_x509_spki_init)
LOAD_FUNCPTR_OPT(gnutls_x509_spki_set_rsa_oaep_params)
LOAD_FUNCPTR_OPT(gnutls_x509_spki_set_rsa_pss_params)
#undef LOAD_FUNCPTR_OPT
@ -1004,6 +1022,72 @@ done:
return status;
}
static gnutls_privkey_t create_privkey( gnutls_pk_algorithm_t pk_alg, unsigned int bitlen,
const gnutls_keygen_data_st *data, unsigned int data_size )
{
gnutls_privkey_t privkey;
int ret;
if ((ret = pgnutls_privkey_init( &privkey )))
{
pgnutls_perror( ret );
return NULL;
}
if ((ret = pgnutls_privkey_generate2( privkey, pk_alg, bitlen, 0, data, data_size )))
{
pgnutls_perror( ret );
pgnutls_privkey_deinit( privkey );
return NULL;
}
return privkey;
}
static gnutls_pubkey_t create_pubkey_from_privkey( gnutls_privkey_t privkey )
{
gnutls_pubkey_t pubkey;
int ret;
if ((ret = pgnutls_pubkey_init( &pubkey )))
{
pgnutls_perror( ret );
return NULL;
}
if ((ret = pgnutls_pubkey_import_privkey( pubkey, privkey, 0, 0 )))
{
pgnutls_perror( ret );
pgnutls_pubkey_deinit( pubkey );
return NULL;
}
return pubkey;
}
static gnutls_dh_params_t get_dh_params( gnutls_privkey_t privkey )
{
gnutls_dh_params_t params;
gnutls_datum_t x;
int ret;
if ((ret = pgnutls_dh_params_init( &params )))
{
pgnutls_perror( ret );
return NULL;
}
if ((ret = pgnutls_privkey_export_dh_raw( privkey, params, NULL, &x, 0 )))
{
pgnutls_perror( ret );
pgnutls_dh_params_deinit( params );
return NULL;
}
free( x.data );
return params;
}
static NTSTATUS key_asymmetric_generate( void *args )
{
struct key *key = args;
@ -1011,7 +1095,6 @@ static NTSTATUS key_asymmetric_generate( void *args )
gnutls_privkey_t privkey;
gnutls_pubkey_t pubkey;
unsigned int bitlen;
int ret;
if (!libgnutls_handle) return STATUS_INTERNAL_ERROR;
if (key_data(key)->a.privkey) return STATUS_INVALID_HANDLE;
@ -1051,30 +1134,27 @@ static NTSTATUS key_asymmetric_generate( void *args )
return STATUS_NOT_SUPPORTED;
}
if ((ret = pgnutls_privkey_init( &privkey )))
if (key->alg_id == ALG_ID_DH && key_data(key)->a.dh_params)
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
gnutls_keygen_data_st data;
data.type = GNUTLS_KEYGEN_DH;
data.data = (unsigned char *)key_data(key)->a.dh_params;
data.size = 0;
if (!(privkey = create_privkey( pk_alg, bitlen, &data, 1 ))) return STATUS_INTERNAL_ERROR;
}
if ((ret = pgnutls_pubkey_init( &pubkey )))
else if (!(privkey = create_privkey( pk_alg, bitlen, NULL, 0 ))) return STATUS_INTERNAL_ERROR;
if (key->alg_id == ALG_ID_DH && !key_data(key)->a.dh_params &&
!(key_data(key)->a.dh_params = get_dh_params( privkey )))
{
pgnutls_perror( ret );
pgnutls_privkey_deinit( privkey );
return STATUS_INTERNAL_ERROR;
}
if ((ret = pgnutls_privkey_generate( privkey, pk_alg, bitlen, 0 )))
if (!(pubkey = create_pubkey_from_privkey( privkey )))
{
pgnutls_perror( ret );
pgnutls_privkey_deinit( privkey );
pgnutls_pubkey_deinit( pubkey );
return STATUS_INTERNAL_ERROR;
}
if ((ret = pgnutls_pubkey_import_privkey( pubkey, privkey, 0, 0 )))
{
pgnutls_perror( ret );
pgnutls_privkey_deinit( privkey );
pgnutls_pubkey_deinit( pubkey );
return STATUS_INTERNAL_ERROR;
}
@ -1587,7 +1667,7 @@ static NTSTATUS key_export_dh_public( struct key *key, UCHAR *buf, ULONG len, UL
BCRYPT_DH_KEY_BLOB *dh_blob = (BCRYPT_DH_KEY_BLOB *)buf;
ULONG size = key->u.a.bitlen / 8;
gnutls_dh_params_t params;
gnutls_datum_t p, g, y, x = {0};
gnutls_datum_t p, g, y;
UCHAR *dst;
int ret = GNUTLS_E_INVALID_REQUEST;
@ -1597,12 +1677,7 @@ static NTSTATUS key_export_dh_public( struct key *key, UCHAR *buf, ULONG len, UL
return STATUS_INTERNAL_ERROR;
}
if (key_data(key)->a.pubkey)
ret = pgnutls_pubkey_export_dh_raw( key_data(key)->a.pubkey, params, &y, 0 );
else if (key_data(key)->a.privkey)
ret = pgnutls_privkey_export_dh_raw( key_data(key)->a.privkey, params, &y, &x, 0 );
if (ret)
if ((ret = pgnutls_pubkey_export_dh_raw( key_data(key)->a.pubkey, params, &y, 0 )))
{
pgnutls_perror( ret );
pgnutls_dh_params_deinit( params );
@ -1612,7 +1687,7 @@ static NTSTATUS key_export_dh_public( struct key *key, UCHAR *buf, ULONG len, UL
if ((ret = pgnutls_dh_params_export_raw( params, &p, &g, NULL )) < 0)
{
pgnutls_perror( ret );
free( y.data ); free( x.data );
free( y.data );
pgnutls_dh_params_deinit( params );
return STATUS_INTERNAL_ERROR;
}
@ -1629,7 +1704,7 @@ static NTSTATUS key_export_dh_public( struct key *key, UCHAR *buf, ULONG len, UL
dh_blob->cbKey = size;
}
free( p.data ); free( g.data ); free( y.data ); free( x.data );
free( p.data ); free( g.data ); free( y.data );
return STATUS_SUCCESS;
}
@ -1650,8 +1725,7 @@ static NTSTATUS key_export_dh( struct key *key, UCHAR *buf, ULONG len, ULONG *re
return STATUS_INTERNAL_ERROR;
}
ret = pgnutls_privkey_export_dh_raw( key_data(key)->a.privkey, params, &y, &x, 0 );
if (ret)
if ((ret = pgnutls_privkey_export_dh_raw( key_data(key)->a.privkey, params, &y, &x, 0 )))
{
pgnutls_perror( ret );
pgnutls_dh_params_deinit( params );
@ -1685,12 +1759,48 @@ static NTSTATUS key_export_dh( struct key *key, UCHAR *buf, ULONG len, ULONG *re
return STATUS_SUCCESS;
}
static NTSTATUS key_export_dh_params( struct key *key, UCHAR *buf, ULONG len, ULONG *ret_len )
{
BCRYPT_DH_PARAMETER_HEADER *hdr = (BCRYPT_DH_PARAMETER_HEADER *)buf;
unsigned int size = sizeof(*hdr) + key->u.a.bitlen / 8 * 2;
gnutls_datum_t p, g;
NTSTATUS status = STATUS_SUCCESS;
UCHAR *dst;
int ret;
if (!key_data(key)->a.dh_params) return STATUS_INVALID_PARAMETER;
if ((ret = pgnutls_dh_params_export_raw( key_data(key)->a.dh_params, &p, &g, NULL )))
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
}
*ret_len = size;
if (len < size) status = STATUS_BUFFER_TOO_SMALL;
else if (buf)
{
hdr->cbLength = size;
hdr->dwMagic = BCRYPT_DH_PARAMETERS_MAGIC;
hdr->cbKeyLength = key->u.a.bitlen / 8;
dst = (UCHAR *)(hdr + 1);
dst += export_gnutls_datum( dst, hdr->cbKeyLength, &p, 1 );
dst += export_gnutls_datum( dst, hdr->cbKeyLength, &g, 1 );
}
free( p.data ); free( g.data );
return status;
}
static NTSTATUS key_asymmetric_export( void *args )
{
const struct key_asymmetric_export_params *params = args;
struct key *key = params->key;
unsigned flags = params->flags;
if (!(key->u.a.flags & KEY_FLAG_FINALIZED)) return STATUS_INVALID_HANDLE;
switch (key->alg_id)
{
case ALG_ID_ECDH_P256:
@ -1719,7 +1829,9 @@ static NTSTATUS key_asymmetric_export( void *args )
return STATUS_NOT_IMPLEMENTED;
case ALG_ID_DH:
if (flags & KEY_EXPORT_FLAG_PUBLIC)
if (flags & KEY_EXPORT_FLAG_DH_PARAMETERS)
return key_export_dh_params( key, params->buf, params->len, params->ret_len );
if (flags & KEY_EXPORT_FLAG_PUBLIC)
return key_export_dh_public( key, params->buf, params->len, params->ret_len );
return key_export_dh( key, params->buf, params->len, params->ret_len );
@ -1766,17 +1878,19 @@ static NTSTATUS key_import_dh_public( struct key *key, UCHAR *buf, ULONG len )
return STATUS_INTERNAL_ERROR;
}
ret = pgnutls_pubkey_import_dh_raw( handle, params, &y );
pgnutls_dh_params_deinit( params );
if (ret < 0)
if ((ret = pgnutls_pubkey_import_dh_raw( handle, params, &y )))
{
pgnutls_perror( ret );
pgnutls_dh_params_deinit( params );
pgnutls_pubkey_deinit( handle );
return STATUS_INTERNAL_ERROR;
}
if (key_data(key)->a.pubkey) pgnutls_pubkey_deinit( key_data(key)->a.pubkey );
key_data(key)->a.pubkey = handle;
if (key_data(key)->a.dh_params) pgnutls_dh_params_deinit( key_data(key)->a.dh_params );
key_data(key)->a.dh_params = params;
return STATUS_SUCCESS;
}
@ -1819,17 +1933,49 @@ static NTSTATUS key_import_dh( struct key *key, UCHAR *buf, ULONG len )
return STATUS_INTERNAL_ERROR;
}
ret = pgnutls_privkey_import_dh_raw( handle, params, &y, &x );
pgnutls_dh_params_deinit( params );
if (ret < 0)
if ((ret = pgnutls_privkey_import_dh_raw( handle, params, &y, &x )))
{
pgnutls_perror( ret );
pgnutls_dh_params_deinit( params );
pgnutls_privkey_deinit( handle );
return STATUS_INTERNAL_ERROR;
}
if (key_data(key)->a.privkey) pgnutls_privkey_deinit( key_data(key)->a.privkey );
key_data(key)->a.privkey = handle;
if (key_data(key)->a.dh_params) pgnutls_dh_params_deinit( key_data(key)->a.dh_params );
key_data(key)->a.dh_params = params;
return STATUS_SUCCESS;
}
static NTSTATUS key_import_dh_params( struct key *key, UCHAR *buf, ULONG len )
{
BCRYPT_DH_PARAMETER_HEADER *dh_header = (BCRYPT_DH_PARAMETER_HEADER *)buf;
gnutls_dh_params_t params;
gnutls_datum_t p, g;
int ret;
if ((ret = pgnutls_dh_params_init( &params )))
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
}
p.data = (unsigned char *)(dh_header + 1);
p.size = dh_header->cbKeyLength;
g.data = p.data + dh_header->cbKeyLength;
g.size = dh_header->cbKeyLength;
if ((ret = pgnutls_dh_params_import_raw( params, &p, &g )))
{
pgnutls_perror( ret );
pgnutls_dh_params_deinit( params );
return STATUS_INTERNAL_ERROR;
}
if (key_data(key)->a.dh_params) pgnutls_dh_params_deinit( key_data(key)->a.dh_params );
key_data(key)->a.dh_params = params;
return STATUS_SUCCESS;
}
@ -1875,9 +2021,12 @@ static NTSTATUS key_asymmetric_import( void *args )
return STATUS_NOT_IMPLEMENTED;
case ALG_ID_DH:
if (flags & KEY_IMPORT_FLAG_DH_PARAMETERS)
return key_import_dh_params( key, params->buf, params->len );
if (flags & KEY_IMPORT_FLAG_PUBLIC)
return key_import_dh_public( key, params->buf, params->len );
return key_import_dh( key, params->buf, params->len );
ret = key_import_dh( key, params->buf, params->len );
break;
default:
FIXME( "algorithm %u not yet supported\n", key->alg_id );
@ -2300,6 +2449,7 @@ static NTSTATUS key_asymmetric_destroy( void *args )
if (key_data(key)->a.privkey) pgnutls_privkey_deinit( key_data(key)->a.privkey );
if (key_data(key)->a.pubkey) pgnutls_pubkey_deinit( key_data(key)->a.pubkey );
if (key_data(key)->a.dh_params) pgnutls_dh_params_deinit( key_data(key)->a.dh_params );
return STATUS_SUCCESS;
}
@ -2477,6 +2627,27 @@ static NTSTATUS key_asymmetric_duplicate( void *args )
return STATUS_SUCCESS;
}
static NTSTATUS privkey_set_rsa_oaep_params( gnutls_privkey_t key, gnutls_digest_algorithm_t dig, gnutls_datum_t *label )
{
gnutls_x509_spki_t spki;
int ret;
if (((ret = pgnutls_x509_spki_init( &spki ) < 0)))
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
}
pgnutls_x509_spki_set_rsa_oaep_params( spki, dig, label );
ret = pgnutls_privkey_set_spki( key, spki, 0 );
pgnutls_x509_spki_deinit( spki );
if (ret < 0)
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
}
return STATUS_SUCCESS;
}
static NTSTATUS key_asymmetric_decrypt( void *args )
{
const struct key_asymmetric_decrypt_params *params = args;
@ -2484,6 +2655,28 @@ static NTSTATUS key_asymmetric_decrypt( void *args )
NTSTATUS status = STATUS_SUCCESS;
int ret;
if (params->key->alg_id == ALG_ID_RSA && params->flags & BCRYPT_PAD_OAEP)
{
BCRYPT_OAEP_PADDING_INFO *pad = params->padding;
gnutls_digest_algorithm_t dig;
gnutls_datum_t label;
if (!pad || !pad->pszAlgId)
{
WARN( "padding info not found\n" );
return STATUS_INVALID_PARAMETER;
}
if ((dig = get_digest_from_id( pad->pszAlgId )) == GNUTLS_DIG_UNKNOWN)
{
FIXME( "hash algorithm %s not recognized\n", debugstr_w(pad->pszAlgId) );
return STATUS_NOT_SUPPORTED;
}
label.data = pad->pbLabel;
label.size = pad->cbLabel;
if ((status = privkey_set_rsa_oaep_params( key_data(params->key)->a.privkey, dig, &label ))) return status;
}
e.data = params->input;
e.size = params->input_len;
if ((ret = pgnutls_privkey_decrypt_data( key_data(params->key)->a.privkey, 0, &e, &d )))
@ -2494,12 +2687,33 @@ static NTSTATUS key_asymmetric_decrypt( void *args )
*params->ret_len = d.size;
if (params->output_len >= d.size) memcpy( params->output, d.data, *params->ret_len );
else status = STATUS_BUFFER_TOO_SMALL;
else if (params->output) status = STATUS_BUFFER_TOO_SMALL;
free( d.data );
return status;
}
static NTSTATUS pubkey_set_rsa_oaep_params( gnutls_pubkey_t key, gnutls_digest_algorithm_t dig, gnutls_datum_t *label )
{
gnutls_x509_spki_t spki;
int ret;
if (((ret = pgnutls_x509_spki_init( &spki ) < 0)))
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
}
pgnutls_x509_spki_set_rsa_oaep_params( spki, dig, label );
ret = pgnutls_pubkey_set_spki( key, spki, 0 );
pgnutls_x509_spki_deinit( spki );
if (ret < 0)
{
pgnutls_perror( ret );
return STATUS_INTERNAL_ERROR;
}
return STATUS_SUCCESS;
}
static NTSTATUS key_asymmetric_encrypt( void *args )
{
const struct key_asymmetric_encrypt_params *params = args;
@ -2509,6 +2723,28 @@ static NTSTATUS key_asymmetric_encrypt( void *args )
if (!key_data(params->key)->a.pubkey) return STATUS_INVALID_HANDLE;
if (params->key->alg_id == ALG_ID_RSA && params->flags & BCRYPT_PAD_OAEP)
{
BCRYPT_OAEP_PADDING_INFO *pad = params->padding;
gnutls_digest_algorithm_t dig;
gnutls_datum_t label;
if (!pad || !pad->pszAlgId || !pad->pbLabel)
{
WARN( "padding info not found\n" );
return STATUS_INVALID_PARAMETER;
}
if ((dig = get_digest_from_id( pad->pszAlgId )) == GNUTLS_DIG_UNKNOWN)
{
FIXME( "hash algorithm %s not recognized\n", debugstr_w(pad->pszAlgId) );
return STATUS_NOT_SUPPORTED;
}
label.data = pad->pbLabel;
label.size = pad->cbLabel;
if ((status = pubkey_set_rsa_oaep_params( key_data(params->key)->a.pubkey, dig, &label ))) return status;
}
d.data = params->input;
d.size = params->input_len;
if ((ret = pgnutls_pubkey_encrypt_data(key_data(params->key)->a.pubkey, 0, &d, &e)))
@ -2530,6 +2766,7 @@ static NTSTATUS key_asymmetric_derive_key( void *args )
{
const struct key_asymmetric_derive_key_params *params = args;
gnutls_datum_t s;
NTSTATUS status = STATUS_SUCCESS;
int ret;
if ((ret = pgnutls_privkey_derive_secret( key_data(params->privkey)->a.privkey,
@ -2539,15 +2776,15 @@ static NTSTATUS key_asymmetric_derive_key( void *args )
return STATUS_INTERNAL_ERROR;
}
if (!params->output) *params->ret_len = s.size;
else
*params->ret_len = EXPORT_SIZE( s, params->privkey->u.a.bitlen / 8, 1 );
if (params->output)
{
*params->ret_len = min( params->output_len, s.size );
memcpy( params->output, s.data, *params->ret_len );
if (params->output_len < *params->ret_len) status = STATUS_BUFFER_TOO_SMALL;
else export_gnutls_datum( params->output, *params->ret_len, &s, 1 );
}
free( s.data );
return STATUS_SUCCESS;
return status;
}
const unixlib_entry_t __wine_unix_call_funcs[] =
@ -2600,7 +2837,7 @@ struct key32
{
struct object hdr;
enum alg_id alg_id;
UINT64 private[2]; /* private data for backend */
UINT64 private[PRIVATE_DATA_SIZE]; /* private data for backend */
union
{
struct key_symmetric32 s;
@ -2610,12 +2847,19 @@ struct key32
union padding
{
BCRYPT_OAEP_PADDING_INFO oaep;
BCRYPT_PKCS1_PADDING_INFO pkcs1;
BCRYPT_PSS_PADDING_INFO pss;
};
union padding32
{
struct
{
PTR32 pszAlgId;
PTR32 pbLabel;
ULONG cbLabel;
} oaep;
struct
{
PTR32 pszAlgId;
@ -2633,13 +2877,21 @@ static union padding *get_padding( union padding32 *padding32, union padding *pa
switch (flags)
{
case BCRYPT_PAD_OAEP:
padding->oaep.pszAlgId = ULongToPtr( padding32->oaep.pszAlgId );
padding->oaep.pbLabel = ULongToPtr( padding32->oaep.pbLabel );
padding->oaep.cbLabel = padding32->oaep.cbLabel;
return padding;
case BCRYPT_PAD_PKCS1:
padding->pkcs1.pszAlgId = ULongToPtr( padding32->pkcs1.pszAlgId );
return padding;
case BCRYPT_PAD_PSS:
padding->pss.pszAlgId = ULongToPtr( padding32->pss.pszAlgId );
padding->pss.cbSalt = padding32->pss.cbSalt;
return padding;
default:
break;
}
@ -2650,8 +2902,7 @@ static struct key *get_symmetric_key( struct key32 *key32, struct key *key )
{
key->hdr = key32->hdr;
key->alg_id = key32->alg_id;
key->private[0] = key32->private[0];
key->private[1] = key32->private[1];
memcpy( key->private, key32->private, sizeof(key->private) );
key->u.s.mode = key32->u.s.mode;
key->u.s.block_size = key32->u.s.block_size;
key->u.s.vector = ULongToPtr(key32->u.s.vector);
@ -2665,8 +2916,7 @@ static struct key *get_asymmetric_key( struct key32 *key32, struct key *key )
{
key->hdr = key32->hdr;
key->alg_id = key32->alg_id;
key->private[0] = key32->private[0];
key->private[1] = key32->private[1];
memcpy( key->private, key32->private, sizeof(key->private) );
key->u.a.bitlen = key32->u.a.bitlen;
key->u.a.flags = key32->u.a.flags;
key->u.a.dss_seed = key32->u.a.dss_seed;
@ -2675,14 +2925,12 @@ static struct key *get_asymmetric_key( struct key32 *key32, struct key *key )
static void put_symmetric_key32( struct key *key, struct key32 *key32 )
{
key32->private[0] = key->private[0];
key32->private[1] = key->private[1];
memcpy( key32->private, key->private, sizeof(key32->private) );
}
static void put_asymmetric_key32( struct key *key, struct key32 *key32 )
{
key32->private[0] = key->private[0];
key32->private[1] = key->private[1];
memcpy( key32->private, key->private, sizeof(key32->private) );
key32->u.a.flags = key->u.a.flags;
key32->u.a.dss_seed = key->u.a.dss_seed;
}
@ -2828,22 +3076,27 @@ static NTSTATUS wow64_key_asymmetric_decrypt( void *args )
PTR32 key;
PTR32 input;
ULONG input_len;
PTR32 padding;
PTR32 output;
ULONG output_len;
PTR32 ret_len;
ULONG flags;
} const *params32 = args;
NTSTATUS ret;
struct key key;
union padding padding;
struct key32 *key32 = ULongToPtr( params32->key );
struct key_asymmetric_decrypt_params params =
{
get_asymmetric_key( key32, &key ),
ULongToPtr(params32->input),
params32->input_len,
get_padding( ULongToPtr(params32->padding), &padding, params32->flags ),
ULongToPtr(params32->output),
params32->output_len,
ULongToPtr(params32->ret_len)
ULongToPtr(params32->ret_len),
params32->flags
};
ret = key_asymmetric_decrypt( &params );
@ -2858,22 +3111,27 @@ static NTSTATUS wow64_key_asymmetric_encrypt( void *args )
PTR32 key;
PTR32 input;
ULONG input_len;
PTR32 padding;
PTR32 output;
ULONG output_len;
PTR32 ret_len;
ULONG flags;
} const *params32 = args;
NTSTATUS ret;
struct key key;
union padding padding;
struct key32 *key32 = ULongToPtr( params32->key );
struct key_asymmetric_encrypt_params params =
{
get_asymmetric_key( key32, &key ),
ULongToPtr(params32->input),
params32->input_len,
get_padding( ULongToPtr(params32->padding), &padding, params32->flags ),
ULongToPtr(params32->output),
params32->output_len,
ULongToPtr(params32->ret_len)
ULongToPtr(params32->ret_len),
params32->flags
};
ret = key_asymmetric_encrypt( &params );

View file

@ -2444,20 +2444,16 @@ static const UCHAR rsa_encrypted_no_padding[] =
static void test_rsa_encrypt(void)
{
static UCHAR input[] = "Hello World!";
static UCHAR input_no_padding[64] = { 0 };
UCHAR encrypted[64], decrypted[64];
BCRYPT_ALG_HANDLE rsa = 0;
BCRYPT_KEY_HANDLE key = 0, key2;
NTSTATUS ret = 0;
DWORD encrypted_size = 60;
UCHAR *encrypted_a = NULL;
UCHAR *encrypted_b = NULL;
DWORD decrypted_size = 0;
UCHAR input[] = "Hello World!", input_no_padding[64] = { 0 }, encrypted[64], decrypted[64];
BCRYPT_ALG_HANDLE rsa;
BCRYPT_KEY_HANDLE key, key2;
NTSTATUS ret;
DWORD encrypted_size, decrypted_size;
UCHAR *encrypted_a = NULL, *encrypted_b = NULL;
BCRYPT_OAEP_PADDING_INFO oaep_pad;
oaep_pad.pszAlgId = BCRYPT_MD5_ALGORITHM;
oaep_pad.pbLabel = (PUCHAR)"test";
oaep_pad.pszAlgId = BCRYPT_SHA256_ALGORITHM;
oaep_pad.pbLabel = (UCHAR *)"test";
oaep_pad.cbLabel = 5;
ret = BCryptOpenAlgorithmProvider(&rsa, BCRYPT_RSA_ALGORITHM, NULL, 0);
@ -2478,10 +2474,11 @@ static void test_rsa_encrypt(void)
ret = BCryptImportKeyPair(rsa, NULL, BCRYPT_RSAPRIVATE_BLOB, &key, rsaPrivateBlob, sizeof(rsaPrivateBlob), 0);
ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
todo_wine {
/* No padding */
todo_wine {
memset(input_no_padding, 0, sizeof(input_no_padding));
strcpy((char *)input_no_padding, "Hello World");
encrypted_size = 0;
ret = BCryptEncrypt(key, input_no_padding, sizeof(input_no_padding), NULL, NULL, 0, NULL, 0, &encrypted_size, BCRYPT_PAD_NONE);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(encrypted_size == 64, "got size of %ld\n", encrypted_size);
@ -2496,22 +2493,32 @@ static void test_rsa_encrypt(void)
ret = BCryptEncrypt(key, input_no_padding, sizeof(input_no_padding), NULL, NULL, 0, encrypted_a, 12, &encrypted_size, BCRYPT_PAD_NONE);
ok(ret == STATUS_BUFFER_TOO_SMALL, "got %lx\n", ret);
ok(encrypted_size == 64, "got size of %ld\n", encrypted_size);
ret = BCryptEncrypt(key, input_no_padding, sizeof(input_no_padding), NULL, NULL, 0, encrypted_a, encrypted_size, &encrypted_size, BCRYPT_PAD_NONE);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(encrypted_size == 64, "got size of %ld\n", encrypted_size);
ret = BCryptEncrypt(key, input_no_padding, sizeof(input_no_padding), NULL, NULL, 0, encrypted_b, encrypted_size, &encrypted_size, BCRYPT_PAD_NONE);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
}
ok(!memcmp(encrypted_a, encrypted_b, encrypted_size), "Both outputs should be the same\n");
ok(!memcmp(encrypted_b, rsa_encrypted_no_padding, encrypted_size), "Data mismatch.\n");
BCryptDecrypt(key, encrypted_a, encrypted_size, NULL, NULL, 0, NULL, 0, &decrypted_size, BCRYPT_PAD_NONE);
todo_wine {
decrypted_size = 0;
ret = BCryptDecrypt(key, encrypted_a, encrypted_size, NULL, NULL, 0, NULL, 0, &decrypted_size, BCRYPT_PAD_NONE);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(decrypted_size == sizeof(input_no_padding), "got %lu\n", decrypted_size);
BCryptDecrypt(key, encrypted_a, encrypted_size, NULL, NULL, 0, decrypted, decrypted_size, &decrypted_size, BCRYPT_PAD_NONE);
ok(!memcmp(decrypted, input_no_padding, sizeof(input_no_padding)), "Decrypted output it's not what expected\n");
ret = BCryptDecrypt(key, encrypted_a, encrypted_size, NULL, NULL, 0, decrypted, decrypted_size, &decrypted_size, BCRYPT_PAD_NONE);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(decrypted_size == sizeof(input_no_padding), "got %lu\n", decrypted_size);
ok(!memcmp(decrypted, input_no_padding, sizeof(input_no_padding)), "unexpected output\n");
}
encrypted_size = 60;
/* PKCS1 Padding */
encrypted_size = 0;
ret = BCryptEncrypt(key, input, sizeof(input), NULL, NULL, 0, NULL, 0, &encrypted_size, BCRYPT_PAD_PKCS1);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(encrypted_size == 64, "got size of %ld\n", encrypted_size);
@ -2523,22 +2530,54 @@ static void test_rsa_encrypt(void)
ret = BCryptEncrypt(key, input, sizeof(input), NULL, NULL, 0, encrypted_a, encrypted_size, &encrypted_size, BCRYPT_PAD_PKCS1);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(encrypted_size == 64, "got size of %ld\n", encrypted_size);
ret = BCryptEncrypt(key, input, sizeof(input), NULL, NULL, 0, encrypted_b, encrypted_size, &encrypted_size, BCRYPT_PAD_PKCS1);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(encrypted_size == 64, "got size of %ld\n", encrypted_size);
ok(memcmp(encrypted_a, encrypted_b, encrypted_size), "Both outputs are the same\n");
BCryptDecrypt(key, encrypted_a, encrypted_size, NULL, NULL, 0, NULL, 0, &decrypted_size, BCRYPT_PAD_PKCS1);
decrypted_size = 0;
ret = BCryptDecrypt(key, encrypted_a, encrypted_size, NULL, NULL, 0, NULL, 0, &decrypted_size, BCRYPT_PAD_PKCS1);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(decrypted_size == sizeof(input), "got size of %ld\n", decrypted_size);
BCryptDecrypt(key, encrypted_a, encrypted_size, NULL, NULL, 0, decrypted, decrypted_size, &decrypted_size, BCRYPT_PAD_PKCS1);
ok(!memcmp(decrypted, input, sizeof(input)), "Decrypted output it's not what expected\n");
todo_wine {
encrypted_size = 60;
/* OAEP Padding */
ret = BCryptEncrypt(key, input, sizeof(input), &oaep_pad, NULL, 0, NULL, 0, &encrypted_size, BCRYPT_PAD_OAEP);
ret = BCryptDecrypt(key, encrypted_a, encrypted_size, NULL, NULL, 0, decrypted, decrypted_size, &decrypted_size, BCRYPT_PAD_PKCS1);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(decrypted_size == sizeof(input), "got size of %ld\n", decrypted_size);
ok(!memcmp(decrypted, input, sizeof(input)), "unexpected output\n");
ret = BCryptImportKeyPair(rsa, NULL, LEGACY_RSAPRIVATE_BLOB, &key2, (UCHAR *)&rsaLegacyPrivateBlob,
sizeof(rsaLegacyPrivateBlob), 0);
ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = BCryptEncrypt(key2, input, sizeof(input), NULL, NULL, 0, encrypted, sizeof(encrypted),
&encrypted_size, BCRYPT_PAD_PKCS1);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(encrypted_size == 64, "got size of %ld\n", encrypted_size);
memset(decrypted, 0, sizeof(decrypted));
ret = BCryptDecrypt(key, encrypted, sizeof(encrypted), NULL, NULL, 0, decrypted, sizeof(decrypted),
&decrypted_size, BCRYPT_PAD_PKCS1);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(decrypted_size == sizeof(input), "got size of %ld\n", decrypted_size);
ok(!memcmp(decrypted, input, sizeof(input)), "unexpected output\n");
BCryptDestroyKey(key2);
BCryptDestroyKey(key);
/* OAEP Padding */
ret = BCryptGenerateKeyPair(rsa, &key, 640 /* minimum size for sha256 hash */, 0);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ret = BCryptFinalizeKeyPair(key, 0);
ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
todo_wine {
encrypted_size = 0;
ret = BCryptEncrypt(key, input, sizeof(input), &oaep_pad, NULL, 0, NULL, 0, &encrypted_size, BCRYPT_PAD_OAEP);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(encrypted_size == 80, "got size of %ld\n", encrypted_size);
encrypted_a = realloc(encrypted_a, encrypted_size);
memset(encrypted_a, 0, encrypted_size);
encrypted_b = realloc(encrypted_b, encrypted_size);
@ -2546,38 +2585,28 @@ static void test_rsa_encrypt(void)
ret = BCryptEncrypt(key, input, sizeof(input), &oaep_pad, NULL, 0, encrypted_a, encrypted_size, &encrypted_size, BCRYPT_PAD_OAEP);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(encrypted_size == 80, "got size of %ld\n", encrypted_size);
ret = BCryptEncrypt(key, input, sizeof(input), &oaep_pad, NULL, 0, encrypted_b, encrypted_size, &encrypted_size, BCRYPT_PAD_OAEP);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(encrypted_size == 80, "got size of %ld\n", encrypted_size);
ok(memcmp(encrypted_a, encrypted_b, encrypted_size), "Both outputs are the same\n");
decrypted_size = 0;
memset(decrypted, 0, sizeof(decrypted));
BCryptDecrypt(key, encrypted_a, encrypted_size, &oaep_pad, NULL, 0, NULL, 0, &decrypted_size, BCRYPT_PAD_OAEP);
ret = BCryptDecrypt(key, encrypted_a, encrypted_size, &oaep_pad, NULL, 0, NULL, 0, &decrypted_size, BCRYPT_PAD_OAEP);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(decrypted_size == sizeof(input), "got %lu\n", decrypted_size);
BCryptDecrypt(key, encrypted_a, encrypted_size, &oaep_pad, NULL, 0, decrypted, decrypted_size, &decrypted_size, BCRYPT_PAD_OAEP);
ok(!memcmp(decrypted, input, sizeof(input)), "Decrypted output it's not what expected\n");
ret = BCryptDecrypt(key, encrypted_a, encrypted_size, &oaep_pad, NULL, 0, decrypted, decrypted_size, &decrypted_size, BCRYPT_PAD_OAEP);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(decrypted_size == sizeof(input), "got %lu\n", decrypted_size);
ok(!memcmp(decrypted, input, sizeof(input)), "unexpected output\n");
}
free(encrypted_a);
free(encrypted_b);
ret = BCryptImportKeyPair(rsa, NULL, LEGACY_RSAPRIVATE_BLOB, &key2,
(UCHAR *)&rsaLegacyPrivateBlob, sizeof(rsaLegacyPrivateBlob), 0);
ok(ret == STATUS_SUCCESS, "got %#lx\n", ret);
ret = BCryptEncrypt(key2, input, sizeof(input), NULL, NULL, 0,
encrypted, sizeof(encrypted), &encrypted_size, BCRYPT_PAD_PKCS1);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(encrypted_size == 64, "got size of %ld\n", encrypted_size);
memset(decrypted, 0, sizeof(decrypted));
ret = BCryptDecrypt(key, encrypted, sizeof(encrypted), NULL, NULL, 0,
decrypted, sizeof(decrypted), &decrypted_size, BCRYPT_PAD_PKCS1);
ok(ret == STATUS_SUCCESS, "got %lx\n", ret);
ok(decrypted_size == sizeof(input), "got size of %ld\n", decrypted_size);
ok(!memcmp(decrypted, input, sizeof(input)), "Decrypted output it's not what expected\n");
BCryptDestroyKey(key2);
BCryptDestroyKey(key);
if (pBCryptHash)
@ -3835,11 +3864,113 @@ static void test_DSA(void)
static void test_SecretAgreement(void)
{
BCRYPT_SECRET_HANDLE secret;
static BCryptBuffer hash_param_buffers[] =
{
{
sizeof(BCRYPT_SHA256_ALGORITHM),
KDF_HASH_ALGORITHM,
(void *)BCRYPT_SHA256_ALGORITHM,
}
};
static BCryptBufferDesc hash_params =
{
BCRYPTBUFFER_VERSION,
ARRAY_SIZE(hash_param_buffers),
hash_param_buffers,
};
static const ULONG dh_private_key[] =
{
0xc4caf69c, 0x57b4db27, 0x36f7135f, 0x5ccba686, 0xc37b8819, 0x1d35c9b2, 0xbb07a1cf, 0x0c5d1c1b,
0xc79acb10, 0x31dfdabb, 0x702e02b9, 0x1efab345, 0x262a8074, 0x5edf7698, 0x9b9dc630, 0x13c34b93,
0xacbc928b, 0xb79eed8c, 0x7413dce9, 0xa5521280, 0x88d8e695, 0xa310269f, 0xca7c5719, 0xcd0c775b,
0x9a6e2cf2, 0x9e235c51, 0xf49db62d, 0x28e72424, 0x4a44da5a, 0x3d98268d, 0x8e4d2be3, 0x254e44e6,
0x18a67e55, 0x572e13a1, 0x46f81ca8, 0xc331c9b9, 0xf8fe3dd4, 0x8a889e5a, 0x6c0505fd, 0xbd97a121,
0xed2dbd67, 0xf39efa8e, 0x36f9c287, 0xf6bbfa6c, 0x461e42ad, 0x17dc170e, 0xc002dc2e, 0x4813d9a4,
0x0b6fabb8, 0x6a9e1860, 0xa8a8cbd9, 0xb7ed6b5d, 0xabb34d23, 0xf2fbe1fd, 0x8670df1e, 0xba7fa4e6,
0xf7039712, 0x94448f30, 0xe10c812e, 0x3e311976, 0xcfdd72c4, 0xbdbea98f, 0xc9a540d6, 0x89646d57,
0x7ab63b33, 0x03a1e9b6, 0x947f7a9b, 0x5ae59eeb, 0x1d12eb05, 0x3f425d92, 0xe028c6ba, 0xbf90ddc9,
0xb554f55a, 0x7aeb88b6, 0x4a443a5f, 0xbab35111, 0x82c78a0c, 0x298dd482, 0x02937cb1, 0xc94cdc2e,
0x59b010eb, 0x3bbc0a2b, 0xd845fee0, 0x04c1d0db, 0x0c8c9424, 0x1cafd4b2, 0x9aa7aed9, 0x6a478486,
0xa8841fd7, 0xbfeff40a, 0x8fd7bcc5, 0x3bb28977, 0x2b9a7955, 0xa55cd2e4, 0x1b6ad657, 0x067cdf21,
0x06f36920, 0x63280e1b, 0xf17d930f, 0xa06e74a8, 0x463b3a6f, 0x2a464507, 0x93f8a982, 0x8f620a7d,
0xeda32d11, 0x9706a6d4, 0x33dce588, 0x75a1c446, 0x048ab567, 0xd735aafa, 0x806f7c1c, 0xdcb9651a,
0x26acf3b4, 0x45f91cc9, 0x2a0de6fc, 0xf3c03d0c, 0xf5aee0aa, 0x3eeaaf36, 0x18ccee61, 0x83faa783,
0x4b2b5250, 0xf4ccea22, 0x5ac0714b, 0x3f0b2bc6, 0x481b13ce, 0x12040ea7, 0x66e0bbed, 0x158e1a67,
};
static const ULONG dh_private_key2[] =
{
0xffffffff, 0xffffffff, 0xa2da0fc9, 0x34c26821, 0x8b62c6c4, 0xd11cdc80, 0x084e0229, 0x74cc678a,
0xa6be0b02, 0x229b133b, 0x79084a51, 0xdd04348e, 0xb31995ef, 0x1b433acd, 0x6d0a2b30, 0x37145ff2,
0x6d35e14f, 0x45c2516d, 0x76b585e4, 0xc67e5e62, 0xe9424cf4, 0x6bed37a6, 0xb65cff0b, 0xedb706f4,
0xfb6b38ee, 0xa59f895a, 0x11249fae, 0xe61f4b7c, 0x51662849, 0x8153e6ec, 0xffffffff, 0xffffffff,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000000,
0xa0c3c734, 0xc130c92d, 0x5265abf8, 0xff409f17, 0xbcdce187, 0xff64dae3, 0x170560aa, 0xb2423ed8,
0x9ee5a8b9, 0x92548030, 0x02bba1f9, 0x823e39a4, 0x69c438f5, 0xf91016ac, 0x89bfd166, 0x7f996446,
0x86224203, 0x15bf689c, 0x619354a4, 0x0c1d3a1f, 0x11bcf3d2, 0x58aae029, 0x41c69824, 0x3fafc179,
0xa742747c, 0x60658c7a, 0xd3b0bde4, 0x78d3f08b, 0x6cefa061, 0x33752536, 0xe84d4901, 0x48cd73f4,
0x8d449700, 0x1f95120e, 0xceb31745, 0x3663177b, 0xbd9bb2d5, 0x9c23c0d9, 0x814d34f8, 0xbc54edb0,
0xb874659a, 0x3bac8a30, 0xa1f3dd46, 0x1705c900, 0xbc46fefe, 0x7d13875b, 0x3064351a, 0x4bd89a1c,
0x9e938761, 0x931949db, 0x34490719, 0x84fb08ca, 0xa9dd355a, 0x5b3f5061, 0x2ac96663, 0xc594429e,
0xbe58395d, 0x2f7d872a, 0x303d37b3, 0xa3a9b606, 0x735a6732, 0xa095bd95, 0x3d55a7c3, 0x00e54635,
};
static const ULONG dh_peer_key[] =
{
0xffffffff, 0xffffffff, 0xa2da0fc9, 0x34c26821, 0x8b62c6c4, 0xd11cdc80, 0x084e0229, 0x74cc678a,
0xa6be0b02, 0x229b133b, 0x79084a51, 0xdd04348e, 0xb31995ef, 0x1b433acd, 0x6d0a2b30, 0x37145ff2,
0x6d35e14f, 0x45c2516d, 0x76b585e4, 0xc67e5e62, 0xe9424cf4, 0x6bed37a6, 0xb65cff0b, 0xedb706f4,
0xfb6b38ee, 0xa59f895a, 0x11249fae, 0xe61f4b7c, 0x51662849, 0x8153e6ec, 0xffffffff, 0xffffffff,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x02000000,
0x3bf7404b, 0x6284fffe, 0x97c0d565, 0xd830c658, 0xcc21bf39, 0xcae45bb6, 0x019df7df, 0xbf4cd293,
0x6bf1989d, 0x78a81f52, 0xa4ed861c, 0x6bacf493, 0xa3e700d1, 0xd06cc206, 0x411b9727, 0x01e9c9ab,
0x9b7e6efa, 0xf46bb25d, 0xd1027242, 0x6130787c, 0xa7b87d8b, 0xfee41492, 0x50db6213, 0x321199b6,
0x7dace53a, 0xe8b1ec51, 0x2181b113, 0x3b33e3c0, 0x5b3a2d67, 0xbd34f0c1, 0x7037c542, 0x4a8d5540,
};
static const ULONG dh_shared_secret_raw[] =
{
0x375d89b5, 0x35a9c270, 0xfbc5ba82, 0x09eb3069, 0xd50965b0, 0xace510f7, 0x981e8731, 0x80a76115,
0xf386d348, 0xca17b8df, 0x0b0e84ec, 0xf81f756e, 0x5030fa20, 0x03113b71, 0x97b7e879, 0x899b5fae,
0xe6913299, 0x09270076, 0x39bc813a, 0xde3ef070, 0x65ad5b3a, 0x2b7c4ba4, 0x86c98ef9, 0x3236feaf,
0x3e0253f7, 0x0489d2dd, 0x97669a3d, 0x50242fca, 0x5d4aecb1, 0xcf2d805f, 0x2258afff, 0x750e92cd,
};
static const ULONG dh_shared_secret_raw2[] =
{
0x0815f37d, 0x19ee74ab, 0x9f63f123, 0xe1b3f10c, 0xbcc9be83, 0xaddf5b9d, 0x28174e72, 0xf8a33825,
0xfc74e47d, 0x2c950888, 0xf5b776d9, 0xfc712fef, 0x5b213b32, 0x489a9829, 0xfc0a4d1d, 0x6e641d3b,
0x3bb2ff57, 0x63500318, 0x081ee54f, 0xf33a2805, 0xb3759e98, 0xa9a64afe, 0x964b8897, 0x04691bbc,
0x80f4aae1, 0x617405ee, 0xab71724d, 0x6c10c214, 0x6f60b96f, 0xdc777b0b, 0x22f40d4f, 0x8a1c4eb5,
};
static const ULONG dh_shared_secret_sha1[] =
{
0x0babba9c, 0x0bdeacbd, 0x04e36574, 0xdd504dcd, 0x0cd88db0,
};
static const ULONG dh_shared_secret_sha256[] =
{
0x3213db5b, 0x8cc8250b, 0xc829eaab, 0x00933709, 0x68160aa9, 0xfb9f1e20, 0xf92368e6, 0x2b8e18eb,
};
static const ULONG length = 1024;
BCRYPT_DH_PARAMETER_HEADER *dh_header;
BCRYPT_DH_KEY_BLOB *dh_key_blob;
BCRYPT_SECRET_HANDLE secret, secret2;
BCRYPT_ALG_HANDLE alg;
BCRYPT_KEY_HANDLE key;
BCRYPT_KEY_HANDLE key, key2;
UCHAR buffer[2048];
NTSTATUS status;
ULONG size;
ULONG size, i;
status = BCryptOpenAlgorithmProvider(&alg, BCRYPT_ECDH_P256_ALGORITHM, NULL, 0);
ok(status == STATUS_SUCCESS, "got %#lx\n", status);
@ -3928,6 +4059,224 @@ static void test_SecretAgreement(void)
status = BCryptDestroySecret(secret);
ok(status == STATUS_SUCCESS, "got %#lx\n", status);
key = NULL;
status = BCryptGenerateKeyPair(alg, &key, 256, 0);
ok(status == STATUS_INVALID_PARAMETER, "got %08lx\n", status);
status = BCryptGenerateKeyPair(alg, &key, length, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
ok(key != NULL, "key not set\n");
memset(buffer, 0xcc, sizeof(buffer));
status = BCryptGetProperty(key, BCRYPT_DH_PARAMETERS, buffer, sizeof(buffer), &size, 0);
ok(status == STATUS_INVALID_HANDLE, "got %08lx\n", status);
status = BCryptExportKey(key, NULL, BCRYPT_DH_PUBLIC_BLOB, buffer, sizeof(buffer), &size, 0);
ok(status == STATUS_INVALID_HANDLE, "got %08lx\n", status);
status = BCryptFinalizeKeyPair(key, 0);
if (status != STATUS_SUCCESS)
{
BCryptDestroyKey(key);
BCryptCloseAlgorithmProvider(alg, 0);
return;
}
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptFinalizeKeyPair(key, 0);
ok(status == STATUS_INVALID_HANDLE, "got %08lx\n", status);
size = 0xdeadbeef;
status = BCryptGetProperty(key, BCRYPT_DH_PARAMETERS, NULL, sizeof(buffer), &size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
ok(size == sizeof(BCRYPT_DH_PARAMETER_HEADER) + length / 8 * 2, "Got unexpected size %lu.\n", size);
size = 0xdeadbeef;
status = BCryptGetProperty(key, BCRYPT_DH_PARAMETERS, buffer, 28, &size, 0);
ok(status == STATUS_BUFFER_TOO_SMALL, "got %08lx\n", status);
ok(size == sizeof(BCRYPT_DH_PARAMETER_HEADER) + length / 8 * 2, "Got unexpected size %lu.\n", size);
size = 0xdeadbeef;
status = BCryptGetProperty(key, BCRYPT_DH_PARAMETERS, buffer, sizeof(buffer), &size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
ok(size == sizeof(BCRYPT_DH_PARAMETER_HEADER) + length / 8 * 2, "Got unexpected size %lu.\n", size);
dh_header = (BCRYPT_DH_PARAMETER_HEADER *)buffer;
ok(dh_header->cbLength == sizeof(*dh_header) + length / 8 * 2, "Got unexpected length %lu.\n", dh_header->cbLength);
ok(dh_header->cbKeyLength == length / 8, "Got unexpected length %lu.\n", dh_header->cbKeyLength);
ok(dh_header->dwMagic == BCRYPT_DH_PARAMETERS_MAGIC, "Got unexpected magic %#lx.\n", dh_header->dwMagic);
status = BCryptDestroyKey(key);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
dh_key_blob = (BCRYPT_DH_KEY_BLOB *)buffer;
dh_key_blob->dwMagic = BCRYPT_DH_PRIVATE_MAGIC;
dh_key_blob->cbKey = length / 8;
memcpy(dh_key_blob + 1, dh_private_key, sizeof(dh_private_key));
size = sizeof(buffer);
status = BCryptImportKeyPair(alg, NULL, BCRYPT_DH_PRIVATE_BLOB, &key, buffer, size, 0);
ok(status == STATUS_INVALID_PARAMETER, "got %08lx\n", status);
size = sizeof(*dh_key_blob) + length / 8 * 4;
status = BCryptImportKeyPair(alg, NULL, BCRYPT_DH_PRIVATE_BLOB, &key, buffer, size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
memset(buffer, 0xcc, sizeof(buffer));
size = 0xdeadbeef;
status = BCryptExportKey(key, NULL, BCRYPT_DH_PUBLIC_BLOB, NULL, 0, &size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
ok(size == sizeof(BCRYPT_DH_KEY_BLOB) + length / 8 * 3, "Got unexpected size %lu.\n", size);
size = 0xdeadbeef;
status = BCryptExportKey(key, NULL, BCRYPT_DH_PUBLIC_BLOB, buffer, sizeof(buffer), &size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
ok(size == sizeof(BCRYPT_DH_KEY_BLOB) + length / 8 * 3, "Got unexpected size %lu.\n", size);
dh_key_blob = (BCRYPT_DH_KEY_BLOB *)buffer;
ok(dh_key_blob->dwMagic == BCRYPT_DH_PUBLIC_MAGIC, "Got unexpected magic %#lx.\n", dh_key_blob->dwMagic);
ok(dh_key_blob->cbKey == length / 8, "Got unexpected length %lu.\n", dh_key_blob->cbKey);
ok(!memcmp(dh_key_blob + 1, dh_private_key, length / 8 * 3), "Key data does not match.\n");
status = BCryptGenerateKeyPair(alg, &key2, length, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
dh_header = (BCRYPT_DH_PARAMETER_HEADER *)buffer;
dh_header->dwMagic = BCRYPT_DH_PARAMETERS_MAGIC;
dh_header->cbLength = sizeof(*dh_header) + length / 8 * 2;
dh_header->cbKeyLength = length / 8;
memcpy(dh_header + 1, dh_private_key, length / 8 * 2);
status = BCryptSetProperty(key2, BCRYPT_DH_PARAMETERS, buffer, dh_header->cbLength, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptFinalizeKeyPair(key2, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptExportKey(key2, NULL, BCRYPT_DH_PUBLIC_BLOB, buffer, sizeof(buffer), &size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
ok(size == sizeof(BCRYPT_DH_KEY_BLOB) + length / 8 * 3, "Got unexpected size %lu.\n", size);
ok(dh_key_blob->dwMagic == BCRYPT_DH_PUBLIC_MAGIC, "Got unexpected dwMagic %#lx.\n", dh_key_blob->dwMagic);
ok(dh_key_blob->cbKey == length / 8, "Got unexpected length %lu.\n", dh_key_blob->cbKey);
todo_wine ok(!memcmp(dh_key_blob + 1, dh_private_key, length / 8 * 2), "DH parameters do not match.\n");
ok(memcmp((BYTE *)(dh_key_blob + 1) + length / 8 * 2, (BYTE *)dh_private_key + length / 8 * 2, length / 8),
"Random public key data matches.\n");
memset(buffer, 0xcc, sizeof(buffer));
status = BCryptExportKey(key, NULL, BCRYPT_DH_PRIVATE_BLOB, buffer, sizeof(buffer), &size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
dh_key_blob = (BCRYPT_DH_KEY_BLOB *)buffer;
ok(size == sizeof(BCRYPT_DH_KEY_BLOB) + length / 8 * 4, "Got unexpected size %lu.\n", size);
ok(dh_key_blob->dwMagic == BCRYPT_DH_PRIVATE_MAGIC, "Got unexpected dwMagic %#lx.\n", dh_key_blob->dwMagic);
ok(dh_key_blob->cbKey == length / 8, "Got unexpected length %lu.\n", dh_key_blob->cbKey);
ok(!memcmp(dh_key_blob + 1, dh_private_key, length / 8 * 4), "Private key data does not match.\n");
status = BCryptSecretAgreement(NULL, key, &secret, 0);
ok(status == STATUS_INVALID_HANDLE, "got %08lx\n", status);
status = BCryptSecretAgreement(key, NULL, &secret, 0);
ok(status == STATUS_INVALID_HANDLE, "got %08lx\n", status);
status = BCryptSecretAgreement(key, key, NULL, 0);
ok(status == STATUS_INVALID_PARAMETER, "got %08lx\n", status);
status = BCryptSecretAgreement(key, key, &secret, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptDeriveKey(NULL, L"HASH", NULL, NULL, 0, &size, 0);
ok(status == STATUS_INVALID_HANDLE, "got %08lx\n", status);
status = BCryptDeriveKey(key, L"HASH", NULL, NULL, 0, &size, 0);
ok(status == STATUS_INVALID_HANDLE, "got %08lx\n", status);
status = BCryptDeriveKey(secret, NULL, NULL, NULL, 0, &size, 0);
ok(status == STATUS_INVALID_PARAMETER, "got %08lx\n", status);
size = 0xdeadbeef;
status = BCryptDeriveKey(secret, L"HASH", NULL, NULL, 0, &size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
ok(size == 20, "Got unexpected size %lu.\n", size);
size = 0xdeadbeef;
status = BCryptDeriveKey(secret, BCRYPT_KDF_RAW_SECRET, NULL, NULL, 0, &size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
ok(size == length / 8, "Got unexpected size %lu.\n", size);
status = BCryptDeriveKey(secret, BCRYPT_KDF_RAW_SECRET, NULL, buffer, 128, &size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
ok(size == length / 8, "Got unexpected size %lu.\n", size);
ok(!memcmp(buffer, dh_shared_secret_raw, size), "Raw shared secret data does not match.\n");
size = sizeof(buffer);
memset(buffer, 0xcc, sizeof(buffer));
status = BCryptDeriveKey(secret, BCRYPT_KDF_HASH, NULL, buffer, 128, &size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
ok(size == 20, "Got unexpected size %lu.\n", size);
ok(!memcmp(buffer, dh_shared_secret_sha1, sizeof(dh_shared_secret_sha1)),
"sha1 shared secret data does not match.\n");
size = sizeof(buffer);
status = BCryptDeriveKey(secret, BCRYPT_KDF_HASH, &hash_params, buffer, size, &size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
ok(size == 32, "Got unexpected size %lu.\n", size);
ok(!memcmp(buffer, dh_shared_secret_sha256, sizeof(dh_shared_secret_sha256)),
"sha256 shared secret data does not match.\n");
for (i = size; i < sizeof(buffer); ++i)
if (buffer[i] != 0xcc) break;
ok(i == sizeof(buffer), "Buffer modified at %lu, value %#x.\n", i, buffer[i]);
status = BCryptDestroySecret(secret);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptSecretAgreement(key, key2, &secret, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptSecretAgreement(key2, key, &secret2, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptDeriveKey(secret, BCRYPT_KDF_RAW_SECRET, NULL, buffer, 128, &size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptDeriveKey(secret, BCRYPT_KDF_RAW_SECRET, NULL, buffer + size, 128, &size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
ok(!memcmp(buffer, buffer + size, size), "Shared secrets do not match.\n");
status = BCryptDestroySecret(secret);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptDestroySecret(secret2);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptDestroyKey(key);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptDestroyKey(key2);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
dh_key_blob = (BCRYPT_DH_KEY_BLOB *)buffer;
dh_key_blob->dwMagic = BCRYPT_DH_PRIVATE_MAGIC;
dh_key_blob->cbKey = length / 8;
memcpy(dh_key_blob + 1, dh_private_key2, sizeof(dh_private_key2));
size = sizeof(*dh_key_blob) + length / 8 * 4;
status = BCryptImportKeyPair(alg, NULL, BCRYPT_DH_PRIVATE_BLOB, &key, buffer, size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
dh_key_blob = (BCRYPT_DH_KEY_BLOB *)buffer;
dh_key_blob->dwMagic = BCRYPT_DH_PUBLIC_MAGIC;
dh_key_blob->cbKey = length / 8;
memcpy(dh_key_blob + 1, dh_peer_key, sizeof(dh_peer_key));
size = sizeof(*dh_key_blob) + length / 8 * 3;
status = BCryptImportKeyPair(alg, NULL, BCRYPT_DH_PUBLIC_BLOB, &key2, buffer, size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptSecretAgreement(key, key2, &secret, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptDeriveKey(secret, BCRYPT_KDF_RAW_SECRET, NULL, buffer, 128, &size, 0);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
ok(size == length / 8, "Got unexpected size %lu.\n", size);
ok(!memcmp(buffer, dh_shared_secret_raw2, size), "Raw shared secret data does not match.\n");
status = BCryptDestroySecret(secret);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptDestroyKey(key);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptDestroyKey(key2);
ok(status == STATUS_SUCCESS, "got %08lx\n", status);
status = BCryptCloseAlgorithmProvider(alg, 0);
ok(status == STATUS_SUCCESS, "got %#lx\n", status);
}

View file

@ -149,7 +149,7 @@ HRESULT CompCatCacheDaemon_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
This->IRunnableTask_iface.lpVtbl = &CompCatCacheDaemonVtbl;
This->refCount = 1;
InitializeCriticalSection(&This->cs);
InitializeCriticalSectionEx(&This->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": CompCatCacheDaemon.cs");
TRACE("returning %p\n", This);

View file

@ -626,7 +626,7 @@ HRESULT ProgressDialog_Constructor(IUnknown *pUnkOuter, IUnknown **ppOut)
This->IProgressDialog_iface.lpVtbl = &ProgressDialogVtbl;
This->IOleWindow_iface.lpVtbl = &OleWindowVtbl;
This->refCount = 1;
InitializeCriticalSection(&This->cs);
InitializeCriticalSectionEx(&This->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ProgressDialog.cs");
TRACE("returning %p\n", This);

View file

@ -91,7 +91,7 @@
@ stdcall CM_Get_Device_Interface_List_SizeW(ptr ptr wstr long) setupapi.CM_Get_Device_Interface_List_SizeW
@ stdcall CM_Get_Device_Interface_List_Size_ExA(ptr ptr str long ptr) setupapi.CM_Get_Device_Interface_List_Size_ExA
@ stdcall CM_Get_Device_Interface_List_Size_ExW(ptr ptr wstr long ptr) setupapi.CM_Get_Device_Interface_List_Size_ExW
@ stub CM_Get_Device_Interface_PropertyW
@ stdcall CM_Get_Device_Interface_PropertyW(wstr ptr ptr ptr ptr long)
@ stub CM_Get_First_Log_Conf
@ stub CM_Get_First_Log_Conf_Ex
@ stub CM_Get_Global_State

View file

@ -17,6 +17,7 @@
*/
#include "wine/debug.h"
#include "winreg.h"
#include "cfgmgr32.h"
WINE_DEFAULT_DEBUG_CHANNEL(setupapi);
@ -67,3 +68,16 @@ CONFIGRET WINAPI CM_Register_Notification( CM_NOTIFY_FILTER *filter, void *conte
return CR_CALL_NOT_IMPLEMENTED;
}
/***********************************************************************
* CM_Get_Device_Interface_PropertyW (cfgmgr32.@)
*/
CONFIGRET WINAPI CM_Get_Device_Interface_PropertyW( LPCWSTR device_interface, const DEVPROPKEY *property_key,
DEVPROPTYPE *property_type, BYTE *property_buffer,
ULONG *property_buffer_size, ULONG flags )
{
FIXME("%s %p %p %p %p %ld stub!\n", debugstr_w(device_interface), property_key, property_type,
property_buffer, property_buffer_size, flags);
return CR_CALL_NOT_IMPLEMENTED;
}

View file

@ -17,6 +17,7 @@
*/
#include "wine/test.h"
#include "winreg.h"
#include "cfgmgr32.h"
static void test_CM_MapCrToWin32Err(void)

View file

@ -376,7 +376,7 @@ static struct apartment *apartment_construct(DWORD model)
apt->refs = 1;
apt->remunk_exported = FALSE;
apt->oidc = 1;
InitializeCriticalSection(&apt->cs);
InitializeCriticalSectionEx(&apt->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
apt->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": apartment");
apt->multi_threaded = !(model & COINIT_APARTMENTTHREADED);

View file

@ -1575,7 +1575,7 @@ static HRESULT proxy_manager_construct(
list_init(&This->entry);
list_init(&This->interfaces);
InitializeCriticalSection(&This->cs);
InitializeCriticalSectionEx(&This->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
This->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": proxy_manager");
/* the apartment the object was unmarshaled into */

View file

@ -143,7 +143,7 @@ void WINAPI RoUninitialize(void)
/***********************************************************************
* RoGetActivationFactory (combase.@)
*/
HRESULT WINAPI RoGetActivationFactory(HSTRING classid, REFIID iid, void **class_factory)
HRESULT WINAPI DECLSPEC_HOTPATCH RoGetActivationFactory(HSTRING classid, REFIID iid, void **class_factory)
{
PFNGETACTIVATIONFACTORY pDllGetActivationFactory;
IActivationFactory *factory;

View file

@ -187,7 +187,7 @@ static struct stub_manager *new_stub_manager(struct apartment *apt, IUnknown *ob
list_init(&sm->ifstubs);
InitializeCriticalSection(&sm->lock);
InitializeCriticalSectionEx(&sm->lock, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
sm->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": stub_manager");
IUnknown_AddRef(object);

View file

@ -813,7 +813,7 @@ static BOOL ANIMATE_Create(HWND hWnd, const CREATESTRUCTW *lpcs)
TRACE("Animate style %#lx, parent %p\n", infoPtr->dwStyle, infoPtr->hwndNotify);
InitializeCriticalSection(&infoPtr->cs);
InitializeCriticalSectionEx(&infoPtr->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
infoPtr->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ANIMATE_INFO*->cs");
return TRUE;

View file

@ -763,106 +763,18 @@ HIMAGELIST WINAPI
ImageList_Create (INT cx, INT cy, UINT flags,
INT cInitial, INT cGrow)
{
HIMAGELIST himl;
INT nCount;
HBITMAP hbmTemp;
UINT ilc = (flags & 0xFE);
static const WORD aBitBlend25[] =
{0xAA, 0x00, 0x55, 0x00, 0xAA, 0x00, 0x55, 0x00};
static const WORD aBitBlend50[] =
{0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA};
IImageList2 *himl;
TRACE("(%d %d 0x%x %d %d)\n", cx, cy, flags, cInitial, cGrow);
if (cx < 0 || cy < 0) return NULL;
if (!((flags&ILC_COLORDDB) == ILC_COLORDDB) && (cx == 0 || cy == 0)) return NULL;
/* Create the IImageList interface for the image list */
if (FAILED(ImageListImpl_CreateInstance(NULL, &IID_IImageList, (void **)&himl)))
if (FAILED(ImageListImpl_CreateInstance(NULL, &IID_IImageList2, (void **)&himl)))
return NULL;
cGrow = (WORD)((max( cGrow, 1 ) + 3) & ~3);
if (IImageList2_Initialize(himl, cx, cy, flags, cInitial, cGrow) == S_OK)
return (HIMAGELIST)himl;
if (cGrow > 256)
{
/* Windows doesn't limit the size here, but X11 doesn't let us allocate such huge bitmaps */
WARN( "grow %d too large, limiting to 256\n", cGrow );
cGrow = 256;
}
himl->cx = cx;
himl->cy = cy;
himl->flags = flags;
himl->cMaxImage = cInitial + 1;
himl->cInitial = cInitial;
himl->cGrow = cGrow;
himl->clrFg = CLR_DEFAULT;
himl->clrBk = CLR_NONE;
himl->color_table_set = FALSE;
/* initialize overlay mask indices */
for (nCount = 0; nCount < MAX_OVERLAYIMAGE; nCount++)
himl->nOvlIdx[nCount] = -1;
/* Create Image & Mask DCs */
himl->hdcImage = CreateCompatibleDC (0);
if (!himl->hdcImage)
goto cleanup;
if (himl->flags & ILC_MASK){
himl->hdcMask = CreateCompatibleDC(0);
if (!himl->hdcMask)
goto cleanup;
}
/* Default to ILC_COLOR4 if none of the ILC_COLOR* flags are specified */
if (ilc == ILC_COLOR)
{
ilc = ILC_COLOR4;
himl->flags |= ILC_COLOR4;
}
if (ilc >= ILC_COLOR4 && ilc <= ILC_COLOR32)
himl->uBitsPixel = ilc;
else
himl->uBitsPixel = (UINT)GetDeviceCaps (himl->hdcImage, BITSPIXEL);
if (himl->cMaxImage > 0) {
himl->hbmImage = ImageList_CreateImage(himl->hdcImage, himl, himl->cMaxImage);
SelectObject(himl->hdcImage, himl->hbmImage);
} else
himl->hbmImage = 0;
if ((himl->cMaxImage > 0) && (himl->flags & ILC_MASK)) {
SIZE sz;
imagelist_get_bitmap_size(himl, himl->cMaxImage, &sz);
himl->hbmMask = CreateBitmap (sz.cx, sz.cy, 1, 1, NULL);
if (himl->hbmMask == 0) {
ERR("Error creating mask bitmap!\n");
goto cleanup;
}
SelectObject(himl->hdcMask, himl->hbmMask);
}
else
himl->hbmMask = 0;
himl->item_flags = Alloc( himl->cMaxImage * sizeof(*himl->item_flags) );
/* create blending brushes */
hbmTemp = CreateBitmap (8, 8, 1, 1, aBitBlend25);
himl->hbrBlend25 = CreatePatternBrush (hbmTemp);
DeleteObject (hbmTemp);
hbmTemp = CreateBitmap (8, 8, 1, 1, aBitBlend50);
himl->hbrBlend50 = CreatePatternBrush (hbmTemp);
DeleteObject (hbmTemp);
TRACE("created imagelist %p\n", himl);
return himl;
cleanup:
ImageList_Destroy(himl);
IImageList2_Release(himl);
return NULL;
}
@ -3721,8 +3633,99 @@ static HRESULT WINAPI ImageListImpl_GetStatistics(IImageList2 *iface, IMAGELISTS
static HRESULT WINAPI ImageListImpl_Initialize(IImageList2 *iface, INT cx, INT cy, UINT flags, INT initial, INT grow)
{
FIXME("(%p)->(%d %d %d %d %d): stub\n", iface, cx, cy, flags, initial, grow);
return E_NOTIMPL;
HIMAGELIST himl = impl_from_IImageList2(iface);
INT nCount;
HBITMAP hbmTemp;
UINT ilc = (flags & 0xFE);
static const WORD aBitBlend25[] =
{0xAA, 0x00, 0x55, 0x00, 0xAA, 0x00, 0x55, 0x00};
static const WORD aBitBlend50[] =
{0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA, 0x55, 0xAA};
TRACE("(%p)->(%d %d %d %d %d)\n", iface, cx, cy, flags, initial, grow);
if (cx < 0 || cy < 0) return E_INVALIDARG;
if (!((flags&ILC_COLORDDB) == ILC_COLORDDB) && (cx == 0 || cy == 0)) return E_INVALIDARG;
grow = (WORD)((max( grow, 1 ) + 3) & ~3);
if (grow > 256)
{
/* Windows doesn't limit the size here, but X11 doesn't let us allocate such huge bitmaps */
WARN( "grow %d too large, limiting to 256\n", grow );
grow = 256;
}
himl->cx = cx;
himl->cy = cy;
himl->flags = flags;
himl->cMaxImage = initial + 1;
himl->cInitial = initial;
himl->cGrow = grow;
himl->clrFg = CLR_DEFAULT;
himl->clrBk = CLR_NONE;
himl->color_table_set = FALSE;
/* initialize overlay mask indices */
for (nCount = 0; nCount < MAX_OVERLAYIMAGE; nCount++)
himl->nOvlIdx[nCount] = -1;
/* Create Image & Mask DCs */
himl->hdcImage = CreateCompatibleDC (0);
if (!himl->hdcImage)
return E_FAIL;
if (himl->flags & ILC_MASK){
himl->hdcMask = CreateCompatibleDC(0);
if (!himl->hdcMask)
return E_FAIL;
}
/* Default to ILC_COLOR4 if none of the ILC_COLOR* flags are specified */
if (ilc == ILC_COLOR)
{
ilc = ILC_COLOR4;
himl->flags |= ILC_COLOR4;
}
if (ilc >= ILC_COLOR4 && ilc <= ILC_COLOR32)
himl->uBitsPixel = ilc;
else
himl->uBitsPixel = (UINT)GetDeviceCaps (himl->hdcImage, BITSPIXEL);
if (himl->cMaxImage > 0) {
himl->hbmImage = ImageList_CreateImage(himl->hdcImage, himl, himl->cMaxImage);
SelectObject(himl->hdcImage, himl->hbmImage);
} else
himl->hbmImage = 0;
if ((himl->cMaxImage > 0) && (himl->flags & ILC_MASK)) {
SIZE sz;
imagelist_get_bitmap_size(himl, himl->cMaxImage, &sz);
himl->hbmMask = CreateBitmap (sz.cx, sz.cy, 1, 1, NULL);
if (himl->hbmMask == 0) {
ERR("Error creating mask bitmap!\n");
return E_FAIL;
}
SelectObject(himl->hdcMask, himl->hbmMask);
}
else
himl->hbmMask = 0;
himl->item_flags = Alloc( himl->cMaxImage * sizeof(*himl->item_flags) );
/* create blending brushes */
hbmTemp = CreateBitmap (8, 8, 1, 1, aBitBlend25);
himl->hbrBlend25 = CreatePatternBrush (hbmTemp);
DeleteObject (hbmTemp);
hbmTemp = CreateBitmap (8, 8, 1, 1, aBitBlend50);
himl->hbrBlend50 = CreatePatternBrush (hbmTemp);
DeleteObject (hbmTemp);
TRACE("created imagelist %p\n", himl);
return S_OK;
}
static HRESULT WINAPI ImageListImpl_Replace2(IImageList2 *iface, INT i, HBITMAP image, HBITMAP mask, IUnknown *unk, DWORD flags)

View file

@ -1672,6 +1672,8 @@ static void test_iimagelist(void)
HIMAGELIST himl;
HRESULT hr;
ULONG ret;
HBITMAP hbm;
int ret2;
if (!pHIMAGELIST_QueryInterface)
{
@ -1741,7 +1743,48 @@ static void test_iimagelist(void)
win_skip("IImageList2 is not supported.\n");
return;
}
ok(hr == S_OK, "got 0x%08lx\n", hr);
hr = IImageList2_Initialize(imagelist, BMP_CX, BMP_CX, ILC_COLOR24, 1, 1);
ok(hr == S_OK, "got %#lx\n", hr);
check_iml_data((HIMAGELIST)imagelist, BMP_CX, BMP_CX, 0, 2, 1, ILC_COLOR24, "IImageList2 0");
hr = IImageList2_Remove(imagelist, 0);
ok(hr == E_INVALIDARG, "got %#lx\n", hr);
hr = IImageList2_Remove(imagelist, -1);
ok(hr == S_OK, "got %#lx\n", hr);
hbm = CreateBitmap(BMP_CX, BMP_CX, 1, 1, NULL);
ret2 = -1;
hr = IImageList2_Add(imagelist, hbm, 0, &ret2);
ok(hr == S_OK, "got %#lx\n", hr);
ok(ret2 == 0, "got %d\n", ret2);
check_iml_data((HIMAGELIST)imagelist, BMP_CX, BMP_CX, 1, 2, 4, ILC_COLOR24, "IImageList2 1");
ret2 = -1;
hr = IImageList2_Add(imagelist, hbm, 0, &ret2);
ok(hr == S_OK, "got %#lx\n", hr);
ok(ret2 == 1, "got %d\n", ret2);
check_iml_data((HIMAGELIST)imagelist, BMP_CX, BMP_CX, 2, 7, 4, ILC_COLOR24, "IImageList2 2");
hr = IImageList2_Remove(imagelist, 0);
ok(hr == S_OK, "got %#lx\n", hr);
check_iml_data((HIMAGELIST)imagelist, BMP_CX, BMP_CX, 1, 7, 4, ILC_COLOR24, "IImageList2 1");
hr = IImageList2_Remove(imagelist, -1);
ok(hr == S_OK, "got %#lx\n", hr);
check_iml_data((HIMAGELIST)imagelist, BMP_CX, BMP_CX, 0, 4, 1, ILC_COLOR24, "IImageList2 0");
hr = IImageList2_Remove(imagelist, 0);
ok(hr == E_INVALIDARG, "got %#lx\n", hr);
DeleteObject(hbm);
IImageList2_Release(imagelist);
}

View file

@ -469,6 +469,7 @@ static void test_monthcal(void)
ok(limits == GDTR_MIN, "got 0x%08lx\n", limits);
GetSystemTime(st);
st[0].wDay = 25;
st[1] = st[0];
st[1].wYear++;
r = SendMessageA(hwnd, MCM_SETRANGE, 0, (LPARAM)st);
@ -480,6 +481,7 @@ static void test_monthcal(void)
/* flags are 0, set min limit */
GetSystemTime(st);
st[0].wDay = 25;
st[1] = st[0];
st[1].wYear++;

View file

@ -978,10 +978,11 @@ static BOOL PRINTDLG_SetUpPaperComboBoxW(HWND hDlg,
/***********************************************************************
* PRINTDLG_UpdatePrinterInfoTexts [internal]
*/
static void PRINTDLG_UpdatePrinterInfoTextsA(HWND hDlg, const PRINTER_INFO_2A *pi)
static void PRINTDLG_UpdatePrinterInfoTextsA(HWND hDlg, DWORD flags, const PRINTER_INFO_2A *pi)
{
char StatusMsg[256];
char ResourceString[256];
char printer_name[256];
int i;
/* Status Message */
@ -1004,6 +1005,17 @@ static void PRINTDLG_UpdatePrinterInfoTextsA(HWND hDlg, const PRINTER_INFO_2A *p
SetDlgItemTextA(hDlg, stc12, StatusMsg);
/* set all other printer info texts */
if (flags & PD_PRINTSETUP)
{
DWORD dwBufLen = ARRAY_SIZE(printer_name);
GetDefaultPrinterA(printer_name, &dwBufLen);
}
else
{
/* FIXME: Windows decorates the printer name with text like 'System Printer' or 'on <port>'. */
lstrcpynA(printer_name, pi->pPrinterName, ARRAY_SIZE(printer_name));
}
SetDlgItemTextA(hDlg, stc1, printer_name);
SetDlgItemTextA(hDlg, stc11, pi->pDriverName);
if (pi->pLocation != NULL && pi->pLocation[0] != '\0')
@ -1014,11 +1026,12 @@ static void PRINTDLG_UpdatePrinterInfoTextsA(HWND hDlg, const PRINTER_INFO_2A *p
return;
}
static void PRINTDLG_UpdatePrinterInfoTextsW(HWND hDlg, const PRINTER_INFO_2W *pi)
static void PRINTDLG_UpdatePrinterInfoTextsW(HWND hDlg, DWORD flags, const PRINTER_INFO_2W *pi)
{
WCHAR StatusMsg[256];
WCHAR ResourceString[256];
int i;
WCHAR printer_name[256];
int i;
/* Status Message */
StatusMsg[0]='\0';
@ -1040,6 +1053,17 @@ static void PRINTDLG_UpdatePrinterInfoTextsW(HWND hDlg, const PRINTER_INFO_2W *p
SetDlgItemTextW(hDlg, stc12, StatusMsg);
/* set all other printer info texts */
if (flags & PD_PRINTSETUP)
{
DWORD dwBufLen = ARRAY_SIZE(printer_name);
GetDefaultPrinterW(printer_name, &dwBufLen);
}
else
{
/* FIXME: Windows decorates the printer name with text like 'System Printer' or 'on <port>'. */
lstrcpynW(printer_name, pi->pPrinterName, ARRAY_SIZE(printer_name));
}
SetDlgItemTextW(hDlg, stc1, printer_name);
SetDlgItemTextW(hDlg, stc11, pi->pDriverName);
if (pi->pLocation != NULL && pi->pLocation[0] != '\0')
SetDlgItemTextW(hDlg, stc14, pi->pLocation);
@ -1081,7 +1105,7 @@ static BOOL PRINTDLG_ChangePrinterA(HWND hDlg, char *name, PRINT_PTRA *PrintStru
}
ClosePrinter(hprn);
PRINTDLG_UpdatePrinterInfoTextsA(hDlg, PrintStructures->lpPrinterInfo);
PRINTDLG_UpdatePrinterInfoTextsA(hDlg, lppd->Flags, PrintStructures->lpPrinterInfo);
free(PrintStructures->lpDevMode);
PrintStructures->lpDevMode = NULL;
@ -1229,7 +1253,7 @@ static BOOL PRINTDLG_ChangePrinterA(HWND hDlg, char *name, PRINT_PTRA *PrintStru
if(IsDefault)
SendMessageA(hQuality, CB_SETCURSEL, Index, 0);
SendMessageA(hQuality, CB_SETITEMDATA, Index, MAKELONG(dpiX,dpiY));
SendMessageA(hQuality, CB_SETITEMDATA, Index, MAKELONG(Resolutions[i], Resolutions[i+1]));
}
free(Resolutions);
}
@ -1288,7 +1312,7 @@ static BOOL PRINTDLG_ChangePrinterW(HWND hDlg, WCHAR *name,
}
ClosePrinter(hprn);
PRINTDLG_UpdatePrinterInfoTextsW(hDlg, PrintStructures->lpPrinterInfo);
PRINTDLG_UpdatePrinterInfoTextsW(hDlg, lppd->Flags, PrintStructures->lpPrinterInfo);
free(PrintStructures->lpDevMode);
PrintStructures->lpDevMode = NULL;
@ -1386,6 +1410,61 @@ static BOOL PRINTDLG_ChangePrinterW(HWND hDlg, WCHAR *name,
if (lppd->Flags & PD_HIDEPRINTTOFILE)
ShowWindow(GetDlgItem(hDlg, chx1), SW_HIDE);
/* Fill print quality combo, PrintDlg16 */
if (GetDlgItem(hDlg, cmb1))
{
DWORD num_resolutions = DeviceCapabilitiesW(PrintStructures->lpPrinterInfo->pPrinterName,
PrintStructures->lpPrinterInfo->pPortName,
DC_ENUMRESOLUTIONS, NULL, lpdm);
if (num_resolutions != -1)
{
HWND quality = GetDlgItem(hDlg, cmb1);
LONG* resolutions;
WCHAR buf[255];
DWORD i;
int dpiX, dpiY;
HDC printer = CreateDCW(PrintStructures->lpPrinterInfo->pDriverName,
PrintStructures->lpPrinterInfo->pPrinterName,
0, lpdm);
resolutions = malloc(num_resolutions * sizeof(LONG) * 2);
DeviceCapabilitiesW(PrintStructures->lpPrinterInfo->pPrinterName,
PrintStructures->lpPrinterInfo->pPortName,
DC_ENUMRESOLUTIONS, (LPWSTR)resolutions, lpdm);
dpiX = GetDeviceCaps(printer, LOGPIXELSX);
dpiY = GetDeviceCaps(printer, LOGPIXELSY);
DeleteDC(printer);
SendMessageW(quality, CB_RESETCONTENT, 0, 0);
for (i = 0; i < (num_resolutions * 2); i += 2)
{
BOOL is_default = FALSE;
LRESULT index;
if (resolutions[i] == resolutions[i+1])
{
if (dpiX == resolutions[i])
is_default = TRUE;
swprintf(buf, sizeof(buf), L"%ld dpi", resolutions[i]);
} else
{
if (dpiX == resolutions[i] && dpiY == resolutions[i+1])
is_default = TRUE;
swprintf(buf, sizeof(buf), L"%ld dpi x %ld dpi", resolutions[i], resolutions[i+1]);
}
index = SendMessageW(quality, CB_ADDSTRING, 0, (LPARAM)buf);
if (is_default)
SendMessageW(quality, CB_SETCURSEL, index, 0);
SendMessageW(quality, CB_SETITEMDATA, index, MAKELONG(resolutions[i], resolutions[i+1]));
}
free(resolutions);
}
}
} else { /* PD_PRINTSETUP */
BOOL bPortrait = (lpdm->dmOrientation == DMORIENT_PORTRAIT);
@ -1761,8 +1840,8 @@ static LRESULT PRINTDLG_WMCommandA(HWND hDlg, WPARAM wParam,
case cmb4: /* Printer combobox */
if (HIWORD(wParam)==CBN_SELCHANGE) {
char *PrinterName;
INT index = SendDlgItemMessageW(hDlg, LOWORD(wParam), CB_GETCURSEL, 0, 0);
INT length = SendDlgItemMessageW(hDlg, LOWORD(wParam), CB_GETLBTEXTLEN, index, 0);
INT index = SendDlgItemMessageA(hDlg, LOWORD(wParam), CB_GETCURSEL, 0, 0);
INT length = SendDlgItemMessageA(hDlg, LOWORD(wParam), CB_GETLBTEXTLEN, index, 0);
PrinterName = malloc(length + 1);
SendDlgItemMessageA(hDlg, LOWORD(wParam), CB_GETLBTEXT, index, (LPARAM)PrinterName);
PRINTDLG_ChangePrinterA(hDlg, PrinterName, PrintStructures);
@ -1909,7 +1988,10 @@ static LRESULT PRINTDLG_WMCommandW(HWND hDlg, WPARAM wParam,
}
break;
case cmb1: /* Printer Combobox in PRINT SETUP */
case cmb1: /* Printer Combobox in PRINT SETUP, quality combobox in PRINT16 */
if (PrinterComboID != LOWORD(wParam)) {
break;
}
/* FALLTHROUGH */
case cmb4: /* Printer combobox */
if (HIWORD(wParam)==CBN_SELCHANGE) {

View file

@ -478,18 +478,22 @@ static LONG create_property_sheetW(struct propsheet *ps, PROPSHEETUI_INFO_HEADER
(!header->titleW || !(header->flags & PSUIHDRF_EXACT_PTITLE)))
{
len = wcslen(title);
if (len < ARRAY_SIZE(title))
if (len < ARRAY_SIZE(title) - 1)
{
title[len++] = ' ';
LoadStringW(compstui_hmod, IDS_CPSUI_DEFAULT, title + len, ARRAY_SIZE(title) - len);
LoadStringW(compstui_hmod, IDS_CPSUI_DEFAULT, title + len, ARRAY_SIZE(title) - len);
}
}
if ((header->flags & PSUIHDRF_PROPTITLE) &&
(!header->titleW || !(header->flags & PSUIHDRF_EXACT_PTITLE)))
{
len = wcslen(title);
if (len < ARRAY_SIZE(title))
if (len < ARRAY_SIZE(title) - 1)
{
title[len++] = ' ';
LoadStringW(compstui_hmod, IDS_CPSUI_PROPERTIES, title + len, ARRAY_SIZE(title) - len);
LoadStringW(compstui_hmod, IDS_CPSUI_PROPERTIES, title + len, ARRAY_SIZE(title) - len);
}
}
psh.nPages = ps->pages_cnt;

View file

@ -33,9 +33,9 @@
@ cdecl -arch=arm ??0_NonReentrantPPLLock@details@Concurrency@@QAA@XZ(ptr) _NonReentrantPPLLock_ctor
@ thiscall -arch=i386 ??0_NonReentrantPPLLock@details@Concurrency@@QAE@XZ(ptr) _NonReentrantPPLLock_ctor
@ cdecl -arch=win64 ??0_NonReentrantPPLLock@details@Concurrency@@QEAA@XZ(ptr) _NonReentrantPPLLock_ctor
@ stub -arch=arm ??0_ReaderWriterLock@details@Concurrency@@QAA@XZ
@ stub -arch=i386 ??0_ReaderWriterLock@details@Concurrency@@QAE@XZ
@ stub -arch=win64 ??0_ReaderWriterLock@details@Concurrency@@QEAA@XZ
@ cdecl -arch=arm ??0_ReaderWriterLock@details@Concurrency@@QAA@XZ(ptr) _ReaderWriterLock_ctor
@ thiscall -arch=i386 ??0_ReaderWriterLock@details@Concurrency@@QAE@XZ(ptr) _ReaderWriterLock_ctor
@ cdecl -arch=win64 ??0_ReaderWriterLock@details@Concurrency@@QEAA@XZ(ptr) _ReaderWriterLock_ctor
@ cdecl -arch=arm ??0_ReentrantBlockingLock@details@Concurrency@@QAA@XZ(ptr) _ReentrantBlockingLock_ctor
@ thiscall -arch=i386 ??0_ReentrantBlockingLock@details@Concurrency@@QAE@XZ(ptr) _ReentrantBlockingLock_ctor
@ cdecl -arch=win64 ??0_ReentrantBlockingLock@details@Concurrency@@QEAA@XZ(ptr) _ReentrantBlockingLock_ctor
@ -450,9 +450,9 @@
@ stub -arch=win64 ?_ConcRT_CoreAssert@details@Concurrency@@YAXPEBD0H@Z
@ stub -arch=win32 ?_ConcRT_Trace@details@Concurrency@@YAXHPB_WZZ
@ stub -arch=win64 ?_ConcRT_Trace@details@Concurrency@@YAXHPEB_WZZ
@ stub -arch=arm ?_Confirm_cancel@_Cancellation_beacon@details@Concurrency@@QAA_NXZ
@ stub -arch=i386 ?_Confirm_cancel@_Cancellation_beacon@details@Concurrency@@QAE_NXZ
@ stub -arch=win64 ?_Confirm_cancel@_Cancellation_beacon@details@Concurrency@@QEAA_NXZ
@ cdecl -arch=arm ?_Confirm_cancel@_Cancellation_beacon@details@Concurrency@@QAA_NXZ(ptr) _Cancellation_beacon__Confirm_cancel
@ thiscall -arch=i386 ?_Confirm_cancel@_Cancellation_beacon@details@Concurrency@@QAE_NXZ(ptr) _Cancellation_beacon__Confirm_cancel
@ cdecl -arch=win64 ?_Confirm_cancel@_Cancellation_beacon@details@Concurrency@@QEAA_NXZ(ptr) _Cancellation_beacon__Confirm_cancel
@ cdecl ?_CurrentContext@_Context@details@Concurrency@@SA?AV123@XZ() _Context__CurrentContext
@ stub ?_Current_node@location@Concurrency@@SA?AV12@XZ
@ stub -arch=arm ?_Destroy@_AsyncTaskCollection@details@Concurrency@@EAAXXZ

View file

@ -268,7 +268,7 @@
@ cdecl _scalb(double long)
@ cdecl _searchenv(str str ptr)
@ cdecl _seterrormode(long)
@ cdecl -norelay _setjmp(ptr) MSVCRT__setjmp
@ cdecl -norelay _setjmp(ptr)
@ cdecl _setmode(long long)
@ stub _setsystime(ptr long)
@ cdecl _sleep(long)
@ -434,7 +434,7 @@
@ cdecl -arch=win64 localtime(ptr) _localtime64
@ cdecl log(double)
@ cdecl log10(double)
@ cdecl longjmp(ptr long) MSVCRT_longjmp
@ cdecl longjmp(ptr long)
@ cdecl malloc(long)
@ cdecl mblen(ptr long)
@ cdecl mbstowcs(ptr str long)

View file

@ -111,8 +111,6 @@ static DWORD encodeBase64A(const BYTE *in_buf, int in_len, LPCSTR sep,
i = 0;
while (div > 0 && ptr < end)
{
if (i && i % 64 == 0)
ptr += stradd(ptr, end, sep, strlen(sep));
/* first char is the first 6 bits of the first byte*/
chunk[0] = b64[ ( d[0] >> 2) & 0x3f ];
/* second char is the last 2 bits of the first byte and the first 4
@ -127,6 +125,9 @@ static DWORD encodeBase64A(const BYTE *in_buf, int in_len, LPCSTR sep,
i += 4;
d += 3;
div--;
if (i && i % 64 == 0)
ptr += stradd(ptr, end, sep, strlen(sep));
}
switch(pad_bytes)
@ -393,11 +394,6 @@ static LONG encodeBase64W(const BYTE *in_buf, int in_len, LPCWSTR sep,
i = 0;
while (div > 0)
{
if (i && i % 64 == 0)
{
lstrcpyW(ptr, sep);
ptr += lstrlenW(sep);
}
/* first char is the first 6 bits of the first byte*/
*ptr++ = b64[ ( d[0] >> 2) & 0x3f ];
/* second char is the last 2 bits of the first byte and the first 4
@ -411,6 +407,12 @@ static LONG encodeBase64W(const BYTE *in_buf, int in_len, LPCWSTR sep,
i += 4;
d += 3;
div--;
if (i && i % 64 == 0)
{
lstrcpyW(ptr, sep);
ptr += lstrlenW(sep);
}
}
switch(pad_bytes)

View file

@ -2778,32 +2778,37 @@ BOOL CNG_ImportPubKey(CERT_PUBLIC_KEY_INFO *pubKeyInfo, BCRYPT_KEY_HANDLE *key)
static BOOL CNG_PrepareSignatureECC(BYTE *encoded_sig, DWORD encoded_size, BYTE **sig_value, DWORD *sig_len)
{
CERT_ECC_SIGNATURE *ecc_sig;
DWORD size;
DWORD size, r_size, s_size, r_offset, s_offset;
int i;
if (!CryptDecodeObjectEx(X509_ASN_ENCODING, X509_ECC_SIGNATURE, encoded_sig, encoded_size,
CRYPT_DECODE_ALLOC_FLAG, NULL, &ecc_sig, &size))
return FALSE;
if (!ecc_sig->r.cbData || !ecc_sig->s.cbData)
if (!(r_size = ecc_sig->r.cbData) || !(s_size = ecc_sig->s.cbData))
{
LocalFree(ecc_sig);
SetLastError(ERROR_INVALID_DATA);
return FALSE;
}
r_size = s_size = max( r_size, s_size );
*sig_len = ecc_sig->r.cbData + ecc_sig->s.cbData;
*sig_len = r_size + s_size;
if (!(*sig_value = CryptMemAlloc(*sig_len)))
{
LocalFree(ecc_sig);
SetLastError(ERROR_OUTOFMEMORY);
return FALSE;
}
memset( *sig_value, 0, *sig_len );
r_offset = r_size - ecc_sig->r.cbData;
s_offset = s_size - ecc_sig->s.cbData;
for (i = 0; i < ecc_sig->r.cbData; i++)
(*sig_value)[i] = ecc_sig->r.pbData[ecc_sig->r.cbData - i - 1];
(*sig_value)[i + r_offset] = ecc_sig->r.pbData[ecc_sig->r.cbData - i - 1];
for (i = 0; i < ecc_sig->s.cbData; i++)
(*sig_value)[ecc_sig->r.cbData + i] = ecc_sig->s.pbData[ecc_sig->s.cbData - i - 1];
(*sig_value)[r_size + i + s_offset] = ecc_sig->s.pbData[ecc_sig->s.cbData - i - 1];
LocalFree(ecc_sig);
return TRUE;

View file

@ -478,7 +478,7 @@ WINECRYPT_CERTSTORE *CRYPT_CollectionOpenStore(HCRYPTPROV hCryptProv,
{
memset(store, 0, sizeof(WINE_COLLECTIONSTORE));
CRYPT_InitStore(&store->hdr, dwFlags, StoreTypeCollection, &CollectionStoreVtbl);
InitializeCriticalSection(&store->cs);
InitializeCriticalSectionEx(&store->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
store->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PWINE_COLLECTIONSTORE->cs");
list_init(&store->stores);
}

View file

@ -125,7 +125,7 @@ HCRYPTOIDFUNCSET WINAPI CryptInitOIDFunctionSet(LPCSTR pszFuncName,
ret->name = CryptMemAlloc(strlen(pszFuncName) + 1);
if (ret->name)
{
InitializeCriticalSection(&ret->cs);
InitializeCriticalSectionEx(&ret->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
ret->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": OIDFunctionSet.cs");
list_init(&ret->functions);
strcpy(ret->name, pszFuncName);

View file

@ -46,7 +46,7 @@ CONTEXT_PROPERTY_LIST *ContextPropertyList_Create(void)
if (list)
{
InitializeCriticalSection(&list->cs);
InitializeCriticalSectionEx(&list->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
list->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PCONTEXT_PROPERTY_LIST->cs");
list_init(&list->properties);
}

View file

@ -545,7 +545,7 @@ WINECRYPT_CERTSTORE *CRYPT_RegOpenStore(HCRYPTPROV hCryptProv, DWORD dwFlags,
regInfo->dwOpenFlags = dwFlags;
regInfo->memStore = memStore;
regInfo->key = key;
InitializeCriticalSection(&regInfo->cs);
InitializeCriticalSectionEx(&regInfo->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
regInfo->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": PWINE_REGSTOREINFO->cs");
list_init(&regInfo->certsToDelete);
list_init(&regInfo->crlsToDelete);

View file

@ -388,7 +388,7 @@ static WINECRYPT_CERTSTORE *CRYPT_MemOpenStore(HCRYPTPROV hCryptProv,
{
memset(store, 0, sizeof(WINE_MEMSTORE));
CRYPT_InitStore(&store->hdr, dwFlags, StoreTypeMem, &MemStoreVtbl);
InitializeCriticalSection(&store->cs);
InitializeCriticalSectionEx(&store->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO);
store->cs.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": ContextList.cs");
list_init(&store->certs);
list_init(&store->crls);

View file

@ -57,6 +57,8 @@ static const BYTE toEncode4[] =
static const BYTE toEncode5[] =
"abcdefghijlkmnopqrstuvwxyz01234567890ABCDEFGHI";
static const BYTE toEncode6[] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
static const struct BinTests tests[] = {
{ toEncode1, sizeof(toEncode1), "AA==\r\n", },
{ toEncode2, sizeof(toEncode2), "AQI=\r\n", },
@ -69,6 +71,9 @@ static const struct BinTests tests[] = {
"SElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0NTY3ODkwAA==\r\n" },
{ toEncode5, sizeof(toEncode5),
"YWJjZGVmZ2hpamxrbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5MEFCQ0RFRkdISQA=\r\n" },
{ toEncode6, sizeof(toEncode6),
"YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh\r\n"
"YQA=\r\n" },
};
static const struct BinTests testsNoCR[] = {
@ -83,6 +88,9 @@ static const struct BinTests testsNoCR[] = {
"SElKS0xNTk9QUVJTVFVWV1hZWjAxMjM0NTY3ODkwAA==\n" },
{ toEncode5, sizeof(toEncode5),
"YWJjZGVmZ2hpamxrbW5vcHFyc3R1dnd4eXowMTIzNDU2Nzg5MEFCQ0RFRkdISQA=\n" },
{ toEncode6, sizeof(toEncode6),
"YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh\n"
"YQA=\n" },
};
static WCHAR *strdupAtoW(const char *str)

View file

@ -355,7 +355,7 @@ static HRESULT async_info_create( IUnknown *invoker, IUnknown *param, async_oper
if ((impl->invoker = invoker)) IUnknown_AddRef( impl->invoker );
if ((impl->param = param)) IUnknown_AddRef( impl->param );
InitializeCriticalSection( &impl->cs );
InitializeCriticalSectionEx( &impl->cs, 0, RTL_CRITICAL_SECTION_FLAG_FORCE_DEBUG_INFO );
impl->cs.DebugInfo->Spare[0] = (DWORD_PTR)( __FILE__ ": async_info.cs" );
*out = &impl->IWineAsyncInfoImpl_iface;

View file

@ -1,6 +1,6 @@
MODULE = d2d1.dll
IMPORTLIB = d2d1
IMPORTS = d3d10_1 dxguid uuid gdi32 user32 advapi32
IMPORTS = d3d10_1 dxguid uuid gdi32 user32 advapi32 d3dcompiler
DELAYIMPORTS = dwrite xmllite ole32
SOURCES = \

View file

@ -674,8 +674,6 @@ struct d2d_effect_registration
BOOL builtin;
CLSID id;
UINT32 input_count;
UINT32 default_input_count;
struct d2d_effect_properties properties;
};
@ -707,6 +705,8 @@ struct d2d_effect_registration * d2d_factory_get_registered_effect(ID2D1Factory
const GUID *effect_id);
void d2d_factory_register_effect(struct d2d_factory *factory,
struct d2d_effect_registration *effect);
HRESULT d2d_effect_property_get_uint32_value(const struct d2d_effect_properties *properties,
const struct d2d_effect_property *prop, UINT32 *value);
struct d2d_transform_graph
{
@ -738,6 +738,9 @@ HRESULT d2d_effect_subproperties_add(struct d2d_effect_properties *props, const
struct d2d_effect_property * d2d_effect_properties_get_property_by_name(
const struct d2d_effect_properties *properties, const WCHAR *name);
void d2d_effect_properties_cleanup(struct d2d_effect_properties *props);
HRESULT d2d_factory_register_builtin_effect(struct d2d_factory *factory, REFCLSID effect_id,
const WCHAR *property_xml, const D2D1_PROPERTY_BINDING *bindings, UINT32 binding_count,
PD2D1_EFFECT_FACTORY effect_factory);
enum d2d_command_list_state
{

File diff suppressed because it is too large Load diff

View file

@ -189,7 +189,7 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_impl_PrepareForRender(ID2D1EffectImp
static HRESULT STDMETHODCALLTYPE d2d_effect_impl_SetGraph(ID2D1EffectImpl *iface, ID2D1TransformGraph *graph)
{
return E_NOTIMPL;
return S_OK;
}
static const ID2D1EffectImplVtbl d2d_effect_impl_vtbl =
@ -211,48 +211,105 @@ static HRESULT STDMETHODCALLTYPE builtin_factory_stub(IUnknown **effect_impl)
return S_OK;
}
struct d2d_effect_info
{
const CLSID *clsid;
UINT32 default_input_count;
UINT32 min_inputs;
UINT32 max_inputs;
};
static const WCHAR _2d_affine_transform_description[] =
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='2D Affine Transform'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Stub'/> \
<Property name='Description' type='string' value='2D Affine Transform'/> \
<Inputs> \
<Input name='Source'/> \
</Inputs> \
</Effect>";
static const struct d2d_effect_info builtin_effects[] =
{
{&CLSID_D2D12DAffineTransform, 1, 1, 1},
{&CLSID_D2D13DPerspectiveTransform, 1, 1, 1},
{&CLSID_D2D1Composite, 2, 1, 0xffffffff},
{&CLSID_D2D1Crop, 1, 1, 1},
{&CLSID_D2D1Shadow, 1, 1, 1},
{&CLSID_D2D1Grayscale, 1, 1, 1},
};
static const WCHAR _3d_perspective_transform_description[] =
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='3D Perspective Transform'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Stub'/> \
<Property name='Description' type='string' value='3D Perspective Transform'/> \
<Inputs> \
<Input name='Source'/> \
</Inputs> \
</Effect>";
static const WCHAR composite_description[] =
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='Composite'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Stub'/> \
<Property name='Description' type='string' value='Composite'/> \
<Inputs minimum='1' maximum='0xffffffff' > \
<Input name='Source1'/> \
<Input name='Source2'/> \
</Inputs> \
</Effect>";
static const WCHAR crop_description[] =
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='Crop'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Stub'/> \
<Property name='Description' type='string' value='Crop'/> \
<Inputs > \
<Input name='Source'/> \
</Inputs> \
</Effect>";
static const WCHAR shadow_description[] =
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='Shadow'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Stub'/> \
<Property name='Description' type='string' value='Shadow'/> \
<Inputs > \
<Input name='Source'/> \
</Inputs> \
</Effect>";
static const WCHAR grayscale_description[] =
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='Grayscale'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Stub'/> \
<Property name='Description' type='string' value='Grayscale'/> \
<Inputs > \
<Input name='Source'/> \
</Inputs> \
</Effect>";
void d2d_effects_init_builtins(struct d2d_factory *factory)
{
struct d2d_effect_registration *effect;
static const struct builtin_description
{
const CLSID *clsid;
const WCHAR *description;
}
builtin_effects[] =
{
{ &CLSID_D2D12DAffineTransform, _2d_affine_transform_description },
{ &CLSID_D2D13DPerspectiveTransform, _3d_perspective_transform_description},
{ &CLSID_D2D1Composite, composite_description },
{ &CLSID_D2D1Crop, crop_description },
{ &CLSID_D2D1Shadow, shadow_description },
{ &CLSID_D2D1Grayscale, grayscale_description },
};
unsigned int i;
HRESULT hr;
for (i = 0; i < ARRAY_SIZE(builtin_effects); ++i)
{
const struct d2d_effect_info *info = &builtin_effects[i];
WCHAR max_inputs[32];
if (!(effect = calloc(1, sizeof(*effect))))
return;
swprintf(max_inputs, ARRAY_SIZE(max_inputs), L"%lu", info->max_inputs);
d2d_effect_properties_add(&effect->properties, L"MinInputs", D2D1_PROPERTY_MIN_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, L"1");
d2d_effect_properties_add(&effect->properties, L"MaxInputs", D2D1_PROPERTY_MAX_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, max_inputs);
memcpy(&effect->id, info->clsid, sizeof(*info->clsid));
effect->default_input_count = info->default_input_count;
effect->factory = builtin_factory_stub;
effect->builtin = TRUE;
d2d_factory_register_effect(factory, effect);
if (FAILED(hr = d2d_factory_register_builtin_effect(factory, builtin_effects[i].clsid, builtin_effects[i].description,
NULL, 0, builtin_factory_stub)))
{
WARN("Failed to register the effect %s, hr %#lx.\n", wine_dbgstr_guid(builtin_effects[i].clsid), hr);
}
}
}
@ -304,25 +361,25 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties *
{
static const UINT32 sizes[] =
{
0, /* D2D1_PROPERTY_TYPE_UNKNOWN */
0, /* D2D1_PROPERTY_TYPE_STRING */
sizeof(BOOL), /* D2D1_PROPERTY_TYPE_BOOL */
sizeof(UINT32), /* D2D1_PROPERTY_TYPE_UINT32 */
sizeof(INT32), /* D2D1_PROPERTY_TYPE_INT32 */
sizeof(float), /* D2D1_PROPERTY_TYPE_FLOAT */
2 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR2 */
3 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR3 */
4 * sizeof(float), /* D2D1_PROPERTY_TYPE_VECTOR4 */
0, /* FIXME: D2D1_PROPERTY_TYPE_BLOB */
sizeof(void *), /* D2D1_PROPERTY_TYPE_IUNKNOWN */
sizeof(UINT32), /* D2D1_PROPERTY_TYPE_ENUM */
sizeof(UINT32), /* D2D1_PROPERTY_TYPE_ARRAY */
sizeof(CLSID), /* D2D1_PROPERTY_TYPE_CLSID */
6 * sizeof(float), /* D2D1_PROPERTY_TYPE_MATRIX_3X2 */
12 * sizeof(float), /* D2D1_PROPERTY_TYPE_MATRIX_4X3 */
16 * sizeof(float), /* D2D1_PROPERTY_TYPE_MATRIX_4X4 */
20 * sizeof(float), /* D2D1_PROPERTY_TYPE_MATRIX_5X4 */
sizeof(void *), /* D2D1_PROPERTY_TYPE_COLOR_CONTEXT */
[D2D1_PROPERTY_TYPE_UNKNOWN] = 0,
[D2D1_PROPERTY_TYPE_STRING] = 0,
[D2D1_PROPERTY_TYPE_BOOL] = sizeof(BOOL),
[D2D1_PROPERTY_TYPE_UINT32] = sizeof(UINT32),
[D2D1_PROPERTY_TYPE_INT32] = sizeof(INT32),
[D2D1_PROPERTY_TYPE_FLOAT] = sizeof(float),
[D2D1_PROPERTY_TYPE_VECTOR2] = sizeof(D2D_VECTOR_2F),
[D2D1_PROPERTY_TYPE_VECTOR3] = sizeof(D2D_VECTOR_3F),
[D2D1_PROPERTY_TYPE_VECTOR4] = sizeof(D2D_VECTOR_4F),
[D2D1_PROPERTY_TYPE_BLOB] = 0 /* FIXME */,
[D2D1_PROPERTY_TYPE_IUNKNOWN] = sizeof(IUnknown *),
[D2D1_PROPERTY_TYPE_ENUM] = sizeof(UINT32),
[D2D1_PROPERTY_TYPE_ARRAY] = sizeof(UINT32),
[D2D1_PROPERTY_TYPE_CLSID] = sizeof(CLSID),
[D2D1_PROPERTY_TYPE_MATRIX_3X2] = sizeof(D2D_MATRIX_3X2_F),
[D2D1_PROPERTY_TYPE_MATRIX_4X3] = sizeof(D2D_MATRIX_4X3_F),
[D2D1_PROPERTY_TYPE_MATRIX_4X4] = sizeof(D2D_MATRIX_4X4_F),
[D2D1_PROPERTY_TYPE_MATRIX_5X4] = sizeof(D2D_MATRIX_5X4_F),
[D2D1_PROPERTY_TYPE_COLOR_CONTEXT] = sizeof(ID2D1ColorContext *),
};
struct d2d_effect_property *p;
HRESULT hr;
@ -387,6 +444,9 @@ static HRESULT d2d_effect_properties_internal_add(struct d2d_effect_properties *
{
case D2D1_PROPERTY_TYPE_UINT32:
case D2D1_PROPERTY_TYPE_INT32:
_uint32 = wcstoul(value, NULL, 0);
src = &_uint32;
break;
case D2D1_PROPERTY_TYPE_ENUM:
_uint32 = wcstoul(value, NULL, 10);
src = &_uint32;
@ -570,6 +630,13 @@ static HRESULT d2d_effect_property_get_value(const struct d2d_effect_properties
return S_OK;
}
HRESULT d2d_effect_property_get_uint32_value(const struct d2d_effect_properties *properties,
const struct d2d_effect_property *prop, UINT32 *value)
{
return d2d_effect_property_get_value(properties, prop, D2D1_PROPERTY_TYPE_UINT32,
(BYTE *)value, sizeof(*value));
}
static HRESULT d2d_effect_property_set_value(struct d2d_effect_properties *properties,
struct d2d_effect_property *prop, D2D1_PROPERTY_TYPE type, const BYTE *value, UINT32 size)
{
@ -746,7 +813,7 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadPixelShader(ID2D1EffectC
TRACE("iface %p, shader_id %s, buffer %p, buffer_size %u.\n",
iface, debugstr_guid(shader_id), buffer, buffer_size);
if (ID2D1EffectContext_IsShaderLoaded(iface, shader_id))
if (d2d_device_is_shader_loaded(effect_context->device_context->device, shader_id))
return S_OK;
if (FAILED(hr = ID3D11Device1_CreatePixelShader(effect_context->device_context->d3d_device,
@ -772,7 +839,7 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadVertexShader(ID2D1Effect
TRACE("iface %p, shader_id %s, buffer %p, buffer_size %u.\n",
iface, debugstr_guid(shader_id), buffer, buffer_size);
if (ID2D1EffectContext_IsShaderLoaded(iface, shader_id))
if (d2d_device_is_shader_loaded(effect_context->device_context->device, shader_id))
return S_OK;
if (FAILED(hr = ID3D11Device1_CreateVertexShader(effect_context->device_context->d3d_device,
@ -798,7 +865,7 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_context_LoadComputeShader(ID2D1Effec
TRACE("iface %p, shader_id %s, buffer %p, buffer_size %u.\n",
iface, debugstr_guid(shader_id), buffer, buffer_size);
if (ID2D1EffectContext_IsShaderLoaded(iface, shader_id))
if (d2d_device_is_shader_loaded(effect_context->device_context->device, shader_id))
return S_OK;
if (FAILED(hr = ID3D11Device1_CreateComputeShader(effect_context->device_context->d3d_device,
@ -978,7 +1045,8 @@ static void d2d_effect_cleanup(struct d2d_effect *effect)
}
free(effect->inputs);
ID2D1EffectContext_Release(&effect->effect_context->ID2D1EffectContext_iface);
ID2D1TransformGraph_Release(&effect->graph->ID2D1TransformGraph_iface);
if (effect->graph)
ID2D1TransformGraph_Release(&effect->graph->ID2D1TransformGraph_iface);
d2d_effect_properties_cleanup(&effect->properties);
if (effect->impl)
ID2D1EffectImpl_Release(effect->impl);
@ -1120,6 +1188,12 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_GetValueByName(ID2D1Effect *iface, c
value, value_size);
}
static HRESULT d2d_effect_get_value(struct d2d_effect *effect, UINT32 index, D2D1_PROPERTY_TYPE type,
BYTE *value, UINT32 value_size)
{
return ID2D1Properties_GetValue(&effect->properties.ID2D1Properties_iface, index, type, value, value_size);
}
static HRESULT STDMETHODCALLTYPE d2d_effect_GetValue(ID2D1Effect *iface, UINT32 index, D2D1_PROPERTY_TYPE type,
BYTE *value, UINT32 value_size)
{
@ -1127,8 +1201,7 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_GetValue(ID2D1Effect *iface, UINT32
TRACE("iface %p, index %#x, type %u, value %p, value_size %u.\n", iface, index, type, value, value_size);
return ID2D1Properties_GetValue(&effect->properties.ID2D1Properties_iface, index, type,
value, value_size);
return d2d_effect_get_value(effect, index, type, value, value_size);
}
static UINT32 STDMETHODCALLTYPE d2d_effect_GetValueSize(ID2D1Effect *iface, UINT32 index)
@ -1165,20 +1238,12 @@ static void STDMETHODCALLTYPE d2d_effect_SetInput(ID2D1Effect *iface, UINT32 ind
effect->inputs[index] = input;
}
static HRESULT STDMETHODCALLTYPE d2d_effect_SetInputCount(ID2D1Effect *iface, UINT32 count)
static HRESULT d2d_effect_set_input_count(struct d2d_effect *effect, UINT32 count)
{
struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
unsigned int i, min_inputs, max_inputs;
bool initialized = effect->inputs != NULL;
HRESULT hr = S_OK;
unsigned int i;
TRACE("iface %p, count %u.\n", iface, count);
d2d_effect_GetValue(iface, D2D1_PROPERTY_MIN_INPUTS, D2D1_PROPERTY_TYPE_UINT32,
(BYTE *)&min_inputs, sizeof(min_inputs));
d2d_effect_GetValue(iface, D2D1_PROPERTY_MAX_INPUTS, D2D1_PROPERTY_TYPE_UINT32,
(BYTE *)&max_inputs, sizeof(max_inputs));
if (count < min_inputs || count > max_inputs)
return E_INVALIDARG;
if (count == effect->input_count)
return S_OK;
@ -1189,21 +1254,52 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_SetInputCount(ID2D1Effect *iface, UI
if (effect->inputs[i])
ID2D1Image_Release(effect->inputs[i]);
}
effect->input_count = count;
return S_OK;
}
if (!d2d_array_reserve((void **)&effect->inputs, &effect->inputs_size,
count, sizeof(*effect->inputs)))
else
{
ERR("Failed to resize inputs array.\n");
return E_OUTOFMEMORY;
}
if (!d2d_array_reserve((void **)&effect->inputs, &effect->inputs_size,
count, sizeof(*effect->inputs)))
{
ERR("Failed to resize inputs array.\n");
return E_OUTOFMEMORY;
}
memset(&effect->inputs[effect->input_count], 0, sizeof(*effect->inputs) * (count - effect->input_count));
memset(&effect->inputs[effect->input_count], 0, sizeof(*effect->inputs) * (count - effect->input_count));
}
effect->input_count = count;
return S_OK;
if (initialized)
{
ID2D1TransformGraph_Release(&effect->graph->ID2D1TransformGraph_iface);
effect->graph = NULL;
if (!(effect->graph = calloc(1, sizeof(*effect->graph))))
return E_OUTOFMEMORY;
d2d_transform_graph_init(effect->graph);
if (FAILED(hr = ID2D1EffectImpl_SetGraph(effect->impl, &effect->graph->ID2D1TransformGraph_iface)))
WARN("Failed to set a new transform graph, hr %#lx.\n", hr);
}
return hr;
}
static HRESULT STDMETHODCALLTYPE d2d_effect_SetInputCount(ID2D1Effect *iface, UINT32 count)
{
struct d2d_effect *effect = impl_from_ID2D1Effect(iface);
unsigned int min_inputs, max_inputs;
TRACE("iface %p, count %u.\n", iface, count);
d2d_effect_get_value(effect, D2D1_PROPERTY_MIN_INPUTS, D2D1_PROPERTY_TYPE_UINT32,
(BYTE *)&min_inputs, sizeof(min_inputs));
d2d_effect_get_value(effect, D2D1_PROPERTY_MAX_INPUTS, D2D1_PROPERTY_TYPE_UINT32,
(BYTE *)&max_inputs, sizeof(max_inputs));
if (count < min_inputs || count > max_inputs)
return E_INVALIDARG;
return d2d_effect_set_input_count(effect, count);
}
static void STDMETHODCALLTYPE d2d_effect_GetInput(ID2D1Effect *iface, UINT32 index, ID2D1Image **input)
@ -1532,6 +1628,7 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec
const struct d2d_effect_registration *reg;
struct d2d_transform_graph *graph;
struct d2d_effect *object;
UINT32 input_count;
WCHAR clsidW[39];
HRESULT hr;
@ -1574,7 +1671,9 @@ HRESULT d2d_effect_create(struct d2d_device_context *context, const CLSID *effec
d2d_effect_properties_add(&object->properties, L"Precision", D2D1_PROPERTY_PRECISION, D2D1_PROPERTY_TYPE_ENUM, L"0");
d2d_effect_init_properties_vtbls(object);
d2d_effect_SetInputCount(&object->ID2D1Effect_iface, reg->default_input_count);
/* Sync instance input count with default input count from the description. */
d2d_effect_get_value(object, D2D1_PROPERTY_INPUTS, D2D1_PROPERTY_TYPE_ARRAY, (BYTE *)&input_count, sizeof(input_count));
d2d_effect_set_input_count(object, input_count);
if (FAILED(hr = reg->factory((IUnknown **)&object->impl)))
{

View file

@ -69,7 +69,7 @@ struct d2d_effect_registration * d2d_factory_get_registered_effect(ID2D1Factory
struct d2d_factory *factory = unsafe_impl_from_ID2D1Factory(iface);
struct d2d_effect_registration *reg;
d2d_effects_init_builtins(factory);
d2d_factory_init_builtin_effects(factory);
LIST_FOR_EACH_ENTRY(reg, &factory->effects, struct d2d_effect_registration, entry)
{
@ -677,25 +677,25 @@ static HRESULT parse_effect_get_property_type(IXmlReader *reader, D2D1_PROPERTY_
{
static const WCHAR *types[] =
{
L"", /* D2D1_PROPERTY_TYPE_UNKNOWN */
L"string", /* D2D1_PROPERTY_TYPE_STRING */
L"bool", /* D2D1_PROPERTY_TYPE_BOOL */
L"uint32", /* D2D1_PROPERTY_TYPE_UINT32 */
L"int32", /* D2D1_PROPERTY_TYPE_INT32 */
L"float", /* D2D1_PROPERTY_TYPE_FLOAT */
L"vector2", /* D2D1_PROPERTY_TYPE_VECTOR2 */
L"vector3", /* D2D1_PROPERTY_TYPE_VECTOR3 */
L"vector4", /* D2D1_PROPERTY_TYPE_VECTOR4 */
L"blob", /* D2D1_PROPERTY_TYPE_BLOB */
L"iunknown", /* D2D1_PROPERTY_TYPE_IUNKNOWN */
L"enum", /* D2D1_PROPERTY_TYPE_ENUM */
L"array", /* D2D1_PROPERTY_TYPE_ARRAY */
L"clsid", /* D2D1_PROPERTY_TYPE_CLSID */
L"matrix3x2", /* D2D1_PROPERTY_TYPE_MATRIX_3X2 */
L"matrix4x3", /* D2D1_PROPERTY_TYPE_MATRIX_4X3 */
L"matrix4x4", /* D2D1_PROPERTY_TYPE_MATRIX_4X4 */
L"matrix5x4", /* D2D1_PROPERTY_TYPE_MATRIX_5X4 */
L"colorcontext", /* D2D1_PROPERTY_TYPE_COLOR_CONTEXT */
[D2D1_PROPERTY_TYPE_UNKNOWN] = L"",
[D2D1_PROPERTY_TYPE_STRING] = L"string",
[D2D1_PROPERTY_TYPE_BOOL] = L"bool",
[D2D1_PROPERTY_TYPE_UINT32] = L"uint32",
[D2D1_PROPERTY_TYPE_INT32] = L"int32",
[D2D1_PROPERTY_TYPE_FLOAT] = L"float",
[D2D1_PROPERTY_TYPE_VECTOR2] = L"vector2",
[D2D1_PROPERTY_TYPE_VECTOR3] = L"vector3",
[D2D1_PROPERTY_TYPE_VECTOR4] = L"vector4",
[D2D1_PROPERTY_TYPE_BLOB] = L"blob",
[D2D1_PROPERTY_TYPE_IUNKNOWN] = L"iunknown",
[D2D1_PROPERTY_TYPE_ENUM] = L"enum",
[D2D1_PROPERTY_TYPE_ARRAY] = L"array",
[D2D1_PROPERTY_TYPE_CLSID] = L"clsid",
[D2D1_PROPERTY_TYPE_MATRIX_3X2] = L"matrix3x2",
[D2D1_PROPERTY_TYPE_MATRIX_4X3] = L"matrix4x3",
[D2D1_PROPERTY_TYPE_MATRIX_4X4] = L"matrix4x4",
[D2D1_PROPERTY_TYPE_MATRIX_5X4] = L"matrix5x4",
[D2D1_PROPERTY_TYPE_COLOR_CONTEXT] = L"colorcontext",
};
unsigned int i;
WCHAR *value;
@ -788,12 +788,13 @@ static HRESULT parse_effect_property(IXmlReader *reader, struct d2d_effect_regis
static HRESULT parse_effect_inputs(IXmlReader *reader, struct d2d_effect_registration *effect)
{
struct d2d_effect_property *inputs, *min_inputs, *max_inputs;
struct d2d_effect_properties *subproperties;
UINT32 min_inputs_value, max_inputs_value;
unsigned int depth, input_count = 0;
struct d2d_effect_property *inputs;
XmlNodeType node_type;
WCHAR nameW[16];
WCHAR *name;
WCHAR *name, *value;
WCHAR buffW[16];
HRESULT hr;
if (FAILED(hr = d2d_effect_properties_add(&effect->properties, L"Inputs",
@ -811,28 +812,92 @@ static HRESULT parse_effect_inputs(IXmlReader *reader, struct d2d_effect_registr
d2d_effect_subproperties_add(subproperties, L"DisplayName", D2D1_SUBPROPERTY_DISPLAYNAME,
D2D1_PROPERTY_TYPE_STRING, L"Inputs");
if (IXmlReader_IsEmptyElement(reader)) return S_OK;
while (parse_effect_get_next_xml_node(reader, XmlNodeType_None, L"Input", &depth) == S_OK)
if (SUCCEEDED(parse_effect_get_attribute(reader, L"minimum", &value)))
{
if (FAILED(hr = IXmlReader_GetNodeType(reader, &node_type))) return hr;
if (node_type == XmlNodeType_EndElement) continue;
if (node_type != XmlNodeType_Element) return HRESULT_FROM_WIN32(ERROR_NOT_FOUND);
if (FAILED(hr = parse_effect_get_attribute(reader, L"name", &name))) return hr;
swprintf(nameW, ARRAY_SIZE(nameW), L"%lu", input_count);
d2d_effect_subproperties_add(subproperties, nameW, input_count, D2D1_PROPERTY_TYPE_STRING, name);
input_count++;
free(name);
hr = d2d_effect_properties_add(&effect->properties, L"MinInputs", D2D1_PROPERTY_MIN_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, value);
free(value);
if (FAILED(hr)) return hr;
}
if (SUCCEEDED(parse_effect_get_attribute(reader, L"maximum", &value)))
{
hr = d2d_effect_properties_add(&effect->properties, L"MaxInputs", D2D1_PROPERTY_MAX_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, value);
free(value);
if (FAILED(hr)) return hr;
}
*(UINT32 *)(effect->properties.data.ptr + inputs->data.offset) = input_count;
if (FAILED(hr = IXmlReader_GetNodeType(reader, &node_type))) return hr;
if (node_type != XmlNodeType_EndElement) return HRESULT_FROM_WIN32(ERROR_NOT_FOUND);
min_inputs = d2d_effect_properties_get_property_by_name(&effect->properties, L"MinInputs");
max_inputs = d2d_effect_properties_get_property_by_name(&effect->properties, L"MaxInputs");
return S_OK;
if (!IXmlReader_IsEmptyElement(reader))
{
while (parse_effect_get_next_xml_node(reader, XmlNodeType_None, L"Input", &depth) == S_OK)
{
if (FAILED(hr = IXmlReader_GetNodeType(reader, &node_type))) return hr;
if (node_type == XmlNodeType_EndElement) continue;
if (node_type != XmlNodeType_Element) return HRESULT_FROM_WIN32(ERROR_NOT_FOUND);
if (FAILED(hr = parse_effect_get_attribute(reader, L"name", &name))) return hr;
swprintf(buffW, ARRAY_SIZE(buffW), L"%lu", input_count);
d2d_effect_subproperties_add(subproperties, buffW, input_count, D2D1_PROPERTY_TYPE_STRING, name);
input_count++;
free(name);
}
*(UINT32 *)(effect->properties.data.ptr + inputs->data.offset) = input_count;
if (FAILED(hr = IXmlReader_GetNodeType(reader, &node_type))) return hr;
if (node_type != XmlNodeType_EndElement) return HRESULT_FROM_WIN32(ERROR_NOT_FOUND);
}
if (min_inputs)
d2d_effect_property_get_uint32_value(&effect->properties, min_inputs, &min_inputs_value);
if (max_inputs)
d2d_effect_property_get_uint32_value(&effect->properties, max_inputs, &max_inputs_value);
/* Validate the range */
if (min_inputs && max_inputs)
{
if (min_inputs_value > max_inputs_value)
{
WARN("Invalid input count range %u - %u.\n", min_inputs_value, max_inputs_value);
return E_INVALIDARG;
}
}
/* Validate actual input count with specified range. */
if (min_inputs && min_inputs_value > input_count)
{
WARN("Too few inputs were declared, expected at least %u.\n", min_inputs_value);
return E_INVALIDARG;
}
if (max_inputs && max_inputs_value < input_count)
{
WARN("Too many inputs were declared, expected at most %u.\n", max_inputs_value);
return E_INVALIDARG;
}
/* Apply default value to a missing property. If both properties are missing, add them. */
if (min_inputs != max_inputs)
{
swprintf(buffW, ARRAY_SIZE(buffW), L"%lu", min_inputs ? min_inputs_value : max_inputs_value);
if (min_inputs)
hr = d2d_effect_properties_add(&effect->properties, L"MaxInputs", D2D1_PROPERTY_MAX_INPUTS, D2D1_PROPERTY_TYPE_UINT32, buffW);
else
hr = d2d_effect_properties_add(&effect->properties, L"MinInputs", D2D1_PROPERTY_MIN_INPUTS, D2D1_PROPERTY_TYPE_UINT32, buffW);
}
else if (!min_inputs)
{
swprintf(buffW, ARRAY_SIZE(buffW), L"%lu", input_count);
hr = d2d_effect_properties_add(&effect->properties, L"MinInputs", D2D1_PROPERTY_MIN_INPUTS, D2D1_PROPERTY_TYPE_UINT32, buffW);
if (SUCCEEDED(hr))
hr = d2d_effect_properties_add(&effect->properties, L"MaxInputs", D2D1_PROPERTY_MAX_INPUTS, D2D1_PROPERTY_TYPE_UINT32, buffW);
}
return hr;
}
static HRESULT parse_effect_xml(IXmlReader *reader, struct d2d_effect_registration *effect)
@ -875,21 +940,15 @@ static HRESULT parse_effect_xml(IXmlReader *reader, struct d2d_effect_registrati
return hr;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Factory3 *iface,
static HRESULT d2d_factory_register_effect_from_stream(struct d2d_factory *factory,
REFCLSID effect_id, IStream *property_xml, const D2D1_PROPERTY_BINDING *bindings,
UINT32 binding_count, PD2D1_EFFECT_FACTORY effect_factory)
UINT32 binding_count, PD2D1_EFFECT_FACTORY effect_factory, BOOL builtin)
{
struct d2d_factory *factory = impl_from_ID2D1Factory3(iface);
struct d2d_effect_registration *effect;
IXmlReader *reader;
unsigned int i;
HRESULT hr;
TRACE("iface %p, effect_id %s, property_xml %p, bindings %p, binding_count %u, effect_factory %p.\n",
iface, debugstr_guid(effect_id), property_xml, bindings, binding_count, effect_factory);
d2d_factory_init_builtin_effects(factory);
LIST_FOR_EACH_ENTRY_REV(effect, &factory->effects, struct d2d_effect_registration, entry)
{
if (IsEqualGUID(effect_id, &effect->id))
@ -914,6 +973,7 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Facto
IXmlReader_Release(reader);
return E_OUTOFMEMORY;
}
effect->builtin = builtin;
hr = parse_effect_xml(reader, effect);
IXmlReader_Release(reader);
@ -955,28 +1015,35 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Facto
effect->registration_count = 1;
effect->id = *effect_id;
effect->factory = effect_factory;
d2d_effect_properties_add(&effect->properties, L"MinInputs", D2D1_PROPERTY_MIN_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, L"1");
d2d_effect_properties_add(&effect->properties, L"MaxInputs", D2D1_PROPERTY_MAX_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, L"1" /* FIXME */);
effect->default_input_count = 1;
d2d_factory_register_effect(factory, effect);
return S_OK;
}
static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromString(ID2D1Factory3 *iface,
REFCLSID effect_id, const WCHAR *property_xml, const D2D1_PROPERTY_BINDING *bindings,
static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromStream(ID2D1Factory3 *iface,
REFCLSID effect_id, IStream *property_xml, const D2D1_PROPERTY_BINDING *bindings,
UINT32 binding_count, PD2D1_EFFECT_FACTORY effect_factory)
{
struct d2d_factory *factory = impl_from_ID2D1Factory3(iface);
TRACE("iface %p, effect_id %s, property_xml %p, bindings %p, binding_count %u, effect_factory %p.\n",
iface, debugstr_guid(effect_id), property_xml, bindings, binding_count, effect_factory);
d2d_factory_init_builtin_effects(factory);
return d2d_factory_register_effect_from_stream(factory, effect_id, property_xml, bindings,
binding_count, effect_factory, FALSE);
}
static HRESULT d2d_factory_register_effect_from_string(struct d2d_factory *factory,
REFCLSID effect_id, const WCHAR *property_xml, const D2D1_PROPERTY_BINDING *bindings,
UINT32 binding_count, PD2D1_EFFECT_FACTORY effect_factory, BOOL builtin)
{
static const LARGE_INTEGER zero;
IStream *stream;
ULONG size;
HRESULT hr;
TRACE("iface %p, effect_id %s, property_xml %s, bindings %p, binding_count %u, effect_factory %p.\n",
iface, debugstr_guid(effect_id), debugstr_w(property_xml), bindings, binding_count, effect_factory);
if (FAILED(hr = CreateStreamOnHGlobal(NULL, TRUE, &stream)))
return hr;
@ -985,13 +1052,36 @@ static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromString(ID2D1Facto
hr = IStream_Seek(stream, zero, SEEK_SET, NULL);
if (SUCCEEDED(hr))
hr = ID2D1Factory3_RegisterEffectFromStream(iface, effect_id, stream, bindings,
binding_count, effect_factory);
hr = d2d_factory_register_effect_from_stream(factory, effect_id, stream, bindings,
binding_count, effect_factory, builtin);
IStream_Release(stream);
return hr;
}
HRESULT d2d_factory_register_builtin_effect(struct d2d_factory *factory, REFCLSID effect_id,
const WCHAR *property_xml, const D2D1_PROPERTY_BINDING *bindings, UINT32 binding_count,
PD2D1_EFFECT_FACTORY effect_factory)
{
return d2d_factory_register_effect_from_string(factory, effect_id, property_xml, bindings,
binding_count, effect_factory, TRUE);
}
static HRESULT STDMETHODCALLTYPE d2d_factory_RegisterEffectFromString(ID2D1Factory3 *iface,
REFCLSID effect_id, const WCHAR *property_xml, const D2D1_PROPERTY_BINDING *bindings,
UINT32 binding_count, PD2D1_EFFECT_FACTORY effect_factory)
{
struct d2d_factory *factory = impl_from_ID2D1Factory3(iface);
TRACE("iface %p, effect_id %s, property_xml %s, bindings %p, binding_count %u, effect_factory %p.\n",
iface, debugstr_guid(effect_id), debugstr_w(property_xml), bindings, binding_count, effect_factory);
d2d_factory_init_builtin_effects(factory);
return d2d_factory_register_effect_from_string(factory, effect_id, property_xml, bindings,
binding_count, effect_factory, FALSE);
}
static HRESULT STDMETHODCALLTYPE d2d_factory_UnregisterEffect(ID2D1Factory3 *iface, REFCLSID effect_id)
{
struct d2d_factory *factory = impl_from_ID2D1Factory3(iface);

View file

@ -16,10 +16,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC optimize "O2,no-strict-aliasing,excess-precision=standard"
#endif
#include "d2d1_private.h"
#include <float.h>
@ -1539,7 +1535,7 @@ static BOOL d2d_cdt_triangulate(struct d2d_cdt *cdt, size_t start_vertex, size_t
return TRUE;
}
/* More than tree vertices, divide. */
/* More than three vertices, divide. */
cut = vertex_count / 2;
if (!d2d_cdt_triangulate(cdt, start_vertex, cut, &left_outer, &left_inner))
return FALSE;
@ -2289,6 +2285,9 @@ static HRESULT d2d_path_geometry_triangulate(struct d2d_geometry *geometry)
size_t vertex_count, i, j;
struct d2d_cdt cdt = {0};
D2D1_POINT_2F *vertices;
#ifdef __i386__
unsigned int control_word_x87, mask = 0;
#endif
for (i = 0, vertex_count = 0; i < geometry->u.path.figure_count; ++i)
{
@ -2339,10 +2338,20 @@ static HRESULT d2d_path_geometry_triangulate(struct d2d_geometry *geometry)
cdt.free_edge = ~0u;
cdt.vertices = vertices;
#ifdef __i386__
control_word_x87 = _controlfp(0, 0);
_controlfp(_PC_24, mask = _MCW_PC);
#endif
if (!d2d_cdt_triangulate(&cdt, 0, vertex_count, &left_edge, &right_edge))
goto fail;
if (!d2d_cdt_insert_segments(&cdt, geometry))
goto fail;
#ifdef __i386__
_controlfp(control_word_x87, _MCW_PC);
mask = 0;
#endif
if (!d2d_cdt_generate_faces(&cdt, geometry))
goto fail;
@ -2354,6 +2363,9 @@ fail:
geometry->fill.vertex_count = 0;
free(vertices);
free(cdt.edges);
#ifdef __i386__
if (mask) _controlfp(control_word_x87, mask);
#endif
return E_FAIL;
}
@ -3235,6 +3247,7 @@ done:
if (FAILED(hr))
{
free(geometry->fill.bezier_vertices);
geometry->fill.bezier_vertices = NULL;
geometry->fill.bezier_vertex_count = 0;
d2d_path_geometry_free_figures(geometry);
geometry->u.path.state = D2D_GEOMETRY_STATE_ERROR;

View file

@ -1,5 +1,5 @@
TESTDLL = d2d1.dll
IMPORTS = d2d1 d3d10_1 d3d11 dwrite dxguid uuid user32 advapi32 ole32 gdi32
IMPORTS = d2d1 d3d10_1 d3d11 dwrite dxguid uuid user32 advapi32 ole32 gdi32 d3dcompiler
SOURCES = \
d2d1.c

View file

@ -20,6 +20,7 @@
#include <limits.h>
#include <math.h>
#include <float.h>
#include "d3dcompiler.h"
#include "d2d1_3.h"
#include "d2d1effectauthor.h"
#include "d3d11.h"
@ -53,10 +54,22 @@ L"<?xml version='1.0'?> \
<Property name='DisplayName' type='string' value='Int32 prop'/> \
<Property name='Default' type='int32' value='10'/> \
</Property> \
<Property name='Int32PropHex' type='int32' value='0xffff0001'> \
<Property name='DisplayName' type='string' value='Int32 prop hex'/> \
</Property> \
<Property name='Int32PropOct' type='int32' value='012'> \
<Property name='DisplayName' type='string' value='Int32 prop oct'/> \
</Property> \
<Property name='UInt32Prop' type='uint32' value='-3'> \
<Property name='DisplayName' type='string' value='UInt32 prop'/> \
<Property name='Default' type='uint32' value='10'/> \
</Property> \
<Property name='UInt32PropHex' type='uint32' value='0xfff'> \
<Property name='DisplayName' type='string' value='UInt32 prop hex'/> \
</Property> \
<Property name='UInt32PropOct' type='uint32' value='013'> \
<Property name='DisplayName' type='string' value='UInt32 prop oct'/> \
</Property> \
<Property name='Bool' type='bool'> \
<Property name='DisplayName' type='string' value='Bool property'/> \
<Property name='Default' type='bool' value='false'/> \
@ -220,38 +233,32 @@ L"<?xml version='1.0'?> \
</Effect> \
";
static const DWORD test_vs[] =
{
#if 0
void main(float4 pos : Position, out float4 output : SV_Position)
{
output = pos;
}
#endif
0x43425844, 0xa84b398b, 0xc4047d32, 0xc19c67bb, 0x4644285e, 0x00000001, 0x000000d8, 0x00000003,
0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
0x00000000, 0x00000000, 0x00000003, 0x00000000, 0x00000f0f, 0x69736f50, 0x6e6f6974, 0xababab00,
0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000001, 0x00000003,
0x00000000, 0x0000000f, 0x505f5653, 0x7469736f, 0x006e6f69, 0x52444853, 0x0000003c, 0x00010040,
0x0000000f, 0x0300005f, 0x001010f2, 0x00000000, 0x04000067, 0x001020f2, 0x00000000, 0x00000001,
0x05000036, 0x001020f2, 0x00000000, 0x00101e46, 0x00000000, 0x0100003e,
};
static const WCHAR *effect_variable_input_count =
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='VariableInputs'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Test'/> \
<Property name='Description' type='string' value='Test effect.'/> \
<Inputs minimum='2' maximum='5' > \
<Input name='Source1'/> \
<Input name='Source2'/> \
<Input name='Source3'/> \
</Inputs> \
</Effect> \
";
static const DWORD test_ps[] =
{
#if 0
float4 main() : SV_Target
{
return float4(0.1, 0.2, 0.3, 0.4);
}
#endif
0x43425844, 0xf34300ae, 0x22fc6d56, 0x5cca66fa, 0x86ae3266, 0x00000001, 0x000000b0, 0x00000003,
0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000,
0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00000038, 0x00000040, 0x0000000e,
0x03000065, 0x001020f2, 0x00000000, 0x08000036, 0x001020f2, 0x00000000, 0x00004002, 0x3dcccccd,
0x3e4ccccd, 0x3e99999a, 0x3ecccccd, 0x0100003e,
};
static const char test_vs_code[] =
"void main(float4 pos : Position, out float4 output : SV_Position)\n"
"{\n"
" output = pos;\n"
"}";
static const char test_ps_code[] =
"float4 main() : SV_Target\n"
"{\n"
" return float4(0.1, 0.2, 0.3, 0.4);\n"
"}";
static HRESULT (WINAPI *pD2D1CreateDevice)(IDXGIDevice *dxgi_device,
const D2D1_CREATION_PROPERTIES *properties, ID2D1Device **device);
@ -350,10 +357,12 @@ struct expected_geometry_figure
struct effect_impl
{
ID2D1EffectImpl ID2D1EffectImpl_iface;
ID2D1DrawTransform ID2D1DrawTransform_iface;
LONG refcount;
UINT integer;
ID2D1EffectContext *effect_context;
ID2D1TransformGraph *transform_graph;
ID2D1DrawInfo *draw_info;
};
static void queue_d3d1x_test(void (*test)(BOOL d3d11), BOOL d3d11)
@ -10795,7 +10804,7 @@ static void test_mt_factory(BOOL d3d11)
ID2D1Multithread_Enter(multithread);
thread = CreateThread(NULL, 0, mt_factory_test_thread_draw_func, ctx.rt, 0, NULL);
ok(!!thread, "Failed to create a thread.\n");
ret = WaitForSingleObject(thread, 1000);
ret = WaitForSingleObject(thread, 5000);
ok(ret == WAIT_OBJECT_0, "Didn't expect timeout.\n");
ID2D1Multithread_Leave(multithread);
WaitForSingleObject(thread, INFINITE);
@ -10805,8 +10814,8 @@ static void test_mt_factory(BOOL d3d11)
release_test_context(&ctx);
}
#define check_system_properties(effect, is_builtin) check_system_properties_(__LINE__, effect, is_builtin)
static void check_system_properties_(unsigned int line, ID2D1Effect *effect, BOOL is_builtin)
#define check_system_properties(effect) check_system_properties_(__LINE__, effect)
static void check_system_properties_(unsigned int line, ID2D1Effect *effect)
{
UINT i, value_size, str_size;
WCHAR name[32], buffer[256];
@ -10848,7 +10857,6 @@ static void check_system_properties_(unsigned int line, ID2D1Effect *effect, BOO
name[0] = 0;
hr = ID2D1Effect_GetPropertyName(effect, test->index, name, sizeof(name));
todo_wine_if((is_builtin && (test->type == D2D1_PROPERTY_TYPE_ARRAY || test->type == D2D1_PROPERTY_TYPE_STRING)))
ok_(__FILE__, line)(hr == S_OK, "Failed to get property name, hr %#lx\n", hr);
if (hr == D2DERR_INVALID_PROPERTY)
{
@ -10859,7 +10867,6 @@ static void check_system_properties_(unsigned int line, ID2D1Effect *effect, BOO
debugstr_w(name), debugstr_w(test->name));
type = ID2D1Effect_GetType(effect, test->index);
todo_wine_if((is_builtin && (test->type == D2D1_PROPERTY_TYPE_ARRAY || test->type == D2D1_PROPERTY_TYPE_STRING)))
ok_(__FILE__, line)(type == test->type, "Got unexpected property type %#x, expected %#x.\n",
type, test->type);
@ -10867,17 +10874,15 @@ static void check_system_properties_(unsigned int line, ID2D1Effect *effect, BOO
value_size = ID2D1Effect_GetValueSize(effect, test->index);
if (test->value_size != 0)
{
todo_wine_if(is_builtin && test->type == D2D1_PROPERTY_TYPE_ARRAY)
ok_(__FILE__, line)(value_size == test->value_size, "Got unexpected value size %u, expected %u.\n",
value_size, test->value_size);
}
else if (test->type == D2D1_PROPERTY_TYPE_STRING)
{
hr = ID2D1Effect_GetValue(effect, test->index, D2D1_PROPERTY_TYPE_STRING, (BYTE *)buffer, sizeof(buffer));
todo_wine_if(is_builtin)
ok_(__FILE__, line)(hr == S_OK, "Failed to get value, hr %#lx.\n", hr);
str_size = (wcslen((WCHAR *)buffer) + 1) * sizeof(WCHAR);
todo_wine_if(is_builtin || buffer[0] == 0)
todo_wine_if(buffer[0] == 0)
ok_(__FILE__, line)(value_size == str_size, "Got unexpected value size %u, expected %u.\n",
value_size, str_size);
}
@ -10967,12 +10972,12 @@ static void test_builtin_effect(BOOL d3d11)
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, sizeof(buffer));
todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
str_size = (wcslen((WCHAR *)buffer) + 1) * sizeof(WCHAR);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, str_size);
todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_DISPLAYNAME, D2D1_PROPERTY_TYPE_STRING, buffer, str_size - 1);
todo_wine ok(hr == D2DERR_INSUFFICIENT_BUFFER, "Got unexpected hr %#lx.\n", hr);
ok(hr == D2DERR_INSUFFICIENT_BUFFER, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID, 0xdeadbeef, (BYTE *)&clsid, sizeof(clsid));
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
@ -11091,8 +11096,15 @@ static inline struct effect_impl *impl_from_ID2D1EffectImpl(ID2D1EffectImpl *ifa
return CONTAINING_RECORD(iface, struct effect_impl, ID2D1EffectImpl_iface);
}
static inline struct effect_impl *impl_from_ID2D1DrawTransform(ID2D1DrawTransform *iface)
{
return CONTAINING_RECORD(iface, struct effect_impl, ID2D1DrawTransform_iface);
}
static HRESULT STDMETHODCALLTYPE effect_impl_QueryInterface(ID2D1EffectImpl *iface, REFIID iid, void **out)
{
struct effect_impl *effect_impl = impl_from_ID2D1EffectImpl(iface);
if (IsEqualGUID(iid, &IID_ID2D1EffectImpl)
|| IsEqualGUID(iid, &IID_IUnknown))
{
@ -11100,6 +11112,14 @@ static HRESULT STDMETHODCALLTYPE effect_impl_QueryInterface(ID2D1EffectImpl *ifa
*out = iface;
return S_OK;
}
else if (IsEqualGUID(iid, &IID_ID2D1DrawTransform)
|| IsEqualGUID(iid, &IID_ID2D1Transform)
|| IsEqualGUID(iid, &IID_ID2D1TransformNode))
{
ID2D1EffectImpl_AddRef(iface);
*out = &effect_impl->ID2D1DrawTransform_iface;
return S_OK;
}
*out = NULL;
return E_NOINTERFACE;
@ -11121,6 +11141,8 @@ static ULONG STDMETHODCALLTYPE effect_impl_Release(ID2D1EffectImpl *iface)
{
if (effect_impl->effect_context)
ID2D1EffectContext_Release(effect_impl->effect_context);
if (effect_impl->draw_info)
ID2D1DrawInfo_Release(effect_impl->draw_info);
free(effect_impl);
}
@ -11143,7 +11165,12 @@ static HRESULT STDMETHODCALLTYPE effect_impl_PrepareForRender(ID2D1EffectImpl *i
static HRESULT STDMETHODCALLTYPE effect_impl_SetGraph(ID2D1EffectImpl *iface, ID2D1TransformGraph *graph)
{
return E_NOTIMPL;
struct effect_impl *effect_impl = impl_from_ID2D1EffectImpl(iface);
ID2D1TransformGraph_Release(effect_impl->transform_graph);
ID2D1TransformGraph_AddRef(effect_impl->transform_graph = graph);
return S_OK;
}
static const ID2D1EffectImplVtbl effect_impl_vtbl =
@ -11451,6 +11478,40 @@ static void test_effect_register(BOOL d3d11)
hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_D2D1Composite);
ok(hr == D2DERR_EFFECT_IS_NOT_REGISTERED, "Got unexpected hr %#lx.\n", hr);
/* Variable input count. */
hr = ID2D1Factory1_RegisterEffectFromString(factory, &CLSID_TestEffect,
effect_variable_input_count, NULL, 0, effect_impl_create);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DeviceContext_CreateEffect(device_context, &CLSID_TestEffect, &effect);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
integer = ID2D1Effect_GetInputCount(effect);
ok(integer == 3, "Unexpected input count %u.\n", integer);
integer = 0;
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_MIN_INPUTS, D2D1_PROPERTY_TYPE_UINT32,
(BYTE *)&integer, sizeof(integer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(integer == 2, "Unexpected value %u.\n", integer);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_MAX_INPUTS, D2D1_PROPERTY_TYPE_UINT32,
(BYTE *)&integer, sizeof(integer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(integer == 5, "Unexpected value %u.\n", integer);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_INPUTS, D2D1_PROPERTY_TYPE_ARRAY,
(BYTE *)&integer, sizeof(integer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(integer == 3, "Unexpected data %u.\n", integer);
hr = ID2D1Effect_SetInputCount(effect, 4);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_INPUTS, D2D1_PROPERTY_TYPE_ARRAY,
(BYTE *)&integer, sizeof(integer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(integer == 3, "Unexpected data %u.\n", integer);
ID2D1Effect_Release(effect);
hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
release_test_context(&ctx);
}
@ -11463,6 +11524,7 @@ static void test_effect_context(BOOL d3d11)
struct d2d1_test_context ctx;
ID2D1Factory1 *factory;
ID2D1Device *device;
ID3D10Blob *vs, *ps;
ULONG refcount;
BOOL loaded;
HRESULT hr;
@ -11478,6 +11540,14 @@ static void test_effect_context(BOOL d3d11)
return;
}
hr = D3DCompile(test_vs_code, sizeof(test_vs_code) - 1, "test_vs", NULL, NULL,
"main", "vs_4_0", 0, 0, &vs, NULL);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = D3DCompile(test_ps_code, sizeof(test_ps_code) - 1, "test_ps", NULL, NULL,
"main", "ps_4_0", 0, 0, &ps, NULL);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
binding.propertyName = L"Context";
binding.setFunction = NULL;
binding.getFunction = effect_impl_get_context;
@ -11500,26 +11570,26 @@ static void test_effect_context(BOOL d3d11)
ok(!loaded, "Unexpected shader loaded state.\n");
hr = ID2D1EffectContext_LoadVertexShader(effect_context,
&GUID_TestVertexShader, (const BYTE *)test_ps, sizeof(test_ps));
&GUID_TestVertexShader, ID3D10Blob_GetBufferPointer(ps), ID3D10Blob_GetBufferSize(ps));
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1EffectContext_LoadVertexShader(effect_context,
&GUID_TestVertexShader, (const BYTE *)test_vs, sizeof(test_vs));
&GUID_TestVertexShader, ID3D10Blob_GetBufferPointer(vs), ID3D10Blob_GetBufferSize(vs));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
loaded = ID2D1EffectContext_IsShaderLoaded(effect_context, &GUID_TestVertexShader);
ok(loaded, "Unexpected shader loaded state.\n");
hr = ID2D1EffectContext_LoadVertexShader(effect_context,
&GUID_TestVertexShader, (const BYTE *)test_ps, sizeof(test_ps));
&GUID_TestVertexShader, ID3D10Blob_GetBufferPointer(ps), ID3D10Blob_GetBufferSize(ps));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1EffectContext_LoadVertexShader(effect_context,
&GUID_TestVertexShader, (const BYTE *)test_vs, sizeof(test_vs));
&GUID_TestVertexShader, ID3D10Blob_GetBufferPointer(vs), ID3D10Blob_GetBufferSize(vs));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1EffectContext_LoadPixelShader(effect_context,
&GUID_TestPixelShader, (const BYTE *)test_vs, sizeof(test_vs));
&GUID_TestPixelShader, ID3D10Blob_GetBufferPointer(vs), ID3D10Blob_GetBufferSize(vs));
ok(hr == E_INVALIDARG, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1EffectContext_LoadPixelShader(effect_context,
&GUID_TestPixelShader, (const BYTE *)test_ps, sizeof(test_ps));
&GUID_TestPixelShader, ID3D10Blob_GetBufferPointer(ps), ID3D10Blob_GetBufferSize(ps));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
loaded = ID2D1EffectContext_IsShaderLoaded(effect_context, &GUID_TestPixelShader);
ok(loaded, "Unexpected shader loaded state.\n");
@ -11580,6 +11650,10 @@ static void test_effect_context(BOOL d3d11)
hr = ID2D1Factory1_UnregisterEffect(factory, &CLSID_TestEffect);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID3D10Blob_Release(vs);
ID3D10Blob_Release(ps);
release_test_context(&ctx);
}
@ -11700,6 +11774,28 @@ static void test_effect_properties(BOOL d3d11)
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(val == -2, "Unexpected value %d.\n", val);
/* Int32 property, hex literal. */
index = ID2D1Effect_GetPropertyIndex(effect, L"Int32PropHex");
hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!wcscmp(buffer, L"Int32PropHex"), "Unexpected name %s.\n", wine_dbgstr_w(buffer));
prop_type = ID2D1Effect_GetType(effect, index);
ok(prop_type == D2D1_PROPERTY_TYPE_INT32, "Unexpected type %u.\n", prop_type);
hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_INT32, (BYTE *)&val, sizeof(val));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(val == -65535, "Unexpected value %d.\n", val);
/* Int32 property, octal literal. */
index = ID2D1Effect_GetPropertyIndex(effect, L"Int32PropOct");
hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!wcscmp(buffer, L"Int32PropOct"), "Unexpected name %s.\n", wine_dbgstr_w(buffer));
prop_type = ID2D1Effect_GetType(effect, index);
ok(prop_type == D2D1_PROPERTY_TYPE_INT32, "Unexpected type %u.\n", prop_type);
hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_INT32, (BYTE *)&val, sizeof(val));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(val == 10, "Unexpected value %d.\n", val);
/* UInt32 property. */
index = ID2D1Effect_GetPropertyIndex(effect, L"UInt32Prop");
hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
@ -11711,6 +11807,17 @@ static void test_effect_properties(BOOL d3d11)
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(integer == -3, "Unexpected value %u.\n", integer);
/* UInt32 property, hex literal. */
index = ID2D1Effect_GetPropertyIndex(effect, L"UInt32PropHex");
hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!wcscmp(buffer, L"UInt32PropHex"), "Unexpected name %s.\n", wine_dbgstr_w(buffer));
prop_type = ID2D1Effect_GetType(effect, index);
ok(prop_type == D2D1_PROPERTY_TYPE_UINT32, "Unexpected type %u.\n", prop_type);
hr = ID2D1Effect_GetValue(effect, index, D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&integer, sizeof(integer));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(integer == 0xfff, "Unexpected value %x.\n", integer);
/* Vector2 property. */
index = ID2D1Effect_GetPropertyIndex(effect, L"Vec2Prop");
hr = ID2D1Effect_GetPropertyName(effect, index, buffer, ARRAY_SIZE(buffer));
@ -11814,7 +11921,7 @@ static void test_effect_properties(BOOL d3d11)
hr = ID2D1DeviceContext_CreateEffect(ctx.context, &CLSID_TestEffect, &effect);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_system_properties(effect, FALSE);
check_system_properties(effect);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_CLSID,
D2D1_PROPERTY_TYPE_CLSID, (BYTE *)&clsid, sizeof(clsid));
@ -11859,14 +11966,12 @@ static void test_effect_properties(BOOL d3d11)
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_MIN_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&min_inputs, sizeof(min_inputs));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
todo_wine_if(test->min_inputs == 0)
ok(min_inputs == test->min_inputs, "Got unexpected min inputs %u, expected %u.\n",
min_inputs, test->min_inputs);
hr = ID2D1Effect_GetValue(effect, D2D1_PROPERTY_MAX_INPUTS,
D2D1_PROPERTY_TYPE_UINT32, (BYTE *)&max_inputs, sizeof(max_inputs));
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
todo_wine_if(test->max_inputs == 0)
ok(max_inputs == test->max_inputs, "Got unexpected max inputs %u, expected %u.\n",
max_inputs, test->max_inputs);
@ -12186,7 +12291,7 @@ static void test_effect_2d_affine(BOOL d3d11)
hr = ID2D1DeviceContext_CreateEffect(context, &CLSID_D2D12DAffineTransform, &effect);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_system_properties(effect, TRUE);
check_system_properties(effect);
count = ID2D1Effect_GetPropertyCount(effect);
todo_wine ok(count == 4, "Got unexpected property count %u.\n", count);
@ -12329,7 +12434,7 @@ static void test_effect_crop(BOOL d3d11)
hr = ID2D1DeviceContext_CreateEffect(context, &CLSID_D2D1Crop, &effect);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_system_properties(effect, TRUE);
check_system_properties(effect);
count = ID2D1Effect_GetPropertyCount(effect);
todo_wine ok(count == 2, "Got unexpected property count %u.\n", count);
@ -12413,7 +12518,7 @@ static void test_effect_grayscale(BOOL d3d11)
hr = ID2D1DeviceContext_CreateEffect(context, &CLSID_D2D1Grayscale, &effect);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
check_system_properties(effect, TRUE);
check_system_properties(effect);
count = ID2D1Effect_GetPropertyCount(effect);
ok(!count, "Got unexpected property count %u.\n", count);
@ -14161,6 +14266,224 @@ static void test_dc_target_is_supported(BOOL d3d11)
release_test_context(&ctx);
}
static HRESULT STDMETHODCALLTYPE ps_effect_impl_Initialize(ID2D1EffectImpl *iface,
ID2D1EffectContext *context, ID2D1TransformGraph *graph)
{
static const char ps_code[] =
"float4 main() : sv_target\n"
"{\n"
" return float4(0.1, 0.2, 0.3, 0.4);\n"
"}";
struct effect_impl *effect_impl = impl_from_ID2D1EffectImpl(iface);
ID3D10Blob *blob;
HRESULT hr;
effect_impl->effect_context = context;
ID2D1EffectContext_AddRef(effect_impl->effect_context);
hr = D3DCompile(ps_code, strlen(ps_code), "test_ps", NULL, NULL, "main",
"ps_4_0", 0, 0, &blob, NULL);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr = ID2D1EffectContext_LoadPixelShader(context, &GUID_TestPixelShader,
ID3D10Blob_GetBufferPointer(blob), ID3D10Blob_GetBufferSize(blob))))
{
hr = ID2D1TransformGraph_SetSingleTransformNode(graph,
(ID2D1TransformNode *)&effect_impl->ID2D1DrawTransform_iface);
}
ID3D10Blob_Release(blob);
return hr;
}
static const ID2D1EffectImplVtbl ps_effect_impl_vtbl =
{
effect_impl_QueryInterface,
effect_impl_AddRef,
effect_impl_Release,
ps_effect_impl_Initialize,
effect_impl_PrepareForRender,
effect_impl_SetGraph,
};
static HRESULT STDMETHODCALLTYPE effect_impl_draw_transform_QueryInterface(
ID2D1DrawTransform *iface, REFIID iid, void **out)
{
struct effect_impl *effect_impl = impl_from_ID2D1DrawTransform(iface);
return ID2D1EffectImpl_QueryInterface(&effect_impl->ID2D1EffectImpl_iface, iid, out);
}
static ULONG STDMETHODCALLTYPE effect_impl_draw_transform_AddRef(ID2D1DrawTransform *iface)
{
struct effect_impl *effect_impl = impl_from_ID2D1DrawTransform(iface);
return ID2D1EffectImpl_AddRef(&effect_impl->ID2D1EffectImpl_iface);
}
static ULONG STDMETHODCALLTYPE effect_impl_draw_transform_Release(ID2D1DrawTransform *iface)
{
struct effect_impl *effect_impl = impl_from_ID2D1DrawTransform(iface);
return ID2D1EffectImpl_Release(&effect_impl->ID2D1EffectImpl_iface);
}
static UINT32 STDMETHODCALLTYPE effect_impl_draw_transform_GetInputCount(ID2D1DrawTransform *iface)
{
return 1;
}
static HRESULT STDMETHODCALLTYPE effect_impl_draw_transform_MapOutputRectToInputRects(
ID2D1DrawTransform *iface, const D2D1_RECT_L *output_rect, D2D1_RECT_L *input_rects,
UINT32 input_rect_count)
{
if (input_rect_count != 1)
return E_INVALIDARG;
input_rects[0] = *output_rect;
return S_OK;
}
static HRESULT STDMETHODCALLTYPE effect_impl_draw_transform_MapInputRectsToOutputRect(
ID2D1DrawTransform *iface, const D2D1_RECT_L *input_rects, const D2D1_RECT_L *input_opaque_rects,
UINT32 input_rect_count, D2D1_RECT_L *output_rect, D2D1_RECT_L *output_opaque_rect)
{
if (input_rect_count != 1)
return E_INVALIDARG;
*output_rect = input_rects[0];
memset(output_opaque_rect, 0, sizeof(*output_opaque_rect));
return S_OK;
}
static HRESULT STDMETHODCALLTYPE effect_impl_draw_transform_MapInvalidRect(
ID2D1DrawTransform *iface, UINT32 index, D2D1_RECT_L input_rect, D2D1_RECT_L *output_rect)
{
ok(0, "Unexpected call.\n");
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE effect_impl_draw_transform_SetDrawInfo(ID2D1DrawTransform *iface,
ID2D1DrawInfo *info)
{
return ID2D1DrawInfo_SetPixelShader(info, &GUID_TestPixelShader, 0);
}
static const ID2D1DrawTransformVtbl ps_effect_draw_transform_vtbl =
{
effect_impl_draw_transform_QueryInterface,
effect_impl_draw_transform_AddRef,
effect_impl_draw_transform_Release,
effect_impl_draw_transform_GetInputCount,
effect_impl_draw_transform_MapOutputRectToInputRects,
effect_impl_draw_transform_MapInputRectsToOutputRect,
effect_impl_draw_transform_MapInvalidRect,
effect_impl_draw_transform_SetDrawInfo,
};
static HRESULT STDMETHODCALLTYPE ps_effect_impl_create(IUnknown **effect_impl)
{
struct effect_impl *object;
if (!(object = calloc(1, sizeof(*object))))
return E_OUTOFMEMORY;
object->ID2D1EffectImpl_iface.lpVtbl = &ps_effect_impl_vtbl;
object->ID2D1DrawTransform_iface.lpVtbl = &ps_effect_draw_transform_vtbl;
object->refcount = 1;
*effect_impl = (IUnknown *)&object->ID2D1EffectImpl_iface;
return S_OK;
}
static void test_effect_custom_pixel_shader(BOOL d3d11)
{
static const WCHAR *description =
L"<?xml version='1.0'?> \
<Effect> \
<Property name='DisplayName' type='string' value='PSEffect'/> \
<Property name='Author' type='string' value='The Wine Project'/> \
<Property name='Category' type='string' value='Test'/> \
<Property name='Description' type='string' value='Test effect.'/> \
<Inputs> \
<Input name='Source'/> \
</Inputs> \
</Effect> \
";
D2D1_BITMAP_PROPERTIES1 bitmap_desc;
DWORD colour, expected_colour;
struct d2d1_test_context ctx;
struct resource_readback rb;
ID2D1DeviceContext *context;
D2D1_SIZE_U input_size;
ID2D1Factory1 *factory;
ID2D1Bitmap1 *bitmap;
ID2D1Effect *effect;
ID2D1Image *output;
DWORD pixel;
HRESULT hr;
if (!init_test_context(&ctx, d3d11))
return;
context = ctx.context;
factory = ctx.factory1;
if (!factory)
{
win_skip("ID2D1Factory1 is not supported.\n");
release_test_context(&ctx);
return;
}
hr = ID2D1Factory1_RegisterEffectFromString(factory, &CLSID_TestEffect, description, NULL,
0, ps_effect_impl_create);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
hr = ID2D1DeviceContext_CreateEffect(context, &CLSID_TestEffect, &effect);
todo_wine
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
if (FAILED(hr))
{
release_test_context(&ctx);
return;
}
set_size_u(&input_size, 1, 1);
pixel = 0xabcd00ff;
bitmap_desc.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM;
bitmap_desc.pixelFormat.alphaMode = D2D1_ALPHA_MODE_IGNORE;
bitmap_desc.dpiX = 96.0f;
bitmap_desc.dpiY = 96.0f;
bitmap_desc.bitmapOptions = D2D1_BITMAP_OPTIONS_NONE;
bitmap_desc.colorContext = NULL;
hr = ID2D1DeviceContext_CreateBitmap(context, input_size, &pixel, sizeof(pixel),
&bitmap_desc, &bitmap);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ID2D1Effect_SetInput(effect, 0, (ID2D1Image *)bitmap, FALSE);
ID2D1Effect_GetOutput(effect, &output);
ID2D1DeviceContext_BeginDraw(context);
ID2D1DeviceContext_Clear(context, 0);
ID2D1DeviceContext_DrawImage(context, output, NULL, NULL, 0, 0);
hr = ID2D1DeviceContext_EndDraw(context, NULL, NULL);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_readback(&ctx, &rb);
colour = get_readback_colour(&rb, 0, 0);
expected_colour = 0x661a334c;
todo_wine ok(compare_colour(colour, expected_colour, 1),
"Got unexpected colour %#lx, expected %#lx.\n", colour, expected_colour);
release_resource_readback(&rb);
ID2D1Image_Release(output);
ID2D1Bitmap1_Release(bitmap);
ID2D1Effect_Release(effect);
release_test_context(&ctx);
}
START_TEST(d2d1)
{
HMODULE d2d1_dll = GetModuleHandleA("d2d1.dll");
@ -14250,6 +14573,7 @@ START_TEST(d2d1)
queue_test(test_image_bounds);
queue_test(test_bitmap_map);
queue_test(test_bitmap_create);
queue_test(test_effect_custom_pixel_shader);
run_queued_tests();
}

View file

@ -1,11 +1,12 @@
MODULE = d3d10.dll
IMPORTLIB = d3d10
IMPORTS = uuid d3d10core d3dcompiler dxgi wined3d
IMPORTS = uuid d3d10core d3dcompiler_39 dxgi wined3d
EXTRADEFS = -DD3D_COMPILER_VERSION=0
PARENTSRC = ../d3dcompiler_43
EXTRAINCL = $(VKD3D_PE_CFLAGS)
SOURCES = \
blob.c \
d3d10_main.c \
effect.c \
reflection.c \

View file

@ -239,7 +239,7 @@ HRESULT WINAPI D3D10CompileEffectFromMemory(void *data, SIZE_T data_size, const
data, data_size, wine_dbgstr_a(filename), defines, include,
hlsl_flags, fx_flags, effect, errors);
return D3DCompile(data, data_size, filename, defines, include,
return D3DCompileFromMemory(data, data_size, filename, defines, include,
NULL, "fx_4_0", hlsl_flags, fx_flags, effect, errors);
}

View file

@ -315,4 +315,12 @@ HRESULT d3d10_effect_parse(struct d3d10_effect *effect, const void *data, SIZE_T
HRESULT WINAPI D3D10CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapter,
unsigned int flags, D3D_FEATURE_LEVEL feature_level, ID3D10Device **device);
/* d3dcompiler_39 function prototypes */
HRESULT WINAPI D3DCompileFromMemory(const void *data, SIZE_T data_size, const char *filename,
const D3D_SHADER_MACRO *defines, ID3DInclude *include, const char *entrypoint,
const char *target, UINT sflags, UINT eflags, ID3DBlob **shader, ID3DBlob **error_messages);
HRESULT WINAPI D3DDisassembleCode(const void *data, SIZE_T data_size,
UINT flags, const char *comments, ID3DBlob **disassembly);
#endif /* __WINE_D3D10_PRIVATE_H */

View file

@ -34,20 +34,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d10);
#define TAG_CLI4 MAKE_TAG('C', 'L', 'I', '4')
#define TAG_CTAB MAKE_TAG('C', 'T', 'A', 'B')
#define D3D10_FX10_TYPE_COLUMN_SHIFT 11
#define D3D10_FX10_TYPE_COLUMN_MASK (0x7 << D3D10_FX10_TYPE_COLUMN_SHIFT)
#define D3D10_FX10_TYPE_ROW_SHIFT 8
#define D3D10_FX10_TYPE_ROW_MASK (0x7 << D3D10_FX10_TYPE_ROW_SHIFT)
#define D3D10_FX10_TYPE_BASETYPE_SHIFT 3
#define D3D10_FX10_TYPE_BASETYPE_MASK (0x1f << D3D10_FX10_TYPE_BASETYPE_SHIFT)
#define D3D10_FX10_TYPE_CLASS_SHIFT 0
#define D3D10_FX10_TYPE_CLASS_MASK (0x7 << D3D10_FX10_TYPE_CLASS_SHIFT)
#define D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK 0x4000
static inline struct d3d10_effect *impl_from_ID3D10EffectPool(ID3D10EffectPool *iface)
{
return CONTAINING_RECORD(iface, struct d3d10_effect, ID3D10EffectPool_iface);
@ -1897,9 +1883,25 @@ static D3D10_SHADER_VARIABLE_TYPE d3d10_variable_type(uint32_t t, BOOL is_object
}
}
struct numeric_type
{
uint32_t type_class : 3;
uint32_t base_type : 5;
uint32_t rows : 3;
uint32_t columns : 3;
uint32_t column_major : 1;
uint32_t unknown : 17;
};
static HRESULT parse_fx10_type(const char *data, size_t data_size, uint32_t offset, struct d3d10_effect_type *t)
{
uint32_t typeinfo, type_flags, type_kind;
union
{
struct numeric_type type;
uint32_t data;
} numeric;
const char *ptr;
unsigned int i;
@ -1940,28 +1942,25 @@ static HRESULT parse_fx10_type(const char *data, size_t data_size, uint32_t offs
case 1:
TRACE("Type is numeric.\n");
if (!require_space(ptr - data, 1, sizeof(typeinfo), data_size))
if (!require_space(ptr - data, 1, sizeof(numeric), data_size))
{
WARN("Invalid offset %#x (data size %#Ix).\n", offset, data_size);
return E_FAIL;
}
typeinfo = read_u32(&ptr);
numeric.data = read_u32(&ptr);
t->member_count = 0;
t->column_count = (typeinfo & D3D10_FX10_TYPE_COLUMN_MASK) >> D3D10_FX10_TYPE_COLUMN_SHIFT;
t->row_count = (typeinfo & D3D10_FX10_TYPE_ROW_MASK) >> D3D10_FX10_TYPE_ROW_SHIFT;
t->basetype = d3d10_variable_type((typeinfo & D3D10_FX10_TYPE_BASETYPE_MASK)
>> D3D10_FX10_TYPE_BASETYPE_SHIFT, FALSE, &type_flags);
t->type_class = d3d10_variable_class((typeinfo & D3D10_FX10_TYPE_CLASS_MASK)
>> D3D10_FX10_TYPE_CLASS_SHIFT, typeinfo & D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK);
t->column_count = numeric.type.columns;
t->row_count = numeric.type.rows;
t->basetype = d3d10_variable_type(numeric.type.base_type, FALSE, &type_flags);
t->type_class = d3d10_variable_class(numeric.type.type_class, numeric.type.column_major);
TRACE("Type description: %#x.\n", typeinfo);
TRACE("Type description: %#x.\n", numeric.data);
TRACE("\tcolumns: %u.\n", t->column_count);
TRACE("\trows: %u.\n", t->row_count);
TRACE("\tbasetype: %s.\n", debug_d3d10_shader_variable_type(t->basetype));
TRACE("\tclass: %s.\n", debug_d3d10_shader_variable_class(t->type_class));
TRACE("\tunknown bits: %#x.\n", typeinfo & ~(D3D10_FX10_TYPE_COLUMN_MASK | D3D10_FX10_TYPE_ROW_MASK
| D3D10_FX10_TYPE_BASETYPE_MASK | D3D10_FX10_TYPE_CLASS_MASK | D3D10_FX10_TYPE_MATRIX_COLUMN_MAJOR_MASK));
TRACE("\tunknown bits: %#x.\n", numeric.type.unknown);
break;
case 2:
@ -3797,10 +3796,13 @@ static HRESULT create_buffer_object(struct d3d10_effect_variable *v)
static HRESULT parse_fx10_buffer(const char *data, size_t data_size, const char **ptr,
BOOL local, struct d3d10_effect_variable *l)
{
enum buffer_flags
{
IS_TBUFFER = 1,
};
const char *prefix = local ? "Local" : "Shared";
uint32_t offset, flags;
unsigned int i;
uint32_t offset;
D3D10_CBUFFER_TYPE d3d10_cbuffer_type;
HRESULT hr;
unsigned int stride = 0;
@ -3827,32 +3829,30 @@ static HRESULT parse_fx10_buffer(const char *data, size_t data_size, const char
l->data_size = read_u32(ptr);
TRACE("%s buffer data size: %#x.\n", prefix, l->data_size);
d3d10_cbuffer_type = read_u32(ptr);
TRACE("%s buffer type: %#x.\n", prefix, d3d10_cbuffer_type);
flags = read_u32(ptr);
TRACE("%s buffer flags: %#x.\n", prefix, flags);
switch(d3d10_cbuffer_type)
if (flags & IS_TBUFFER)
{
case D3D10_CT_CBUFFER:
l->type->basetype = D3D10_SVT_CBUFFER;
if (!copy_name("cbuffer", &l->type->name))
{
ERR("Failed to copy name.\n");
return E_OUTOFMEMORY;
}
break;
l->type->basetype = D3D10_SVT_TBUFFER;
copy_name("tbuffer", &l->type->name);
}
else
{
l->type->basetype = D3D10_SVT_CBUFFER;
copy_name("cbuffer", &l->type->name);
}
if (!l->type->name)
{
ERR("Failed to copy name.\n");
return E_OUTOFMEMORY;
}
case D3D10_CT_TBUFFER:
l->type->basetype = D3D10_SVT_TBUFFER;
if (!copy_name("tbuffer", &l->type->name))
{
ERR("Failed to copy name.\n");
return E_OUTOFMEMORY;
}
break;
default:
ERR("Unexpected D3D10_CBUFFER_TYPE %#x!\n", d3d10_cbuffer_type);
return E_FAIL;
flags &= ~IS_TBUFFER;
if (flags)
{
ERR("Unexpected buffer flags %#x.\n", flags);
return E_FAIL;
}
l->type->member_count = read_u32(ptr);

View file

@ -26,8 +26,7 @@ HRESULT WINAPI D3D10CompileShader(const char *data, SIZE_T data_size, const char
const D3D10_SHADER_MACRO *defines, ID3D10Include *include, const char *entrypoint,
const char *profile, UINT flags, ID3D10Blob **shader, ID3D10Blob **error_messages)
{
/* Forward to d3dcompiler */
return D3DCompile(data, data_size, filename, defines, include,
return D3DCompileFromMemory(data, data_size, filename, defines, include,
entrypoint, profile, flags, 0, shader, error_messages);
}
@ -37,5 +36,5 @@ HRESULT WINAPI D3D10DisassembleShader(const void *data, SIZE_T data_size,
TRACE("data %p, data_size %#Ix, color_code %#x, comments %p, disassembly %p.\n",
data, data_size, color_code, comments, disassembly);
return D3DDisassemble(data, data_size, color_code ? D3D_DISASM_ENABLE_COLOR_CODE : 0, comments, disassembly);
return D3DDisassembleCode(data, data_size, color_code ? D3D_DISASM_ENABLE_COLOR_CODE : 0, comments, disassembly);
}

View file

@ -9147,7 +9147,7 @@ static void test_effect_value_expression(void)
ID3D10Device_OMGetBlendState(device, &blend_state, blend_factor, &sample_mask);
ok(!blend_state, "Unexpected blend state %p.\n", blend_state);
for (idx = 0; idx < ARRAY_SIZE(blend_factor); ++idx)
ok(blend_factor[idx] == UINT_MAX, "Got unexpected blend_factor[%u] %.8e.\n", idx, blend_factor[idx]);
ok(blend_factor[idx] == (float)UINT_MAX, "Got unexpected blend_factor[%u] %.8e.\n", idx, blend_factor[idx]);
ok(!sample_mask, "Got unexpected sample_mask %#x.\n", sample_mask);
/* movc */
@ -9875,6 +9875,90 @@ static void test_effect_fx_4_1_blend_state(void)
ok(!refcount, "Device has %lu references left.\n", refcount);
}
static void test_effect_compiler(void)
{
static char empty_effect[] =
"technique10 {};";
static char empty_buffer[] =
"cbuffer cb1 { float4 m1; }\n"
"cbuffer cb2 { }\n"
"technique10 {};";
D3D10_EFFECT_VARIABLE_DESC var_desc;
ID3D10EffectConstantBuffer *cb;
D3D10_EFFECT_DESC desc;
ID3D10Device *device;
ID3D10Effect *effect;
ID3D10Blob *blob;
HRESULT hr;
if (!(device = create_device()))
{
skip("Failed to create device, skipping tests.\n");
return;
}
hr = D3D10CompileEffectFromMemory(empty_effect, sizeof(empty_effect), NULL, NULL, NULL, 0, 0,
&blob, NULL);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = create_effect(ID3D10Blob_GetBufferPointer(blob), 0, device, NULL, &effect);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ID3D10Effect_GetDesc(effect, &desc);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(desc.Techniques == 1, "Unexpected technique count %u.\n", desc.Techniques);
todo_wine
ok(desc.ConstantBuffers == 1, "Unexpected buffer count %u.\n", desc.ConstantBuffers);
cb = effect->lpVtbl->GetConstantBufferByIndex(effect, 0);
hr = cb->lpVtbl->GetDesc(cb, &var_desc);
todo_wine
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (hr == S_OK)
ok(!strcmp(var_desc.Name, "$Globals"), "Unexpected variable name %s.\n", var_desc.Name);
ID3D10Effect_Release(effect);
ID3D10Blob_Release(blob);
/* Empty user buffers. */
hr = D3D10CompileEffectFromMemory(empty_buffer, sizeof(empty_buffer), NULL, NULL, NULL, 0, 0,
&blob, NULL);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = create_effect(ID3D10Blob_GetBufferPointer(blob), 0, device, NULL, &effect);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = ID3D10Effect_GetDesc(effect, &desc);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(desc.Techniques == 1, "Unexpected technique count %u.\n", desc.Techniques);
todo_wine
ok(desc.ConstantBuffers == 3, "Unexpected buffer count %u.\n", desc.ConstantBuffers);
cb = effect->lpVtbl->GetConstantBufferByIndex(effect, 0);
hr = cb->lpVtbl->GetDesc(cb, &var_desc);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine
ok(!strcmp(var_desc.Name, "$Globals"), "Unexpected variable name %s.\n", var_desc.Name);
cb = effect->lpVtbl->GetConstantBufferByIndex(effect, 1);
hr = cb->lpVtbl->GetDesc(cb, &var_desc);
todo_wine
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (hr == S_OK)
ok(!strcmp(var_desc.Name, "cb1"), "Unexpected variable name %s.\n", var_desc.Name);
cb = effect->lpVtbl->GetConstantBufferByIndex(effect, 2);
hr = cb->lpVtbl->GetDesc(cb, &var_desc);
todo_wine
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (hr == S_OK)
ok(!strcmp(var_desc.Name, "cb2"), "Unexpected variable name %s.\n", var_desc.Name);
ID3D10Effect_Release(effect);
ID3D10Blob_Release(blob);
ID3D10Device_Release(device);
}
START_TEST(effect)
{
test_effect_constant_buffer_type();
@ -9903,4 +9987,5 @@ START_TEST(effect)
test_effect_value_expression();
test_effect_fx_4_1();
test_effect_fx_4_1_blend_state();
test_effect_compiler();
}

View file

@ -1039,6 +1039,44 @@ static void test_fx_4_1_blend_state(void)
ok(!refcount, "Device has %lu references left.\n", refcount);
}
static void test_shader_profiles(void)
{
const char *profile;
profile = D3D10GetVertexShaderProfile(NULL);
ok(!strcmp(profile, "vs_4_0"), "Unexpected profile %s.\n", profile);
profile = D3D10GetGeometryShaderProfile(NULL);
ok(!strcmp(profile, "gs_4_0"), "Unexpected profile %s.\n", profile);
profile = D3D10GetPixelShaderProfile(NULL);
ok(!strcmp(profile, "ps_4_0"), "Unexpected profile %s.\n", profile);
}
static void test_compile_effect(void)
{
char default_bs_source[] = "BlendState default_blend_state {};";
char bs_source2[] =
"BlendState blend_state\n"
"{\n"
" srcblend[0] = zero;\n"
"};";
ID3D10Blob *blob;
HRESULT hr;
hr = D3D10CompileEffectFromMemory(default_bs_source, strlen(default_bs_source),
NULL, NULL, NULL, 0, 0, &blob, NULL);
todo_wine
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
if (SUCCEEDED(hr))
ID3D10Blob_Release(blob);
/* Compilation fails due to 10.1 feature incompatibility with fx_4_0 profile. */
hr = D3D10CompileEffectFromMemory(bs_source2, strlen(bs_source2), NULL, NULL, NULL,
0, 0, &blob, NULL);
ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr);
}
START_TEST(d3d10_1)
{
test_create_device();
@ -1047,4 +1085,6 @@ START_TEST(d3d10_1)
test_create_blend_state();
test_getdc();
test_fx_4_1_blend_state();
test_shader_profiles();
test_compile_effect();
}

View file

@ -4162,6 +4162,35 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CheckFeatureSupport(ID3D11Device2
return S_OK;
}
case D3D11_FEATURE_D3D11_OPTIONS2:
{
D3D11_FEATURE_DATA_D3D11_OPTIONS2 *options = feature_support_data;
if (feature_support_data_size != sizeof(*options))
{
WARN("Invalid data size.\n");
return E_INVALIDARG;
}
wined3d_mutex_lock();
hr = wined3d_device_get_device_caps(device->wined3d_device, &wined3d_caps);
wined3d_mutex_unlock();
if (FAILED(hr))
{
WARN("Failed to get device caps, hr %#lx.\n", hr);
return hr;
}
options->PSSpecifiedStencilRefSupported = wined3d_caps.stencil_export;
options->TypedUAVLoadAdditionalFormats = FALSE;
options->ROVsSupported = FALSE;
options->ConservativeRasterizationTier = D3D11_CONSERVATIVE_RASTERIZATION_NOT_SUPPORTED;
options->TiledResourcesTier = D3D11_TILED_RESOURCES_NOT_SUPPORTED;
options->MapOnDefaultTextures = FALSE;
options->StandardSwizzle = FALSE;
options->UnifiedMemoryArchitecture = FALSE;
return S_OK;
}
case D3D11_FEATURE_D3D11_OPTIONS3:
{
D3D11_FEATURE_DATA_D3D11_OPTIONS3 *options = feature_support_data;

View file

@ -21,6 +21,7 @@
#include <float.h>
#include <limits.h>
#include <math.h>
#include <stdbool.h>
#include <stdlib.h>
#define COBJMACROS
#include "initguid.h"
@ -1646,6 +1647,16 @@ static BOOL check_compute_shaders_via_sm4_support(ID3D11Device *device)
return options.ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x;
}
static bool check_stencil_ref_export_support(ID3D11Device *device)
{
D3D11_FEATURE_DATA_D3D11_OPTIONS2 options;
if (FAILED(ID3D11Device_CheckFeatureSupport(device,
D3D11_FEATURE_D3D11_OPTIONS2, &options, sizeof(options))))
return false;
return options.PSSpecifiedStencilRefSupported;
}
static BOOL check_viewport_array_index_from_any_shader_support(ID3D11Device *device)
{
D3D11_FEATURE_DATA_D3D11_OPTIONS3 options;
@ -35452,6 +35463,707 @@ static void test_clear_during_render(void)
release_test_context(&test_context);
}
static void test_stencil_export(void)
{
D3D11_SHADER_RESOURCE_VIEW_DESC srv_desc;
D3D11_DEPTH_STENCIL_VIEW_DESC dsv_desc;
struct d3d11_test_context test_context;
D3D11_DEPTH_STENCIL_DESC ds_desc = {0};
ID3D11DepthStencilState *ds_state;
D3D11_TEXTURE2D_DESC texture_desc;
ID3D11PixelShader *ps, *ps_sample;
ID3D11ShaderResourceView *srv;
ID3D11DeviceContext *context;
struct resource_readback rb;
ID3D11DepthStencilView *dsv;
ID3D11RenderTargetView *rtv;
ID3D11Texture2D *rt, *ds;
ID3D11Device *device;
ID3D11Buffer *cb;
HRESULT hr;
static const DWORD ps_code[] =
{
#if 0
uint stencil_ref;
uint main() : SV_StencilRef
{
return stencil_ref;
}
#endif
0x43425844, 0x3980cb16, 0xbbe87d38, 0xb93f7c61, 0x200c41ed, 0x00000001, 0x000000cc, 0x00000004,
0x00000030, 0x00000040, 0x00000078, 0x000000bc, 0x4e475349, 0x00000008, 0x00000000, 0x00000008,
0x4e47534f, 0x00000030, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000001,
0xffffffff, 0x00000e01, 0x535f5653, 0x636e6574, 0x65526c69, 0xabab0066, 0x58454853, 0x0000003c,
0x00000050, 0x0000000f, 0x0100086a, 0x04000059, 0x00208e46, 0x00000000, 0x00000001, 0x02000065,
0x00029001, 0x05000036, 0x00029001, 0x0020800a, 0x00000000, 0x00000000, 0x0100003e, 0x30494653,
0x00000008, 0x00000200, 0x00000000,
};
static const DWORD ps_sample_code[] =
{
#if 0
Texture2D<uint4> tex : register(t0);
uint4 main(float4 pos : SV_Position) : SV_TARGET
{
return tex[uint2(pos.xy)].g;
}
#endif
0x43425844, 0xdd1e98d4, 0x53c81701, 0x576f6b2e, 0x040b18bb, 0x00000001, 0x0000014c, 0x00000003,
0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020,
0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x7469736f, 0x006e6f69,
0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000001,
0x00000000, 0x0000000f, 0x545f5653, 0x45475241, 0xabab0054, 0x58454853, 0x000000b0, 0x00000050,
0x0000002c, 0x0100086a, 0x04001858, 0x00107000, 0x00000000, 0x00004444, 0x04002064, 0x00101032,
0x00000000, 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x0500001c,
0x00100032, 0x00000000, 0x00101046, 0x00000000, 0x08000036, 0x001000c2, 0x00000000, 0x00004002,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x8900002d, 0x800000c2, 0x00111103, 0x00100012,
0x00000000, 0x00100e46, 0x00000000, 0x00107e16, 0x00000000, 0x05000036, 0x001020f2, 0x00000000,
0x00100006, 0x00000000, 0x0100003e,
};
static const float black[] = {0.0f, 0.0f, 0.0f, 0.0f};
static const DWORD cb_data[4] = {0xff};
if (!init_test_context(&test_context, NULL))
return;
device = test_context.device;
context = test_context.immediate_context;
if (!check_stencil_ref_export_support(device))
{
skip("The device does not support stencil ref export.\n");
release_test_context(&test_context);
return;
}
ID3D11Texture2D_GetDesc(test_context.backbuffer, &texture_desc);
texture_desc.Format = DXGI_FORMAT_R8_UINT;
hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &rt);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)rt, NULL, &rtv);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
ID3D11Texture2D_GetDesc(test_context.backbuffer, &texture_desc);
texture_desc.Format = DXGI_FORMAT_R32G8X24_TYPELESS;
texture_desc.BindFlags = D3D11_BIND_DEPTH_STENCIL | D3D11_BIND_SHADER_RESOURCE;
hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &ds);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
dsv_desc.Format = DXGI_FORMAT_D32_FLOAT_S8X24_UINT;
dsv_desc.ViewDimension = D3D11_DSV_DIMENSION_TEXTURE2D;
dsv_desc.Flags = 0;
dsv_desc.Texture2D.MipSlice = 0;
hr = ID3D11Device_CreateDepthStencilView(device, (ID3D11Resource *)ds, &dsv_desc, &dsv);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
srv_desc.Format = DXGI_FORMAT_X32_TYPELESS_G8X24_UINT;
srv_desc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
srv_desc.Texture2D.MostDetailedMip = 0;
srv_desc.Texture2D.MipLevels = 1;
hr = ID3D11Device_CreateShaderResourceView(device, (ID3D11Resource *)ds, &srv_desc, &srv);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
ds_desc.DepthFunc = D3D11_COMPARISON_NEVER;
ds_desc.StencilEnable = TRUE,
ds_desc.StencilReadMask = D3D11_DEFAULT_STENCIL_READ_MASK,
ds_desc.StencilWriteMask = D3D11_DEFAULT_STENCIL_WRITE_MASK,
ds_desc.FrontFace.StencilFailOp = D3D11_STENCIL_OP_REPLACE,
ds_desc.FrontFace.StencilDepthFailOp = D3D11_STENCIL_OP_REPLACE,
ds_desc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_REPLACE,
ds_desc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS,
ds_desc.BackFace = ds_desc.FrontFace;
hr = ID3D11Device_CreateDepthStencilState(device, &ds_desc, &ds_state);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ID3D11Device_CreatePixelShader(device, ps_code, sizeof(ps_code), NULL, &ps);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ID3D11Device_CreatePixelShader(device, ps_sample_code, sizeof(ps_sample_code), NULL, &ps_sample);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
cb = create_buffer(device, D3D11_BIND_CONSTANT_BUFFER, sizeof(cb_data), cb_data);
ID3D11DeviceContext_ClearDepthStencilView(context, dsv, D3D11_CLEAR_STENCIL, 0.0f, 0x80);
ID3D11DeviceContext_OMSetRenderTargets(context, 1, &rtv, dsv);
ID3D11DeviceContext_OMSetDepthStencilState(context, ds_state, 0);
ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0);
ID3D11DeviceContext_PSSetConstantBuffers(context, 0, 1, &cb);
draw_quad(&test_context);
ID3D11DeviceContext_OMSetRenderTargets(context, 1, &rtv, NULL);
ID3D11DeviceContext_ClearRenderTargetView(context, rtv, black);
ID3D11DeviceContext_PSSetShaderResources(context, 0, 1, &srv);
ID3D11DeviceContext_PSSetShader(context, ps_sample, NULL, 0);
draw_quad(&test_context);
get_texture_readback(rt, 0, &rb);
check_readback_data_u8(&rb, NULL, 0xff, 0);
release_resource_readback(&rb);
ID3D11ShaderResourceView_Release(srv);
ID3D11Buffer_Release(cb);
ID3D11PixelShader_Release(ps);
ID3D11PixelShader_Release(ps_sample);
ID3D11DepthStencilState_Release(ds_state);
ID3D11Texture2D_Release(rt);
ID3D11Texture2D_Release(ds);
ID3D11RenderTargetView_Release(rtv);
ID3D11DepthStencilView_Release(dsv);
release_test_context(&test_context);
}
static void test_high_resource_count(void)
{
D3D11_TEXTURE2D_DESC texture_desc = {0};
struct d3d11_test_context test_context;
D3D11_SAMPLER_DESC sampler_desc = {0};
D3D11_BUFFER_DESC buffer_desc = {0};
ID3D11ShaderResourceView *srvs[100];
ID3D11Texture2D *textures[50], *rt;
D3D11_MAPPED_SUBRESOURCE map_desc;
ID3D11SamplerState *samplers[2];
ID3D11DeviceContext *context;
ID3D11RenderTargetView *rtv;
ID3D11Buffer *buffers[50];
ID3D11PixelShader *ps;
ID3D11Device *device;
float *data_ptr;
HRESULT hr;
static const struct vec4 expect = {1274.0f, 637.0f, 1225.0f, 0.0f};
static const struct vec4 expect2 = {1274.0f, 637.0f, 1325.0f, 0.0f};
static const DWORD ps_code[] =
{
#if 0
Texture2D<float> tex[50];
Buffer<float> buf[50];
SamplerState point_sampler, linear_sampler;
float4 main() : SV_Target
{
float4 ret = 0;
for (uint i = 0; i < 50; ++i)
{
ret.x += tex[i].Sample(point_sampler, 0.5);
ret.y += tex[i].Sample(linear_sampler, 0.5);
ret.z += buf[i].Load(0);
}
return ret;
}
#endif
0x43425844, 0xa909dad8, 0x13f3f278, 0x34767ac9, 0x7c08344c, 0x00000001, 0x000031a8, 0x00000003,
0x0000002c, 0x0000003c, 0x00000070, 0x4e475349, 0x00000008, 0x00000000, 0x00000008, 0x4e47534f,
0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, 0x00000000,
0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, 0x00003130, 0x00000040, 0x00000c4c,
0x0300005a, 0x00106000, 0x00000000, 0x0300005a, 0x00106000, 0x00000001, 0x04001858, 0x00107000,
0x00000000, 0x00005555, 0x04001858, 0x00107000, 0x00000001, 0x00005555, 0x04001858, 0x00107000,
0x00000002, 0x00005555, 0x04001858, 0x00107000, 0x00000003, 0x00005555, 0x04001858, 0x00107000,
0x00000004, 0x00005555, 0x04001858, 0x00107000, 0x00000005, 0x00005555, 0x04001858, 0x00107000,
0x00000006, 0x00005555, 0x04001858, 0x00107000, 0x00000007, 0x00005555, 0x04001858, 0x00107000,
0x00000008, 0x00005555, 0x04001858, 0x00107000, 0x00000009, 0x00005555, 0x04001858, 0x00107000,
0x0000000a, 0x00005555, 0x04001858, 0x00107000, 0x0000000b, 0x00005555, 0x04001858, 0x00107000,
0x0000000c, 0x00005555, 0x04001858, 0x00107000, 0x0000000d, 0x00005555, 0x04001858, 0x00107000,
0x0000000e, 0x00005555, 0x04001858, 0x00107000, 0x0000000f, 0x00005555, 0x04001858, 0x00107000,
0x00000010, 0x00005555, 0x04001858, 0x00107000, 0x00000011, 0x00005555, 0x04001858, 0x00107000,
0x00000012, 0x00005555, 0x04001858, 0x00107000, 0x00000013, 0x00005555, 0x04001858, 0x00107000,
0x00000014, 0x00005555, 0x04001858, 0x00107000, 0x00000015, 0x00005555, 0x04001858, 0x00107000,
0x00000016, 0x00005555, 0x04001858, 0x00107000, 0x00000017, 0x00005555, 0x04001858, 0x00107000,
0x00000018, 0x00005555, 0x04001858, 0x00107000, 0x00000019, 0x00005555, 0x04001858, 0x00107000,
0x0000001a, 0x00005555, 0x04001858, 0x00107000, 0x0000001b, 0x00005555, 0x04001858, 0x00107000,
0x0000001c, 0x00005555, 0x04001858, 0x00107000, 0x0000001d, 0x00005555, 0x04001858, 0x00107000,
0x0000001e, 0x00005555, 0x04001858, 0x00107000, 0x0000001f, 0x00005555, 0x04001858, 0x00107000,
0x00000020, 0x00005555, 0x04001858, 0x00107000, 0x00000021, 0x00005555, 0x04001858, 0x00107000,
0x00000022, 0x00005555, 0x04001858, 0x00107000, 0x00000023, 0x00005555, 0x04001858, 0x00107000,
0x00000024, 0x00005555, 0x04001858, 0x00107000, 0x00000025, 0x00005555, 0x04001858, 0x00107000,
0x00000026, 0x00005555, 0x04001858, 0x00107000, 0x00000027, 0x00005555, 0x04001858, 0x00107000,
0x00000028, 0x00005555, 0x04001858, 0x00107000, 0x00000029, 0x00005555, 0x04001858, 0x00107000,
0x0000002a, 0x00005555, 0x04001858, 0x00107000, 0x0000002b, 0x00005555, 0x04001858, 0x00107000,
0x0000002c, 0x00005555, 0x04001858, 0x00107000, 0x0000002d, 0x00005555, 0x04001858, 0x00107000,
0x0000002e, 0x00005555, 0x04001858, 0x00107000, 0x0000002f, 0x00005555, 0x04001858, 0x00107000,
0x00000030, 0x00005555, 0x04001858, 0x00107000, 0x00000031, 0x00005555, 0x04000858, 0x00107000,
0x00000032, 0x00005555, 0x04000858, 0x00107000, 0x00000033, 0x00005555, 0x04000858, 0x00107000,
0x00000034, 0x00005555, 0x04000858, 0x00107000, 0x00000035, 0x00005555, 0x04000858, 0x00107000,
0x00000036, 0x00005555, 0x04000858, 0x00107000, 0x00000037, 0x00005555, 0x04000858, 0x00107000,
0x00000038, 0x00005555, 0x04000858, 0x00107000, 0x00000039, 0x00005555, 0x04000858, 0x00107000,
0x0000003a, 0x00005555, 0x04000858, 0x00107000, 0x0000003b, 0x00005555, 0x04000858, 0x00107000,
0x0000003c, 0x00005555, 0x04000858, 0x00107000, 0x0000003d, 0x00005555, 0x04000858, 0x00107000,
0x0000003e, 0x00005555, 0x04000858, 0x00107000, 0x0000003f, 0x00005555, 0x04000858, 0x00107000,
0x00000040, 0x00005555, 0x04000858, 0x00107000, 0x00000041, 0x00005555, 0x04000858, 0x00107000,
0x00000042, 0x00005555, 0x04000858, 0x00107000, 0x00000043, 0x00005555, 0x04000858, 0x00107000,
0x00000044, 0x00005555, 0x04000858, 0x00107000, 0x00000045, 0x00005555, 0x04000858, 0x00107000,
0x00000046, 0x00005555, 0x04000858, 0x00107000, 0x00000047, 0x00005555, 0x04000858, 0x00107000,
0x00000048, 0x00005555, 0x04000858, 0x00107000, 0x00000049, 0x00005555, 0x04000858, 0x00107000,
0x0000004a, 0x00005555, 0x04000858, 0x00107000, 0x0000004b, 0x00005555, 0x04000858, 0x00107000,
0x0000004c, 0x00005555, 0x04000858, 0x00107000, 0x0000004d, 0x00005555, 0x04000858, 0x00107000,
0x0000004e, 0x00005555, 0x04000858, 0x00107000, 0x0000004f, 0x00005555, 0x04000858, 0x00107000,
0x00000050, 0x00005555, 0x04000858, 0x00107000, 0x00000051, 0x00005555, 0x04000858, 0x00107000,
0x00000052, 0x00005555, 0x04000858, 0x00107000, 0x00000053, 0x00005555, 0x04000858, 0x00107000,
0x00000054, 0x00005555, 0x04000858, 0x00107000, 0x00000055, 0x00005555, 0x04000858, 0x00107000,
0x00000056, 0x00005555, 0x04000858, 0x00107000, 0x00000057, 0x00005555, 0x04000858, 0x00107000,
0x00000058, 0x00005555, 0x04000858, 0x00107000, 0x00000059, 0x00005555, 0x04000858, 0x00107000,
0x0000005a, 0x00005555, 0x04000858, 0x00107000, 0x0000005b, 0x00005555, 0x04000858, 0x00107000,
0x0000005c, 0x00005555, 0x04000858, 0x00107000, 0x0000005d, 0x00005555, 0x04000858, 0x00107000,
0x0000005e, 0x00005555, 0x04000858, 0x00107000, 0x0000005f, 0x00005555, 0x04000858, 0x00107000,
0x00000060, 0x00005555, 0x04000858, 0x00107000, 0x00000061, 0x00005555, 0x04000858, 0x00107000,
0x00000062, 0x00005555, 0x04000858, 0x00107000, 0x00000063, 0x00005555, 0x03000065, 0x001020f2,
0x00000000, 0x02000068, 0x00000002, 0x0c000045, 0x001000f2, 0x00000000, 0x00004002, 0x3f000000,
0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0c000045,
0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46,
0x00000001, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000,
0x00000000, 0x00000000, 0x00107e46, 0x00000002, 0x00106000, 0x00000000, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001,
0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000003, 0x00106000,
0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000,
0x00107e46, 0x00000004, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000,
0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000005, 0x00106000, 0x00000000, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2,
0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000006,
0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000,
0x00000000, 0x00107e46, 0x00000007, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002,
0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000008, 0x00106000, 0x00000000,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045,
0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46,
0x00000009, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000,
0x00000000, 0x00000000, 0x00107e46, 0x0000000a, 0x00106000, 0x00000000, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001,
0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000000b, 0x00106000,
0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000,
0x00107e46, 0x0000000c, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000,
0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000000d, 0x00106000, 0x00000000, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2,
0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000000e,
0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000,
0x00000000, 0x00107e46, 0x0000000f, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002,
0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000010, 0x00106000, 0x00000000,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045,
0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46,
0x00000011, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000,
0x00000000, 0x00000000, 0x00107e46, 0x00000012, 0x00106000, 0x00000000, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001,
0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000013, 0x00106000,
0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000,
0x00107e46, 0x00000014, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000,
0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000015, 0x00106000, 0x00000000, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2,
0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000016,
0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000,
0x00000000, 0x00107e46, 0x00000017, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002,
0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000018, 0x00106000, 0x00000000,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045,
0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46,
0x00000019, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000,
0x00000000, 0x00000000, 0x00107e46, 0x0000001a, 0x00106000, 0x00000000, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001,
0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000001b, 0x00106000,
0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000,
0x00107e46, 0x0000001c, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000,
0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000001d, 0x00106000, 0x00000000, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2,
0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000001e,
0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000,
0x00000000, 0x00107e46, 0x0000001f, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002,
0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000020, 0x00106000, 0x00000000,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045,
0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46,
0x00000021, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000,
0x00000000, 0x00000000, 0x00107e46, 0x00000022, 0x00106000, 0x00000000, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001,
0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000023, 0x00106000,
0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000,
0x00107e46, 0x00000024, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000,
0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000025, 0x00106000, 0x00000000, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2,
0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000026,
0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000,
0x00000000, 0x00107e46, 0x00000027, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002,
0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000028, 0x00106000, 0x00000000,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045,
0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46,
0x00000029, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000,
0x00000000, 0x00000000, 0x00107e46, 0x0000002a, 0x00106000, 0x00000000, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001,
0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000002b, 0x00106000,
0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000,
0x00107e46, 0x0000002c, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000,
0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000002d, 0x00106000, 0x00000000, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2,
0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000002e,
0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000,
0x00000000, 0x00107e46, 0x0000002f, 0x00106000, 0x00000000, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002,
0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000030, 0x00106000, 0x00000000,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045,
0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46,
0x00000031, 0x00106000, 0x00000000, 0x07000000, 0x00102012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000000, 0x00004002, 0x3f000000, 0x3f000000,
0x00000000, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000001, 0x0c000045, 0x001000f2,
0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000001,
0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000,
0x00000000, 0x00107e46, 0x00000002, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002,
0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000003, 0x00106000, 0x00000001,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045,
0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46,
0x00000004, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000,
0x00000000, 0x00000000, 0x00107e46, 0x00000005, 0x00106000, 0x00000001, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001,
0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000006, 0x00106000,
0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000,
0x00107e46, 0x00000007, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000,
0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000008, 0x00106000, 0x00000001, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2,
0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000009,
0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000,
0x00000000, 0x00107e46, 0x0000000a, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002,
0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000000b, 0x00106000, 0x00000001,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045,
0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46,
0x0000000c, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000,
0x00000000, 0x00000000, 0x00107e46, 0x0000000d, 0x00106000, 0x00000001, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001,
0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000000e, 0x00106000,
0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000,
0x00107e46, 0x0000000f, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000,
0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000010, 0x00106000, 0x00000001, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2,
0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000011,
0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000,
0x00000000, 0x00107e46, 0x00000012, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002,
0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000013, 0x00106000, 0x00000001,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045,
0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46,
0x00000014, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000,
0x00000000, 0x00000000, 0x00107e46, 0x00000015, 0x00106000, 0x00000001, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001,
0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000016, 0x00106000,
0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000,
0x00107e46, 0x00000017, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000,
0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000018, 0x00106000, 0x00000001, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2,
0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000019,
0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000,
0x00000000, 0x00107e46, 0x0000001a, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002,
0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000001b, 0x00106000, 0x00000001,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045,
0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46,
0x0000001c, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000,
0x00000000, 0x00000000, 0x00107e46, 0x0000001d, 0x00106000, 0x00000001, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001,
0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000001e, 0x00106000,
0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000,
0x00107e46, 0x0000001f, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000,
0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000020, 0x00106000, 0x00000001, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2,
0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000021,
0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000,
0x00000000, 0x00107e46, 0x00000022, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002,
0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000023, 0x00106000, 0x00000001,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045,
0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46,
0x00000024, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000,
0x00000000, 0x00000000, 0x00107e46, 0x00000025, 0x00106000, 0x00000001, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001,
0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000026, 0x00106000,
0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000,
0x00107e46, 0x00000027, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000,
0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000028, 0x00106000, 0x00000001, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2,
0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000029,
0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000,
0x00000000, 0x00107e46, 0x0000002a, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002,
0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000002b, 0x00106000, 0x00000001,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045,
0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46,
0x0000002c, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000,
0x00000000, 0x00000000, 0x00107e46, 0x0000002d, 0x00106000, 0x00000001, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001,
0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000002e, 0x00106000,
0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000,
0x00107e46, 0x0000002f, 0x00106000, 0x00000001, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2, 0x00000001, 0x00004002, 0x3f000000,
0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000030, 0x00106000, 0x00000001, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0c000045, 0x001000f2,
0x00000001, 0x00004002, 0x3f000000, 0x3f000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000031,
0x00106000, 0x00000001, 0x07000000, 0x00102022, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0a00002d, 0x001000f2, 0x00000000, 0x00004002, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00107e46, 0x00000032, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000033, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000034, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001,
0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000035, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2,
0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000036,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d,
0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46,
0x00000037, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00107e46, 0x00000038, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00107e46, 0x00000039, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00107e46, 0x0000003a, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000003b, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000003c, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001,
0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000003d, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2,
0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000003e,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d,
0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46,
0x0000003f, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00107e46, 0x00000040, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00107e46, 0x00000041, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00107e46, 0x00000042, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000043, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000044, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001,
0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000045, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2,
0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000046,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d,
0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46,
0x00000047, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00107e46, 0x00000048, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00107e46, 0x00000049, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00107e46, 0x0000004a, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000004b, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000004c, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001,
0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000004d, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2,
0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000004e,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d,
0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46,
0x0000004f, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00107e46, 0x00000050, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00107e46, 0x00000051, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00107e46, 0x00000052, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000053, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000054, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001,
0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000055, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2,
0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000056,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d,
0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46,
0x00000057, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00107e46, 0x00000058, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00107e46, 0x00000059, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00107e46, 0x0000005a, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000005b, 0x07000000, 0x00100012, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000005c, 0x07000000, 0x00100012,
0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001,
0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000005d, 0x07000000,
0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2,
0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x0000005e,
0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x0a00002d,
0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00107e46,
0x0000005f, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a, 0x00000001,
0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00107e46, 0x00000060, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000, 0x0010000a,
0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00107e46, 0x00000061, 0x07000000, 0x00100012, 0x00000000, 0x0010000a, 0x00000000,
0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00107e46, 0x00000062, 0x07000000, 0x00100012, 0x00000000, 0x0010000a,
0x00000000, 0x0010000a, 0x00000001, 0x0a00002d, 0x001000f2, 0x00000001, 0x00004002, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00107e46, 0x00000063, 0x07000000, 0x00102042, 0x00000000,
0x0010000a, 0x00000000, 0x0010000a, 0x00000001, 0x05000036, 0x00102082, 0x00000000, 0x00004001,
0x00000000, 0x0100003e,
};
if (!init_test_context(&test_context, NULL))
return;
device = test_context.device;
context = test_context.immediate_context;
hr = ID3D11Device_CreatePixelShader(device, ps_code, sizeof(ps_code), NULL, &ps);
ok(hr == S_OK, "Failed to create pixel shader, hr %#lx.\n", hr);
texture_desc.Width = 16;
texture_desc.Height = 16;
texture_desc.MipLevels = 1;
texture_desc.ArraySize = 1;
texture_desc.Format = DXGI_FORMAT_R32G32B32A32_FLOAT;
texture_desc.SampleDesc.Count = 1;
texture_desc.Usage = D3D11_USAGE_DEFAULT;
texture_desc.BindFlags = D3D11_BIND_RENDER_TARGET;
hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &rt);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)rt, NULL, &rtv);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
for (unsigned int i = 0; i < ARRAY_SIZE(textures); ++i)
{
float data[2] = {0.0f, i + 1};
D3D11_SUBRESOURCE_DATA data_desc = {data, sizeof(data), sizeof(data)};
texture_desc.Width = 2;
texture_desc.Height = 1;
texture_desc.MipLevels = 1;
texture_desc.ArraySize = 1;
texture_desc.Format = DXGI_FORMAT_R32_FLOAT;
texture_desc.SampleDesc.Count = 1;
texture_desc.Usage = D3D11_USAGE_DEFAULT;
texture_desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
hr = ID3D11Device_CreateTexture2D(device, &texture_desc, &data_desc, &textures[i]);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = ID3D11Device_CreateShaderResourceView(device, (ID3D11Resource *)textures[i], NULL, &srvs[i]);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
}
for (unsigned int i = 0; i < ARRAY_SIZE(buffers); ++i)
{
float data[2] = {i + 1, 0.0f};
D3D11_SUBRESOURCE_DATA data_desc = {data, sizeof(data), sizeof(data)};
D3D11_SHADER_RESOURCE_VIEW_DESC srv_desc;
buffer_desc.ByteWidth = sizeof(data);
buffer_desc.Usage = D3D11_USAGE_DYNAMIC;
buffer_desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
buffer_desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
hr = ID3D11Device_CreateBuffer(device, &buffer_desc, &data_desc, &buffers[i]);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
srv_desc.Format = DXGI_FORMAT_R32_FLOAT;
srv_desc.ViewDimension = D3D11_SRV_DIMENSION_BUFFER;
srv_desc.Buffer.FirstElement = 0;
srv_desc.Buffer.NumElements = 2;
hr = ID3D11Device_CreateShaderResourceView(device,
(ID3D11Resource *)buffers[i], &srv_desc, &srvs[ARRAY_SIZE(textures) + i]);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
}
sampler_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
sampler_desc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
sampler_desc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;
sampler_desc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
sampler_desc.MaxLOD = FLT_MAX;
hr = ID3D11Device_CreateSamplerState(device, &sampler_desc, &samplers[0]);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
sampler_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
hr = ID3D11Device_CreateSamplerState(device, &sampler_desc, &samplers[1]);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
ID3D11DeviceContext_OMSetRenderTargets(context, 1, &rtv, NULL);
ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0);
/* Deliberately make the bindings mismatch, to test that we handle NULL
* and unrelated bindings correctly. */
ID3D11DeviceContext_PSSetShaderResources(context, 1, ARRAY_SIZE(srvs) - 2, &srvs[1]);
ID3D11DeviceContext_PSSetShaderResources(context, ARRAY_SIZE(srvs) + 1, 1, &srvs[0]);
ID3D11DeviceContext_PSSetShaderResources(context, ARRAY_SIZE(srvs) + 2, 1, &srvs[ARRAY_SIZE(srvs) - 1]);
ID3D11DeviceContext_PSSetSamplers(context, 0, 2, samplers);
draw_quad(&test_context);
check_texture_vec4(rt, &expect, 0);
/* Discard the data in one of the buffers and draw again. */
hr = ID3D11DeviceContext_Map(context, (ID3D11Resource *)buffers[1], 0, D3D11_MAP_WRITE_DISCARD, 0, &map_desc);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
data_ptr = map_desc.pData;
data_ptr[0] = 102.0f;
data_ptr[1] = 0.0f;
ID3D11DeviceContext_Unmap(context, (ID3D11Resource *)buffers[1], 0);
draw_quad(&test_context);
check_texture_vec4(rt, &expect2, 0);
ID3D11Texture2D_Release(rt);
ID3D11RenderTargetView_Release(rtv);
for (unsigned int i = 0; i < ARRAY_SIZE(srvs); ++i)
ID3D11ShaderResourceView_Release(srvs[i]);
for (unsigned int i = 0; i < ARRAY_SIZE(buffers); ++i)
ID3D11Buffer_Release(buffers[i]);
for (unsigned int i = 0; i < ARRAY_SIZE(textures); ++i)
ID3D11Texture2D_Release(textures[i]);
for (unsigned int i = 0; i < ARRAY_SIZE(samplers); ++i)
ID3D11SamplerState_Release(samplers[i]);
ID3D11PixelShader_Release(ps);
release_test_context(&test_context);
}
START_TEST(d3d11)
{
unsigned int argc, i;
@ -35649,6 +36361,8 @@ START_TEST(d3d11)
queue_for_each_feature_level(test_shared_resource);
queue_test(test_keyed_mutex);
queue_test(test_clear_during_render);
queue_test(test_stencil_export);
queue_test(test_high_resource_count);
run_queued_tests();

View file

@ -410,7 +410,11 @@ static void test_swapchain(void)
d3dpp.BackBufferCount = 0;
hr = IDirect3DDevice8_CreateAdditionalSwapChain(device, &d3dpp, &swapchain1);
ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr);
ok(d3dpp.BackBufferCount == 1, "The back buffer count in the presentparams struct is %d\n", d3dpp.BackBufferCount);
ok(!d3dpp.BackBufferWidth, "Got unexpected BackBufferWidth %u.\n", d3dpp.BackBufferWidth);
ok(!d3dpp.BackBufferHeight, "Got unexpected BackBufferHeight %u.\n", d3dpp.BackBufferHeight);
ok(d3dpp.BackBufferFormat == D3DFMT_A8R8G8B8, "Got unexpected BackBufferFormat %#x.\n", d3dpp.BackBufferFormat);
ok(d3dpp.BackBufferCount == 1, "Got unexpected BackBufferCount %u.\n", d3dpp.BackBufferCount);
ok(!d3dpp.hDeviceWindow, "Got unexpected hDeviceWindow %p.\n", d3dpp.hDeviceWindow);
d3dpp.hDeviceWindow = NULL;
d3dpp.BackBufferCount = 1;
@ -8896,6 +8900,33 @@ static void test_swapchain_parameters(void)
IDirect3DDevice8_Release(device);
}
memset(&present_parameters, 0, sizeof(present_parameters));
present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
present_parameters.Windowed = TRUE;
present_parameters.BackBufferWidth = 0;
present_parameters.BackBufferHeight = 0;
present_parameters.BackBufferFormat = D3DFMT_X8R8G8B8;
hr = IDirect3D8_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
window, D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&present_parameters, &device);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!present_parameters.BackBufferWidth, "Got unexpected BackBufferWidth %u.\n", present_parameters.BackBufferWidth);
ok(!present_parameters.BackBufferHeight, "Got unexpected BackBufferHeight %u,.\n", present_parameters.BackBufferHeight);
ok(present_parameters.BackBufferFormat == D3DFMT_X8R8G8B8, "Got unexpected BackBufferFormat %#x.\n", present_parameters.BackBufferFormat);
ok(present_parameters.BackBufferCount == 1, "Got unexpected BackBufferCount %u.\n", present_parameters.BackBufferCount);
ok(!present_parameters.MultiSampleType, "Got unexpected MultiSampleType %u.\n", present_parameters.MultiSampleType);
ok(present_parameters.SwapEffect == D3DSWAPEFFECT_DISCARD, "Got unexpected SwapEffect %#x.\n", present_parameters.SwapEffect);
ok(!present_parameters.hDeviceWindow, "Got unexpected hDeviceWindow %p.\n", present_parameters.hDeviceWindow);
ok(present_parameters.Windowed, "Got unexpected Windowed %#x.\n", present_parameters.Windowed);
ok(!present_parameters.EnableAutoDepthStencil, "Got unexpected EnableAutoDepthStencil %#x.\n", present_parameters.EnableAutoDepthStencil);
ok(!present_parameters.AutoDepthStencilFormat, "Got unexpected AutoDepthStencilFormat %#x.\n", present_parameters.AutoDepthStencilFormat);
ok(!present_parameters.Flags, "Got unexpected Flags %#lx.\n", present_parameters.Flags);
ok(!present_parameters.FullScreen_RefreshRateInHz, "Got unexpected FullScreen_RefreshRateInHz %u.\n", present_parameters.FullScreen_RefreshRateInHz);
ok(!present_parameters.FullScreen_PresentationInterval, "Got unexpected FullScreen_PresentationInterval %#x.\n", present_parameters.FullScreen_PresentationInterval);
IDirect3DDevice8_Release(device);
IDirect3D8_Release(d3d);
DestroyWindow(window);
}

View file

@ -12188,6 +12188,200 @@ static void test_mipmap_upload(void)
release_test_context(&context);
}
static void test_specular_shaders(void)
{
struct d3d8_test_context context;
struct surface_readback rb;
IDirect3DDevice8 *device;
unsigned int color;
DWORD vs, ps;
HRESULT hr;
static const DWORD vs_code[] =
{
#if 0
vs_1_1
mov oPos, v0
mov oD0, v5
mov oD1, v6
#endif
0xfffe0101,
0x00000001, 0xc00f0000, 0x90e40000,
0x00000001, 0xd00f0000, 0x90e40005,
0x00000001, 0xd00f0001, 0x90e40006,
0x0000ffff
};
static const DWORD ps_code[] =
{
#if 0
ps_1_1
mov r0, v1
#endif
0xffff0101,
0x00000001, 0x800f0000, 0x90e40001,
0x0000ffff
};
static const DWORD decl[] =
{
D3DVSD_STREAM(0),
D3DVSD_REG(D3DVSDE_POSITION, D3DVSDT_FLOAT3),
D3DVSD_REG(D3DVSDE_NORMAL, D3DVSDT_FLOAT3),
D3DVSD_REG(D3DVSDE_DIFFUSE, D3DVSDT_D3DCOLOR),
D3DVSD_REG(D3DVSDE_SPECULAR, D3DVSDT_D3DCOLOR),
D3DVSD_END()
};
static const struct
{
struct vec3 position;
struct vec3 normal;
unsigned int diffuse;
unsigned int specular;
}
quad[] =
{
{{-1.0f, -1.0f, 0.0f}, {1.0f, 1.0f, 1.0f}, 0x0000003f, 0x00007f00},
{{-1.0f, 1.0f, 0.0f}, {1.0f, 1.0f, 1.0f}, 0x0000003f, 0x00007f00},
{{ 1.0f, -1.0f, 0.0f}, {1.0f, 1.0f, 1.0f}, 0x0000003f, 0x00007f00},
{{ 1.0f, 1.0f, 0.0f}, {1.0f, 1.0f, 1.0f}, 0x0000003f, 0x00007f00},
};
static const D3DMATERIAL8 material =
{
.Specular = {0.7f, 0.0f, 0.7f, 1.0f},
.Power = 2.0f,
};
static const D3DLIGHT8 light =
{
.Type = D3DLIGHT_DIRECTIONAL,
.Diffuse = {0.0f, 0.1f, 0.1f, 0.0f},
.Specular = {0.8f, 0.8f, 0.8f, 0.0f},
.Direction = {0.0f, 0.0f, -1.0f},
};
if (!init_test_context(&context))
return;
device = context.device;
/* Vertex shader only. */
hr = IDirect3DDevice8_CreateVertexShader(device, decl, vs_code, &vs, 0);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 0.0, 0);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_BeginScene(device);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_SetVertexShader(device, vs);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ZENABLE, FALSE);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_SPECULARENABLE, TRUE);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_EndScene(device);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_rt_color(context.backbuffer, 0x00007f3f);
hr = IDirect3DDevice8_BeginScene(device);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_SPECULARENABLE, FALSE);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_EndScene(device);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_rt_color(context.backbuffer, 0x0000003f);
hr = IDirect3DDevice8_CreatePixelShader(device, ps_code, &ps);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
/* Pixel shader only. */
hr = IDirect3DDevice8_SetPixelShader(device, ps);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_DIFFUSE | D3DFVF_SPECULAR);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_SetMaterial(device, &material);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_SetLight(device, 0, &light);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_LightEnable(device, 0, TRUE);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_BeginScene(device);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_SPECULARENABLE, TRUE);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_EndScene(device);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
get_surface_readback(context.backbuffer, &rb);
color = get_readback_color(&rb, 160, 120);
ok(color_match(color, 0x003300, 1), "Got color %08x.\n", color);
color = get_readback_color(&rb, 480, 120);
ok(color_match(color, 0x001900, 1), "Got color %08x.\n", color);
color = get_readback_color(&rb, 160, 360);
ok(color_match(color, 0x009900, 1), "Got color %08x.\n", color);
color = get_readback_color(&rb, 480, 360);
ok(color_match(color, 0x003300, 1), "Got color %08x.\n", color);
release_surface_readback(&rb);
hr = IDirect3DDevice8_BeginScene(device);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_SPECULARENABLE, FALSE);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_EndScene(device);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_rt_color(context.backbuffer, 0x00007f00);
hr = IDirect3DDevice8_BeginScene(device);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_SPECULARMATERIALSOURCE, D3DMCS_MATERIAL);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_EndScene(device);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_rt_color(context.backbuffer, 0x00007f00);
/* Vertex shader and pixel shader. */
hr = IDirect3DDevice8_SetVertexShader(device, vs);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_BeginScene(device);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_SPECULARENABLE, TRUE);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_EndScene(device);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_rt_color(context.backbuffer, 0x00007f00);
hr = IDirect3DDevice8_BeginScene(device);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_SetRenderState(device, D3DRS_SPECULARENABLE, FALSE);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice8_EndScene(device);
ok(hr == S_OK, "Got hr %#lx.\n", hr);
check_rt_color(context.backbuffer, 0x00007f00);
release_test_context(&context);
}
START_TEST(visual)
{
D3DADAPTER_IDENTIFIER8 identifier;
@ -12271,4 +12465,5 @@ START_TEST(visual)
test_filling_convention();
test_managed_reset();
test_mipmap_upload();
test_specular_shaders();
}

View file

@ -370,6 +370,7 @@ static const struct wined3d_swapchain_state_parent_ops d3d9_swapchain_state_pare
static HRESULT swapchain_init(struct d3d9_swapchain *swapchain, struct d3d9_device *device,
struct wined3d_swapchain_desc *desc, unsigned int swap_interval)
{
struct wined3d_swapchain_desc swapchain_desc;
HRESULT hr;
swapchain->refcount = 1;
@ -384,6 +385,11 @@ static HRESULT swapchain_init(struct d3d9_swapchain *swapchain, struct d3d9_devi
return hr;
}
wined3d_swapchain_get_desc(swapchain->wined3d_swapchain, &swapchain_desc);
desc->backbuffer_width = swapchain_desc.backbuffer_width;
desc->backbuffer_height = swapchain_desc.backbuffer_height;
desc->backbuffer_format = swapchain_desc.backbuffer_format;
swapchain->parent_device = &device->IDirect3DDevice9Ex_iface;
IDirect3DDevice9Ex_AddRef(swapchain->parent_device);

View file

@ -3686,6 +3686,7 @@ static void test_swapchain_parameters(void)
{
IDirect3DDevice9Ex *device;
IDirect3D9Ex *d3d9ex;
RECT client_rect;
HWND window;
HRESULT hr;
unsigned int i;
@ -3837,6 +3838,39 @@ static void test_swapchain_parameters(void)
IDirect3DDevice9Ex_Release(device);
}
memset(&present_parameters, 0, sizeof(present_parameters));
present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
present_parameters.Windowed = TRUE;
present_parameters.BackBufferWidth = 0;
present_parameters.BackBufferHeight = 0;
present_parameters.BackBufferFormat = D3DFMT_UNKNOWN;
GetClientRect(window, &client_rect);
hr = IDirect3D9Ex_CreateDeviceEx(d3d9ex, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
window, D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&present_parameters, NULL, &device);
ok(present_parameters.BackBufferWidth == client_rect.right, "Got unexpected BackBufferWidth %u, expected %ld.\n",
present_parameters.BackBufferWidth, client_rect.right);
ok(present_parameters.BackBufferHeight == client_rect.bottom, "Got unexpected BackBufferHeight %u, expected %ld.\n",
present_parameters.BackBufferHeight, client_rect.bottom);
ok(present_parameters.BackBufferFormat != D3DFMT_UNKNOWN, "Got unexpected BackBufferFormat %#x.\n",
present_parameters.BackBufferFormat);
ok(present_parameters.BackBufferCount == 1, "Got unexpected BackBufferCount %u.\n", present_parameters.BackBufferCount);
ok(!present_parameters.MultiSampleType, "Got unexpected MultiSampleType %u.\n", present_parameters.MultiSampleType);
ok(!present_parameters.MultiSampleQuality, "Got unexpected MultiSampleQuality %lu.\n", present_parameters.MultiSampleQuality);
ok(present_parameters.SwapEffect == D3DSWAPEFFECT_DISCARD, "Got unexpected SwapEffect %#x.\n", present_parameters.SwapEffect);
ok(!present_parameters.hDeviceWindow, "Got unexpected hDeviceWindow %p.\n", present_parameters.hDeviceWindow);
ok(present_parameters.Windowed, "Got unexpected Windowed %#x.\n", present_parameters.Windowed);
ok(!present_parameters.EnableAutoDepthStencil, "Got unexpected EnableAutoDepthStencil %#x.\n", present_parameters.EnableAutoDepthStencil);
ok(!present_parameters.AutoDepthStencilFormat, "Got unexpected AutoDepthStencilFormat %#x.\n", present_parameters.AutoDepthStencilFormat);
ok(!present_parameters.Flags, "Got unexpected Flags %#lx.\n", present_parameters.Flags);
ok(!present_parameters.FullScreen_RefreshRateInHz, "Got unexpected FullScreen_RefreshRateInHz %u.\n",
present_parameters.FullScreen_RefreshRateInHz);
ok(!present_parameters.PresentationInterval, "Got unexpected PresentationInterval %#x.\n", present_parameters.PresentationInterval);
IDirect3DDevice9Ex_Release(device);
IDirect3D9Ex_Release(d3d9ex);
DestroyWindow(window);
}

View file

@ -1263,6 +1263,7 @@ static void test_swapchain(void)
IDirect3DSurface9 *backbuffer, *stereo_buffer;
D3DPRESENT_PARAMETERS d3dpp;
IDirect3DDevice9 *device;
RECT client_rect;
IDirect3D9 *d3d;
ULONG refcount;
HWND window, window2;
@ -1341,11 +1342,23 @@ static void test_swapchain(void)
ok(swapchainX == NULL, "Swapchain 1 is %p\n", swapchainX);
if(swapchainX) IDirect3DSwapChain9_Release(swapchainX);
memset(&d3dpp, 0, sizeof(d3dpp));
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
d3dpp.BackBufferFormat = D3DFMT_A8R8G8B8;
GetClientRect(window, &client_rect);
/* Create a bunch of swapchains */
d3dpp.BackBufferCount = 0;
hr = IDirect3DDevice9_CreateAdditionalSwapChain(device, &d3dpp, &swapchain1);
ok(SUCCEEDED(hr), "Got hr %#lx.\n", hr);
ok(d3dpp.BackBufferCount == 1, "The back buffer count in the presentparams struct is %d\n", d3dpp.BackBufferCount);
ok(d3dpp.BackBufferWidth == client_rect.right, "Got unexpected BackBufferWidth %u, expected %ld.\n",
d3dpp.BackBufferWidth, client_rect.right);
ok(d3dpp.BackBufferHeight == client_rect.bottom, "Got unexpected BackBufferHeight %u, expected %ld.\n",
d3dpp.BackBufferHeight, client_rect.bottom);
ok(d3dpp.BackBufferFormat == D3DFMT_A8R8G8B8, "Got unexpected BackBufferFormat %#x.\n", d3dpp.BackBufferFormat);
ok(d3dpp.BackBufferCount == 1, "Got unexpected BackBufferCount %u.\n", d3dpp.BackBufferCount);
ok(!d3dpp.hDeviceWindow, "Got unexpected hDeviceWindow %p.\n", d3dpp.hDeviceWindow);
d3dpp.hDeviceWindow = NULL;
d3dpp.BackBufferCount = 1;
@ -12296,6 +12309,7 @@ static void test_swapchain_parameters(void)
{
IDirect3DDevice9 *device;
HRESULT hr, expected_hr;
RECT client_rect;
IDirect3D9 *d3d;
D3DCAPS9 caps;
HWND window;
@ -12493,6 +12507,40 @@ static void test_swapchain_parameters(void)
IDirect3DDevice9_Release(device);
}
memset(&present_parameters, 0, sizeof(present_parameters));
present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD;
present_parameters.Windowed = TRUE;
present_parameters.BackBufferWidth = 0;
present_parameters.BackBufferHeight = 0;
present_parameters.BackBufferFormat = D3DFMT_UNKNOWN;
GetClientRect(window, &client_rect);
hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
window, D3DCREATE_SOFTWARE_VERTEXPROCESSING,
&present_parameters, &device);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(present_parameters.BackBufferWidth == client_rect.right, "Got unexpected BackBufferWidth %u, expected %ld.\n",
present_parameters.BackBufferWidth, client_rect.right);
ok(present_parameters.BackBufferHeight == client_rect.bottom, "Got unexpected BackBufferHeight %u, expected %ld.\n",
present_parameters.BackBufferHeight, client_rect.bottom);
ok(present_parameters.BackBufferFormat != D3DFMT_UNKNOWN, "Got unexpected BackBufferFormat %#x.\n",
present_parameters.BackBufferFormat);
ok(present_parameters.BackBufferCount == 1, "Got unexpected BackBufferCount %u.\n", present_parameters.BackBufferCount);
ok(!present_parameters.MultiSampleType, "Got unexpected MultiSampleType %u.\n", present_parameters.MultiSampleType);
ok(!present_parameters.MultiSampleQuality, "Got unexpected MultiSampleQuality %lu.\n", present_parameters.MultiSampleQuality);
ok(present_parameters.SwapEffect == D3DSWAPEFFECT_DISCARD, "Got unexpected SwapEffect %#x.\n", present_parameters.SwapEffect);
ok(!present_parameters.hDeviceWindow, "Got unexpected hDeviceWindow %p.\n", present_parameters.hDeviceWindow);
ok(present_parameters.Windowed, "Got unexpected Windowed %#x.\n", present_parameters.Windowed);
ok(!present_parameters.EnableAutoDepthStencil, "Got unexpected EnableAutoDepthStencil %#x.\n", present_parameters.EnableAutoDepthStencil);
ok(!present_parameters.AutoDepthStencilFormat, "Got unexpected AutoDepthStencilFormat %#x.\n", present_parameters.AutoDepthStencilFormat);
ok(!present_parameters.Flags, "Got unexpected Flags %#lx.\n", present_parameters.Flags);
ok(!present_parameters.FullScreen_RefreshRateInHz, "Got unexpected FullScreen_RefreshRateInHz %u.\n",
present_parameters.FullScreen_RefreshRateInHz);
ok(!present_parameters.PresentationInterval, "Got unexpected PresentationInterval %#x.\n", present_parameters.PresentationInterval);
IDirect3DDevice9_Release(device);
IDirect3D9_Release(d3d);
DestroyWindow(window);
}

View file

@ -29,6 +29,7 @@
*/
#include <stdbool.h>
#include <stdint.h>
#include <limits.h>
#include <math.h>
@ -107,6 +108,18 @@ static BOOL compare_vec4(const struct vec4 *vec, float x, float y, float z, floa
&& compare_float(vec->w, w, ulps);
}
static uint32_t float_to_int(float f)
{
union
{
uint32_t u;
float f;
} u;
u.f = f;
return u.u;
}
static BOOL adapter_is_warp(const D3DADAPTER_IDENTIFIER9 *identifier)
{
return !strcmp(identifier->Driver, "d3d10warp.dll");
@ -1667,16 +1680,17 @@ static void color_fill_test(void)
{D3DPOOL_MANAGED, 0, D3DERR_INVALIDCALL},
{D3DPOOL_SCRATCH, 0, D3DERR_INVALIDCALL},
};
enum format_flags
{
CHECK_FILL_VALUE = 0x1,
BLOCKS = 0x2,
FLOAT_VALUES = 0x4,
};
static const struct
{
D3DFORMAT format;
const char *name;
enum
{
CHECK_FILL_VALUE = 0x1,
BLOCKS = 0x2,
FLOAT_VALUES = 0x4,
} flags;
enum format_flags flags;
unsigned int fill_i[4];
float fill_f[4];
}
@ -3366,7 +3380,7 @@ static void generate_bumpmap_textures(IDirect3DDevice9 *device) {
for (y = 0; y < 128; ++y)
{
if(i)
{ /* Set up black texture with 2x2 texel white spot in the middle */
{
DWORD *ptr = (DWORD *)(((BYTE *)locked_rect.pBits) + (y * locked_rect.Pitch));
for (x = 0; x < 128; ++x)
{
@ -3510,10 +3524,10 @@ static void texbem_test(void)
generate_bumpmap_textures(device);
IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT00, *(LPDWORD)&bumpenvmat[0]);
IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT01, *(LPDWORD)&bumpenvmat[1]);
IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT10, *(LPDWORD)&bumpenvmat[2]);
hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT11, *(LPDWORD)&bumpenvmat[3]);
IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT00, float_to_int(bumpenvmat[0]));
IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT01, float_to_int(bumpenvmat[1]));
IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT10, float_to_int(bumpenvmat[2]));
hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT11, float_to_int(bumpenvmat[3]));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetVertexShader(device, NULL);
@ -3664,24 +3678,24 @@ static void texbem_test(void)
bumpenvmat[0] =-1.0; bumpenvmat[2] = 2.0;
bumpenvmat[1] = 0.0; bumpenvmat[3] = 0.0;
hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT00, *(LPDWORD)&bumpenvmat[0]);
hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT00, float_to_int(bumpenvmat[0]));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT01, *(LPDWORD)&bumpenvmat[1]);
hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT01, float_to_int(bumpenvmat[1]));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT10, *(LPDWORD)&bumpenvmat[2]);
hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT10, float_to_int(bumpenvmat[2]));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT11, *(LPDWORD)&bumpenvmat[3]);
hr = IDirect3DDevice9_SetTextureStageState(device, 1, D3DTSS_BUMPENVMAT11, float_to_int(bumpenvmat[3]));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
bumpenvmat[0] = 1.5; bumpenvmat[2] = 0.0;
bumpenvmat[1] = 0.0; bumpenvmat[3] = 0.5;
hr = IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_BUMPENVMAT00, *(LPDWORD)&bumpenvmat[0]);
hr = IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_BUMPENVMAT00, float_to_int(bumpenvmat[0]));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_BUMPENVMAT01, *(LPDWORD)&bumpenvmat[1]);
hr = IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_BUMPENVMAT01, float_to_int(bumpenvmat[1]));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_BUMPENVMAT10, *(LPDWORD)&bumpenvmat[2]);
hr = IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_BUMPENVMAT10, float_to_int(bumpenvmat[2]));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_BUMPENVMAT11, *(LPDWORD)&bumpenvmat[3]);
hr = IDirect3DDevice9_SetTextureStageState(device, 3, D3DTSS_BUMPENVMAT11, float_to_int(bumpenvmat[3]));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
@ -11027,13 +11041,13 @@ static void fixed_function_bumpmap_test(void)
/* Generate the textures */
generate_bumpmap_textures(device);
hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_BUMPENVMAT00, *(LPDWORD)&bumpenvmat[0]);
hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_BUMPENVMAT00, float_to_int(bumpenvmat[0]));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_BUMPENVMAT01, *(LPDWORD)&bumpenvmat[1]);
hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_BUMPENVMAT01, float_to_int(bumpenvmat[1]));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_BUMPENVMAT10, *(LPDWORD)&bumpenvmat[2]);
hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_BUMPENVMAT10, float_to_int(bumpenvmat[2]));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_BUMPENVMAT11, *(LPDWORD)&bumpenvmat[3]);
hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_BUMPENVMAT11, float_to_int(bumpenvmat[3]));
ok(hr == S_OK, "Got hr %#lx.\n", hr);
hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_BUMPENVMAP);
@ -23249,16 +23263,17 @@ static void test_texture_blending(void)
DWORD value;
};
enum texture_stage_texture
{
TEXTURE_INVALID,
TEXTURE_NONE,
TEXTURE_BUMPMAP,
TEXTURE_RED,
};
struct texture_stage
{
enum
{
TEXTURE_INVALID,
TEXTURE_NONE,
TEXTURE_BUMPMAP,
TEXTURE_RED,
}
texture;
enum texture_stage_texture texture;
struct texture_stage_state state[20];
};
@ -26438,16 +26453,23 @@ static void test_desktop_window(void)
device = create_device(d3d, GetDesktopWindow(), GetDesktopWindow(), TRUE);
ok(!!device, "Failed to create a D3D device.\n");
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 1.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = getPixelColor(device, 1, 1);
ok(color == 0x00ff0000, "Got unexpected color 0x%08x.\n", color);
if (device)
{
hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffff0000, 1.0f, 0);
ok(SUCCEEDED(hr), "Failed to clear, hr %#lx.\n", hr);
color = getPixelColor(device, 1, 1);
ok(color == 0x00ff0000, "Got unexpected color 0x%08x.\n", color);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to present, hr %#lx.\n", hr);
hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL);
ok(SUCCEEDED(hr), "Failed to present, hr %#lx.\n", hr);
refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %lu references left.\n", refcount);
refcount = IDirect3DDevice9_Release(device);
ok(!refcount, "Device has %lu references left.\n", refcount);
}
else
{
skip("Failed to create a D3D device for the desktop window, skipping tests.\n");
}
/* test device with NULL HWND */
device = create_device(d3d, NULL, NULL, TRUE);

View file

@ -1,4 +1,5 @@
MODULE = d3dcompiler_39.dll
IMPORTLIB = d3dcompiler_39
IMPORTS = wined3d
EXTRADEFS = -DD3D_COMPILER_VERSION=39
PARENTSRC = ../d3dcompiler_43

View file

@ -397,29 +397,12 @@ HRESULT WINAPI D3DAssemble(const void *data, SIZE_T datasize, const char *filena
return hr;
}
HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filename,
const D3D_SHADER_MACRO *macros, ID3DInclude *include, const char *entry_point,
const char *profile, UINT flags, UINT effect_flags, UINT secondary_flags,
const void *secondary_data, SIZE_T secondary_data_size, ID3DBlob **shader_blob,
ID3DBlob **messages_blob)
static enum vkd3d_shader_target_type get_target_for_profile(const char *profile)
{
struct d3dcompiler_include_from_file include_from_file;
struct vkd3d_shader_preprocess_info preprocess_info;
struct vkd3d_shader_hlsl_source_info hlsl_info;
struct vkd3d_shader_compile_option options[3];
struct vkd3d_shader_compile_info compile_info;
struct vkd3d_shader_compile_option *option;
struct vkd3d_shader_code byte_code;
const D3D_SHADER_MACRO *macro;
size_t profile_len, i;
char *messages;
HRESULT hr;
int ret;
static const char * const d3dbc_profiles[] =
{
"fx_2_",
"ps.1.",
"ps.2.",
"ps.3.",
@ -439,6 +422,50 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
"tx_1_",
};
static const char * const fx_profiles[] =
{
"fx_2_0",
"fx_4_0",
"fx_4_1",
"fx_5_0",
};
profile_len = strlen(profile);
for (i = 0; i < ARRAY_SIZE(d3dbc_profiles); ++i)
{
size_t len = strlen(d3dbc_profiles[i]);
if (len <= profile_len && !memcmp(profile, d3dbc_profiles[i], len))
return VKD3D_SHADER_TARGET_D3D_BYTECODE;
}
for (i = 0; i < ARRAY_SIZE(fx_profiles); ++i)
{
if (!strcmp(profile, fx_profiles[i]))
return VKD3D_SHADER_TARGET_FX;
}
return VKD3D_SHADER_TARGET_DXBC_TPF;
}
HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filename,
const D3D_SHADER_MACRO *macros, ID3DInclude *include, const char *entry_point,
const char *profile, UINT flags, UINT effect_flags, UINT secondary_flags,
const void *secondary_data, SIZE_T secondary_data_size, ID3DBlob **shader_blob,
ID3DBlob **messages_blob)
{
struct d3dcompiler_include_from_file include_from_file;
struct vkd3d_shader_preprocess_info preprocess_info;
struct vkd3d_shader_hlsl_source_info hlsl_info;
struct vkd3d_shader_compile_option options[4];
struct vkd3d_shader_compile_info compile_info;
struct vkd3d_shader_compile_option *option;
struct vkd3d_shader_code byte_code;
const D3D_SHADER_MACRO *macro;
char *messages;
HRESULT hr;
int ret;
TRACE("data %p, data_size %Iu, filename %s, macros %p, include %p, entry_point %s, "
"profile %s, flags %#x, effect_flags %#x, secondary_flags %#x, secondary_data %p, "
"secondary_data_size %Iu, shader_blob %p, messages_blob %p.\n",
@ -453,8 +480,11 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
include = &include_from_file.ID3DInclude_iface;
}
if (flags & ~(D3DCOMPILE_DEBUG | D3DCOMPILE_PACK_MATRIX_ROW_MAJOR | D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR))
if (flags & ~(D3DCOMPILE_DEBUG | D3DCOMPILE_PACK_MATRIX_ROW_MAJOR | D3DCOMPILE_PACK_MATRIX_COLUMN_MAJOR
| D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY))
{
FIXME("Ignoring flags %#x.\n", flags);
}
if (effect_flags)
FIXME("Ignoring effect flags %#x.\n", effect_flags);
if (secondary_flags)
@ -474,24 +504,12 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
compile_info.source.code = data;
compile_info.source.size = data_size;
compile_info.source_type = VKD3D_SHADER_SOURCE_HLSL;
compile_info.target_type = VKD3D_SHADER_TARGET_DXBC_TPF;
compile_info.target_type = get_target_for_profile(profile);
compile_info.options = options;
compile_info.option_count = 1;
compile_info.log_level = VKD3D_SHADER_LOG_INFO;
compile_info.source_name = filename;
profile_len = strlen(profile);
for (i = 0; i < ARRAY_SIZE(d3dbc_profiles); ++i)
{
size_t len = strlen(d3dbc_profiles[i]);
if (len <= profile_len && !memcmp(profile, d3dbc_profiles[i], len))
{
compile_info.target_type = VKD3D_SHADER_TARGET_D3D_BYTECODE;
break;
}
}
preprocess_info.type = VKD3D_SHADER_STRUCTURE_TYPE_PREPROCESS_INFO;
preprocess_info.next = &hlsl_info;
preprocess_info.macros = (const struct vkd3d_shader_macro *)macros;
@ -532,6 +550,13 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
option->value = VKD3D_SHADER_COMPILE_OPTION_PACK_MATRIX_COLUMN_MAJOR;
}
if (flags & D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY)
{
option = &options[compile_info.option_count++];
option->name = VKD3D_SHADER_COMPILE_OPTION_BACKWARD_COMPATIBILITY;
option->value = VKD3D_SHADER_COMPILE_OPTION_BACKCOMPAT_MAP_SEMANTIC_NAMES;
}
ret = vkd3d_shader_compile(&compile_info, &byte_code, &messages);
if (ret)
@ -576,6 +601,20 @@ HRESULT WINAPI D3DCompile2(const void *data, SIZE_T data_size, const char *filen
return S_OK;
}
/* Unlike other effect profiles fx_4_x is using DXBC container. */
if (!strcmp(profile, "fx_4_0") || !strcmp(profile, "fx_4_1"))
{
struct vkd3d_shader_dxbc_section_desc section = { .tag = TAG_FX10, .data = byte_code };
struct vkd3d_shader_code dxbc;
ret = vkd3d_shader_serialize_dxbc(1, &section, &dxbc, NULL);
vkd3d_shader_free_shader_code(&byte_code);
if (ret)
return hresult_from_vkd3d_result(ret);
byte_code = dxbc;
}
if (SUCCEEDED(hr = D3DCreateBlob(byte_code.size, shader_blob)))
memcpy(ID3D10Blob_GetBufferPointer(*shader_blob), byte_code.code, byte_code.size);
@ -735,6 +774,12 @@ end:
return hr;
}
HRESULT WINAPI D3DCreateLinker(ID3D11Linker **linker)
{
FIXME("linker %p stub!\n", linker);
return E_NOTIMPL;
}
HRESULT WINAPI D3DLoadModule(const void *data, SIZE_T size, ID3D11Module **module)
{
FIXME("data %p, size %Iu, module %p stub!\n", data, size, module);

View file

@ -523,6 +523,7 @@ void SlDeleteShader(struct bwriter_shader *shader);
((DWORD)(ch2) << 16) | ((DWORD)(ch3) << 24 ))
#define TAG_Aon9 MAKE_TAG('A', 'o', 'n', '9')
#define TAG_DXBC MAKE_TAG('D', 'X', 'B', 'C')
#define TAG_FX10 MAKE_TAG('F', 'X', '1', '0')
#define TAG_ISGN MAKE_TAG('I', 'S', 'G', 'N')
#define TAG_OSGN MAKE_TAG('O', 'S', 'G', 'N')
#define TAG_OSG5 MAKE_TAG('O', 'S', 'G', '5')

View file

@ -622,7 +622,7 @@ static void test_sampling(void)
draw_quad(&test_context, ps_code);
v = get_color_vec4(&test_context, 0, 0);
todo_wine ok(compare_vec4(&v, 0.25f, 0.0f, 0.25f, 0.0f, 0),
ok(compare_vec4(&v, 0.25f, 0.0f, 0.25f, 0.0f, 0),
"Got unexpected value {%.8e, %.8e, %.8e, %.8e}.\n", v.x, v.y, v.z, v.w);
ID3D10Blob_Release(ps_code);

View file

@ -5,7 +5,7 @@
@ stub D3DCompressShaders
@ stdcall D3DCreateBlob(long ptr)
@ stub D3DCreateFunctionLinkingGraph
@ stub D3DCreateLinker
@ stdcall D3DCreateLinker(ptr)
@ stub D3DDecompressShaders
@ stdcall D3DDisassemble(ptr long long ptr ptr)
@ stub D3DDisassemble10Effect(ptr long ptr)

View file

@ -4375,11 +4375,10 @@ static void test_create_effect_from_memory(void)
effect = (ID3D10Effect *)0xdeadbeef;
hr = D3DX10CreateEffectFromMemory(test_fx_source, strlen(test_fx_source) + 1, NULL, NULL, NULL, "fx_4_0",
0x0, 0x0, device, NULL, NULL, &effect, &errors, NULL);
todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
todo_wine ok(!errors, "Got unexpected errors %p.\n", errors);
todo_wine ok(!!effect && effect != (ID3D10Effect *)0xdeadbeef, "Got unexpected effect %p.\n", effect);
if (hr == S_OK)
effect->lpVtbl->Release(effect);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!errors, "Got unexpected errors %p.\n", errors);
ok(!!effect && effect != (ID3D10Effect *)0xdeadbeef, "Got unexpected effect %p.\n", effect);
effect->lpVtbl->Release(effect);
refcount = ID3D10Device_Release(device);
ok(!refcount, "Got unexpected refcount %lu.\n", refcount);
@ -4465,21 +4464,19 @@ static void test_create_effect_from_file(void)
effect = (ID3D10Effect *)0xdeadbeef;
hr = D3DX10CreateEffectFromFileW(path, NULL, NULL, "fx_4_0", 0x0, 0x0,
device, NULL, NULL, &effect, &errors, NULL);
todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
todo_wine ok(!errors, "Got unexpected errors %p.\n", errors);
todo_wine ok(effect && effect != (ID3D10Effect *)0xdeadbeef, "Got unexpected effect %p.\n", effect);
if (hr == S_OK)
effect->lpVtbl->Release(effect);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!errors, "Got unexpected errors %p.\n", errors);
ok(effect && effect != (ID3D10Effect *)0xdeadbeef, "Got unexpected effect %p.\n", effect);
effect->lpVtbl->Release(effect);
errors = (ID3D10Blob *)0xdeadbeef;
effect = (ID3D10Effect *)0xdeadbeef;
hr = D3DX10CreateEffectFromFileA(get_str_a(path), NULL, NULL, "fx_4_0", 0x0, 0x0,
device, NULL, NULL, &effect, &errors, NULL);
todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
todo_wine ok(!errors, "Got unexpected errors %p.\n", errors);
todo_wine ok(effect && effect != (ID3D10Effect *)0xdeadbeef, "Got unexpected effect %p.\n", effect);
if (hr == S_OK)
effect->lpVtbl->Release(effect);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!errors, "Got unexpected errors %p.\n", errors);
ok(effect && effect != (ID3D10Effect *)0xdeadbeef, "Got unexpected effect %p.\n", effect);
effect->lpVtbl->Release(effect);
delete_file(test_file_name);
@ -4584,21 +4581,19 @@ static void test_create_effect_from_resource(void)
effect = (ID3D10Effect *)0xdeadbeef;
hr = D3DX10CreateEffectFromResourceW(resource_module, test_resource_name, NULL, NULL, NULL, "fx_4_0",
0, 0, device, NULL, NULL, &effect, &errors, NULL);
todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
todo_wine ok(!errors, "Got unexpected errors %p.\n", errors);
todo_wine ok(effect && effect != (ID3D10Effect *)0xdeadbeef, "Got unexpected effect %p.\n", effect);
if (hr == S_OK)
effect->lpVtbl->Release(effect);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!errors, "Got unexpected errors %p.\n", errors);
ok(effect && effect != (ID3D10Effect *)0xdeadbeef, "Got unexpected effect %p.\n", effect);
effect->lpVtbl->Release(effect);
errors = (ID3D10Blob *)0xdeadbeef;
effect = (ID3D10Effect *)0xdeadbeef;
hr = D3DX10CreateEffectFromResourceA(resource_module, get_str_a(test_resource_name), NULL, NULL, NULL, "fx_4_0",
0, 0, device, NULL, NULL, &effect, &errors, NULL);
todo_wine ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
todo_wine ok(!errors, "Got unexpected errors %p.\n", errors);
todo_wine ok(effect && effect != (ID3D10Effect *)0xdeadbeef, "Got unexpected effect %p.\n", effect);
if (hr == S_OK)
effect->lpVtbl->Release(effect);
ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr);
ok(!errors, "Got unexpected errors %p.\n", errors);
ok(effect && effect != (ID3D10Effect *)0xdeadbeef, "Got unexpected effect %p.\n", effect);
effect->lpVtbl->Release(effect);
delete_resource_module(test_resource_name, resource_module);

View file

@ -1875,6 +1875,210 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
}
}
static HRESULT d3dx_image_decompress(const void *memory, uint32_t row_pitch, const RECT *rect,
const RECT *unaligned_rect, const struct volume *size, const struct pixel_format_desc *desc,
void **out_memory, uint32_t *out_row_pitch, RECT *out_rect, const struct pixel_format_desc **out_desc)
{
void (*fetch_dxt_texel)(int srcRowStride, const BYTE *pixdata, int i, int j, void *texel);
const struct pixel_format_desc *uncompressed_desc = NULL;
uint32_t x, y, tmp_pitch;
BYTE *uncompressed_mem;
switch (desc->format)
{
case D3DFMT_DXT1:
uncompressed_desc = get_format_info(D3DFMT_A8B8G8R8);
fetch_dxt_texel = fetch_2d_texel_rgba_dxt1;
break;
case D3DFMT_DXT2:
case D3DFMT_DXT3:
uncompressed_desc = get_format_info(D3DFMT_A8B8G8R8);
fetch_dxt_texel = fetch_2d_texel_rgba_dxt3;
break;
case D3DFMT_DXT4:
case D3DFMT_DXT5:
uncompressed_desc = get_format_info(D3DFMT_A8B8G8R8);
fetch_dxt_texel = fetch_2d_texel_rgba_dxt5;
break;
default:
FIXME("Unexpected compressed texture format %u.\n", desc->format);
return E_NOTIMPL;
}
if (!(uncompressed_mem = malloc(size->width * size->height * size->depth * uncompressed_desc->bytes_per_pixel)))
return E_OUTOFMEMORY;
if (unaligned_rect && EqualRect(rect, unaligned_rect))
goto exit;
TRACE("Decompressing image.\n");
tmp_pitch = row_pitch * desc->block_width / desc->block_byte_count;
for (y = 0; y < size->height; ++y)
{
BYTE *ptr = &uncompressed_mem[y * size->width * uncompressed_desc->bytes_per_pixel];
for (x = 0; x < size->width; ++x)
{
const POINT pt = { x, y };
if (!PtInRect(unaligned_rect, pt))
fetch_dxt_texel(tmp_pitch, (BYTE *)memory, x + rect->left, y + rect->top, ptr);
ptr += uncompressed_desc->bytes_per_pixel;
}
}
exit:
*out_memory = uncompressed_mem;
*out_row_pitch = size->width * uncompressed_desc->bytes_per_pixel;
if (unaligned_rect)
*out_rect = *unaligned_rect;
else
SetRect(out_rect, 0, 0, size->width, size->height);
*out_desc = uncompressed_desc;
return S_OK;
}
static void set_volume_struct(struct volume *volume, uint32_t width, uint32_t height, uint32_t depth)
{
volume->width = width;
volume->height = height;
volume->depth = depth;
}
static HRESULT d3dx_load_image_from_memory(void *dst_memory, uint32_t dst_row_pitch, const struct pixel_format_desc *dst_desc,
const PALETTEENTRY *dst_palette, const RECT *dst_rect, const RECT *dst_rect_aligned, const void *src_memory,
uint32_t src_row_pitch, const struct pixel_format_desc *src_desc, const PALETTEENTRY *src_palette, const RECT *src_rect,
uint32_t filter_flags, uint32_t color_key)
{
struct volume src_size, dst_size, dst_size_aligned;
const BYTE *src_memory_offset = src_memory;
HRESULT hr = S_OK;
TRACE("dst_memory %p, dst_row_pitch %d, dst_desc %p, dst_palette %p, dst_rect %s, dst_rect_aligned %s, src_memory %p, "
"src_row_pitch %d, src_desc %p, src_palette %p, src_rect %s, filter %#x, color_key 0x%08x.\n",
dst_memory, dst_row_pitch, dst_desc, dst_palette, wine_dbgstr_rect(dst_rect), wine_dbgstr_rect(dst_rect_aligned),
src_memory, src_row_pitch, src_desc, src_palette, wine_dbgstr_rect(src_rect), filter_flags, color_key);
set_volume_struct(&src_size, (src_rect->right - src_rect->left), (src_rect->bottom - src_rect->top), 1);
set_volume_struct(&dst_size, (dst_rect->right - dst_rect->left), (dst_rect->bottom - dst_rect->top), 1);
set_volume_struct(&dst_size_aligned, (dst_rect_aligned->right - dst_rect_aligned->left),
(dst_rect_aligned->bottom - dst_rect_aligned->top), 1);
src_memory_offset += (src_rect->top / src_desc->block_height) * src_row_pitch;
src_memory_offset += (src_rect->left / src_desc->block_width) * src_desc->block_byte_count;
/* Everything matches, simply copy the pixels. */
if (src_desc->format == dst_desc->format
&& dst_size.width == src_size.width
&& dst_size.height == src_size.height
&& color_key == 0
&& !(src_rect->left & (src_desc->block_width - 1))
&& !(src_rect->top & (src_desc->block_height - 1))
&& !(dst_rect->left & (dst_desc->block_width - 1))
&& !(dst_rect->top & (dst_desc->block_height - 1)))
{
TRACE("Simple copy.\n");
copy_pixels(src_memory_offset, src_row_pitch, 0, dst_memory, dst_row_pitch, 0, &src_size, src_desc);
return S_OK;
}
/* Stretching or format conversion. */
if (!is_conversion_from_supported(src_desc)
|| !is_conversion_to_supported(dst_desc))
{
FIXME("Unsupported format conversion %#x -> %#x.\n", src_desc->format, dst_desc->format);
return E_NOTIMPL;
}
/*
* If the source is a compressed image, we need to decompress it first
* before doing any modifications.
*/
if (src_desc->type == FORMAT_DXT)
{
const struct pixel_format_desc *uncompressed_desc;
uint32_t uncompressed_row_pitch;
void *uncompressed_mem = NULL;
RECT uncompressed_rect;
hr = d3dx_image_decompress(src_memory, src_row_pitch, src_rect, NULL, &src_size, src_desc,
&uncompressed_mem, &uncompressed_row_pitch, &uncompressed_rect, &uncompressed_desc);
if (SUCCEEDED(hr))
{
hr = d3dx_load_image_from_memory(dst_memory, dst_row_pitch, dst_desc, dst_palette, dst_rect, dst_rect_aligned,
uncompressed_mem, uncompressed_row_pitch, uncompressed_desc, src_palette, &uncompressed_rect,
filter_flags, color_key);
}
free(uncompressed_mem);
return hr;
}
/* Same as the above, need to decompress the destination prior to modifying. */
if (dst_desc->type == FORMAT_DXT)
{
const struct pixel_format_desc *uncompressed_desc;
uint32_t uncompressed_row_pitch;
void *uncompressed_mem = NULL;
BYTE *uncompressed_mem_offset;
RECT uncompressed_rect;
hr = d3dx_image_decompress(dst_memory, dst_row_pitch, dst_rect_aligned, dst_rect, &dst_size_aligned, dst_desc,
&uncompressed_mem, &uncompressed_row_pitch, &uncompressed_rect, &uncompressed_desc);
if (FAILED(hr))
return hr;
uncompressed_mem_offset = (BYTE *)uncompressed_mem + (dst_rect->top - dst_rect_aligned->top) * uncompressed_row_pitch
+ (dst_rect->left - dst_rect_aligned->left) * uncompressed_desc->bytes_per_pixel;
hr = d3dx_load_image_from_memory(uncompressed_mem_offset, uncompressed_row_pitch, uncompressed_desc, dst_palette,
&uncompressed_rect, &uncompressed_rect, src_memory, src_row_pitch, src_desc, src_palette,
src_rect, filter_flags, color_key);
if (SUCCEEDED(hr))
{
GLenum gl_format = 0;
TRACE("Compressing DXTn surface.\n");
switch (dst_desc->format)
{
case D3DFMT_DXT1:
gl_format = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
break;
case D3DFMT_DXT2:
case D3DFMT_DXT3:
gl_format = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
break;
case D3DFMT_DXT4:
case D3DFMT_DXT5:
gl_format = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
break;
default:
ERR("Unexpected destination compressed format %u.\n", dst_desc->format);
}
tx_compress_dxtn(4, dst_size_aligned.width, dst_size_aligned.height, uncompressed_mem, gl_format,
dst_memory, dst_row_pitch);
}
free(uncompressed_mem);
return hr;
}
if ((filter_flags & 0xf) == D3DX_FILTER_NONE)
{
convert_argb_pixels(src_memory_offset, src_row_pitch, 0, &src_size, src_desc,
dst_memory, dst_row_pitch, 0, &dst_size, dst_desc, color_key, src_palette);
}
else /* if ((filter & 0xf) == D3DX_FILTER_POINT) */
{
if ((filter_flags & 0xf) != D3DX_FILTER_POINT)
FIXME("Unhandled filter %#x.\n", filter_flags);
/* Always apply a point filter until D3DX_FILTER_LINEAR,
* D3DX_FILTER_TRIANGLE and D3DX_FILTER_BOX are implemented. */
point_filter_argb_pixels(src_memory_offset, src_row_pitch, 0, &src_size, src_desc, dst_memory, dst_row_pitch, 0,
&dst_size, dst_desc, color_key, src_palette);
}
return hr;
}
/************************************************************
* D3DXLoadSurfaceFromMemory
*
@ -1913,7 +2117,6 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
DWORD filter, D3DCOLOR color_key)
{
const struct pixel_format_desc *srcformatdesc, *destformatdesc;
struct volume src_size, dst_size, dst_size_aligned;
RECT dst_rect_temp, dst_rect_aligned;
IDirect3DSurface9 *surface;
D3DSURFACE_DESC surfdesc;
@ -1945,10 +2148,6 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
return E_NOTIMPL;
}
src_size.width = src_rect->right - src_rect->left;
src_size.height = src_rect->bottom - src_rect->top;
src_size.depth = 1;
IDirect3DSurface9_GetDesc(dst_surface, &surfdesc);
destformatdesc = get_format_info(surfdesc.Format);
if (!dst_rect)
@ -1987,172 +2186,16 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
dst_rect_aligned.bottom = min((dst_rect_aligned.bottom + destformatdesc->block_height - 1)
& ~(destformatdesc->block_height - 1), surfdesc.Height);
dst_size.width = dst_rect->right - dst_rect->left;
dst_size.height = dst_rect->bottom - dst_rect->top;
dst_size.depth = 1;
dst_size_aligned.width = dst_rect_aligned.right - dst_rect_aligned.left;
dst_size_aligned.height = dst_rect_aligned.bottom - dst_rect_aligned.top;
dst_size_aligned.depth = 1;
if (filter == D3DX_DEFAULT)
filter = D3DX_FILTER_TRIANGLE | D3DX_FILTER_DITHER;
if (FAILED(hr = lock_surface(dst_surface, &dst_rect_aligned, &lockrect, &surface, TRUE)))
return hr;
src_memory = (BYTE *)src_memory + src_rect->top / srcformatdesc->block_height * src_pitch
+ src_rect->left / srcformatdesc->block_width * srcformatdesc->block_byte_count;
if (src_format == surfdesc.Format
&& dst_size.width == src_size.width
&& dst_size.height == src_size.height
&& color_key == 0
&& !(src_rect->left & (srcformatdesc->block_width - 1))
&& !(src_rect->top & (srcformatdesc->block_height - 1))
&& !(dst_rect->left & (destformatdesc->block_width - 1))
&& !(dst_rect->top & (destformatdesc->block_height - 1)))
{
TRACE("Simple copy.\n");
copy_pixels(src_memory, src_pitch, 0, lockrect.pBits, lockrect.Pitch, 0,
&src_size, srcformatdesc);
}
else /* Stretching or format conversion. */
{
const struct pixel_format_desc *dst_format;
DWORD *src_uncompressed = NULL;
BYTE *dst_uncompressed = NULL;
unsigned int dst_pitch;
BYTE *dst_mem;
if (!is_conversion_from_supported(srcformatdesc)
|| !is_conversion_to_supported(destformatdesc))
{
FIXME("Unsupported format conversion %#x -> %#x.\n", src_format, surfdesc.Format);
unlock_surface(dst_surface, &dst_rect_aligned, surface, FALSE);
return E_NOTIMPL;
}
if (srcformatdesc->type == FORMAT_DXT)
{
void (*fetch_dxt_texel)(int srcRowStride, const BYTE *pixdata,
int i, int j, void *texel);
unsigned int x, y;
src_pitch = src_pitch * srcformatdesc->block_width / srcformatdesc->block_byte_count;
src_uncompressed = malloc(src_size.width * src_size.height * sizeof(DWORD));
if (!src_uncompressed)
{
unlock_surface(dst_surface, &dst_rect_aligned, surface, FALSE);
return E_OUTOFMEMORY;
}
switch(src_format)
{
case D3DFMT_DXT1:
fetch_dxt_texel = fetch_2d_texel_rgba_dxt1;
break;
case D3DFMT_DXT2:
case D3DFMT_DXT3:
fetch_dxt_texel = fetch_2d_texel_rgba_dxt3;
break;
case D3DFMT_DXT4:
case D3DFMT_DXT5:
fetch_dxt_texel = fetch_2d_texel_rgba_dxt5;
break;
default:
FIXME("Unexpected compressed texture format %u.\n", src_format);
fetch_dxt_texel = NULL;
}
TRACE("Uncompressing DXTn surface.\n");
for (y = 0; y < src_size.height; ++y)
{
DWORD *ptr = &src_uncompressed[y * src_size.width];
for (x = 0; x < src_size.width; ++x)
{
fetch_dxt_texel(src_pitch, src_memory, x + src_rect->left, y + src_rect->top, ptr);
++ptr;
}
}
src_memory = src_uncompressed;
src_pitch = src_size.width * sizeof(DWORD);
srcformatdesc = get_format_info(D3DFMT_A8B8G8R8);
}
if (destformatdesc->type == FORMAT_DXT)
{
BOOL dst_misaligned = dst_rect->left != dst_rect_aligned.left
|| dst_rect->top != dst_rect_aligned.top
|| dst_rect->right != dst_rect_aligned.right
|| dst_rect->bottom != dst_rect_aligned.bottom;
size_t dst_uncompressed_size = dst_size_aligned.width * dst_size_aligned.height * sizeof(DWORD);
dst_uncompressed = malloc(dst_uncompressed_size);
if (!dst_uncompressed)
{
free(src_uncompressed);
unlock_surface(dst_surface, &dst_rect_aligned, surface, FALSE);
return E_OUTOFMEMORY;
}
if (dst_misaligned) memset(dst_uncompressed, 0, dst_uncompressed_size);
dst_pitch = dst_size_aligned.width * sizeof(DWORD);
dst_format = get_format_info(D3DFMT_A8B8G8R8);
dst_mem = dst_uncompressed + (dst_rect->top - dst_rect_aligned.top) * dst_pitch
+ (dst_rect->left - dst_rect_aligned.left) * sizeof(DWORD);
}
else
{
dst_mem = lockrect.pBits;
dst_pitch = lockrect.Pitch;
dst_format = destformatdesc;
}
if ((filter & 0xf) == D3DX_FILTER_NONE)
{
convert_argb_pixels(src_memory, src_pitch, 0, &src_size, srcformatdesc,
dst_mem, dst_pitch, 0, &dst_size, dst_format, color_key, src_palette);
}
else /* if ((filter & 0xf) == D3DX_FILTER_POINT) */
{
if ((filter & 0xf) != D3DX_FILTER_POINT)
FIXME("Unhandled filter %#lx.\n", filter);
/* Always apply a point filter until D3DX_FILTER_LINEAR,
* D3DX_FILTER_TRIANGLE and D3DX_FILTER_BOX are implemented. */
point_filter_argb_pixels(src_memory, src_pitch, 0, &src_size, srcformatdesc,
dst_mem, dst_pitch, 0, &dst_size, dst_format, color_key, src_palette);
}
free(src_uncompressed);
if (dst_uncompressed)
{
GLenum gl_format = 0;
TRACE("Compressing DXTn surface.\n");
switch(surfdesc.Format)
{
case D3DFMT_DXT1:
gl_format = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
break;
case D3DFMT_DXT2:
case D3DFMT_DXT3:
gl_format = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT;
break;
case D3DFMT_DXT4:
case D3DFMT_DXT5:
gl_format = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT;
break;
default:
ERR("Unexpected destination compressed format %u.\n", surfdesc.Format);
}
tx_compress_dxtn(4, dst_size_aligned.width, dst_size_aligned.height,
dst_uncompressed, gl_format, lockrect.pBits,
lockrect.Pitch);
free(dst_uncompressed);
}
}
hr = d3dx_load_image_from_memory(lockrect.pBits, lockrect.Pitch, destformatdesc, dst_palette, dst_rect,
&dst_rect_aligned, src_memory, src_pitch, srcformatdesc, src_palette, src_rect, filter, color_key);
if (FAILED(hr))
WARN("d3dx_load_image_from_memory failed with hr %#lx\n", hr);
return unlock_surface(dst_surface, &dst_rect_aligned, surface, TRUE);
}

View file

@ -257,12 +257,7 @@ static void test_create_effect_and_pool(IDirect3DDevice9 *device)
ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
hr = D3DXCreateEffect(device, effect_desc, sizeof(effect_desc), NULL, NULL, 0, NULL, &effect, NULL);
todo_wine ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
if (FAILED(hr))
{
skip("Failed to compile effect, skipping test.\n");
return;
}
ok(hr == D3D_OK, "Got result %lx, expected 0 (D3D_OK)\n", hr);
hr = effect->lpVtbl->QueryInterface(effect, &IID_ID3DXBaseEffect, (void **)&base);
ok(hr == E_NOINTERFACE, "QueryInterface failed, got %lx, expected %lx (E_NOINTERFACE)\n", hr, E_NOINTERFACE);
@ -8047,8 +8042,6 @@ static void test_create_effect_from_file(void)
trace("D3DXCreateEffectFromFileExW messages:\n%s", (char *)ID3DXBuffer_GetBufferPointer(messages));
ID3DXBuffer_Release(messages);
}
if (effect)
effect->lpVtbl->Release(effect);
delete_file("effect1.fx");
delete_file("effect2.fx");

View file

@ -23,6 +23,7 @@
#include "wine/test.h"
#include "d3dx9tex.h"
#include "resources.h"
#include <stdint.h>
#define check_release(obj, exp) _check_release(__LINE__, obj, exp)
static inline void _check_release(unsigned int line, IUnknown *obj, int exp)
@ -279,6 +280,87 @@ static const BYTE dds_dxt5_8_8[] =
0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0x00,0x00,0x05,0x05,0x50,0x50,
};
/*
* 8x8 dxt5 image data, four 4x4 blocks:
* +-----+-----+
* |Blue |Green|
* | | |
* +-----+-----+
* |Red |Black|
* | | |
* +-----+-----+
*/
static const BYTE dxt5_8_8[] =
{
0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1f,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,
0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x07,0xe0,0x07,0x00,0x00,0x00,0x00,
0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0xf8,0x00,0x00,0x00,0x00,
0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
struct surface_readback
{
IDirect3DSurface9 *surface;
D3DLOCKED_RECT locked_rect;
};
static uint32_t get_readback_color(struct surface_readback *rb, uint32_t x, uint32_t y)
{
return rb->locked_rect.pBits
? ((uint32_t *)rb->locked_rect.pBits)[y * rb->locked_rect.Pitch / sizeof(uint32_t) + x] : 0xdeadbeef;
}
static void release_surface_readback(struct surface_readback *rb)
{
HRESULT hr;
if (!rb->surface)
return;
if (rb->locked_rect.pBits && FAILED(hr = IDirect3DSurface9_UnlockRect(rb->surface)))
trace("Can't unlock the offscreen surface, hr %#lx.\n", hr);
IDirect3DSurface9_Release(rb->surface);
}
static void get_surface_decompressed_readback(IDirect3DDevice9 *device, IDirect3DSurface9 *compressed_surface,
struct surface_readback *rb)
{
D3DSURFACE_DESC desc;
HRESULT hr;
memset(rb, 0, sizeof(*rb));
hr = IDirect3DSurface9_GetDesc(compressed_surface, &desc);
if (FAILED(hr))
{
trace("Failed to get compressed surface description, hr %#lx.\n", hr);
return;
}
hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, desc.Width, desc.Height, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM,
&rb->surface, NULL);
if (FAILED(hr))
{
trace("Can't create the decompressed surface, hr %#lx.\n", hr);
return;
}
hr = D3DXLoadSurfaceFromSurface(rb->surface, NULL, NULL, compressed_surface, NULL, NULL, D3DX_FILTER_NONE, 0);
if (FAILED(hr))
{
trace("Can't load the decompressed surface, hr %#lx.\n", hr);
IDirect3DSurface9_Release(rb->surface);
rb->surface = NULL;
return;
}
hr = IDirect3DSurface9_LockRect(rb->surface, &rb->locked_rect, NULL, D3DLOCK_READONLY);
if (FAILED(hr))
{
trace("Can't lock the offscreen surface, hr %#lx.\n", hr);
IDirect3DSurface9_Release(rb->surface);
rb->surface = NULL;
}
}
static HRESULT create_file(const char *filename, const unsigned char *data, const unsigned int size)
{
DWORD received;
@ -832,6 +914,14 @@ static inline void _check_pixel_4bpp(unsigned int line, const D3DLOCKED_RECT *lo
ok_(__FILE__, line)(color == expected_color, "Got color 0x%08lx, expected 0x%08lx\n", color, expected_color);
}
#define check_readback_pixel_4bpp(rb, x, y, color, todo) _check_readback_pixel_4bpp(__LINE__, rb, x, y, color, todo)
static inline void _check_readback_pixel_4bpp(unsigned int line, struct surface_readback *rb, uint32_t x,
uint32_t y, uint32_t expected_color, BOOL todo)
{
uint32_t color = get_readback_color(rb, x, y);
todo_wine_if(todo) ok_(__FILE__, line)(color == expected_color, "Got color 0x%08x, expected 0x%08x.\n", color, expected_color);
}
static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
{
HRESULT hr;
@ -1450,6 +1540,8 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
skip("Failed to create DXT5 texture, hr %#lx.\n", hr);
else
{
struct surface_readback surface_rb;
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#lx.\n", hr);
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
@ -1521,6 +1613,57 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
check_release((IUnknown *)newsurf, 1);
check_release((IUnknown *)tex, 0);
/* Misalignment tests but check the resulting image. */
hr = IDirect3DDevice9_CreateTexture(device, 8, 8, 1, 0, D3DFMT_DXT5, D3DPOOL_SYSTEMMEM, &tex, NULL);
ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
SetRect(&rect, 0, 0, 8, 8);
hr = D3DXLoadSurfaceFromMemory(newsurf, NULL, NULL, dxt5_8_8,
D3DFMT_DXT5, 16 * 2, NULL, &rect, D3DX_FILTER_NONE, 0);
ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_decompressed_readback(device, newsurf, &surface_rb);
check_readback_pixel_4bpp(&surface_rb, 0, 0, 0xff0000ff, FALSE); /* Blue block, top left. */
check_readback_pixel_4bpp(&surface_rb, 3, 3, 0xff0000ff, FALSE); /* Blue block, bottom right. */
check_readback_pixel_4bpp(&surface_rb, 7, 0, 0xff00ff00, FALSE); /* Green block, top right. */
check_readback_pixel_4bpp(&surface_rb, 4, 3, 0xff00ff00, FALSE); /* Green block, bottom left. */
check_readback_pixel_4bpp(&surface_rb, 3, 4, 0xffff0000, FALSE); /* Red block, top right. */
check_readback_pixel_4bpp(&surface_rb, 0, 7, 0xffff0000, FALSE); /* Red block, bottom left. */
check_readback_pixel_4bpp(&surface_rb, 4, 4, 0xff000000, FALSE); /* Black block, top left. */
check_readback_pixel_4bpp(&surface_rb, 7, 7, 0xff000000, FALSE); /* Black block, bottom right. */
release_surface_readback(&surface_rb);
/*
* Load our surface into a destination rectangle that overlaps
* multiple blocks. Original data in the blocks should be
* preserved.
*/
SetRect(&rect, 4, 4, 8, 8);
SetRect(&destrect, 2, 2, 6, 6);
hr = D3DXLoadSurfaceFromMemory(newsurf, NULL, &destrect, dxt5_8_8,
D3DFMT_DXT5, 16 * 2, NULL, &rect, D3DX_FILTER_NONE, 0);
ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr);
get_surface_decompressed_readback(device, newsurf, &surface_rb);
check_readback_pixel_4bpp(&surface_rb, 0, 0, 0xff0000ff, FALSE); /* Blue block, top left. */
check_readback_pixel_4bpp(&surface_rb, 3, 3, 0xff000000, FALSE); /* Blue block, bottom right. */
check_readback_pixel_4bpp(&surface_rb, 7, 0, 0xff00ff00, FALSE); /* Green block, top right. */
check_readback_pixel_4bpp(&surface_rb, 4, 3, 0xff000000, FALSE); /* Green block, bottom left. */
check_readback_pixel_4bpp(&surface_rb, 3, 4, 0xff000000, FALSE); /* Red block, top right. */
check_readback_pixel_4bpp(&surface_rb, 0, 7, 0xffff0000, FALSE); /* Red block, bottom left. */
check_readback_pixel_4bpp(&surface_rb, 4, 4, 0xff000000, FALSE); /* Black block, top left. */
check_readback_pixel_4bpp(&surface_rb, 7, 7, 0xff000000, FALSE); /* Black block, bottom right. */
release_surface_readback(&surface_rb);
check_release((IUnknown *)newsurf, 1);
check_release((IUnknown *)tex, 0);
}
hr = IDirect3DDevice9_CreateTexture(device, 4, 4, 1, 0, D3DFMT_DXT1, D3DPOOL_SYSTEMMEM, &tex, NULL);

View file

@ -279,6 +279,7 @@ static int get_opcode_size(UNWIND_CODE op)
return 2 + (op.OpInfo != 0);
case UWOP_SAVE_NONVOL:
case UWOP_SAVE_XMM128:
case UWOP_EPILOG:
return 2;
case UWOP_SAVE_NONVOL_FAR:
case UWOP_SAVE_XMM128_FAR:
@ -586,6 +587,9 @@ static BOOL interpret_function_table_entry(struct cpu_stack_walk* csw,
if (!sw_read_mem(csw, context->Rsp + 24, &context->Rsp, sizeof(DWORD64))) return FALSE;
mach_frame = TRUE;
break;
case UWOP_EPILOG:
if (info->Version == 2)
break; /* nothing to do */
default:
FIXME("unknown code %u\n", info->UnwindCode[i].UnwindOp);
break;
@ -729,31 +733,46 @@ static BOOL x86_64_stack_walk(struct cpu_stack_walk *csw, STACKFRAME64 *frame,
static void* x86_64_find_runtime_function(struct module* module, DWORD64 addr)
{
#ifdef __x86_64__
RUNTIME_FUNCTION* rtf;
ULONG size;
int min, max;
RUNTIME_FUNCTION *func = NULL;
const RUNTIME_FUNCTION *rtf;
ULONG size;
rtf = (RUNTIME_FUNCTION*)pe_map_directory(module, IMAGE_DIRECTORY_ENTRY_EXCEPTION, &size);
if (rtf) for (min = 0, max = size / sizeof(*rtf); min <= max; )
rtf = (const RUNTIME_FUNCTION*)pe_map_directory(module, IMAGE_DIRECTORY_ENTRY_EXCEPTION, &size);
if (rtf)
{
int pos = (min + max) / 2;
if (addr < module->module.BaseOfImage + rtf[pos].BeginAddress) max = pos - 1;
else if (addr >= module->module.BaseOfImage + rtf[pos].EndAddress) min = pos + 1;
else
int lo, hi;
for (lo = 0, hi = size / sizeof(*rtf); lo <= hi; )
{
rtf += pos;
while (rtf->UnwindData & 1) /* follow chained entry */
int pos = (lo + hi) / 2;
if (addr < module->module.BaseOfImage + rtf[pos].BeginAddress) hi = pos - 1;
else if (addr >= module->module.BaseOfImage + rtf[pos].EndAddress) lo = pos + 1;
else if ((func = fetch_buffer(module->process, sizeof(*func))))
{
FIXME("RunTime_Function outside IMAGE_DIRECTORY_ENTRY_EXCEPTION unimplemented yet!\n");
return NULL;
/* we need to read into the other process */
/* rtf = (RUNTIME_FUNCTION*)(module->module.BaseOfImage + (rtf->UnwindData & ~1)); */
*func = rtf[pos];
while (func && (func->UnwindData & 1))
{
const BYTE *next = pe_lock_region_from_rva(module, func->UnwindData & ~1, sizeof(*func), NULL);
if (next)
{
*func = *(const RUNTIME_FUNCTION *)next;
pe_unlock_region(module, next);
}
else
{
WARN("Couldn't find chained RUNTIME_FUNCTION\n");
func = NULL;
}
}
break;
}
return rtf;
}
pe_unmap_directory(module, IMAGE_DIRECTORY_ENTRY_EXCEPTION, (const char*)rtf);
}
#endif
return func;
#else
return NULL;
#endif
}
static unsigned x86_64_map_dwarf_register(unsigned regno, const struct module* module, BOOL eh_frame)
@ -951,44 +970,7 @@ static BOOL x86_64_fetch_minidump_thread(struct dump_context* dc, unsigned index
static BOOL x86_64_fetch_minidump_module(struct dump_context* dc, unsigned index, unsigned flags)
{
/* FIXME: not sure about the flags... */
if (1)
{
/* FIXME: crop values across module boundaries, */
#ifdef __x86_64__
struct process* pcs;
struct module* module;
const RUNTIME_FUNCTION* rtf;
ULONG size;
if (!(pcs = process_find_by_handle(dc->process->handle)) ||
!(module = module_find_by_addr(pcs, dc->modules[index].base)))
return FALSE;
rtf = (const RUNTIME_FUNCTION*)pe_map_directory(module, IMAGE_DIRECTORY_ENTRY_EXCEPTION, &size);
if (rtf)
{
const RUNTIME_FUNCTION* end = (const RUNTIME_FUNCTION*)((const char*)rtf + size);
UNWIND_INFO ui;
while (rtf + 1 < end)
{
while (rtf->UnwindData & 1) /* follow chained entry */
{
FIXME("RunTime_Function outside IMAGE_DIRECTORY_ENTRY_EXCEPTION unimplemented yet!\n");
return FALSE;
/* we need to read into the other process */
/* rtf = (RUNTIME_FUNCTION*)(module->module.BaseOfImage + (rtf->UnwindData & ~1)); */
}
if (read_process_memory(dc->process, dc->modules[index].base + rtf->UnwindData, &ui, sizeof(ui)))
minidump_add_memory_block(dc, dc->modules[index].base + rtf->UnwindData,
FIELD_OFFSET(UNWIND_INFO, UnwindCode) + ui.CountOfCodes * sizeof(UNWIND_CODE), 0);
rtf++;
}
}
#endif
}
return TRUE;
return FALSE;
}
struct cpu cpu_x86_64 = {

View file

@ -438,9 +438,11 @@ struct module
struct process* process;
IMAGEHLP_MODULEW64 module;
WCHAR modulename[64]; /* used for enumeration */
WCHAR* alt_modulename; /* used in symbol lookup */
struct module* next;
enum dhext_module_type type : 16;
unsigned short is_virtual : 1,
dont_load_symbols : 1,
is_wine_builtin : 1,
has_file_image : 1;
struct cpu* cpu;
@ -548,17 +550,6 @@ struct module_pair
struct module* effective; /* out: module with debug info */
};
enum pdb_kind {PDB_JG, PDB_DS};
struct pdb_lookup
{
const char* filename;
enum pdb_kind kind;
unsigned int age;
unsigned int timestamp;
GUID guid;
};
struct cpu_stack_walk
{
HANDLE hProcess;
@ -627,7 +618,9 @@ struct dump_context
struct dump_module* modules;
unsigned num_modules;
unsigned alloc_modules;
/* exception information */
/* outter information */
MINIDUMP_EXCEPTION_INFORMATION *except_param;
MINIDUMP_USER_STREAM_INFORMATION *user_stream;
/* output information */
MINIDUMP_TYPE type;
HANDLE hFile;
@ -759,7 +752,6 @@ extern BOOL pe_load_debug_directory(const struct process* pcs,
const IMAGE_DEBUG_DIRECTORY* dbg, int nDbg);
extern DWORD msc_get_file_indexinfo(void* image, const IMAGE_DEBUG_DIRECTORY* dbgdir, DWORD size,
SYMSRV_INDEX_INFOW* info);
extern BOOL pdb_fetch_file_info(const struct pdb_lookup* pdb_lookup, unsigned* matched);
struct pdb_cmd_pair {
const char* name;
DWORD* pvalue;
@ -767,11 +759,12 @@ struct pdb_cmd_pair {
extern BOOL pdb_virtual_unwind(struct cpu_stack_walk *csw, DWORD_PTR ip,
union ctx *context, struct pdb_cmd_pair *cpair);
extern DWORD pdb_get_file_indexinfo(void* image, DWORD size, SYMSRV_INDEX_INFOW* info);
extern DWORD dbg_get_file_indexinfo(void* image, DWORD size, SYMSRV_INDEX_INFOW* info);
/* path.c */
extern BOOL path_find_symbol_file(const struct process* pcs, const struct module* module,
extern BOOL path_find_symbol_file(const struct process *pcs, const struct module *module,
PCSTR full_path, BOOL is_pdb, const GUID* guid, DWORD dw1, DWORD dw2,
WCHAR *buffer, BOOL* is_unmatched);
SYMSRV_INDEX_INFOW *info, BOOL *unmatched);
extern WCHAR *get_dos_file_name(const WCHAR *filename) __WINE_DEALLOC(HeapFree, 3) __WINE_MALLOC;
extern BOOL search_dll_path(const struct process* process, const WCHAR *name, WORD machine,
BOOL (*match)(void*, HANDLE, const WCHAR*), void *param);
@ -790,7 +783,10 @@ extern struct module*
extern BOOL pe_load_debug_info(const struct process* pcs,
struct module* module);
extern const char* pe_map_directory(struct module* module, int dirno, DWORD* size);
extern BOOL pe_unmap_directory(struct module* module, int dirno, const char*);
extern DWORD pe_get_file_indexinfo(void* image, DWORD size, SYMSRV_INDEX_INFOW* info);
extern const BYTE* pe_lock_region_from_rva(struct module *module, DWORD rva, DWORD size, DWORD *length);
extern BOOL pe_unlock_region(struct module *module, const BYTE* region);
/* source.c */
extern unsigned source_new(struct module* module, const char* basedir, const char* source);

View file

@ -61,15 +61,19 @@ static BOOL fetch_process_info(struct dump_context* dc)
{
if (HandleToUlong(spi->UniqueProcessId) == dc->pid)
{
dc->num_threads = spi->dwThreadCount;
dc->num_threads = 0;
dc->threads = HeapAlloc(GetProcessHeap(), 0,
dc->num_threads * sizeof(dc->threads[0]));
if (!dc->threads) goto failed;
for (i = 0; i < dc->num_threads; i++)
spi->dwThreadCount * sizeof(dc->threads[0]));
if (!dc->threads) break;
for (i = 0; i < spi->dwThreadCount; i++)
{
dc->threads[i].tid = HandleToULong(spi->ti[i].ClientId.UniqueThread);
dc->threads[i].prio_class = spi->ti[i].dwBasePriority; /* FIXME */
dc->threads[i].curr_prio = spi->ti[i].dwCurrentPriority;
/* don't include current thread */
if (HandleToULong(spi->ti[i].ClientId.UniqueThread) == GetCurrentThreadId())
continue;
dc->threads[dc->num_threads].tid = HandleToULong(spi->ti[i].ClientId.UniqueThread);
dc->threads[dc->num_threads].prio_class = spi->ti[i].dwBasePriority; /* FIXME */
dc->threads[dc->num_threads].curr_prio = spi->ti[i].dwCurrentPriority;
dc->num_threads++;
}
HeapFree(GetProcessHeap(), 0, pcs_buffer);
return TRUE;
@ -78,7 +82,6 @@ static BOOL fetch_process_info(struct dump_context* dc)
spi = (SYSTEM_PROCESS_INFORMATION*)((char*)spi + spi->NextEntryOffset);
}
}
failed:
HeapFree(GetProcessHeap(), 0, pcs_buffer);
return FALSE;
}
@ -116,7 +119,6 @@ static void fetch_thread_stack(struct dump_context* dc, const void* teb_addr,
* fetches some information about thread of id 'tid'
*/
static BOOL fetch_thread_info(struct dump_context* dc, int thd_idx,
const MINIDUMP_EXCEPTION_INFORMATION* except,
MINIDUMP_THREAD* mdThd, CONTEXT* ctx)
{
DWORD tid = dc->threads[thd_idx].tid;
@ -148,37 +150,15 @@ static BOOL fetch_thread_info(struct dump_context* dc, int thd_idx,
mdThd->Teb = (ULONG_PTR)tbi.TebBaseAddress;
if (tbi.ExitStatus == STILL_ACTIVE)
{
if (tid != GetCurrentThreadId() &&
(mdThd->SuspendCount = SuspendThread(hThread)) != (DWORD)-1)
{
ctx->ContextFlags = CONTEXT_FULL;
if (!GetThreadContext(hThread, ctx))
memset(ctx, 0, sizeof(*ctx));
fetch_thread_stack(dc, tbi.TebBaseAddress, ctx, &mdThd->Stack);
ResumeThread(hThread);
}
else if (tid == GetCurrentThreadId() && except)
{
CONTEXT lctx, *pctx;
mdThd->SuspendCount = 1;
if (except->ClientPointers)
{
EXCEPTION_POINTERS ep;
ReadProcessMemory(dc->process->handle, except->ExceptionPointers,
&ep, sizeof(ep), NULL);
ReadProcessMemory(dc->process->handle, ep.ContextRecord,
&lctx, sizeof(lctx), NULL);
pctx = &lctx;
}
else pctx = except->ExceptionPointers->ContextRecord;
*ctx = *pctx;
fetch_thread_stack(dc, tbi.TebBaseAddress, pctx, &mdThd->Stack);
}
else mdThd->SuspendCount = 0;
mdThd->SuspendCount = SuspendThread(hThread);
ctx->ContextFlags = CONTEXT_ALL;
if (!GetThreadContext(hThread, ctx))
memset(ctx, 0, sizeof(*ctx));
fetch_thread_stack(dc, tbi.TebBaseAddress, ctx, &mdThd->Stack);
ResumeThread(hThread);
}
else
mdThd->SuspendCount = (DWORD)-1;
}
CloseHandle(hThread);
return TRUE;
@ -397,22 +377,21 @@ static void append(struct dump_context* dc, const void* data, unsigned size)
*
* Write in File the exception information from pcs
*/
static unsigned dump_exception_info(struct dump_context* dc,
const MINIDUMP_EXCEPTION_INFORMATION* except)
static unsigned dump_exception_info(struct dump_context* dc)
{
MINIDUMP_EXCEPTION_STREAM mdExcpt;
EXCEPTION_RECORD rec, *prec;
CONTEXT ctx, *pctx;
DWORD i;
mdExcpt.ThreadId = except->ThreadId;
mdExcpt.ThreadId = dc->except_param->ThreadId;
mdExcpt.__alignment = 0;
if (except->ClientPointers)
if (dc->except_param->ClientPointers)
{
EXCEPTION_POINTERS ep;
ReadProcessMemory(dc->process->handle,
except->ExceptionPointers, &ep, sizeof(ep), NULL);
dc->except_param->ExceptionPointers, &ep, sizeof(ep), NULL);
ReadProcessMemory(dc->process->handle,
ep.ExceptionRecord, &rec, sizeof(rec), NULL);
ReadProcessMemory(dc->process->handle,
@ -422,8 +401,8 @@ static unsigned dump_exception_info(struct dump_context* dc,
}
else
{
prec = except->ExceptionPointers->ExceptionRecord;
pctx = except->ExceptionPointers->ContextRecord;
prec = dc->except_param->ExceptionPointers->ExceptionRecord;
pctx = dc->except_param->ExceptionPointers->ContextRecord;
}
mdExcpt.ExceptionRecord.ExceptionCode = prec->ExceptionCode;
mdExcpt.ExceptionRecord.ExceptionFlags = prec->ExceptionFlags;
@ -715,8 +694,7 @@ static unsigned dump_system_info(struct dump_context* dc)
*
* Dumps into File the information about running threads
*/
static unsigned dump_threads(struct dump_context* dc,
const MINIDUMP_EXCEPTION_INFORMATION* except)
static unsigned dump_threads(struct dump_context* dc)
{
MINIDUMP_THREAD mdThd;
MINIDUMP_THREAD_LIST mdThdList;
@ -732,7 +710,7 @@ static unsigned dump_threads(struct dump_context* dc,
for (i = 0; i < dc->num_threads; i++)
{
fetch_thread_info(dc, i, except, &mdThd, &ctx);
fetch_thread_info(dc, i, &mdThd, &ctx);
flags_out = ThreadWriteThread | ThreadWriteStack | ThreadWriteContext |
ThreadWriteInstructionWindow;
@ -906,6 +884,126 @@ static unsigned dump_misc_info(struct dump_context* dc)
return sizeof(mmi);
}
static DWORD CALLBACK write_minidump(void *_args)
{
struct dump_context *dc = _args;
static const MINIDUMP_DIRECTORY emptyDir = {UnusedStream, {0, 0}};
MINIDUMP_HEADER mdHead;
MINIDUMP_DIRECTORY mdDir;
DWORD i, nStreams, idx_stream;
if (!fetch_process_info(dc)) return FALSE;
fetch_modules_info(dc);
/* 1) init */
nStreams = 6 + (dc->except_param ? 1 : 0) +
(dc->user_stream ? dc->user_stream->UserStreamCount : 0);
/* pad the directory size to a multiple of 4 for alignment purposes */
nStreams = (nStreams + 3) & ~3;
/* 2) write header */
mdHead.Signature = MINIDUMP_SIGNATURE;
mdHead.Version = MINIDUMP_VERSION; /* NOTE: native puts in an 'implementation specific' value in the high order word of this member */
mdHead.NumberOfStreams = nStreams;
mdHead.CheckSum = 0; /* native sets a 0 checksum in its files */
mdHead.StreamDirectoryRva = sizeof(mdHead);
mdHead.TimeDateStamp = time(NULL);
mdHead.Flags = dc->type;
append(dc, &mdHead, sizeof(mdHead));
/* 3) write stream directories */
dc->rva += nStreams * sizeof(mdDir);
idx_stream = 0;
/* 3.1) write data stream directories */
/* must be first in minidump */
mdDir.StreamType = SystemInfoStream;
mdDir.Location.Rva = dc->rva;
mdDir.Location.DataSize = dump_system_info(dc);
writeat(dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
mdDir.StreamType = ThreadListStream;
mdDir.Location.Rva = dc->rva;
mdDir.Location.DataSize = dump_threads(dc);
writeat(dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
mdDir.StreamType = ModuleListStream;
mdDir.Location.Rva = dc->rva;
mdDir.Location.DataSize = dump_modules(dc, FALSE);
writeat(dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
mdDir.StreamType = 0xfff0; /* FIXME: this is part of MS reserved streams */
mdDir.Location.Rva = dc->rva;
mdDir.Location.DataSize = dump_modules(dc, TRUE);
writeat(dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
if (!(dc->type & MiniDumpWithFullMemory))
{
mdDir.StreamType = MemoryListStream;
mdDir.Location.Rva = dc->rva;
mdDir.Location.DataSize = dump_memory_info(dc);
writeat(dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
}
mdDir.StreamType = MiscInfoStream;
mdDir.Location.Rva = dc->rva;
mdDir.Location.DataSize = dump_misc_info(dc);
writeat(dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
/* 3.2) write exception information (if any) */
if (dc->except_param)
{
mdDir.StreamType = ExceptionStream;
mdDir.Location.Rva = dc->rva;
mdDir.Location.DataSize = dump_exception_info(dc);
writeat(dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
}
/* 3.3) write user defined streams (if any) */
if (dc->user_stream)
{
for (i = 0; i < dc->user_stream->UserStreamCount; i++)
{
mdDir.StreamType = dc->user_stream->UserStreamArray[i].Type;
mdDir.Location.DataSize = dc->user_stream->UserStreamArray[i].BufferSize;
mdDir.Location.Rva = dc->rva;
writeat(dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
append(dc, dc->user_stream->UserStreamArray[i].Buffer,
dc->user_stream->UserStreamArray[i].BufferSize);
}
}
/* 3.4) write full memory (if requested) */
if (dc->type & MiniDumpWithFullMemory)
{
fetch_memory64_info(dc);
mdDir.StreamType = Memory64ListStream;
mdDir.Location.Rva = dc->rva;
mdDir.Location.DataSize = dump_memory64_info(dc);
writeat(dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
}
/* fill the remaining directory entries with 0's (unused stream types) */
/* NOTE: this should always come last in the dump! */
for (i = idx_stream; i < nStreams; i++)
writeat(dc, mdHead.StreamDirectoryRva + i * sizeof(emptyDir), &emptyDir, sizeof(emptyDir));
return TRUE;
}
/******************************************************************
* MiniDumpWriteDump (DEBUGHLP.@)
*
@ -916,12 +1014,9 @@ BOOL WINAPI MiniDumpWriteDump(HANDLE hProcess, DWORD pid, HANDLE hFile,
PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam,
PMINIDUMP_CALLBACK_INFORMATION CallbackParam)
{
static const MINIDUMP_DIRECTORY emptyDir = {UnusedStream, {0, 0}};
MINIDUMP_HEADER mdHead;
MINIDUMP_DIRECTORY mdDir;
DWORD i, nStreams, idx_stream;
struct dump_context dc;
BOOL sym_initialized = FALSE;
BOOL ret = FALSE;
if (!(dc.process = process_find_by_handle(hProcess)))
{
@ -933,6 +1028,15 @@ BOOL WINAPI MiniDumpWriteDump(HANDLE hProcess, DWORD pid, HANDLE hFile,
dc.process = process_find_by_handle(hProcess);
}
if (DumpType & MiniDumpWithDataSegs)
FIXME("NIY MiniDumpWithDataSegs\n");
if (DumpType & MiniDumpWithHandleData)
FIXME("NIY MiniDumpWithHandleData\n");
if (DumpType & MiniDumpFilterMemory)
FIXME("NIY MiniDumpFilterMemory\n");
if (DumpType & MiniDumpScanMemory)
FIXME("NIY MiniDumpScanMemory\n");
dc.hFile = hFile;
dc.pid = pid;
dc.modules = NULL;
@ -949,125 +1053,26 @@ BOOL WINAPI MiniDumpWriteDump(HANDLE hProcess, DWORD pid, HANDLE hFile,
dc.num_mem64 = 0;
dc.alloc_mem64 = 0;
dc.rva = 0;
dc.except_param = ExceptionParam;
dc.user_stream = UserStreamParam;
if (!fetch_process_info(&dc)) return FALSE;
fetch_modules_info(&dc);
/* 1) init */
nStreams = 6 + (ExceptionParam ? 1 : 0) +
(UserStreamParam ? UserStreamParam->UserStreamCount : 0);
/* pad the directory size to a multiple of 4 for alignment purposes */
nStreams = (nStreams + 3) & ~3;
if (DumpType & MiniDumpWithDataSegs)
FIXME("NIY MiniDumpWithDataSegs\n");
if (DumpType & MiniDumpWithHandleData)
FIXME("NIY MiniDumpWithHandleData\n");
if (DumpType & MiniDumpFilterMemory)
FIXME("NIY MiniDumpFilterMemory\n");
if (DumpType & MiniDumpScanMemory)
FIXME("NIY MiniDumpScanMemory\n");
/* 2) write header */
mdHead.Signature = MINIDUMP_SIGNATURE;
mdHead.Version = MINIDUMP_VERSION; /* NOTE: native puts in an 'implementation specific' value in the high order word of this member */
mdHead.NumberOfStreams = nStreams;
mdHead.CheckSum = 0; /* native sets a 0 checksum in its files */
mdHead.StreamDirectoryRva = sizeof(mdHead);
mdHead.TimeDateStamp = time(NULL);
mdHead.Flags = DumpType;
append(&dc, &mdHead, sizeof(mdHead));
/* 3) write stream directories */
dc.rva += nStreams * sizeof(mdDir);
idx_stream = 0;
/* 3.1) write data stream directories */
/* must be first in minidump */
mdDir.StreamType = SystemInfoStream;
mdDir.Location.Rva = dc.rva;
mdDir.Location.DataSize = dump_system_info(&dc);
writeat(&dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
mdDir.StreamType = ThreadListStream;
mdDir.Location.Rva = dc.rva;
mdDir.Location.DataSize = dump_threads(&dc, ExceptionParam);
writeat(&dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
mdDir.StreamType = ModuleListStream;
mdDir.Location.Rva = dc.rva;
mdDir.Location.DataSize = dump_modules(&dc, FALSE);
writeat(&dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
mdDir.StreamType = 0xfff0; /* FIXME: this is part of MS reserved streams */
mdDir.Location.Rva = dc.rva;
mdDir.Location.DataSize = dump_modules(&dc, TRUE);
writeat(&dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
if (!(DumpType & MiniDumpWithFullMemory))
/* have a dedicated thread for fetching info on self */
if (dc.pid != GetCurrentProcessId())
ret = write_minidump(&dc);
else
{
mdDir.StreamType = MemoryListStream;
mdDir.Location.Rva = dc.rva;
mdDir.Location.DataSize = dump_memory_info(&dc);
writeat(&dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
}
mdDir.StreamType = MiscInfoStream;
mdDir.Location.Rva = dc.rva;
mdDir.Location.DataSize = dump_misc_info(&dc);
writeat(&dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
/* 3.2) write exception information (if any) */
if (ExceptionParam)
{
mdDir.StreamType = ExceptionStream;
mdDir.Location.Rva = dc.rva;
mdDir.Location.DataSize = dump_exception_info(&dc, ExceptionParam);
writeat(&dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
}
/* 3.3) write user defined streams (if any) */
if (UserStreamParam)
{
for (i = 0; i < UserStreamParam->UserStreamCount; i++)
DWORD exit_code;
HANDLE h = CreateThread(NULL, 0, write_minidump, &dc, 0, NULL);
if (h)
{
mdDir.StreamType = UserStreamParam->UserStreamArray[i].Type;
mdDir.Location.DataSize = UserStreamParam->UserStreamArray[i].BufferSize;
mdDir.Location.Rva = dc.rva;
writeat(&dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
append(&dc, UserStreamParam->UserStreamArray[i].Buffer,
UserStreamParam->UserStreamArray[i].BufferSize);
if (WaitForSingleObject(h, INFINITE) == WAIT_OBJECT_0 && GetExitCodeThread(h, &exit_code))
ret = exit_code;
else
TerminateThread(h, 0);
CloseHandle(h);
}
}
/* 3.4) write full memory (if requested) */
if (DumpType & MiniDumpWithFullMemory)
{
fetch_memory64_info(&dc);
mdDir.StreamType = Memory64ListStream;
mdDir.Location.Rva = dc.rva;
mdDir.Location.DataSize = dump_memory64_info(&dc);
writeat(&dc, mdHead.StreamDirectoryRva + idx_stream++ * sizeof(mdDir),
&mdDir, sizeof(mdDir));
}
/* fill the remaining directory entries with 0's (unused stream types) */
/* NOTE: this should always come last in the dump! */
for (i = idx_stream; i < nStreams; i++)
writeat(&dc, mdHead.StreamDirectoryRva + i * sizeof(emptyDir), &emptyDir, sizeof(emptyDir));
if (sym_initialized)
SymCleanup(hProcess);
@ -1076,7 +1081,7 @@ BOOL WINAPI MiniDumpWriteDump(HANDLE hProcess, DWORD pid, HANDLE hFile,
HeapFree(GetProcessHeap(), 0, dc.modules);
HeapFree(GetProcessHeap(), 0, dc.threads);
return TRUE;
return ret;
}
/******************************************************************

Some files were not shown because too many files have changed in this diff Show more