Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wine.inf: add workaround for WRC Generations. #216

Open
wants to merge 2,983 commits into
base: bleeding-edge
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2983 commits
Select commit Hold shift + click to select a range
f47daf2
Revert "mfplat: Implement IMF2DBuffer2::Copy2DTo()."
Aug 15, 2023
baefbda
Revert "mfplat/buffer: Validate buffer size in image copying functions."
Aug 15, 2023
6d86380
Revert "mfplat/buffer: Prepare image copying functions for error chec…
Aug 15, 2023
0704245
mfplat: Support YVYU, NV11, MEDIASUBTYPE_RGB* media types.
ziqingh Dec 21, 2022
c4d9d33
mfplat: Fix locking flags usage for D3D9 buffers.
giomasce Apr 13, 2023
0ca6d7e
mfplat: Do not mark a DXGI buffer as locked if surface mapping fails.
giomasce Apr 17, 2023
8054421
mfplat: Fix locking flags usage for DXGI buffers.
giomasce Apr 17, 2023
f9339fa
mfplat: Only download surface data from GPU for DXGI buffers when rea…
giomasce Apr 17, 2023
c6a3b8e
mfplat: Only upload surface data to GPU for DXGI buffers when writing.
giomasce Apr 17, 2023
132d396
mfplat: Fix returned buffer length in dxgi_surface_buffer_lock().
Apr 4, 2023
7aaa1a1
mfplat/buffer: Use the appropriate image copy function for NV11.
giomasce May 3, 2023
e4758fa
mfplat/buffer: Support YV12, I420 and IYUV image formats.
giomasce Jun 14, 2022
29d1bb4
mfplat/buffer: Implement IMF2DBuffer::ContiguousCopyFrom().
giomasce Jul 11, 2022
fbfc957
mfplat/buffer: Implement IMF2DBuffer::ContiguousCopyTo().
giomasce Jul 11, 2022
1e13d48
mfplat/buffer: Use absolute pitch in memory_1d_2d_buffer_[Un]Lock().
May 10, 2023
47bdf47
mfplat/tests: Add more tests for copying 2d buffers.
May 9, 2023
f15a020
mfplat/buffer: Do not flip in memory_2d_buffer_ContiguousCopy{From|To…
May 10, 2023
999d13e
mfplat/sample: Refactor sample_CopyToBuffer().
May 9, 2023
63bbee2
mfplat/sample: Optimize copying to 2d buffer.
May 9, 2023
a1b00ad
Revert "HACK: msmpeg2vdec: Refuse to load DLL for some games."
Sep 5, 2023
99a37ed
Revert "nsiproxy.sys: Detect wireless interface type on Linux."
ivyl Sep 7, 2023
df85dd2
dinput: Assume that clipping the cursor succeeds.
rbernon Sep 7, 2023
d728d00
winex11: Always ignore MotionNotify event after SetCursorPos.
rbernon Sep 8, 2023
37f9bee
dinput: Only call SetCursorPos if clipping fails.
rbernon Sep 8, 2023
5151c81
mf/tests: Add tests for AAC decoder with different input number of ch…
Sep 19, 2023
427799a
winegstreamer: Handle missing or zero channel count in _GetOutputAvai…
Sep 19, 2023
a559dc9
winegstreamer: Correct output available types attrs in AAC decoder fo…
Sep 19, 2023
b40d10d
winegstreamer: Validate maximum channel count in _SetInputType in AAC…
Sep 19, 2023
a048c58
winegstreamer: Also return output with 2 channels for multichannel in…
Sep 19, 2023
f016c65
Revert "include: Don't align the stack for PE builds."
Sep 29, 2023
3aba72f
mf/session: Use local variables to access transform node streams.
rbernon Jun 7, 2023
7201f32
mf/session: Use a helper to deliver transform node requested samples.
rbernon Jul 4, 2023
fdf23c3
mf/session: Drain transform node input streams individually.
rbernon Jul 6, 2023
faefe53
mf/session: Drain remaining requests in transform_node_deliver_samples.
rbernon Aug 8, 2023
fd6ec34
mf/session: Use helpers to push and pop samples for transform streams.
rbernon Aug 8, 2023
a132a99
mf/session: Push transform input samples directly to ProcessInput.
rbernon Aug 8, 2023
00099cb
mf/session: Request more samples from upstream when necessary.
rbernon Jul 4, 2023
c5ad4b6
mf/session: Increase the request count when requests are already queued.
rbernon Jul 4, 2023
5439c8c
mf: Clear end of presentation if topo_status is not invalid.
tati-frog Oct 4, 2023
714584a
server: Send WM_WINE_SETCURSOR with the last thread input cursor handle.
rbernon Oct 10, 2023
926b267
fixup! server: Get rid of the global cursor structure.
rbernon Oct 10, 2023
9756689
amend! xinput1_3: Hold module reference while the hid thread is running.
ivyl Oct 12, 2023
488f5ef
mf: Clear queued topologies on session shutdown.
besentv May 30, 2023
88cd44c
winex11: Forcefully unmap the clipping window when it loses focus.
rbernon Oct 13, 2023
2c5b2e9
winegstreamer: Add AVDecVideoAcceleration_H264 attribute for h264 dec…
Oct 14, 2023
529e214
Revert "secur32: Get rid of schannel free handle list."
Oct 14, 2023
d085c41
winex11.drv: Ensure initialized thread data in X11DRV_get_ic.
Etaash-mathamsetty Oct 16, 2023
b8ba2b5
amend! winebus.sys: Append is_gamepad to the device instance id.
rbernon Oct 17, 2023
9425115
amend! winebus.sys: Also pass axis and button count to is_hidraw_enab…
rbernon Oct 17, 2023
716a98a
amend! winebus.sys: Enable hidraw for VKB Gladiator NXT EVO.
rbernon Oct 17, 2023
ef7ffb2
amend! winebus.sys: Enable hidraw for Virpil Constellation ALPHA-R.
rbernon Oct 17, 2023
69d8f0e
winegstreamer: Enable new media source for Phantom Doctrine.
Oct 18, 2023
7bafd00
Revert "mf: Don't make stream sink shutdown dependent on IMFActivate …
Oct 19, 2023
967bcad
HACK: faudio: Support WMA3.
ivyl Oct 25, 2023
02a05e0
amend! Revert "Revert "mf: Don't make stream sink shutdown dependent …
Oct 27, 2023
235584a
winmm: Fix pszSound allocation in PlaySound_Alloc().
Oct 31, 2023
0560014
Revert "winmm: Fix pszSound allocation in PlaySound_Alloc()."
Oct 31, 2023
935577c
winex11.drv: fshack: Add optional centered low res modes.
Oct 31, 2023
b66ac8b
win32u: Ignore emulated mouse messages on touch-enabled windows.
rbernon Oct 18, 2023
41bb6ca
Revert "win32u: Ignore emulated mouse messages on touch-enabled windo…
ivyl Nov 6, 2023
c5c6e22
mf: Signal event_cond in wg_parser_stream_disable.
tati-frog Oct 31, 2023
585e99a
amend! rtworkq: Release cancelled work items.
Nov 28, 2023
107068e
amend! mf: Don't leak dropped samples.
Nov 28, 2023
78af915
amend! mf: Don't make stream sink shutdown dependent on IMFActivate p…
Nov 28, 2023
0141a9d
HACK: winex11: Drop X11DRV_GetCursorPos entirely.
rbernon Nov 29, 2023
0d2b05e
mshtml: Skip realloc when func_cnt is 0.
g-insn Jul 18, 2023
a3ea3b4
mshtml: Defer populating the IActiveScript field until it's fully ini…
g-insn Jan 26, 2023
32dabd0
mshtml: Always add script engines to the list before initializing them.
g-insn Jan 28, 2023
4cd413f
jscript: Make disp_call_value a helper that uses the script's Service…
g-insn Feb 2, 2023
9f0b56f
mshtml: Traverse and unlink builtin func disps.
g-insn Feb 1, 2023
e0917bc
mshtml: Simplify dynamic props unlinking.
g-insn Feb 1, 2023
d411562
mshtml: Unlink location when detaching inner window.
g-insn Feb 2, 2023
9e0b415
mshtml: Traverse and unlink legacy prototypes.
g-insn Feb 2, 2023
77fed7b
mshtml: Use proper types for readystate_locked and readystate_pending.
g-insn Feb 27, 2023
8366f84
mshtml: Free the task after the destructor.
g-insn Feb 27, 2023
5ceb39d
mshtml: Pass optional args to XMLHttpRequest.open() correctly.
g-insn Feb 27, 2023
f82e594
mshtml: Implement XDomainRequest on top of XMLHttpRequest.
g-insn Feb 27, 2023
27e883f
mshtml: Register all event handlers when creating the XMLHttpRequest.
g-insn Feb 27, 2023
09ff05d
mshtml: Track readyState in XHRs and report it manually.
g-insn Feb 27, 2023
8afc9fa
mshtml: Add separate task list for tasks dispatching events.
g-insn Feb 27, 2023
eb60af5
mshtml: Implement synchronous XMLHttpRequest.
g-insn Feb 27, 2023
d8332eb
mshtml: Send all readystatechange events for synchronous XHRs in IE9 …
g-insn Feb 27, 2023
ed5c36e
mshtml: Hold ref to HTMLDocumentObj when calling external code.
g-insn Mar 8, 2023
a2eed9a
mshtml: Hold ref to inner window when calling external code.
g-insn Mar 8, 2023
135b1f2
mshtml: Hold ref to outer window when navigating.
g-insn Mar 8, 2023
e96085d
mshtml: Check if browser was detached during notifications while navi…
g-insn Mar 8, 2023
b80528b
mshtml: Hold ref to the frame element during readyState notifications.
g-insn Mar 8, 2023
2ec01e1
mshtml: Grab refs to windows upfront before sending pagehide events.
g-insn Mar 8, 2023
ccb52f7
mshtml: Use already available window local variable in refresh task.
g-insn Mar 8, 2023
3394c47
jscript: Fix jsstr leak after changing variant type to BSTR.
g-insn Mar 13, 2023
4c0e305
mshtml: Fix nsevent leak in create_document_event.
g-insn Mar 20, 2023
7d7b0a0
mshtml: Fix nsscript leak in bind_event_scripts.
g-insn Mar 20, 2023
d19b10e
mshtml: Share reference with the node for Gecko DOM Documents.
g-insn Mar 20, 2023
fcb72e6
mshtml: Fix nsuri leak if create_channelbsc failed.
g-insn Mar 20, 2023
6c0c10e
mshtml: Fix nsparser leak if script_elem_from_nsscript failed.
g-insn Mar 20, 2023
265713b
mshtml: Wine Gecko 2.47.4 release.
cjacek Apr 3, 2023
96ecfa7
mshtml: Tell wine-gecko about the IE compat document mode.
g-insn Apr 12, 2023
0374aa2
mshtml: Set dom.ipc.plugins.enabled to FALSE.
g-insn Apr 12, 2023
f3be020
mshtml: Implement `complete` prop for input elements.
g-insn Apr 12, 2023
22fd6f6
mshtml: Get rid of dispatch_nsevent_hook.
g-insn Apr 12, 2023
b496925
mshtml: Implement ProgressEvent's initProgressEvent method.
g-insn Apr 12, 2023
f8af17f
mshtml: Implement MediaQueryList's addListener method.
g-insn Apr 14, 2023
317b6a1
mshtml: Implement MediaQueryList's removeListener method.
g-insn Apr 14, 2023
3be2824
mshtml: Use proper event type for PageTransition events.
g-insn Apr 14, 2023
ad58fff
mshtml: Do not release the principal returned by GetPrincipal.
g-insn Apr 25, 2023
57b1092
mshtml: Fix factory leak in init_nsio.
g-insn Apr 25, 2023
fddf768
mshtml: Fix nsIFile dir leak in init_xpcom.
g-insn Apr 25, 2023
349f540
mshtml: Fix URI leak in NewURI on failure.
g-insn Apr 25, 2023
6906a61
mshtml: Store minimum compat mode required for events in the ctor table.
g-insn Apr 25, 2023
7bb4549
mshtml: Support cycle collection for nsChannel.
g-insn Apr 25, 2023
f1b615a
mshtml: Fix nsChannel's load_info leak.
g-insn Apr 25, 2023
0f4debc
mshtml: Pass actual node_ccp to ccref_decr for nodes.
g-insn Apr 25, 2023
e02f1c6
mshtml: Fix memory leak on error path in add_func_info (Coverity).
alexhenrie May 12, 2023
863659d
mshtml: Only allow one thread to use Gecko.
alexhenrie May 17, 2023
1466821
mshtml: Explicitly hold ref to the plugin host in NPP_New.
g-insn May 22, 2023
20bb4c3
mshtml: Release ref from the element when detaching the plugin host.
g-insn May 22, 2023
bd1009c
mshtml: Stop the plugin when detaching the plugin host.
g-insn May 22, 2023
9a9a3e8
mshtml: Expose the other remaining props for element.classList.
g-insn May 26, 2023
3d3c4d9
mshtml: Implement classList's contains() method.
g-insn May 26, 2023
3b9a0fc
mshtml: Implement classList's toggle() method.
g-insn May 26, 2023
d334cd2
mshtml: Implement classList's length prop.
g-insn May 26, 2023
23dab04
mshtml: Implement classList's item() method.
g-insn May 26, 2023
4b9fd88
mshtml: Implement indexed props for classList.
g-insn May 26, 2023
e54f24c
mshtml: Fix classList toggle() when return value pointer is NULL.
g-insn May 29, 2023
6f28722
jscript: Return undefined for empty RegExp captures in ES5+ mode.
g-insn May 29, 2023
03e2fcd
jscript: Throw proper error for unexpected quantifiers in RegExp.
g-insn May 29, 2023
0c6a2dc
jscript: Throw proper error for out of memory conditions in RegExp.
g-insn May 29, 2023
766bb7d
mshtml/tests: Test RegExp.toString on object with separate RegExp fla…
g-insn May 29, 2023
c17a1f4
jscript: Correctly implement context for indirect eval calls in ES5+ …
g-insn Jun 21, 2023
bd7a170
jscript: Fix addressing invalid memory if ref is an argument.
g-insn Jun 21, 2023
11a3f0a
jscript: Fix function leak in scope_init_locals.
g-insn Jun 21, 2023
4a23599
jscript: Get rid of jsobj in scope_chain_t.
g-insn Jun 21, 2023
ad6146b
jscript: Don't use iface_to_jsdisp where it's not necessary to grab it.
g-insn Jun 21, 2023
c591137
jscript: Store detached args into a scope's specialized buffer.
g-insn Jun 21, 2023
d6a54b9
jscript: Start from the last argument when adding them to named locals.
g-insn Jun 21, 2023
90d4ba2
jscript: Get rid of the function instance in arguments obj.
g-insn Jun 21, 2023
2327a77
jscript: Use jsstr_empty instead of allocating empty string.
g-insn Jun 22, 2023
cd5f807
jscript: Implement `caller` for function instances and prototype.
g-insn Jun 22, 2023
e29bcc5
jscript: Throw error when accessing `arguments` prop of bind functions.
g-insn Jun 22, 2023
70a2296
jscript: Don't expose Function.prototype.arguments in non-html mode.
g-insn Jun 22, 2023
7951ce0
jscript: Store ref to scope directly instead of frame in arguments ob…
g-insn Jun 22, 2023
d64ca44
jscript: Don't use detached arguments buffer in html mode.
g-insn Jun 22, 2023
60c27da
jscript: Always create detached variable objects with no class.
g-insn Jun 22, 2023
099114f
jscript: Properly handle passing undefined value to Number.toPrecision.
g-insn Jun 22, 2023
809d6e3
jscript: Properly handle passing undefined value to Number.toString i…
g-insn Jun 22, 2023
15e92a8
mshtml: Traverse and unlink AreaElements properly.
g-insn Jun 21, 2023
c2578ca
mshtml: Fix style declaration leak in HTMLStyle_Create.
g-insn Jun 21, 2023
ff0eb12
mshtml: Fix nsIDOMNode leak when retrieving an item in the node list.
g-insn Jun 21, 2023
927ec40
mshtml: Fix node leak when enumerating nodes.
g-insn Jun 21, 2023
f1b3e1c
mshtml: Handle failure and cleanup properly when enumerating nodes.
g-insn Jun 21, 2023
05ff054
mshtml: Fix leaks in create_all_list.
g-insn Jun 21, 2023
4fbb5f8
mshtml: Fix element leaks in get_elem_source_index.
g-insn Jun 21, 2023
708a088
mshtml: Fix text node leak in Element innerText setter.
g-insn Jun 21, 2023
68efbf3
mshtml: Fix text node leak in OptionElement text setter.
g-insn Jun 21, 2023
465d433
mshtml: Introduce helper to transfer node ownership to range points w…
g-insn Jul 6, 2023
4a480ff
mshtml: Fix leak when obtaining previous node of range point.
g-insn Jul 6, 2023
0504114
mshtml: Fix leak when moving to next char in range point.
g-insn Jul 6, 2023
da5e404
mshtml: Fix leak in find_prev_space.
g-insn Jul 6, 2023
6a1ea5a
mshtml: Fix text node leak in TextRange's text setter.
g-insn Jul 6, 2023
9ee300e
mshtml: Grab the binding while aborting it.
g-insn Jul 18, 2023
40028e6
jscript: Convert unlink_props to a helper that unlinks the entire obj…
g-insn Jul 20, 2023
70c9e03
jscript: Implement WeakMap instance stub and constructor.
g-insn Jul 20, 2023
5cd2be8
jscript: Implement WeakMap.set().
g-insn Jul 20, 2023
a8715ff
jscript: Implement WeakMap.get().
g-insn Jul 20, 2023
9293233
jscript: Implement WeakMap.delete().
g-insn Jul 20, 2023
9746dee
jscript: Implement WeakMap.clear().
g-insn Jul 20, 2023
5635ba4
jscript: Implement WeakMap.has().
g-insn Jul 20, 2023
9adca57
jscript: Properly set JS_E_WRONG_THIS as a TypeError.
g-insn Jul 20, 2023
3a966d0
jscript: Call the getter with the proper 'this' in invoke_prop_func.
g-insn Jul 31, 2023
c22d30e
jscript: Use the object containing the prop for builtin getters.
g-insn Jul 31, 2023
ec55c68
mshtml: Use the common HTMLElement dispex vtbl in the dispex definiti…
g-insn Aug 1, 2023
66a787f
mshtml: Introduce unlink_ref helper.
g-insn Aug 1, 2023
9d9cf17
mshtml: Skip windows with no URI when deciding whether to send storag…
g-insn Aug 10, 2023
bb0d03e
jscript: Fix Array.prototype.splice with omitted deleteCount in ES5+ …
Aug 14, 2023
8fed739
mshtml: Use ASCII strings for dispex object names.
g-insn Aug 15, 2023
9b8452e
mshtml: Move console to the inner window.
g-insn Aug 15, 2023
8b462c8
mshtml: Split IUnknown methods for outer windows into separate vtable.
g-insn Aug 15, 2023
ebaec82
mshtml: Make all event target vtbls const.
g-insn Aug 15, 2023
5bf90a7
mshtml: Use designated initializers in dispex and event target vtables.
g-insn Aug 15, 2023
f139aba
mshtml: Use designated initializers in node vtables.
g-insn Aug 15, 2023
cfe08e1
mshtml: Check for non-NULL plugin host before trying to hold ref.
telans Aug 18, 2023
cc15e16
mshtml: Implement querySelector for document fragments.
g-insn Sep 5, 2023
a4b67bd
mshtml: Implement querySelectorAll for document fragments.
g-insn Sep 5, 2023
5a4b984
mshtml: Unstub some implemented event handlers in IHTMLWindow7 interf…
g-insn Sep 7, 2023
c218ff7
mshtml: Call handle_event on the proper dispex object.
g-insn Oct 2, 2023
7738f2f
jscript: Fix Array.map when last element doesn't exist.
g-insn Oct 17, 2023
eeeaf66
jscript: Fix Array.reduce when last element doesn't exist.
g-insn Oct 17, 2023
2f1906b
mshtml: Release the returned lists from Gecko's QuerySelectorAll even…
g-insn Nov 3, 2023
a7c6f58
mshtml: Fix window leak on error in async_stop_request.
g-insn Nov 3, 2023
e5d1240
jscript: Fix EnumVARIANT leak in enumerators.
g-insn Nov 3, 2023
5ebb5dd
jscript: Fix value leak in Array.shift.
g-insn Nov 3, 2023
c08fe2e
jscript: Fix array leak in Array.filter.
g-insn Nov 3, 2023
3c4f153
jscript: Don't addref before calling jsdisp_propput_name.
g-insn Nov 3, 2023
fbcc513
jscript: Fix value arg leak in transform_json_object.
g-insn Nov 3, 2023
6bcdedd
mshtml: Sync with upstream dispex CC revamp.
g-insn Nov 23, 2023
7d16372
jscript: Implement mshtml cycle collection for jscript objects, when …
g-insn Nov 23, 2023
0a4596f
mshtml: Move the global proxy constructors/prototypes from the js ctx…
g-insn Nov 23, 2023
92d5c4a
dsound: Set position past the end of the buffer is invalid.
Dec 7, 2023
1ddbb3b
mf/evr: Increase the number of prerolled samples to 3.
rbernon Dec 8, 2023
ffb0833
mf: Only preroll media sinks when starting from stopped state.
Nov 29, 2023
8b0b068
ntdll: Support gpuvis tracing.
gofman Jan 7, 2023
d1a23fa
msvcrt: Adjust _gmtime64_s() accepted time limits.
Dec 9, 2023
1bec8a2
ntdll: HACK: Try to load steamoverlay.so manually if LD_PRELOAD was l…
Nov 29, 2023
1b47cf4
support 5.1 and 7.1
ivyl Nov 23, 2023
4c57e26
winex11: Fix resize_vk_surfaces() prototype.
nsivov Dec 13, 2023
15d709c
Revert "fixup! winevulkan: HACK: Add WINE_HIDE_VANGOGH_GPU environmen…
Dec 14, 2023
683f6df
Revert "winevulkan: HACK: Add WINE_HIDE_VANGOGH_GPU environment varia…
Dec 14, 2023
c56ee27
Revert "HACK: winevulkan: Add vkGetPhysicalDeviceProperties thunks to…
Dec 14, 2023
2ff2ceb
Revert "HACK: winex11: Support faking AMD PCI IDs for NVIDIA cards"
Dec 14, 2023
29350c1
HACK: winex11, winevulkan: Support faking GPU PCI IDs.
Dec 15, 2022
54d5a73
HACK: winegstreamer: Reduce Biomutant_Trailer.mp4 media source duration.
zzhiyi Dec 13, 2023
c399f9d
dbghelp: Speedup reloading a module at existing address.
Dec 18, 2023
e0fbfa5
dbghelp: Change the order in which we try to load modules.
Dec 18, 2023
9af5179
ntdll: Only allocate debug info with RTL_CRITICAL_SECTION_FLAG_FORCE_…
Dec 18, 2023
e508615
ntdll: Set DebugInfo to NULL for absent DebugInfo in RtlDeleteCritica…
Dec 18, 2023
45d63a7
server: Handle owner rights (S-1-3-4) SID in ACE.
Dec 20, 2023
058d47c
include: Fix boolean return value definition in IIterator<T> methods.
Dec 21, 2023
535b7e8
gdiplus: Add GdipMeasureString hack for SpriteFontX.
Dec 27, 2023
dea6aa9
amend! support 5.1 and 7.1
ivyl Dec 29, 2023
78ec220
FAudio: Create fake codec data for WMA3.
ivyl Dec 29, 2023
57bb537
ir50_32: HACK: Don't build dll.
Jan 3, 2024
ed44de9
ntdll: Return STATUS_DEBUGGER_INACTIVE from NtSystemDebugControl() stub.
Jan 8, 2024
a9ece6e
explorer: Don't pop start menu on "minimize all windows" systray comm…
Jan 9, 2024
6252c53
msvcrt: Reference old locinfo for create_locinfo().
Jan 9, 2024
ca39627
xinput: Implement XInputGetCapabilitiesEx.
Etaash-mathamsetty Dec 10, 2023
5187376
xinput: Reimplement XInputGetCapabilities.
Etaash-mathamsetty Dec 10, 2023
ef59e8d
windows.gaming.input: Stub IRawGameController2 interface.
rbernon Feb 21, 2022
1d540cd
windows.gaming.input: Forward get_NonRoamableId to Wine provider.
rbernon Jan 8, 2024
b0f6229
HACK: dinput: Emulate Steam Input native hooks.
rbernon Jan 8, 2024
00279eb
HACK: hidclass: Emulate Steam Input native hooks.
rbernon Jan 8, 2024
43ccabd
HACK: ntdll: Emulate Steam Input native hooks.
rbernon Jan 8, 2024
0a29145
HACK: win32u: Emulate Steam Input native hooks.
rbernon Jan 8, 2024
222ada6
HACK: windows.gaming.input: Emulate Steam Input native hooks.
rbernon Jan 8, 2024
fc02b27
HACK: xinput: Emulate Steam Input native hooks.
rbernon Jan 8, 2024
2e778c6
HACK: winebus: Expose virtual controller for Steam Input hooks emulat…
rbernon Jan 8, 2024
f9a2920
HACK: win32u: Report underlying VID/PID in Steam Input hooks emulation.
rbernon Jan 9, 2024
20af009
HACK: windows.gaming.input: Report underlying VID/PID in Steam Input …
rbernon Jan 9, 2024
b4d1730
fixup! HACK: winebus: Expose virtual controller for Steam Input hooks…
rbernon Jan 11, 2024
fd607b5
fixup! fixup! HACK: winebus: Expose virtual controller for Steam Inpu…
rbernon Jan 11, 2024
8ad4687
winebus: Disable SDL2.30 new behavior for the SDL unix backend.
rbernon Jan 12, 2024
a56aa3a
fixup! HACK: ntdll: Emulate Steam Input native hooks.
rbernon Jan 12, 2024
d9ebf11
ntdll/tests: Simplify the KiUserExceptionDispatcher tests a little.
julliard Nov 30, 2023
bfa4856
ntdll: Call Wow64PrepareForException directly from KiUserExceptionDis…
julliard Nov 30, 2023
a179a88
ntdll: Allow unwind rules to override the default stack pointer assig…
julliard Nov 30, 2023
fe3d35d
ntdll: Add a machine frame to the KiUserExceptionDispatcher stack on …
julliard Nov 30, 2023
50780ff
ntdll: Add a machine frame to the KiUserApcDispatcher stack on x86-64.
julliard Nov 30, 2023
67e62ab
winebus.sys: Ignore events on unsupported axes.
rbernon Nov 11, 2023
221a234
winebus.sys: Fix incorrect hid_device_set index check.
rbernon Nov 15, 2023
78ca70b
evr: Use D3DCREATE_MULTITHREADED device creation flag.
rbernon Jan 17, 2024
f2437f5
wine.inf: add workaround for WRC Generations.
Etaash-mathamsetty Jan 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 7 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,12 @@ F: dlls/win32u/rawinput.c
F: server/queue.c

Input methods
M: Aric Stewart <[email protected]>
M: Rémi Bernon <[email protected]>
P: Aric Stewart <[email protected]>
F: dlls/imm32/
F: dlls/win32u/imm.c
F: dlls/winemac.drv/ime.c
F: dlls/winex11.drv/ime.c

JavaScript
M: Jacek Caban <[email protected]>
Expand Down Expand Up @@ -212,7 +216,9 @@ F: dlls/winegstreamer/aac_decoder.c
F: dlls/winegstreamer/color_convert.c
F: dlls/winegstreamer/h264_decoder.c
F: dlls/winegstreamer/resampler.c
F: dlls/winegstreamer/video_decoder.c
F: dlls/winegstreamer/video_processor.c
F: dlls/winegstreamer/wg_source.c
F: dlls/winegstreamer/wg_sample.c
F: dlls/winegstreamer/wg_transform.c
F: dlls/winegstreamer/wma_decoder.c
Expand Down
196 changes: 196 additions & 0 deletions README.esync
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
This is eventfd-based synchronization, or 'esync' for short. Turn it on with
WINEESYNC=1; debug it with +esync.

== BUGS AND LIMITATIONS ==

Please let me know if you find any bugs. If you can, also attach a log with
+seh,+pid,+esync,+server,+timestamp.

If you get something like "eventfd: Too many open files" and then things start
crashing, you've probably run out of file descriptors. esync creates one
eventfd descriptor for each synchronization object, and some games may use a
large number of these. Linux by default limits a process to 4096 file
descriptors, which probably was reasonable back in the nineties but isn't
really anymore. (Fortunately Debian and derivatives [Ubuntu, Mint] already
have a reasonable limit.) To raise the limit you'll want to edit
/etc/security/limits.conf and add a line like

* hard nofile 1048576

then restart your session.

On distributions using systemd, the settings in `/etc/security/limits.conf`
will be overridden by systemd's own settings. If you run `ulimit -Hn` and it
returns a lower number than the one you've previously set, then you can set

DefaultLimitNOFILE=1024:1048576

in both `/etc/systemd/system.conf` and `/etc/systemd/user.conf`. You can then
execute `sudo systemctl daemon-reexec` and restart your session. Check again
with `ulimit -Hn` that the limit is correct.

Also note that if the wineserver has esync active, all clients also must, and
vice versa. Otherwise things will probably crash quite badly.

== EXPLANATION ==

The aim is to execute all synchronization operations in "user-space", that is,
without going through wineserver. We do this using Linux's eventfd
facility. The main impetus to using eventfd is so that we can poll multiple
objects at once; in particular we can't do this with futexes, or pthread
semaphores, or the like. The only way I know of to wait on any of multiple
objects is to use select/poll/epoll to wait on multiple fds, and eventfd gives
us those fds in a quite usable way.

Whenever a semaphore, event, or mutex is created, we have the server, instead
of creating a traditional server-side event/semaphore/mutex, instead create an
'esync' primitive. These live in esync.c and are very slim objects; in fact,
they don't even know what type of primitive they are. The server is involved
at all because we still need a way of creating named objects, passing handles
to another process, etc.

The server creates an eventfd file descriptor with the requested parameters
and passes it back to ntdll. ntdll creates an object of the appropriate type,
then caches it in a table. This table is copied almost wholesale from the fd
cache code in server.c.

Specific operations follow quite straightforwardly from eventfd:

* To release an object, or set an event, we simply write() to it.
* An object is signalled if read() succeeds on it. Notably, we create all
eventfd descriptors with O_NONBLOCK, so that we can atomically check if an
object is signalled and grab it if it is. This also lets us reset events.
* For objects whose state should not be reset upon waiting—e.g. manual-reset
events—we simply check for the POLLIN flag instead of reading.
* Semaphores are handled by the EFD_SEMAPHORE flag. This matches up quite well
(although with some difficulties; see below).
* Mutexes store their owner thread locally. This isn't reliable information if
a different process's thread owns the mutex, but this doesn't matter—a
thread should only care whether it owns the mutex, so it knows whether to
try waiting on it or simply to increase the recursion count.

The interesting part about esync is that (almost) all waits happen in ntdll,
including those on server-bound objects. The idea here is that on the server
side, for any waitable object, we create an eventfd file descriptor (not an
esync primitive), and then pass it to ntdll if the program tries to wait on
it. These are cached too, so only the first wait will require a round trip to
the server. Then the server signals the file descriptor as appropriate, and
thereby wakes up the client. So far this is implemented for processes,
threads, message queues (difficult; see below), and device managers (necessary
for drivers to work). All of these are necessarily server-bound, so we
wouldn't really gain anything by signalling on the client side instead. Of
course, except possibly for message queues, it's not likely that any program
(cutting-edge D3D game or not) is going to be causing a great wineserver load
by waiting on any of these objects; the motivation was rather to provide a way
to wait on ntdll-bound and server-bound objects at the same time.

Some cases are still passed to the server, and there's probably no reason not
to keep them that way. Those that I noticed while testing include: async
objects, which are internal to the file APIs and never exposed to userspace,
startup_info objects, which are internal to the loader and signalled when a
process starts, and keyed events, which are exposed through an ntdll API
(although not through kernel32) but can't be mixed with other objects (you
have to use NtWaitForKeyedEvent()). Other cases include: named pipes, debug
events, sockets, and timers. It's unlikely we'll want to optimize debug events
or sockets (or any of the other, rather rare, objects), but it is possible
we'll want to optimize named pipes or timers.

There were two sort of complications when working out the above. The first one
was events. The trouble is that (1) the server actually creates some events by
itself and (2) the server sometimes manipulates events passed by the
client. Resolving the first case was easy enough, and merely entailed creating
eventfd descriptors for the events the same way as for processes and threads
(note that we don't really lose anything this way; the events include
"LowMemoryCondition" and the event that signals system processes to shut
down). For the second case I basically had to hook the server-side event
functions to redirect to esync versions if the event was actually an esync
primitive.

The second complication was message queues. The difficulty here is that X11
signals events by writing into a pipe (at least I think it's a pipe?), and so
as a result wineserver has to poll on that descriptor. In theory we could just
let wineserver do so and then signal us as appropriate, except that wineserver
only polls on the pipe when the thread is waiting for events (otherwise we'd
get e.g. keyboard input while the thread is doing something else, and spin
forever trying to wake up a thread that doesn't care). The obvious solution is
just to poll on that fd ourselves, and that's what I did—it's just that
getting the fd from wineserver was kind of ugly, and the code for waiting was
also kind of ugly basically because we have to wait on both X11's fd and the
"normal" process/thread-style wineserver fd that we use to signal sent
messages. The upshot about the whole thing was that races are basically
impossible, since a thread can only wait on its own queue.

System APCs already work, since the server will forcibly suspend a thread if
it's not already waiting, and so we just need to check for EINTR from
poll(). User APCs and alertable waits are implemented in a similar style to
message queues (well, sort of): whenever someone executes an alertable wait,
we add an additional eventfd to the list, which the server signals when an APC
arrives. If that eventfd gets signaled, we hand it off to the server to take
care of, and return STATUS_USER_APC.

Originally I kept the volatile state of semaphores and mutexes inside a
variable local to the handle, with the knowledge that this would break if
someone tried to open the handle elsewhere or duplicate it. It did, and so now
this state is stored inside shared memory. This is of the POSIX variety, is
allocated by the server (but never mapped there) and lives under the path
"/wine-esync".

There are a couple things that this infrastructure can't handle, although
surprisingly there aren't that many. In particular:
* Implementing wait-all, i.e. WaitForMultipleObjects(..., TRUE, ...), is not
exactly possible the way we'd like it to be possible. In theory that
function should wait until it knows all objects are available, then grab
them all at once atomically. The server (like the kernel) can do this
because the server is single-threaded and can't race with itself. We can't
do this in ntdll, though. The approach I've taken I've laid out in great
detail in the relevant patch, but for a quick summary we poll on each object
until it's signaled (but don't grab it), check them all again, and if
they're all signaled we try to grab them all at once in a tight loop, and if
we fail on any of them we reset the count on whatever we shouldn't have
consumed. Such a blip would necessarily be very quick.
* The whole patchset only works on Linux, where eventfd is available. However,
it should be possible to make it work on a Mac, since eventfd is just a
quicker, easier way to use pipes (i.e. instead of writing 1 to the fd you'd
write 1 byte; instead of reading a 64-bit value from the fd you'd read as
many bytes as you can carry, which is admittedly less than 2**64 but
can probably be something reasonable.) It's also possible, although I
haven't yet looked, to use some different kind of synchronization
primitives, but pipes would be easiest to tack onto this framework.
* PulseEvent() can't work the way it's supposed to work. Fortunately it's rare
and deprecated. It's also explicitly mentioned on MSDN that a thread can
miss the notification for a kernel APC, so in a sense we're not necessarily
doing anything wrong.

There are some things that are perfectly implementable but that I just haven't
done yet:
* Other synchronizable server primitives. It's unlikely we'll need any of
these, except perhaps named pipes (which would honestly be rather difficult)
and (maybe) timers.
* Access masks. We'd need to store these inside ntdll, and validate them when
someone tries to execute esync operations.

This patchset was inspired by Daniel Santos' "hybrid synchronization"
patchset. My idea was to create a framework whereby even contended waits could
be executed in userspace, eliminating a lot of the complexity that his
synchronization primitives used. I do however owe some significant gratitude
toward him for setting me on the right path.

I've tried to maximize code separation, both to make any potential rebases
easier and to ensure that esync is only active when configured. All code in
existing source files is guarded with "if (do_esync())", and generally that
condition is followed by "return esync_version_of_this_method(...);", where
the latter lives in esync.c and is declared in esync.h. I've also tried to
make the patchset very clear and readable—to write it as if I were going to
submit it upstream. (Some intermediate patches do break things, which Wine is
generally against, but I think it's for the better in this case.) I have cut
some corners, though; there is some error checking missing, or implicit
assumptions that the program is behaving correctly.

I've tried to be careful about races. There are a lot of comments whose
purpose are basically to assure me that races are impossible. In most cases we
don't have to worry about races since all of the low-level synchronization is
done by the kernel.

Anyway, yeah, this is esync. Use it if you like.

--Zebediah Figura
Loading