winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
November 2023
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
989 discussions
Start a n
N
ew thread
Nikolay Sivov : tests: Fix some spelling mistakes.
by Alexandre Julliard
13 Nov '23
13 Nov '23
Module: vkd3d Branch: master Commit: 41a72a4eae99003a165c2215afba438a5bfea249 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/41a72a4eae99003a165c2215afba4…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun Nov 12 02:48:30 2023 +0100 tests: Fix some spelling mistakes. --- tests/d3d12.c | 2 +- tests/driver.c | 2 +- tests/shader_runner.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index 8f100a5e..649d86ec 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -1058,7 +1058,7 @@ static void test_format_support(void) } unsupported_format_features[] = { - /* A recent version of WARP suppots B8G8R8A8 UAVs even on D3D_FEATURE_LEVEL_11_0. */ + /* A recent version of WARP supports B8G8R8A8 UAVs even on D3D_FEATURE_LEVEL_11_0. */ {{DXGI_FORMAT_B8G8R8A8_TYPELESS, D3D12_FORMAT_SUPPORT1_TYPED_UNORDERED_ACCESS_VIEW, D3D12_FORMAT_SUPPORT2_UAV_TYPED_LOAD | D3D12_FORMAT_SUPPORT2_UAV_TYPED_STORE}, true}, }; diff --git a/tests/driver.c b/tests/driver.c index 553417ad..504f51df 100644 --- a/tests/driver.c +++ b/tests/driver.c @@ -108,7 +108,7 @@ static enum program_result run_program(const char *cmdline, const char *log_file if (!GetExitCodeProcess(info.hProcess, &exit_code)) { - fprintf(stderr, "Cannot retrive the process exit code, last error %ld.\n", GetLastError()); + fprintf(stderr, "Cannot retrieve the process exit code, last error %ld.\n", GetLastError()); ret = PROGRAM_RESULT_FAILURE; goto out; } diff --git a/tests/shader_runner.c b/tests/shader_runner.c index dadfe333..7e595814 100644 --- a/tests/shader_runner.c +++ b/tests/shader_runner.c @@ -803,7 +803,7 @@ static HRESULT map_unidentified_hrs(HRESULT hr) { if (hr == 0x80010064) { - trace("Mapping unindentified hr %#x as %#x.\n", hr, E_FAIL); + trace("Mapping unidentified hr %#x as %#x.\n", hr, E_FAIL); return E_FAIL; } return hr;
1
0
0
0
Alex Henrie : user32/tests: Allocate clipboard data with HeapAlloc.
by Alexandre Julliard
13 Nov '23
13 Nov '23
Module: wine Branch: master Commit: 88e66d0785dbc80bb49834676ef00a71963d0e4f URL:
https://gitlab.winehq.org/wine/wine/-/commit/88e66d0785dbc80bb49834676ef00a…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sat Nov 11 14:40:00 2023 -0700 user32/tests: Allocate clipboard data with HeapAlloc. This partially reverts commit faae2162b89e951a94f74f65986f6a1015366cf3. --- dlls/user32/tests/clipboard.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c index 819188fa8e3..87df06b6621 100644 --- a/dlls/user32/tests/clipboard.c +++ b/dlls/user32/tests/clipboard.c @@ -1531,10 +1531,10 @@ static void test_handles( HWND hwnd ) if (0) /* crashes on vista64 */ { - ptr = malloc( sizeof(void *) ); + ptr = HeapAlloc( GetProcessHeap(), 0, 0 ); h = SetClipboardData( format_id2, ptr ); ok( !h, "got %p\n", h ); - free( ptr ); + HeapFree( GetProcessHeap(), 0, ptr ); } h = SetClipboardData( format_id2, empty_fixed ); @@ -1547,12 +1547,12 @@ static void test_handles( HWND hwnd ) ok( h == hmoveable, "got %p\n", h ); ok( is_moveable( h ), "expected moveable mem %p\n", h ); - ptr = malloc( 37 ); + ptr = HeapAlloc( GetProcessHeap(), 0, 37 ); h = SetClipboardData( 0xdeadfade, ptr ); ok( h == ptr || !h, "got %p\n", h ); if (!h) /* heap blocks are rejected on >= win8 */ { - free( ptr ); + HeapFree( GetProcessHeap(), 0, ptr ); ptr = NULL; }
1
0
0
0
Henri Verbeet : vkd3d-shader/ir: Introduce vsir_register_is_descriptor().
by Alexandre Julliard
13 Nov '23
13 Nov '23
Module: vkd3d Branch: master Commit: 215a2c4edec192c5fe1a409605da483b3ab9d8c8 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/215a2c4edec192c5fe1a409605da4…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sat Nov 11 18:48:12 2023 +0100 vkd3d-shader/ir: Introduce vsir_register_is_descriptor(). --- libs/vkd3d-shader/spirv.c | 17 +---------------- libs/vkd3d-shader/tpf.c | 17 +---------------- libs/vkd3d-shader/vkd3d_shader_private.h | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 32 deletions(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index d2621ffa..19f56a3a 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -3396,21 +3396,6 @@ static bool spirv_compiler_get_register_info(const struct spirv_compiler *compil return true; } -static bool register_is_descriptor(const struct vkd3d_shader_register *reg) -{ - switch (reg->type) - { - case VKD3DSPR_SAMPLER: - case VKD3DSPR_RESOURCE: - case VKD3DSPR_CONSTBUFFER: - case VKD3DSPR_UAV: - return true; - - default: - return false; - } -} - static bool spirv_compiler_enable_descriptor_indexing(struct spirv_compiler *compiler, enum vkd3d_shader_register_type reg_type, enum vkd3d_shader_resource_type resource_type) { @@ -3536,7 +3521,7 @@ static void spirv_compiler_emit_dereference_register(struct spirv_compiler *comp FIXME("Relative addressing not implemented.\n"); /* Handle arrayed registers, e.g. v[3][0]. */ - if (reg->idx_count > 1 && !register_is_descriptor(reg)) + if (reg->idx_count > 1 && !vsir_register_is_descriptor(reg)) indexes[index_count++] = spirv_compiler_emit_register_addressing(compiler, ®->idx[0]); } diff --git a/libs/vkd3d-shader/tpf.c b/libs/vkd3d-shader/tpf.c index d0d2ea82..60fa3b98 100644 --- a/libs/vkd3d-shader/tpf.c +++ b/libs/vkd3d-shader/tpf.c @@ -1751,21 +1751,6 @@ static bool shader_sm4_read_reg_idx(struct vkd3d_shader_sm4_parser *priv, const return true; } -static bool sm4_register_is_descriptor(enum vkd3d_sm4_register_type register_type) -{ - switch (register_type) - { - case VKD3D_SM4_RT_SAMPLER: - case VKD3D_SM4_RT_RESOURCE: - case VKD3D_SM4_RT_CONSTBUFFER: - case VKD3D_SM5_RT_UAV: - return true; - - default: - return false; - } -} - static bool shader_sm4_read_param(struct vkd3d_shader_sm4_parser *priv, const uint32_t **ptr, const uint32_t *end, enum vkd3d_data_type data_type, struct vkd3d_shader_register *param, enum vkd3d_shader_src_modifier *modifier) { @@ -1943,7 +1928,7 @@ static bool shader_sm4_read_param(struct vkd3d_shader_sm4_parser *priv, const ui break; } } - else if (!shader_is_sm_5_1(priv) && sm4_register_is_descriptor(register_type)) + else if (!shader_is_sm_5_1(priv) && vsir_register_is_descriptor(param)) { /* SM5.1 places a symbol identifier in idx[0] and moves * other values up one slot. Normalize to SM5.1. */ diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index e5d59063..bff49453 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -833,6 +833,21 @@ struct vkd3d_shader_register void vsir_register_init(struct vkd3d_shader_register *reg, enum vkd3d_shader_register_type reg_type, enum vkd3d_data_type data_type, unsigned int idx_count); +static inline bool vsir_register_is_descriptor(const struct vkd3d_shader_register *reg) +{ + switch (reg->type) + { + case VKD3DSPR_SAMPLER: + case VKD3DSPR_RESOURCE: + case VKD3DSPR_CONSTBUFFER: + case VKD3DSPR_UAV: + return true; + + default: + return false; + } +} + struct vkd3d_shader_dst_param { struct vkd3d_shader_register reg;
1
0
0
0
Tag wine-8.20 : Alexandre Julliard : Release 8.20
by Alexandre Julliard
10 Nov '23
10 Nov '23
Module: wine Branch: refs/tags/wine-8.20 Tag: 8cfb57d5faa68ec1b842ba193c46db774bb40d76 URL:
https://gitlab.winehq.org/wine/wine/-/tags/8cfb57d5faa68ec1b842ba193c46db77…
Tagger: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 10 21:54:48 2023 +0100 Release 8.20
1
0
0
0
Alexandre Julliard : Release 8.20.
by Alexandre Julliard
10 Nov '23
10 Nov '23
Module: wine Branch: master Commit: 3a8d71041c159d76a76856867caa1de8ca297151 URL:
https://gitlab.winehq.org/wine/wine/-/commit/3a8d71041c159d76a76856867caa1d…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Nov 10 21:54:48 2023 +0100 Release 8.20. --- .mailmap | 1 + ANNOUNCE | 825 +++++++++++++++++++++++++++++++++++++------------------------- VERSION | 2 +- configure | 18 +- 4 files changed, 501 insertions(+), 345 deletions(-)
1
0
0
0
Rémi Bernon : dmime: Avoid leaking performance channel block ports.
by Alexandre Julliard
10 Nov '23
10 Nov '23
Module: wine Branch: master Commit: 9fb8469bbe2a5f57eefcaaf1803cdcddcd8829ca URL:
https://gitlab.winehq.org/wine/wine/-/commit/9fb8469bbe2a5f57eefcaaf1803cdc…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Fri Nov 10 11:51:52 2023 +0100 dmime: Avoid leaking performance channel block ports. --- dlls/dmime/performance.c | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 4b169427371..0e817d232e3 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -245,8 +245,16 @@ static int channel_block_compare(const void *key, const struct wine_rb_entry *en static void channel_block_free(struct wine_rb_entry *entry, void *context) { - struct channel_block *b = WINE_RB_ENTRY_VALUE(entry, struct channel_block, entry); - free(b); + struct channel_block *block = WINE_RB_ENTRY_VALUE(entry, struct channel_block, entry); + UINT i; + + for (i = 0; i < ARRAY_SIZE(block->channels); i++) + { + struct channel *channel = block->channels + i; + if (channel->port) IDirectMusicPort_Release(channel->port); + } + + free(block); } static struct channel *performance_get_channel(struct performance *This, DWORD channel_num) @@ -278,7 +286,8 @@ static HRESULT channel_block_init(struct performance *This, DWORD block_num, struct channel *channel = block->channels + i; channel->midi_group = midi_group; channel->midi_channel = i; - channel->port = port; + if (channel->port) IDirectMusicPort_Release(channel->port); + if ((channel->port = port)) IDirectMusicPort_AddRef(channel->port); } return S_OK; @@ -992,6 +1001,8 @@ static HRESULT perf_dmport_create(struct performance *perf, DMUS_PORTPARAMS *par return hr; } + wine_rb_destroy(&perf->channel_blocks, channel_block_free, NULL); + for (i = 0; i < params->dwChannelGroups; i++) { if (FAILED(hr = channel_block_init(perf, i, port, i + 1))) @@ -999,6 +1010,7 @@ static HRESULT perf_dmport_create(struct performance *perf, DMUS_PORTPARAMS *par } performance_update_latency_time(perf, port, NULL); + IDirectMusicPort_Release(port); return S_OK; } @@ -1079,7 +1091,8 @@ static HRESULT WINAPI performance_AssignPChannel(IDirectMusicPerformance8 *iface channel->midi_group = midi_group; channel->midi_channel = midi_channel; - channel->port = port; + if (channel->port) IDirectMusicPort_Release(channel->port); + if ((channel->port = port)) IDirectMusicPort_AddRef(channel->port); return S_OK; }
1
0
0
0
Rémi Bernon : dmime: Simplify and rename channel_block_set to channel_block_init.
by Alexandre Julliard
10 Nov '23
10 Nov '23
Module: wine Branch: master Commit: 467f3a2adbe40fcca4a18e32dc1fcdfd7e73fffe URL:
https://gitlab.winehq.org/wine/wine/-/commit/467f3a2adbe40fcca4a18e32dc1fcd…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Oct 26 15:38:12 2023 +0200 dmime: Simplify and rename channel_block_set to channel_block_init. --- dlls/dmime/performance.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 7269cd07670..4b169427371 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -257,32 +257,31 @@ static struct channel *performance_get_channel(struct performance *This, DWORD c return WINE_RB_ENTRY_VALUE(entry, struct channel_block, entry)->channels + channel_num % 16; } -static struct channel_block *channel_block_set(struct wine_rb_tree *tree, DWORD block_num, - IDirectMusicPort *port, DWORD midi_group, BOOL only_set_new) +static HRESULT channel_block_init(struct performance *This, DWORD block_num, + IDirectMusicPort *port, DWORD midi_group) { struct channel_block *block; struct wine_rb_entry *entry; - unsigned int i; + UINT i; - entry = wine_rb_get(tree, &block_num); - if (entry) { + if ((entry = wine_rb_get(&This->channel_blocks, &block_num))) block = WINE_RB_ENTRY_VALUE(entry, struct channel_block, entry); - if (only_set_new) - return block; - } else { - if (!(block = malloc(sizeof(*block)))) return NULL; + else + { + if (!(block = calloc(1, sizeof(*block)))) return E_OUTOFMEMORY; block->block_num = block_num; + wine_rb_put(&This->channel_blocks, &block_num, &block->entry); } - for (i = 0; i < 16; ++i) { - block->channels[i].port = port; - block->channels[i].midi_group = midi_group; - block->channels[i].midi_channel = i; + for (i = 0; i < ARRAY_SIZE(block->channels); ++i) + { + struct channel *channel = block->channels + i; + channel->midi_group = midi_group; + channel->midi_channel = i; + channel->port = port; } - if (!entry) - wine_rb_put(tree, &block->block_num, &block->entry); - return block; + return S_OK; } static inline struct performance *impl_from_IDirectMusicPerformance8(IDirectMusicPerformance8 *iface) @@ -994,7 +993,10 @@ static HRESULT perf_dmport_create(struct performance *perf, DMUS_PORTPARAMS *par } for (i = 0; i < params->dwChannelGroups; i++) - channel_block_set(&perf->channel_blocks, i, port, i + 1, FALSE); + { + if (FAILED(hr = channel_block_init(perf, i, port, i + 1))) + ERR("Failed to init channel block, hr %#lx\n", hr); + } performance_update_latency_time(perf, port, NULL); return S_OK; @@ -1051,9 +1053,7 @@ static HRESULT WINAPI performance_AssignPChannelBlock(IDirectMusicPerformance8 * if (block_num > MAXDWORD / 16) return E_INVALIDARG; if (This->audio_paths_enabled) return DMUS_E_AUDIOPATHS_IN_USE; - channel_block_set(&This->channel_blocks, block_num, port, midi_group, FALSE); - - return S_OK; + return channel_block_init(This, block_num, port, midi_group); } static HRESULT WINAPI performance_AssignPChannel(IDirectMusicPerformance8 *iface, DWORD channel_num,
1
0
0
0
Rémi Bernon : dmime: Introduce a new performance_get_channel helper.
by Alexandre Julliard
10 Nov '23
10 Nov '23
Module: wine Branch: master Commit: 0e73870ecd9def5b15b4e61281558715e1195c5a URL:
https://gitlab.winehq.org/wine/wine/-/commit/0e73870ecd9def5b15b4e612815587…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Oct 26 15:25:13 2023 +0200 dmime: Introduce a new performance_get_channel helper. --- dlls/dmime/performance.c | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index b46e5ae8609..7269cd07670 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -249,6 +249,14 @@ static void channel_block_free(struct wine_rb_entry *entry, void *context) free(b); } +static struct channel *performance_get_channel(struct performance *This, DWORD channel_num) +{ + DWORD block_num = channel_num / 16; + struct wine_rb_entry *entry; + if (!(entry = wine_rb_get(&This->channel_blocks, &block_num))) return NULL; + return WINE_RB_ENTRY_VALUE(entry, struct channel_block, entry)->channels + channel_num % 16; +} + static struct channel_block *channel_block_set(struct wine_rb_tree *tree, DWORD block_num, IDirectMusicPort *port, DWORD midi_group, BOOL only_set_new) { @@ -1052,19 +1060,27 @@ static HRESULT WINAPI performance_AssignPChannel(IDirectMusicPerformance8 *iface IDirectMusicPort *port, DWORD midi_group, DWORD midi_channel) { struct performance *This = impl_from_IDirectMusicPerformance8(iface); - struct channel_block *block; + struct channel *channel; + HRESULT hr; FIXME("(%p)->(%ld, %p, %ld, %ld) semi-stub\n", This, channel_num, port, midi_group, midi_channel); if (!port) return E_POINTER; if (This->audio_paths_enabled) return DMUS_E_AUDIOPATHS_IN_USE; - block = channel_block_set(&This->channel_blocks, channel_num / 16, port, 0, TRUE); - if (block) { - block->channels[channel_num % 16].midi_group = midi_group; - block->channels[channel_num % 16].midi_channel = midi_channel; + if (!(channel = performance_get_channel(This, channel_num))) + { + if (FAILED(hr = IDirectMusicPerformance8_AssignPChannelBlock(iface, + channel_num / 16, port, 0))) + return hr; + if (!(channel = performance_get_channel(This, channel_num))) + return DMUS_E_NOT_FOUND; } + channel->midi_group = midi_group; + channel->midi_channel = midi_channel; + channel->port = port; + return S_OK; } @@ -1072,24 +1088,18 @@ static HRESULT WINAPI performance_PChannelInfo(IDirectMusicPerformance8 *iface, IDirectMusicPort **port, DWORD *midi_group, DWORD *midi_channel) { struct performance *This = impl_from_IDirectMusicPerformance8(iface); - struct channel_block *block; - struct wine_rb_entry *entry; - DWORD block_num = channel_num / 16; - unsigned int index = channel_num % 16; + struct channel *channel; TRACE("(%p)->(%ld, %p, %p, %p)\n", This, channel_num, port, midi_group, midi_channel); - entry = wine_rb_get(&This->channel_blocks, &block_num); - if (!entry) - return E_INVALIDARG; - block = WINE_RB_ENTRY_VALUE(entry, struct channel_block, entry); - - if (port) { - *port = block->channels[index].port; + if (!(channel = performance_get_channel(This, channel_num))) return E_INVALIDARG; + if (port) + { + *port = channel->port; IDirectMusicPort_AddRef(*port); } - if (midi_group) *midi_group = block->channels[index].midi_group; - if (midi_channel) *midi_channel = block->channels[index].midi_channel; + if (midi_group) *midi_group = channel->midi_group; + if (midi_channel) *midi_channel = channel->midi_channel; return S_OK; }
1
0
0
0
Rémi Bernon : dmime: Use a dedicated struct channel to hold performance channels.
by Alexandre Julliard
10 Nov '23
10 Nov '23
Module: wine Branch: master Commit: 79a98eb7b9d398d2c6338a3dcb01d73b5870fde0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/79a98eb7b9d398d2c6338a3dcb01d7…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Oct 26 15:34:09 2023 +0200 dmime: Use a dedicated struct channel to hold performance channels. --- dlls/dmime/performance.c | 57 ++++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 3f40ecd5549..b46e5ae8609 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -32,14 +32,17 @@ enum dmus_internal_message_type DMUS_PMSGT_INTERNAL_SEGMENT_TICK, }; +struct channel +{ + DWORD midi_group; + DWORD midi_channel; + IDirectMusicPort *port; +}; + struct channel_block { DWORD block_num; /* Block 0 is PChannels 0-15, Block 1 is PChannels 16-31, etc */ - struct { - DWORD channel; /* MIDI channel */ - DWORD group; /* MIDI group */ - IDirectMusicPort *port; - } pchannel[16]; + struct channel channels[16]; struct wine_rb_entry entry; }; @@ -247,7 +250,7 @@ static void channel_block_free(struct wine_rb_entry *entry, void *context) } static struct channel_block *channel_block_set(struct wine_rb_tree *tree, DWORD block_num, - IDirectMusicPort *port, DWORD group, BOOL only_set_new) + IDirectMusicPort *port, DWORD midi_group, BOOL only_set_new) { struct channel_block *block; struct wine_rb_entry *entry; @@ -264,9 +267,9 @@ static struct channel_block *channel_block_set(struct wine_rb_tree *tree, DWORD } for (i = 0; i < 16; ++i) { - block->pchannel[i].port = port; - block->pchannel[i].group = group; - block->pchannel[i].channel = i; + block->channels[i].port = port; + block->channels[i].midi_group = midi_group; + block->channels[i].midi_channel = i; } if (!entry) wine_rb_put(tree, &block->block_num, &block->entry); @@ -1030,51 +1033,51 @@ static HRESULT WINAPI performance_RemovePort(IDirectMusicPerformance8 *iface, ID } static HRESULT WINAPI performance_AssignPChannelBlock(IDirectMusicPerformance8 *iface, - DWORD block_num, IDirectMusicPort *port, DWORD group) + DWORD block_num, IDirectMusicPort *port, DWORD midi_group) { struct performance *This = impl_from_IDirectMusicPerformance8(iface); - FIXME("(%p, %ld, %p, %ld): semi-stub\n", This, block_num, port, group); + FIXME("(%p, %ld, %p, %ld): semi-stub\n", This, block_num, port, midi_group); if (!port) return E_POINTER; if (block_num > MAXDWORD / 16) return E_INVALIDARG; if (This->audio_paths_enabled) return DMUS_E_AUDIOPATHS_IN_USE; - channel_block_set(&This->channel_blocks, block_num, port, group, FALSE); + channel_block_set(&This->channel_blocks, block_num, port, midi_group, FALSE); return S_OK; } -static HRESULT WINAPI performance_AssignPChannel(IDirectMusicPerformance8 *iface, DWORD pchannel, - IDirectMusicPort *port, DWORD group, DWORD channel) +static HRESULT WINAPI performance_AssignPChannel(IDirectMusicPerformance8 *iface, DWORD channel_num, + IDirectMusicPort *port, DWORD midi_group, DWORD midi_channel) { struct performance *This = impl_from_IDirectMusicPerformance8(iface); struct channel_block *block; - FIXME("(%p)->(%ld, %p, %ld, %ld) semi-stub\n", This, pchannel, port, group, channel); + FIXME("(%p)->(%ld, %p, %ld, %ld) semi-stub\n", This, channel_num, port, midi_group, midi_channel); if (!port) return E_POINTER; if (This->audio_paths_enabled) return DMUS_E_AUDIOPATHS_IN_USE; - block = channel_block_set(&This->channel_blocks, pchannel / 16, port, 0, TRUE); + block = channel_block_set(&This->channel_blocks, channel_num / 16, port, 0, TRUE); if (block) { - block->pchannel[pchannel % 16].group = group; - block->pchannel[pchannel % 16].channel = channel; + block->channels[channel_num % 16].midi_group = midi_group; + block->channels[channel_num % 16].midi_channel = midi_channel; } return S_OK; } -static HRESULT WINAPI performance_PChannelInfo(IDirectMusicPerformance8 *iface, DWORD pchannel, - IDirectMusicPort **port, DWORD *group, DWORD *channel) +static HRESULT WINAPI performance_PChannelInfo(IDirectMusicPerformance8 *iface, DWORD channel_num, + IDirectMusicPort **port, DWORD *midi_group, DWORD *midi_channel) { struct performance *This = impl_from_IDirectMusicPerformance8(iface); struct channel_block *block; struct wine_rb_entry *entry; - DWORD block_num = pchannel / 16; - unsigned int index = pchannel % 16; + DWORD block_num = channel_num / 16; + unsigned int index = channel_num % 16; - TRACE("(%p)->(%ld, %p, %p, %p)\n", This, pchannel, port, group, channel); + TRACE("(%p)->(%ld, %p, %p, %p)\n", This, channel_num, port, midi_group, midi_channel); entry = wine_rb_get(&This->channel_blocks, &block_num); if (!entry) @@ -1082,13 +1085,11 @@ static HRESULT WINAPI performance_PChannelInfo(IDirectMusicPerformance8 *iface, block = WINE_RB_ENTRY_VALUE(entry, struct channel_block, entry); if (port) { - *port = block->pchannel[index].port; + *port = block->channels[index].port; IDirectMusicPort_AddRef(*port); } - if (group) - *group = block->pchannel[index].group; - if (channel) - *channel = block->pchannel[index].channel; + if (midi_group) *midi_group = block->channels[index].midi_group; + if (midi_channel) *midi_channel = block->channels[index].midi_channel; return S_OK; }
1
0
0
0
Rémi Bernon : dmime: Rename struct pchannel_block to struct channel_block.
by Alexandre Julliard
10 Nov '23
10 Nov '23
Module: wine Branch: master Commit: 53035c6977ee4c4e36f3ce7522d9e49313d1a11e URL:
https://gitlab.winehq.org/wine/wine/-/commit/53035c6977ee4c4e36f3ce7522d9e4…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Oct 26 15:32:29 2023 +0200 dmime: Rename struct pchannel_block to struct channel_block. --- dlls/dmime/performance.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 94d7d8aeea3..3f40ecd5549 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -32,7 +32,8 @@ enum dmus_internal_message_type DMUS_PMSGT_INTERNAL_SEGMENT_TICK, }; -struct pchannel_block { +struct channel_block +{ DWORD block_num; /* Block 0 is PChannels 0-15, Block 1 is PChannels 16-31, etc */ struct { DWORD channel; /* MIDI channel */ @@ -56,7 +57,7 @@ struct performance float fMasterTempo; long lMasterVolume; /* performance channels */ - struct wine_rb_tree pchannels; + struct wine_rb_tree channel_blocks; BOOL audio_paths_enabled; IDirectMusicAudioPath *pDefaultPath; @@ -233,30 +234,28 @@ static HRESULT performance_send_notification_pmsg(struct performance *This, MUSI return hr; } -static int pchannel_block_compare(const void *key, const struct wine_rb_entry *entry) +static int channel_block_compare(const void *key, const struct wine_rb_entry *entry) { - const struct pchannel_block *b = WINE_RB_ENTRY_VALUE(entry, const struct pchannel_block, entry); - + const struct channel_block *b = WINE_RB_ENTRY_VALUE(entry, const struct channel_block, entry); return *(DWORD *)key - b->block_num; } -static void pchannel_block_free(struct wine_rb_entry *entry, void *context) +static void channel_block_free(struct wine_rb_entry *entry, void *context) { - struct pchannel_block *b = WINE_RB_ENTRY_VALUE(entry, struct pchannel_block, entry); - + struct channel_block *b = WINE_RB_ENTRY_VALUE(entry, struct channel_block, entry); free(b); } -static struct pchannel_block *pchannel_block_set(struct wine_rb_tree *tree, DWORD block_num, +static struct channel_block *channel_block_set(struct wine_rb_tree *tree, DWORD block_num, IDirectMusicPort *port, DWORD group, BOOL only_set_new) { - struct pchannel_block *block; + struct channel_block *block; struct wine_rb_entry *entry; unsigned int i; entry = wine_rb_get(tree, &block_num); if (entry) { - block = WINE_RB_ENTRY_VALUE(entry, struct pchannel_block, entry); + block = WINE_RB_ENTRY_VALUE(entry, struct channel_block, entry); if (only_set_new) return block; } else { @@ -408,7 +407,7 @@ static ULONG WINAPI performance_Release(IDirectMusicPerformance8 *iface) TRACE("(%p): ref=%ld\n", This, ref); if (ref == 0) { - wine_rb_destroy(&This->pchannels, pchannel_block_free, NULL); + wine_rb_destroy(&This->channel_blocks, channel_block_free, NULL); This->safe.DebugInfo->Spare[0] = 0; DeleteCriticalSection(&This->safe); free(This); @@ -984,7 +983,7 @@ static HRESULT perf_dmport_create(struct performance *perf, DMUS_PORTPARAMS *par } for (i = 0; i < params->dwChannelGroups; i++) - pchannel_block_set(&perf->pchannels, i, port, i + 1, FALSE); + channel_block_set(&perf->channel_blocks, i, port, i + 1, FALSE); performance_update_latency_time(perf, port, NULL); return S_OK; @@ -1041,7 +1040,7 @@ static HRESULT WINAPI performance_AssignPChannelBlock(IDirectMusicPerformance8 * if (block_num > MAXDWORD / 16) return E_INVALIDARG; if (This->audio_paths_enabled) return DMUS_E_AUDIOPATHS_IN_USE; - pchannel_block_set(&This->pchannels, block_num, port, group, FALSE); + channel_block_set(&This->channel_blocks, block_num, port, group, FALSE); return S_OK; } @@ -1050,14 +1049,14 @@ static HRESULT WINAPI performance_AssignPChannel(IDirectMusicPerformance8 *iface IDirectMusicPort *port, DWORD group, DWORD channel) { struct performance *This = impl_from_IDirectMusicPerformance8(iface); - struct pchannel_block *block; + struct channel_block *block; FIXME("(%p)->(%ld, %p, %ld, %ld) semi-stub\n", This, pchannel, port, group, channel); if (!port) return E_POINTER; if (This->audio_paths_enabled) return DMUS_E_AUDIOPATHS_IN_USE; - block = pchannel_block_set(&This->pchannels, pchannel / 16, port, 0, TRUE); + block = channel_block_set(&This->channel_blocks, pchannel / 16, port, 0, TRUE); if (block) { block->pchannel[pchannel % 16].group = group; block->pchannel[pchannel % 16].channel = channel; @@ -1070,17 +1069,17 @@ static HRESULT WINAPI performance_PChannelInfo(IDirectMusicPerformance8 *iface, IDirectMusicPort **port, DWORD *group, DWORD *channel) { struct performance *This = impl_from_IDirectMusicPerformance8(iface); - struct pchannel_block *block; + struct channel_block *block; struct wine_rb_entry *entry; DWORD block_num = pchannel / 16; unsigned int index = pchannel % 16; TRACE("(%p)->(%ld, %p, %p, %p)\n", This, pchannel, port, group, channel); - entry = wine_rb_get(&This->pchannels, &block_num); + entry = wine_rb_get(&This->channel_blocks, &block_num); if (!entry) return E_INVALIDARG; - block = WINE_RB_ENTRY_VALUE(entry, struct pchannel_block, entry); + block = WINE_RB_ENTRY_VALUE(entry, struct channel_block, entry); if (port) { *port = block->pchannel[index].port; @@ -2080,7 +2079,7 @@ HRESULT create_dmperformance(REFIID iid, void **ret_iface) obj->pDefaultPath = NULL; InitializeCriticalSection(&obj->safe); obj->safe.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": performance->safe"); - wine_rb_init(&obj->pchannels, pchannel_block_compare); + wine_rb_init(&obj->channel_blocks, channel_block_compare); list_init(&obj->messages); list_init(&obj->notifications);
1
0
0
0
← Newer
1
...
52
53
54
55
56
57
58
...
99
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Results per page:
10
25
50
100
200