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

winebus.sys: Only apply hidraw disable hacks to hidraw subsystem #207

Open
wants to merge 2,777 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
2777 commits
Select commit Hold shift + click to select a range
e468659
dmusic: Implement instrument articulation downloads.
rbernon Sep 9, 2023
d598a72
dmime/tests: Test that SendPMsg also converts reference time.
rbernon Sep 13, 2023
433c5fc
dmime: Convert DMUS_PMSG music and reference times in SendPMsg.
rbernon Sep 5, 2023
5eccbcc
dmime: Get rid of the DMUS_PMSGItem typedef.
rbernon Sep 5, 2023
7f1192f
dmime: Use a struct list to keep performance messages.
rbernon Sep 5, 2023
cd74a8d
dmime: Remove unnecessary struct message members.
rbernon Sep 5, 2023
fe890c7
dmime: Rename DMUS_PMSGToItem to message_from_DMUS_PMSG.
rbernon Sep 5, 2023
16f7c3c
dmime: Pass the DMUS_PMSG through the performance graph.
rbernon Sep 13, 2023
eb33642
dmband: Rename IDirectMusicBandImpl prefix to band.
rbernon Sep 10, 2023
63e960b
dmband: Get rid of the IDirectMusicBandImpl typedef.
rbernon Sep 10, 2023
4d95067
dmband: Get rid of the IDirectMusicBandTrack typedef.
rbernon Sep 10, 2023
737073a
dmband: Avoid leaking bands on band track Release.
rbernon Sep 10, 2023
b8db784
dmband: Avoid leaking collection on band release.
rbernon Sep 10, 2023
cd6d538
dmband: Rewrite band lbin list parsing.
rbernon Sep 10, 2023
eb2e46e
dmband: Rewrite band lbil list parsing.
rbernon Sep 10, 2023
5890feb
dmband: Rewrite band dmbd chunk parsing.
rbernon Sep 10, 2023
b6da1f9
dmband: Rewrite band IPersistStream_Load.
rbernon Sep 10, 2023
8f66521
dmime: Rename IDirectMusicSegment8Impl method prefix to segment.
rbernon Sep 10, 2023
ff4b8d1
dmime: Use one-liners for segment parameter checks.
rbernon Sep 10, 2023
2f5ab3e
dmime: Get rid of the IDirectMusicSegmentImpl typedef.
rbernon Sep 10, 2023
29e885a
dmime: Avoid leaking tracks in IDirectMusicSegment_Release.
rbernon Sep 10, 2023
62c8ff6
dmime: Rewrite segment IDirectMusicSegment_GetTrack.
rbernon Sep 15, 2023
b8bf4d7
dmime: Rewrite segment IDirectMusicSegment_GetTrackGroup.
rbernon Sep 15, 2023
2c3e984
dmime: Rewrite segment IDirectMusicSegment_InsertTrack.
rbernon Sep 15, 2023
b7ec719
dmime: Rewrite segment IDirectMusicSegment_RemoveTrack.
rbernon Sep 15, 2023
2e0aa24
dmime: Use segment_append_track in Clone and parse_track_form.
rbernon Sep 15, 2023
d07c26e
dmime/tests: Add some DMUS_NOTIFICATION_PMSG tests.
rbernon Sep 19, 2023
16cda9a
dmime/tests: Test wave segments and DMUS_WAVE_PMSG.
rbernon Sep 19, 2023
ab87518
dmime/tests: Test sequence track and DMUS_NOTE_PMSG.
rbernon Sep 19, 2023
605eec2
dmime/tests: Test band track and DMUS_PATCH_PMSG.
rbernon Sep 19, 2023
07b1ffc
dmusic/tests: Fixup chunk alignment in steam_end_chunk.
rbernon Sep 19, 2023
59a3e12
dmusic: Keep the original instrument patch in the entry.
rbernon Sep 10, 2023
a095554
dmband: Rewrite band track lbdl/lbnd lists parsing.
rbernon Sep 10, 2023
206c0fc
dmband: Rewrite band track DBMT chunk parsing.
rbernon Sep 10, 2023
c98f60b
dmband: Rewrite band track IPersistStream_Load.
rbernon Sep 10, 2023
e306168
dmime: Get rid of the IDirectMusicSeqTrack typedef.
rbernon Sep 15, 2023
3931ff2
dmime: Implement DirectMusicSeqTrack IPersistStream_Load.
rbernon Sep 15, 2023
585b9f9
dmloader: Use nameless unions/structs.
julliard Jul 12, 2023
a3ab336
dmloader: Rename IDirectMusicLoaderImpl method prefix to loader.
rbernon Sep 21, 2023
dd7310d
dmloader: Get rid of the IDirectMusicLoaderImpl typedef.
rbernon Sep 21, 2023
590808c
dmloader: Initialize ref to 1, and release after QueryInterface.
rbernon Sep 21, 2023
5a6d6d3
dmloader: Introduce a new loader_stream_create helper.
rbernon Sep 20, 2023
d9af43c
dmloader: Get rid of the custom generic stream wrapper.
rbernon Sep 20, 2023
5b9859b
dmime/tests: Remove some duplicated tests.
rbernon Sep 28, 2023
8c01b5f
dmime/tests: Move performance tests into dmime.c.
rbernon Sep 28, 2023
716f939
dmime/tests: Test performance Init with a created port.
rbernon Sep 28, 2023
82f2221
dmime: Set the port direct sound before activating it.
rbernon Sep 25, 2023
46ed612
dmime: Initialize performance in Init rather than InitAudio.
rbernon Sep 25, 2023
0ac7c6c
dmime: Return DMUS_E_AUDIOPATHS_IN_USE when audio paths are in use.
rbernon Sep 25, 2023
27ea1ff
dmime: Return DMUS_E_AUDIOPATH_INACTIVE when audio paths are not enab…
rbernon Sep 25, 2023
198f5b7
dmloader: Use a simpler file stream implementation.
rbernon Sep 21, 2023
58804a7
dmusic/tests: Test default gm.dls sound font instruments.
rbernon Sep 20, 2023
e93e53a
dmloader: Remove invalid default DLS collection check.
rbernon Sep 26, 2023
f8513fa
dmloader: Add fallbacks if the configured GMFilePath doesn't exist.
rbernon Sep 26, 2023
8c978ee
dmusic: Avoid leaking articulations when freeing regions.
rbernon Sep 22, 2023
6bdd3ff
dmusic: Avoid crashing in traces if wave doesn't have a WSMPL.
rbernon Sep 26, 2023
4b46c1f
dmusic: Implement SoundFont2 collection parsing.
rbernon Sep 21, 2023
6b0b3f7
dmusic: Implement SoundFont2 wave sample parsing.
rbernon Sep 21, 2023
5fcafc2
dmusic: Implement SoundFont2 instrument parsing.
rbernon Sep 21, 2023
50b95d0
dmime/tests: Add some tests for GUID_ConnectToDLSCollection.
rbernon Sep 21, 2023
6e1d37e
dmime/tests: Test segment state and playing a custom track.
rbernon Sep 29, 2023
4c7e2a4
dmime: Implement IDirectMusicSegment_SetParam.
rbernon Sep 6, 2023
b8a957c
dmband: Implement band track GUID_ConnectToDLSCollection parameter.
rbernon Sep 21, 2023
b96e71d
dmime: Implement IDirectMusicSegment_(Download|Unload).
rbernon Sep 26, 2023
0adc2e8
dmband: Implement IDirectMusicBand_(Download|Unload).
rbernon Sep 21, 2023
d963859
dmband: Implement band track GUID_UnloadFromAudioPath parameter.
rbernon Sep 21, 2023
0e5088c
dmband: Implement band track GUID_DownloadToAudioPath parameter.
rbernon Sep 21, 2023
de6cdb5
dmime: Implement IDirectMusicPerformance_DownloadInstrument.
rbernon Sep 6, 2023
b050c53
dmime: Rename DirectMusicSegmentState8 method prefix to segment_state.
rbernon Sep 22, 2023
3d5361d
dmime: Get rid of the IDirectMusicSegmentState8Impl typedef.
rbernon Sep 22, 2023
a785266
dmime: Implement some segment state default values.
rbernon Sep 22, 2023
270f6c5
dmime: Redirect IDirectMusicPerformance_PlaySegment to PlaySegmentEx.
rbernon Sep 26, 2023
81080d8
dmime: Introduce a new segment_state_create constructor.
rbernon Oct 3, 2023
aaae04e
mfplat: Rename debugstr_fourcc to mf_debugstr_fourcc.
alexhenrie Oct 5, 2023
47008b0
winecoreaudio: Rename wine_dbgstr_fourcc to coreaudio_dbgstr_fourcc.
alexhenrie Oct 5, 2023
143f9d1
include: Introduce wine_dbgstr_fourcc and debugstr_fourcc.
alexhenrie Oct 3, 2023
1e74d47
comctl32: Use the debugstr_fourcc function instead of reimplementing it.
alexhenrie Oct 3, 2023
b6fb91b
mciavi32: Use the debugstr_fourcc function instead of reimplementing it.
alexhenrie Oct 3, 2023
edfd69d
msvfw32: Use the debugstr_fourcc function instead of reimplementing it.
alexhenrie Oct 3, 2023
dc5feb5
dmime/tests: Tests interaction between CloseDown and notifications.
rbernon Oct 6, 2023
9c48164
dmime: Keep messages with the same time ordered.
rbernon Sep 21, 2023
ed52042
dmime: Free all pending messages after CloseDown.
rbernon Oct 6, 2023
fa2dae5
dmime: Send DMUS_PMSGT_DIRTY messages from the performance.
rbernon Sep 22, 2023
39f140b
dmime: Send DMUS_PMSGT_NOTIFICATION messages from the performance.
rbernon Oct 7, 2023
43887db
dmime: Implement IDirectMusicPerformance_GetNotificationPMsg.
rbernon Oct 6, 2023
8835c21
dmime: Call IDirectMusicTrack_(Init|End)Play from the segment state.
rbernon Sep 22, 2023
3161373
dmsynth: Add a trailing linefeed to TRACE() messages.
fgouget Oct 6, 2023
5f565bd
dmime/tests: Queue the message before calling SendPMsg twice.
rbernon Oct 3, 2023
cd7ee33
dmsynth: Import and use FluidSynth 2.3.3.
rbernon Oct 10, 2023
2fd0348
fluidsynth: Use Wine debugging facility for traces.
rbernon Sep 8, 2023
a1533ec
dmsynth: Simplify IDirectMusicSynth8_Open checks.
rbernon Sep 8, 2023
4294729
dmsynth: Create a fluid_synth instance on Open.
rbernon Oct 2, 2023
d6e6e63
dmsynth: Create and register a fluid_sfont instance.
rbernon Sep 4, 2023
a9243c3
include: Avoid narrowing warning in wine_dbgstr_fourcc.
rbernon Oct 9, 2023
62ed458
dmime: Get rid of the IDirectMusicWaveTrack typedef.
rbernon Sep 25, 2023
6f69b52
dmime: Include dmobject.h in dmime_private.h.
rbernon Oct 10, 2023
f70e220
dmusic: Split wave entry points to dmusic_wave.h.
rbernon Oct 10, 2023
934ce22
dmime: Create a wave track when loading a segment from a .wav.
rbernon Oct 10, 2023
2e83b39
dmime: Implement GUID_(Download|Unload)FromAudioPath for wave track.
rbernon Sep 25, 2023
9783f29
dmime: Implement IDirectMusicTrack_Play for the wave track.
rbernon Sep 25, 2023
2b9fbcb
dmime: Play direct sound buffer from DMUS_PMSGT_WAVE message.
rbernon Sep 25, 2023
bd8cee8
dmsynth: Fix synth download of articulations list.
rbernon Sep 23, 2023
8cf80e8
dmsynth: Improve debug traces of DLS2 connections.
rbernon Sep 8, 2023
1170289
dmsynth: Guard synth members with a CS.
rbernon Oct 11, 2023
9ad91bc
dmsynth: Parse MIDI events in IDirectMusicSynth_PlayBuffer.
rbernon Sep 4, 2023
f31ba98
dmsynth: Play some MIDI events in IDirectMusicSynth_Render.
rbernon Sep 4, 2023
ca279ff
dmsynth: Create fluid_preset and fluid_voice from instrument.
rbernon Sep 8, 2023
f16356f
dmband: Download / unload bands when initializing / ending band track.
rbernon Sep 10, 2023
87a5a59
dmime: Implement sequence track IDirectMusicTrack_Play.
rbernon Sep 10, 2023
5142de0
dmime: Implement band track IDirectMusicTrack_Play.
rbernon Oct 12, 2023
2752e13
dmime: Output DMUS_MIDI_PMSG into a music buffer on the port.
rbernon Sep 6, 2023
9f36d03
dmime: Translate DMUS_PMSGT_NOTE to DMUS_PMSGT_MIDI messages.
rbernon Sep 21, 2023
b68bca8
dmime: Translate DMUS_PMSGT_PATCH to DMUS_PMSGT_MIDI messages.
rbernon Sep 19, 2023
4a7237e
include: Fix debugstr_fourcc printf format to print at most 4 chars.
rbernon Oct 16, 2023
ebcadaf
dmime: Rewrite message thread with a condition variable.
rbernon Oct 16, 2023
0250d6a
dmusic: Set synth sink master clock when creating port.
rbernon Sep 4, 2023
7810855
dmsynth: Do nothing in IDirectMusicSynth_SetMasterClock.
rbernon Aug 29, 2023
49f990d
dmusic: Forward IDirectMusicPort_Activate to synth and sink.
rbernon Oct 12, 2023
ba1b241
dmime: Use port latency time for messages with -1 time.
rbernon Oct 16, 2023
493fc41
dmime: Update performance latency time with port latency.
rbernon Oct 16, 2023
992b169
dmime: Use latency time to decide when to process messages.
rbernon Oct 16, 2023
8794a12
dmsynth: Create a render thread on sink activation.
rbernon Sep 5, 2023
087bc17
dmsynth: Implement sink rendering to DirectSound buffer.
rbernon Oct 12, 2023
c2e6c3c
dmsynth: Correctly lookup instrument from the default drum bank.
rbernon Oct 16, 2023
a66c532
dmsynth: Avoid using fluid_ prefix for internal helpers.
rbernon Oct 16, 2023
4859b2c
dmsynth: Fix DLS2 to FluidSynth conversion for CONN_SRC_CCx.
rbernon Oct 18, 2023
68c1293
dmsynth: Fix FluidSynth generators for direct connections.
rbernon Oct 18, 2023
6909f86
dmsynth: Convert modulator values from DLS2 to SF2 convention.
rbernon Oct 16, 2023
e4df1b4
dmsynth: Set default modulators according to the DLS2 spec.
rbernon Oct 16, 2023
621bcbc
dmband: Download segment tracks if performance auto-download is set.
rbernon Oct 12, 2023
125621d
dmband: Set DMUS_PATCH_PMSG bank LSB/MSB from instrument patch.
rbernon Oct 16, 2023
a4ca3a4
dmime: Only use index if group is set in IDirectMusicSegment_SetParam.
rbernon Oct 12, 2023
238720b
dmime: Don't interrupt track iteration if SetParam failed.
rbernon Oct 12, 2023
aac7f71
dmime: Adjust MIDI message time with DMUS_NOTE_PMSG nOffset.
rbernon Oct 16, 2023
c1b23e5
dmusic: Use a dmusic_midi.h header for MIDI messages.
rbernon Oct 16, 2023
0b67f35
dmime: Translate some DMUS_CURVE_PMSG messages to MIDI.
rbernon Oct 16, 2023
71a67ad
dmime: Remove FIXME from methods now mostly implemented.
rbernon Oct 16, 2023
e3935b5
dmime: Avoid crashing when purging notification messages.
rbernon Oct 17, 2023
047c3fd
dmime: Return S_OK from wave track SetParam GUID_UnloadFromAudioPath.
rbernon Oct 17, 2023
bb30262
dmime: Return hr from wave track SetParam GUID_DownloadToAudioPath.
rbernon Oct 17, 2023
7dd8837
dmusic: Implement IDirectMusicObject interface on wave objects.
rbernon Oct 17, 2023
6868d45
dmusic: Use the IDirectMusicObject interface for waves.
rbernon Oct 17, 2023
06ede00
dswave: Use the dmusic wave object implementation.
rbernon Oct 17, 2023
de4d3f5
dmime: Avoid releasing the newly created graph twice.
rbernon Oct 17, 2023
b0d8700
dmime/tests: Remove flaky track playing state test.
rbernon Oct 23, 2023
db6384f
dmime/tests: Avoid checking message segment state reference count.
rbernon Oct 25, 2023
ee83a68
dmime/tests: Ignore failure on missing gm.dls in test_band_track_play.
rbernon Oct 23, 2023
0efdd51
dmusic/tests: Skip test_default_gm_collection if gm.dls is missing.
rbernon Oct 23, 2023
b154826
dmsynth: Set loop and sample generators on the fluid_voice.
rbernon Oct 22, 2023
4490f3c
dmime: Force recompute MIDI message reference time.
rbernon Oct 22, 2023
c1b5cad
dmime: Pass IDirectMusicPerformance8 to segment state functions.
rbernon Oct 24, 2023
73bc9f6
dmime: Pass segment start time as track time offset.
rbernon Oct 24, 2023
6b3cfa9
dmband: Use time_offset to align track start with music time.
rbernon Oct 23, 2023
2428539
dmime: Use time_offset to align track start with music time.
rbernon Oct 23, 2023
d30a562
dmime: Use an internal performance message for segment end.
rbernon Oct 25, 2023
1503bae
dmime: Send notification messages with DMUS_PMSGF_TOOL_IMMEDIATE.
rbernon Oct 25, 2023
8c04f16
dmime/tests: Add a track and longer segment to notifications tests.
rbernon Oct 24, 2023
a741b94
dmime: Use the current time if PlaySegmentEx start_time is 0.
rbernon Oct 24, 2023
8028bc1
dmime: Send DMUS_NOTIFICATION_SEGALMOSTEND before DMUS_NOTIFICATION_S…
rbernon Oct 25, 2023
7da868d
dmime/tests: Check more notification / dirty messages fields.
rbernon Oct 24, 2023
3400cde
dmband: Support start_time and end_time Play parameters.
rbernon Oct 24, 2023
e413a35
dmime: Support start_time and end_time Play parameters.
rbernon Oct 24, 2023
7d2ca44
dmime: Fix performance message requeue-ing from the message thread.
rbernon Oct 24, 2023
1d5f8c1
dmime: Implement segment state chunked playback.
rbernon Oct 25, 2023
9ee93c7
dmime: Send notification messages from segment_play_chunk.
rbernon Oct 25, 2023
5c2c98e
dmime/tests: Test IDirectMusicPerformance_GetSegmentState.
rbernon Oct 23, 2023
2224d6d
dmime: Implement IDirectMusicPerformance_GetSegmentState semi-stub.
rbernon Oct 24, 2023
93afd7a
dmime/tests: Test tempo track Play and DMUS_PMSGT_TEMPO messages.
rbernon Oct 23, 2023
f931c8e
dmime/tests: Test tempo track GetParam with GUID_TempoParam.
rbernon Oct 23, 2023
b2e6601
dmime: Fix tempo track GetParam with GUID_TempoParam implementation.
rbernon Oct 23, 2023
1a43a41
dmime/tests: Add helpers to scale and check music time with tempo.
rbernon Oct 23, 2023
da3313e
dmime/tests: Test playing tempo track effect on performance times.
rbernon Oct 23, 2023
3bc5798
dmime: Support playing secondary and control segments.
rbernon Oct 26, 2023
716565b
dmime: Better implement performance times with tempo track.
rbernon Oct 23, 2023
b837cdf
dmime/tests: Test that IDirectMusicPerformance_Stop clears messages.
rbernon Oct 24, 2023
0bfcb71
dmime: Implement IDirectMusicTrack_EndPlay for wave track.
rbernon Oct 25, 2023
c94d93b
dmime: Clear all pending messages in IDirectMusicPerformance_Stop.
rbernon Oct 26, 2023
804b853
dmime: Send MIDI_SYSTEM_RESET message on performance reset.
rbernon Oct 26, 2023
e692b76
dmsynth: Reset synthesizer defaults on MIDI_SYSTEM_RESET.
rbernon Oct 25, 2023
5319d38
dmime: Implement segment state repeat and looping.
rbernon Oct 25, 2023
88aa8d6
dmime: Stop previously playing primary segment in PlaySegmentEx.
rbernon Oct 26, 2023
42e8559
HACK: dmime: Don't send segment end message for secondary segments.
rbernon Oct 26, 2023
c663f9f
dmband: Skip band / band track chunk on parsing failure.
rbernon Oct 26, 2023
4f70bb1
dmime: Skip sequence track chunk on parsing failure.
rbernon Oct 26, 2023
63a2a89
dmime: Ignore badly formed wave if format and data have been found.
rbernon Oct 26, 2023
b29e4f3
dmime: Remove shadowing local hr variable.
rbernon Oct 26, 2023
9b449e0
dmime: Skip segment chunk on parsing failure (or success).
rbernon Oct 26, 2023
95af897
dmime: Rename struct pchannel_block to struct channel_block.
rbernon Oct 26, 2023
2205e43
dmime: Use a dedicated struct channel to hold performance channels.
rbernon Oct 26, 2023
422cbfb
dmime: Introduce a new performance_get_channel helper.
rbernon Oct 26, 2023
6247e5f
dmime: Set channel block info using IDirectMusicPerformance8_AssignPC…
rbernon Oct 26, 2023
9c5c67a
dmime: Avoid leaking performance channel block ports.
rbernon Oct 26, 2023
44fbee7
rtworkq: Avoid use-after-free.
Nov 1, 2023
5efa97e
mfplat: tests: Validate MFCancelWorkItem releases the callback.
Nov 1, 2023
3f088c2
rtworkq: Release cancelled work items.
Nov 1, 2023
78c3b5f
Revert "win32u: Ignore emulated mouse messages on touch-enabled windo…
ivyl Nov 6, 2023
271b699
fixup! fshack: winex11: Support opengl scaling according to fake reso…
Nov 7, 2023
4a2cac9
fixup! winex11.drv: fshack/GL: Support fshack on offscreen drawables.
Nov 7, 2023
05383dc
wine.inf: Enable builtin amd_ags_x64 for Assassin's Creed Mirage.
Nov 8, 2023
71e696c
user32: Return empty string from LoadStringW() if resource is not found.
Nov 8, 2023
f3fcbdc
user32: Put 0 to output string even for 1 char buffer in LoadStringW().
Nov 8, 2023
ddb9b1e
kernelbase: Return empty string from LoadStringW() if resource is not…
Nov 8, 2023
939fe52
kernelbase: Put 0 to output string even for 1 char buffer in LoadStri…
Nov 8, 2023
1d57f07
windows.gaming.input: Fix inverted start / select gamepad buttons.
rbernon Nov 9, 2023
e1f28ec
amd_ags_x64: Implement agsDriverExtensionsDX11_DeInit().
Nov 9, 2023
a381bee
amd_ags_x64: Factor out get_version_number().
Nov 9, 2023
e3e5b48
amd_ags_x64: Use version provided for agsInitialize().
Sep 28, 2023
7f2e6bc
amd_ags_x64: Factor out get_ags_version_from_resource().
Nov 9, 2023
fa07dce
amd_ags_x64: Try to get version from agsGetVersionNumber() if there i…
Nov 9, 2023
5b05890
amd_ags_x64: Distinguish some versions through available exports if o…
Nov 9, 2023
4b9b6a4
amd_ags_x64: Recognize version 6.2.0.
Nov 9, 2023
fc98a09
winex11.drv: Set _NET_WM_FULLSCREEN_MONITORS only when necessary.
zzhiyi Aug 14, 2023
793404f
fixup! fshack: winex11: Implement _NET_FULLSCREEN_MONITOR support.
zzhiyi Aug 22, 2023
a351a90
fshack: winex11.drv: Use fs_hack_monitor_from_rect() in X11DRV_ShowWi…
zzhiyi Nov 4, 2023
1d2deee
mf: Handle errors with source event generator in session.
tati-frog Aug 29, 2023
15815c8
mf: Signal event_cond in wg_parser_stream_disable.
tati-frog Oct 31, 2023
0ebbd57
winex11.drv: Don't call XIconifyWindow() on Gamescope.
Nov 8, 2023
96bec82
win32u: Store effective AA flags in gdi_font.
Nov 16, 2023
47cf83e
win32u: Set all glyph load flags in get_load_flags().
Nov 16, 2023
61198d9
win32u: Use font AA flags when querying glyph outline with GGO_METRICS.
Nov 16, 2023
bf2a7bc
Revert "dsound: Get rid of the global device GUID arrays."
Nov 16, 2023
8cb26d4
dsound: Dynamically allocate the global device GUID arrays.
alexhenrie Oct 20, 2023
9a04c16
gdiplus: Round width and height in gdip_format_string().
Nov 17, 2023
790e189
fixup! wine.inf: Enable builtin amd_ags_x64 for Assassin's Creed Mirage.
Nov 17, 2023
f000f11
bcryptprimitives: ProcessPrng stub.
ChrisDenton Feb 18, 2023
bcc1b14
evr: Set last presented sample atomically.
rbernon Nov 17, 2023
cfdebd9
fixup! HACK: winegstreamer: Do not report live latency for some games.
ivyl Nov 21, 2023
ed69f61
fixup! HACK: winegstreamer: Don't add unnecessary and slow? videoflip…
ivyl Nov 21, 2023
b242e93
fixup! HACK: winegstreamer: Disable MF_SA_D3D11_AWARE for some games.
ivyl Nov 21, 2023
4b6ba2a
windowscodecs: Enable WICPixelFormat32bppBGRA in BMP encoder.
Nov 17, 2023
d8f4c3a
msvcp110: Implement std::_Xbad_function_call().
Nov 20, 2023
30c64cf
d3dx9: Support empty mesh in D3DXLoadMeshHierarchyFromXInMemory().
alesliehughes Sep 28, 2023
8e7dfbb
d3dx9: Implement D3DXComputeTangent
alesliehughes Nov 17, 2023
74a03fc
include: Fix ID3DXLoadUserData definition.
Nov 21, 2023
528e12d
d3dx9/tests: Add test for user data in D3DXLoadMeshHierarchyFromXInMe…
Nov 21, 2023
7b301f3
d3dx9: Implement loading top and frame user data in D3DXLoadMeshHiera…
Nov 21, 2023
e0f3c31
d3dx9: Unify calling parse_mesh helper functions.
Nov 21, 2023
b66053a
d3dx9: Factor out mesh_get_parse_func().
Nov 21, 2023
314da8d
d3dx9: Support loading mesh user data in D3DXLoadMeshHierarchyFromXIn…
Nov 21, 2023
bd282d2
ntdll: HACK: Enable fsync_yield_to_waiters for LIGHTNING RETURNS: FFX…
Nov 22, 2023
154ef96
amd_ags_x64: Add Unix library.
Nov 23, 2023
c7df0b6
amd_ags_x64: Load libdrm amdgpu info.
Nov 23, 2023
d2baf1b
amd_ags_x64: Try to guess asicFamily from amdgpu info.
Nov 23, 2023
34aa2bb
amd_ags_x64: Fill more device info fields.
Nov 24, 2023
a58b925
amd_ags_x64: Downgrade agsCheckDriverVersion() message to WARN.
Nov 24, 2023
4a69ec6
amend! mfmediaengine: Be a bit more conservative with locks in engine…
Nov 24, 2023
c724349
fixup! amd_ags_x64: Load libdrm amdgpu info.
Nov 24, 2023
92810f4
amd_ags_x64: Workaround zero clock reporting on Vangogh GPU.
Nov 24, 2023
34e4e3b
setupapi: Add stubs for SetupDiGetCustomDeviceProperty{A|W}().
Nov 24, 2023
9d7b32d
winebus.sys: Only apply hidraw disable hacks to hidraw subsystem
twhitehead Nov 25, 2023
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