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
September 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
920 discussions
Start a n
N
ew thread
Rémi Bernon : dmloader: Use a simpler file stream implementation.
by Alexandre Julliard
29 Sep '23
29 Sep '23
Module: wine Branch: master Commit: 1ffc47b5e69b6377244c7df51e3de9a6d02082e9 URL:
https://gitlab.winehq.org/wine/wine/-/commit/1ffc47b5e69b6377244c7df51e3de9…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Sep 21 08:03:31 2023 +0200 dmloader: Use a simpler file stream implementation. --- dlls/dmloader/dmloader_private.h | 18 +-- dlls/dmloader/loader.c | 105 +++++------- dlls/dmloader/loaderstream.c | 335 +++++++++++++++++---------------------- 3 files changed, 189 insertions(+), 269 deletions(-)
1
0
0
0
Andrey Gusev : vkd3d: Add ID3D12Device5 interface stub.
by Alexandre Julliard
28 Sep '23
28 Sep '23
Module: vkd3d Branch: master Commit: 1006e8cbd4f46b560b939a894a03b08ce1f20def URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/1006e8cbd4f46b560b939a894a03b…
Author: Andrey Gusev <andrey.goosev(a)gmail.com> Date: Thu Sep 28 21:06:10 2023 +0300 vkd3d: Add ID3D12Device5 interface stub. --- libs/vkd3d/device.c | 287 +++++++++++++++++++++++++++++---------------- libs/vkd3d/resource.c | 2 +- libs/vkd3d/vkd3d_main.c | 4 +- libs/vkd3d/vkd3d_private.h | 12 +- 4 files changed, 192 insertions(+), 113 deletions(-)
1
0
0
0
Francisco Casas : vkd3d-shader/tpf: Store vkd3d-shader swizzles in sm4_src_register.swizzle.
by Alexandre Julliard
28 Sep '23
28 Sep '23
Module: vkd3d Branch: master Commit: f50d0ae2cbc5ee2a26fedd7b8aac2def62decd6c URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/f50d0ae2cbc5ee2a26fedd7b8aac2…
Author: Francisco Casas <fcasas(a)codeweavers.com> Date: Thu Aug 31 17:24:10 2023 -0400 vkd3d-shader/tpf: Store vkd3d-shader swizzles in sm4_src_register.swizzle. --- libs/vkd3d-shader/tpf.c | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/libs/vkd3d-shader/tpf.c b/libs/vkd3d-shader/tpf.c index a63f0d65..63771736 100644 --- a/libs/vkd3d-shader/tpf.c +++ b/libs/vkd3d-shader/tpf.c @@ -1954,6 +1954,16 @@ static uint32_t swizzle_from_sm4(uint32_t s) return vkd3d_shader_create_swizzle(s & 0x3, (s >> 2) & 0x3, (s >> 4) & 0x3, (s >> 6) & 0x3); } +static uint32_t swizzle_to_sm4(uint32_t s) +{ + uint32_t ret = 0; + ret |= ((vkd3d_swizzle_get_component(s, 0)) & 0x3); + ret |= ((vkd3d_swizzle_get_component(s, 1)) & 0x3) << 2; + ret |= ((vkd3d_swizzle_get_component(s, 2)) & 0x3) << 4; + ret |= ((vkd3d_swizzle_get_component(s, 3)) & 0x3) << 6; + return ret; +} + static bool register_is_input_output(const struct vkd3d_shader_register *reg) { switch (reg->type) @@ -3617,7 +3627,7 @@ struct sm4_instruction { struct vkd3d_shader_register reg; enum vkd3d_sm4_swizzle_type swizzle_type; - unsigned int swizzle; + DWORD swizzle; unsigned int mod; } srcs[5]; unsigned int src_count; @@ -3771,11 +3781,14 @@ static void sm4_register_from_deref(struct hlsl_ctx *ctx, struct vkd3d_shader_re static void sm4_src_from_deref(struct hlsl_ctx *ctx, struct sm4_src_register *src, const struct hlsl_deref *deref, unsigned int map_writemask) { - unsigned int writemask; + unsigned int writemask, hlsl_swizzle; sm4_register_from_deref(ctx, &src->reg, &writemask, &src->swizzle_type, deref); if (src->swizzle_type == VKD3D_SM4_SWIZZLE_VEC4) - src->swizzle = hlsl_map_swizzle(hlsl_swizzle_from_writemask(writemask), map_writemask); + { + hlsl_swizzle = hlsl_map_swizzle(hlsl_swizzle_from_writemask(writemask), map_writemask); + src->swizzle = swizzle_from_sm4(hlsl_swizzle); + } } static void sm4_register_from_node(struct vkd3d_shader_register *reg, unsigned int *writemask, @@ -3800,6 +3813,7 @@ static void sm4_dst_from_node(struct vkd3d_shader_dst_param *dst, const struct h static void sm4_src_from_constant_value(struct sm4_src_register *src, const struct hlsl_constant_value *value, unsigned int width, unsigned int map_writemask) { + src->swizzle = VKD3D_SHADER_NO_SWIZZLE; src->swizzle_type = VKD3D_SM4_SWIZZLE_NONE; src->reg.type = VKD3DSPR_IMMCONST; if (width == 1) @@ -3825,7 +3839,7 @@ static void sm4_src_from_constant_value(struct sm4_src_register *src, static void sm4_src_from_node(struct sm4_src_register *src, const struct hlsl_ir_node *instr, unsigned int map_writemask) { - unsigned int writemask; + unsigned int writemask, hlsl_swizzle; if (instr->type == HLSL_IR_CONSTANT) { @@ -3837,7 +3851,10 @@ static void sm4_src_from_node(struct sm4_src_register *src, sm4_register_from_node(&src->reg, &writemask, &src->swizzle_type, instr); if (src->swizzle_type == VKD3D_SM4_SWIZZLE_VEC4) - src->swizzle = hlsl_map_swizzle(hlsl_swizzle_from_writemask(writemask), map_writemask); + { + hlsl_swizzle = hlsl_map_swizzle(hlsl_swizzle_from_writemask(writemask), map_writemask); + src->swizzle = swizzle_from_sm4(hlsl_swizzle); + } } static void sm4_write_dst_register(const struct tpf_writer *tpf, const struct vkd3d_shader_dst_param *dst) @@ -3902,7 +3919,7 @@ static void sm4_write_src_register(const struct tpf_writer *tpf, const struct sm if (reg_dim == VKD3D_SM4_DIMENSION_VEC4) { token |= (uint32_t)src->swizzle_type << VKD3D_SM4_SWIZZLE_TYPE_SHIFT; - token |= src->swizzle << VKD3D_SM4_SWIZZLE_SHIFT; + token |= swizzle_to_sm4(src->swizzle) << VKD3D_SM4_SWIZZLE_SHIFT; } if (src->mod) token |= VKD3D_SM4_EXTENDED_OPERAND; @@ -4031,7 +4048,7 @@ static void write_sm4_dcl_constant_buffer(const struct tpf_writer *tpf, const st .srcs[0].reg.idx[1].offset = (cbuffer->used_size + 3) / 4, .srcs[0].reg.idx_count = 2, .srcs[0].swizzle_type = VKD3D_SM4_SWIZZLE_VEC4, - .srcs[0].swizzle = HLSL_SWIZZLE(X, Y, Z, W), + .srcs[0].swizzle = VKD3D_SHADER_NO_SWIZZLE, .src_count = 1, }; write_sm4_instruction(tpf, &instr); @@ -5307,8 +5324,8 @@ static void write_sm4_loop(const struct tpf_writer *tpf, const struct hlsl_ir_lo } static void write_sm4_gather(const struct tpf_writer *tpf, const struct hlsl_ir_node *dst, - const struct hlsl_deref *resource, const struct hlsl_deref *sampler, const struct hlsl_ir_node *coords, - unsigned int swizzle, const struct hlsl_ir_node *texel_offset) + const struct hlsl_deref *resource, const struct hlsl_deref *sampler, + const struct hlsl_ir_node *coords, DWORD swizzle, const struct hlsl_ir_node *texel_offset) { struct sm4_src_register *src; struct sm4_instruction instr; @@ -5386,22 +5403,22 @@ static void write_sm4_resource_load(const struct tpf_writer *tpf, const struct h case HLSL_RESOURCE_GATHER_RED: write_sm4_gather(tpf, &load->node, &load->resource, &load->sampler, coords, - HLSL_SWIZZLE(X, X, X, X), texel_offset); + VKD3D_SHADER_SWIZZLE(X, X, X, X), texel_offset); break; case HLSL_RESOURCE_GATHER_GREEN: write_sm4_gather(tpf, &load->node, &load->resource, &load->sampler, coords, - HLSL_SWIZZLE(Y, Y, Y, Y), texel_offset); + VKD3D_SHADER_SWIZZLE(Y, Y, Y, Y), texel_offset); break; case HLSL_RESOURCE_GATHER_BLUE: write_sm4_gather(tpf, &load->node, &load->resource, &load->sampler, coords, - HLSL_SWIZZLE(Z, Z, Z, Z), texel_offset); + VKD3D_SHADER_SWIZZLE(Z, Z, Z, Z), texel_offset); break; case HLSL_RESOURCE_GATHER_ALPHA: write_sm4_gather(tpf, &load->node, &load->resource, &load->sampler, coords, - HLSL_SWIZZLE(W, W, W, W), texel_offset); + VKD3D_SHADER_SWIZZLE(W, W, W, W), texel_offset); break; case HLSL_RESOURCE_SAMPLE_INFO: @@ -5454,8 +5471,8 @@ static void write_sm4_store(const struct tpf_writer *tpf, const struct hlsl_ir_s static void write_sm4_swizzle(const struct tpf_writer *tpf, const struct hlsl_ir_swizzle *swizzle) { + unsigned int writemask, hlsl_swizzle; struct sm4_instruction instr; - unsigned int writemask; memset(&instr, 0, sizeof(instr)); instr.opcode = VKD3D_SM4_OP_MOV; @@ -5464,8 +5481,9 @@ static void write_sm4_swizzle(const struct tpf_writer *tpf, const struct hlsl_ir instr.dst_count = 1; sm4_register_from_node(&instr.srcs[0].reg, &writemask, &instr.srcs[0].swizzle_type, swizzle->val.node); - instr.srcs[0].swizzle = hlsl_map_swizzle(hlsl_combine_swizzles(hlsl_swizzle_from_writemask(writemask), + hlsl_swizzle = hlsl_map_swizzle(hlsl_combine_swizzles(hlsl_swizzle_from_writemask(writemask), swizzle->swizzle, swizzle->node.data_type->dimx), instr.dsts[0].write_mask); + instr.srcs[0].swizzle = swizzle_from_sm4(hlsl_swizzle); instr.src_count = 1; write_sm4_instruction(tpf, &instr);
1
0
0
0
Francisco Casas : vkd3d-shader/tpf: Replace sm4_dst_register with vkd3d_shader_dst_param.
by Alexandre Julliard
28 Sep '23
28 Sep '23
Module: vkd3d Branch: master Commit: ef9ec28eb04fc1fcc16e851670e4940d7e9c7afe URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/ef9ec28eb04fc1fcc16e851670e49…
Author: Francisco Casas <fcasas(a)codeweavers.com> Date: Mon Jul 17 18:08:54 2023 -0400 vkd3d-shader/tpf: Replace sm4_dst_register with vkd3d_shader_dst_param. --- libs/vkd3d-shader/tpf.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/libs/vkd3d-shader/tpf.c b/libs/vkd3d-shader/tpf.c index 718667b3..a63f0d65 100644 --- a/libs/vkd3d-shader/tpf.c +++ b/libs/vkd3d-shader/tpf.c @@ -3610,11 +3610,7 @@ struct sm4_instruction struct sm4_instruction_modifier modifiers[1]; unsigned int modifier_count; - struct sm4_dst_register - { - struct vkd3d_shader_register reg; - unsigned int write_mask; - } dsts[2]; + struct vkd3d_shader_dst_param dsts[2]; unsigned int dst_count; struct sm4_src_register @@ -3794,7 +3790,7 @@ static void sm4_register_from_node(struct vkd3d_shader_register *reg, unsigned i *writemask = instr->reg.writemask; } -static void sm4_dst_from_node(struct sm4_dst_register *dst, const struct hlsl_ir_node *instr) +static void sm4_dst_from_node(struct vkd3d_shader_dst_param *dst, const struct hlsl_ir_node *instr) { unsigned int swizzle_type; @@ -3844,7 +3840,7 @@ static void sm4_src_from_node(struct sm4_src_register *src, src->swizzle = hlsl_map_swizzle(hlsl_swizzle_from_writemask(writemask), map_writemask); } -static void sm4_write_dst_register(const struct tpf_writer *tpf, const struct sm4_dst_register *dst) +static void sm4_write_dst_register(const struct tpf_writer *tpf, const struct vkd3d_shader_dst_param *dst) { const struct vkd3d_sm4_register_type_info *register_type_info; struct vkd3d_bytecode_buffer *buffer = tpf->buffer; @@ -3934,7 +3930,7 @@ static void sm4_write_src_register(const struct tpf_writer *tpf, const struct sm } } -static uint32_t sm4_dst_register_order(const struct sm4_dst_register *dst) +static uint32_t vkd3d_shader_dst_param_order(const struct vkd3d_shader_dst_param *dst) { uint32_t order = 1; if (dst->reg.type == VKD3DSPR_IMMCONST) @@ -3962,7 +3958,7 @@ static void write_sm4_instruction(const struct tpf_writer *tpf, const struct sm4 size += instr->modifier_count; for (i = 0; i < instr->dst_count; ++i) - size += sm4_dst_register_order(&instr->dsts[i]); + size += vkd3d_shader_dst_param_order(&instr->dsts[i]); for (i = 0; i < instr->src_count; ++i) size += sm4_src_register_order(&instr->srcs[i]); size += instr->idx_count;
1
0
0
0
Francisco Casas : vkd3d-shader/tpf: Rename sm4_dst_register.writemask to write_mask.
by Alexandre Julliard
28 Sep '23
28 Sep '23
Module: vkd3d Branch: master Commit: d41d8f8771f31ef3dae76b71e35e7cf9bcdc32b9 URL:
https://gitlab.winehq.org/wine/vkd3d/-/commit/d41d8f8771f31ef3dae76b71e35e7…
Author: Francisco Casas <fcasas(a)codeweavers.com> Date: Mon Jul 17 17:58:31 2023 -0400 vkd3d-shader/tpf: Rename sm4_dst_register.writemask to write_mask. --- libs/vkd3d-shader/tpf.c | 56 ++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 28 deletions(-)
1
0
0
0
Rémi Bernon : dmime: Return DMUS_E_AUDIOPATH_INACTIVE when audio paths are not enabled.
by Alexandre Julliard
28 Sep '23
28 Sep '23
Module: wine Branch: master Commit: 9e0487c4cc36cdbf915d35222c875d23f54958ae URL:
https://gitlab.winehq.org/wine/wine/-/commit/9e0487c4cc36cdbf915d35222c875d…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 25 19:08:34 2023 +0200 dmime: Return DMUS_E_AUDIOPATH_INACTIVE when audio paths are not enabled. --- dlls/dmime/performance.c | 102 ++++++++++++++++++++++------------------------- 1 file changed, 47 insertions(+), 55 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index 7b606998616..bdb7475370a 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -1096,45 +1096,41 @@ static HRESULT WINAPI performance_ClonePMsg(IDirectMusicPerformance8 *iface, DMU } static HRESULT WINAPI performance_CreateAudioPath(IDirectMusicPerformance8 *iface, - IUnknown *pSourceConfig, BOOL fActivate, IDirectMusicAudioPath **ppNewPath) + IUnknown *pSourceConfig, BOOL fActivate, IDirectMusicAudioPath **ret_iface) { - struct performance *This = impl_from_IDirectMusicPerformance8(iface); - IDirectMusicAudioPath *pPath; + struct performance *This = impl_from_IDirectMusicPerformance8(iface); + IDirectMusicAudioPath *pPath; - FIXME("(%p, %p, %d, %p): stub\n", This, pSourceConfig, fActivate, ppNewPath); + FIXME("(%p, %p, %d, %p): stub\n", This, pSourceConfig, fActivate, ret_iface); - if (NULL == ppNewPath) { - return E_POINTER; - } + if (!ret_iface) return E_POINTER; + if (!This->audio_paths_enabled) return DMUS_E_AUDIOPATH_INACTIVE; - create_dmaudiopath(&IID_IDirectMusicAudioPath, (void**)&pPath); - set_audiopath_perf_pointer(pPath, iface); + create_dmaudiopath(&IID_IDirectMusicAudioPath, (void **)&pPath); + set_audiopath_perf_pointer(pPath, iface); - /** TODO */ - - *ppNewPath = pPath; - - return IDirectMusicAudioPath_Activate(*ppNewPath, fActivate); + /** TODO */ + *ret_iface = pPath; + return IDirectMusicAudioPath_Activate(*ret_iface, fActivate); } static HRESULT WINAPI performance_CreateStandardAudioPath(IDirectMusicPerformance8 *iface, - DWORD dwType, DWORD pchannel_count, BOOL fActivate, IDirectMusicAudioPath **ppNewPath) + DWORD dwType, DWORD pchannel_count, BOOL fActivate, IDirectMusicAudioPath **ret_iface) { - struct performance *This = impl_from_IDirectMusicPerformance8(iface); - IDirectMusicAudioPath *pPath; - DSBUFFERDESC desc; - WAVEFORMATEX format; - DMUS_PORTPARAMS params = {0}; - IDirectSoundBuffer *buffer, *primary_buffer; - HRESULT hr = S_OK; + struct performance *This = impl_from_IDirectMusicPerformance8(iface); + IDirectMusicAudioPath *pPath; + DSBUFFERDESC desc; + WAVEFORMATEX format; + DMUS_PORTPARAMS params = {0}; + IDirectSoundBuffer *buffer, *primary_buffer; + HRESULT hr = S_OK; - FIXME("(%p)->(%ld, %ld, %d, %p): semi-stub\n", This, dwType, pchannel_count, fActivate, ppNewPath); + FIXME("(%p)->(%ld, %ld, %d, %p): semi-stub\n", This, dwType, pchannel_count, fActivate, ret_iface); - if (NULL == ppNewPath) { - return E_POINTER; - } + if (!ret_iface) return E_POINTER; + if (!This->audio_paths_enabled) return DMUS_E_AUDIOPATH_INACTIVE; - *ppNewPath = NULL; + *ret_iface = NULL; /* Secondary buffer description */ memset(&format, 0, sizeof(format)); @@ -1204,46 +1200,42 @@ static HRESULT WINAPI performance_CreateStandardAudioPath(IDirectMusicPerformanc set_audiopath_dsound_buffer(pPath, buffer); set_audiopath_primary_dsound_buffer(pPath, primary_buffer); - *ppNewPath = pPath; - - TRACE(" returning IDirectMusicAudioPath interface at %p.\n", *ppNewPath); - - return IDirectMusicAudioPath_Activate(*ppNewPath, fActivate); + *ret_iface = pPath; + TRACE(" returning IDirectMusicAudioPath interface at %p.\n", *ret_iface); + return IDirectMusicAudioPath_Activate(*ret_iface, fActivate); } -static HRESULT WINAPI performance_SetDefaultAudioPath(IDirectMusicPerformance8 *iface, IDirectMusicAudioPath *pAudioPath) +static HRESULT WINAPI performance_SetDefaultAudioPath(IDirectMusicPerformance8 *iface, IDirectMusicAudioPath *audio_path) { - struct performance *This = impl_from_IDirectMusicPerformance8(iface); + struct performance *This = impl_from_IDirectMusicPerformance8(iface); - FIXME("(%p, %p): semi-stub\n", This, pAudioPath); + FIXME("(%p, %p): semi-stub\n", This, audio_path); - if (This->pDefaultPath) { - IDirectMusicAudioPath_Release(This->pDefaultPath); - This->pDefaultPath = NULL; - } - This->pDefaultPath = pAudioPath; - if (This->pDefaultPath) { - IDirectMusicAudioPath_AddRef(This->pDefaultPath); - set_audiopath_perf_pointer(This->pDefaultPath, iface); - } + if (!This->audio_paths_enabled) return DMUS_E_AUDIOPATH_INACTIVE; - return S_OK; + if (This->pDefaultPath) IDirectMusicAudioPath_Release(This->pDefaultPath); + if ((This->pDefaultPath = audio_path)) + { + IDirectMusicAudioPath_AddRef(This->pDefaultPath); + set_audiopath_perf_pointer(This->pDefaultPath, iface); + } + + return S_OK; } static HRESULT WINAPI performance_GetDefaultAudioPath(IDirectMusicPerformance8 *iface, - IDirectMusicAudioPath **ppAudioPath) + IDirectMusicAudioPath **ret_iface) { - struct performance *This = impl_from_IDirectMusicPerformance8(iface); + struct performance *This = impl_from_IDirectMusicPerformance8(iface); - FIXME("(%p, %p): semi-stub (%p)\n", This, ppAudioPath, This->pDefaultPath); + FIXME("(%p, %p): semi-stub (%p)\n", This, ret_iface, This->pDefaultPath); - if (NULL != This->pDefaultPath) { - *ppAudioPath = This->pDefaultPath; - IDirectMusicAudioPath_AddRef(*ppAudioPath); - } else { - *ppAudioPath = NULL; - } - return S_OK; + if (!ret_iface) return E_POINTER; + if (!This->audio_paths_enabled) return DMUS_E_AUDIOPATH_INACTIVE; + + if ((*ret_iface = This->pDefaultPath)) IDirectMusicAudioPath_AddRef(*ret_iface); + + return S_OK; } static HRESULT WINAPI performance_GetParamEx(IDirectMusicPerformance8 *iface, REFGUID rguidType, DWORD dwTrackID,
1
0
0
0
Rémi Bernon : dmime: Return DMUS_E_AUDIOPATHS_IN_USE when audio paths are in use.
by Alexandre Julliard
28 Sep '23
28 Sep '23
Module: wine Branch: master Commit: 0fb4e5ec479bc7424c3818d51884387b15e90e52 URL:
https://gitlab.winehq.org/wine/wine/-/commit/0fb4e5ec479bc7424c3818d5188438…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 25 18:49:40 2023 +0200 dmime: Return DMUS_E_AUDIOPATHS_IN_USE when audio paths are in use. --- dlls/dmime/performance.c | 28 ++++++++++++++++------------ dlls/dmime/tests/dmime.c | 4 ++-- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index a8c2016802c..7b606998616 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -50,6 +50,7 @@ struct performance /* performance channels */ struct wine_rb_tree pchannels; + BOOL audio_paths_enabled; IDirectMusicAudioPath *pDefaultPath; HANDLE hNotification; REFERENCE_TIME rtMinimum; @@ -730,8 +731,8 @@ static HRESULT WINAPI performance_AddPort(IDirectMusicPerformance8 *iface, IDire FIXME("(%p, %p): semi-stub\n", This, port); - if (!This->dmusic) - return DMUS_E_NOT_INIT; + if (!This->dmusic) return DMUS_E_NOT_INIT; + if (This->audio_paths_enabled) return DMUS_E_AUDIOPATHS_IN_USE; if (!port) { DMUS_PORTPARAMS params = { @@ -753,11 +754,13 @@ static HRESULT WINAPI performance_AddPort(IDirectMusicPerformance8 *iface, IDire static HRESULT WINAPI performance_RemovePort(IDirectMusicPerformance8 *iface, IDirectMusicPort *pPort) { - struct performance *This = impl_from_IDirectMusicPerformance8(iface); + struct performance *This = impl_from_IDirectMusicPerformance8(iface); - FIXME("(%p, %p): stub\n", This, pPort); - IDirectMusicPort_Release (pPort); - return S_OK; + if (This->audio_paths_enabled) return DMUS_E_AUDIOPATHS_IN_USE; + + FIXME("(%p, %p): stub\n", This, pPort); + IDirectMusicPort_Release(pPort); + return S_OK; } static HRESULT WINAPI performance_AssignPChannelBlock(IDirectMusicPerformance8 *iface, @@ -767,10 +770,9 @@ static HRESULT WINAPI performance_AssignPChannelBlock(IDirectMusicPerformance8 * FIXME("(%p, %ld, %p, %ld): semi-stub\n", This, block_num, port, group); - if (!port) - return E_POINTER; - if (block_num > MAXDWORD / 16) - return E_INVALIDARG; + if (!port) return E_POINTER; + 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); @@ -785,8 +787,8 @@ static HRESULT WINAPI performance_AssignPChannel(IDirectMusicPerformance8 *iface FIXME("(%p)->(%ld, %p, %ld, %ld) semi-stub\n", This, pchannel, port, group, channel); - if (!port) - return E_POINTER; + 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); if (block) { @@ -959,6 +961,7 @@ static HRESULT WINAPI performance_CloseDown(IDirectMusicPerformance8 *iface) IDirectMusic8_Release(This->dmusic); This->dmusic = NULL; } + This->audio_paths_enabled = FALSE; return S_OK; } @@ -1027,6 +1030,7 @@ static HRESULT WINAPI performance_InitAudio(IDirectMusicPerformance8 *iface, IDi dsound ? *dsound : NULL, hwnd))) return hr; + This->audio_paths_enabled = TRUE; if (default_path_type) { hr = IDirectMusicPerformance8_CreateStandardAudioPath(iface, default_path_type, diff --git a/dlls/dmime/tests/dmime.c b/dlls/dmime/tests/dmime.c index c1043fe90f3..119bfc74fc5 100644 --- a/dlls/dmime/tests/dmime.c +++ b/dlls/dmime/tests/dmime.c @@ -1937,9 +1937,9 @@ static void test_performance_InitAudio(void) ok(hr == S_OK, "PChannelInfo failed, got %#lx\n", hr); ok(port != NULL, "IDirectMusicPort not set\n"); hr = IDirectMusicPerformance8_AssignPChannel(performance, 0, port, 0, 0); - todo_wine ok(hr == DMUS_E_AUDIOPATHS_IN_USE, "AssignPChannel failed (%#lx)\n", hr); + ok(hr == DMUS_E_AUDIOPATHS_IN_USE, "AssignPChannel failed (%#lx)\n", hr); hr = IDirectMusicPerformance8_AssignPChannelBlock(performance, 0, port, 0); - todo_wine ok(hr == DMUS_E_AUDIOPATHS_IN_USE, "AssignPChannelBlock failed (%#lx)\n", hr); + ok(hr == DMUS_E_AUDIOPATHS_IN_USE, "AssignPChannelBlock failed (%#lx)\n", hr); IDirectMusicPort_Release(port); hr = IDirectMusicPerformance8_GetDefaultAudioPath(performance, &path);
1
0
0
0
Rémi Bernon : dmime: Initialize performance in Init rather than InitAudio.
by Alexandre Julliard
28 Sep '23
28 Sep '23
Module: wine Branch: master Commit: 9788fb6911ab56186c95edd6fe487f48ab98e118 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9788fb6911ab56186c95edd6fe487f…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 25 18:49:40 2023 +0200 dmime: Initialize performance in Init rather than InitAudio. --- dlls/dmime/performance.c | 148 ++++++++++++++++++++++++----------------------- dlls/dmime/tests/dmime.c | 6 +- 2 files changed, 79 insertions(+), 75 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index e2d070b0fbe..a8c2016802c 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -40,10 +40,9 @@ struct performance IDirectMusicGraph IDirectMusicGraph_iface; IDirectMusicTool IDirectMusicTool_iface; LONG ref; - IDirectMusic8 *dmusic; + IDirectMusic *dmusic; IDirectSound *dsound; IDirectMusicGraph *pToolGraph; - DMUS_AUDIOPARAMS params; BOOL fAutoDownload; char cMasterGrooveLevel; float fMasterTempo; @@ -314,14 +313,74 @@ static ULONG WINAPI performance_Release(IDirectMusicPerformance8 *iface) return ref; } -/* IDirectMusicPerformanceImpl IDirectMusicPerformance Interface part: */ +static HRESULT performance_init_dsound(struct performance *This, HWND hwnd) +{ + IDirectSound *dsound; + HRESULT hr; + + if (FAILED(hr = DirectSoundCreate(NULL, &dsound, NULL))) return hr; + + if (!hwnd) hwnd = GetForegroundWindow(); + hr = IDirectSound_SetCooperativeLevel(dsound, hwnd, DSSCL_PRIORITY); + + if (SUCCEEDED(hr)) This->dsound = dsound; + else IDirectSound_Release(dsound); + + return hr; +} + +static HRESULT performance_init_dmusic(struct performance *This, IDirectSound *dsound) +{ + IDirectMusic *dmusic; + HRESULT hr; + + if (FAILED(hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, + &IID_IDirectMusic8, (void **)&dmusic))) + return hr; + + hr = IDirectMusic_SetDirectSound(dmusic, dsound, NULL); + + if (SUCCEEDED(hr)) This->dmusic = dmusic; + else IDirectSound_Release(dmusic); + + return hr; +} + static HRESULT WINAPI performance_Init(IDirectMusicPerformance8 *iface, IDirectMusic **dmusic, IDirectSound *dsound, HWND hwnd) { + struct performance *This = impl_from_IDirectMusicPerformance8(iface); + HRESULT hr; + TRACE("(%p, %p, %p, %p)\n", iface, dmusic, dsound, hwnd); - return IDirectMusicPerformance8_InitAudio(iface, dmusic, dsound ? &dsound : NULL, hwnd, 0, 0, - 0, NULL); + if (This->dmusic) return DMUS_E_ALREADY_INITED; + + if ((This->dsound = dsound)) IDirectMusic8_AddRef(This->dsound); + else if (FAILED(hr = performance_init_dsound(This, hwnd))) return hr; + + if (dmusic && (This->dmusic = *dmusic)) IDirectMusic_AddRef(This->dmusic); + else if (FAILED(hr = performance_init_dmusic(This, This->dsound))) + { + IDirectMusicPerformance_CloseDown(iface); + return hr; + } + + if (FAILED(hr = IDirectMusic_GetMasterClock(This->dmusic, NULL, &This->master_clock)) + || FAILED(hr = IDirectMusicPerformance8_GetTime(iface, &This->init_time, NULL))) + { + IDirectMusicPerformance_CloseDown(iface); + return hr; + } + + PostMessageToProcessMsgThread(This, PROCESSMSG_START); + + if (dmusic && !*dmusic) + { + *dmusic = This->dmusic; + IDirectMusic_AddRef(*dmusic); + } + return S_OK; } static HRESULT WINAPI performance_PlaySegment(IDirectMusicPerformance8 *iface, IDirectMusicSegment *pSegment, @@ -900,6 +959,7 @@ static HRESULT WINAPI performance_CloseDown(IDirectMusicPerformance8 *iface) IDirectMusic8_Release(This->dmusic); This->dmusic = NULL; } + return S_OK; } @@ -960,57 +1020,21 @@ static HRESULT WINAPI performance_InitAudio(IDirectMusicPerformance8 *iface, IDi TRACE("(%p, %p, %p, %p, %lx, %lu, %lx, %p)\n", This, dmusic, dsound, hwnd, default_path_type, num_channels, flags, params); - if (This->dmusic) - return DMUS_E_ALREADY_INITED; - - if (!dmusic || !*dmusic) { - hr = CoCreateInstance(&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8, - (void **)&This->dmusic); - if (FAILED(hr)) - return hr; - } else { - This->dmusic = (IDirectMusic8 *)*dmusic; - IDirectMusic8_AddRef(This->dmusic); - } - - if (FAILED(hr = IDirectMusic_GetMasterClock(This->dmusic, NULL, &This->master_clock))) - goto error; + if (flags) FIXME("flags parameter not used\n"); + if (params) FIXME("params parameter not used\n"); - if (!dsound || !*dsound) { - hr = DirectSoundCreate8(NULL, (IDirectSound8 **)&This->dsound, NULL); - if (FAILED(hr)) - goto error; - hr = IDirectSound_SetCooperativeLevel(This->dsound, hwnd ? hwnd : GetForegroundWindow(), - DSSCL_PRIORITY); - if (FAILED(hr)) - goto error; - } else { - This->dsound = *dsound; - IDirectSound_AddRef(This->dsound); - } + if (FAILED(hr = IDirectMusicPerformance8_Init(iface, dmusic && *dmusic ? dmusic : NULL, + dsound ? *dsound : NULL, hwnd))) + return hr; - hr = IDirectMusic8_SetDirectSound(This->dmusic, This->dsound, NULL); - if (FAILED(hr)) - goto error; - - if (!params) { - This->params.dwSize = sizeof(DMUS_AUDIOPARAMS); - This->params.fInitNow = FALSE; - This->params.dwValidData = DMUS_AUDIOPARAMS_FEATURES | DMUS_AUDIOPARAMS_VOICES | - DMUS_AUDIOPARAMS_SAMPLERATE | DMUS_AUDIOPARAMS_DEFAULTSYNTH; - This->params.dwVoices = 64; - This->params.dwSampleRate = 22050; - This->params.dwFeatures = flags; - This->params.clsidDefaultSynth = CLSID_DirectMusicSynthSink; - } else - This->params = *params; - - if (default_path_type) { + if (default_path_type) + { hr = IDirectMusicPerformance8_CreateStandardAudioPath(iface, default_path_type, num_channels, FALSE, &This->pDefaultPath); - if (FAILED(hr)) { - IDirectMusic8_SetDirectSound(This->dmusic, NULL, NULL); - goto error; + if (FAILED(hr)) + { + IDirectMusicPerformance_CloseDown(iface); + return hr; } } @@ -1023,27 +1047,7 @@ static HRESULT WINAPI performance_InitAudio(IDirectMusicPerformance8 *iface, IDi IDirectMusic_AddRef(*dmusic); } - if (FAILED(hr = IDirectMusicPerformance8_GetTime(iface, &This->init_time, NULL))) return hr; - - PostMessageToProcessMsgThread(This, PROCESSMSG_START); - return S_OK; - -error: - if (This->master_clock) - { - IReferenceClock_Release(This->master_clock); - This->master_clock = NULL; - } - if (This->dsound) { - IDirectSound_Release(This->dsound); - This->dsound = NULL; - } - if (This->dmusic) { - IDirectMusic8_Release(This->dmusic); - This->dmusic = NULL; - } - return hr; } static HRESULT WINAPI performance_PlaySegmentEx(IDirectMusicPerformance8 *iface, IUnknown *pSource, diff --git a/dlls/dmime/tests/dmime.c b/dlls/dmime/tests/dmime.c index f016af2f9e6..c1043fe90f3 100644 --- a/dlls/dmime/tests/dmime.c +++ b/dlls/dmime/tests/dmime.c @@ -2009,7 +2009,7 @@ static void test_performance_InitAudio(void) hr = IDirectMusicPerformance8_InitAudio(performance, &dmusic, &dsound, NULL, 0, 64, 0, NULL); ok(hr == S_OK, "InitAudio failed: %#lx\n", hr); ref = get_refcount(dsound); - todo_wine ok(ref == 2, "dsound ref count got %ld expected 2\n", ref); + ok(ref == 2, "dsound ref count got %ld expected 2\n", ref); ref = get_refcount(dmusic); ok(ref == 2, "dmusic ref count got %ld expected 2\n", ref); destroy_performance(performance, dmusic, dsound); @@ -2023,7 +2023,7 @@ static void test_performance_InitAudio(void) hr = IDirectMusicPerformance8_InitAudio(performance, &dmusic, NULL, NULL, 0, 64, 0, NULL); ok(hr == S_OK, "InitAudio failed: %#lx\n", hr); ref = get_refcount(dsound); - todo_wine ok(ref == 2, "dsound ref count got %ld expected 2\n", ref); + ok(ref == 2, "dsound ref count got %ld expected 2\n", ref); ref = get_refcount(dmusic); ok(ref == 2, "dmusic ref count got %ld expected 2\n", ref); destroy_performance(performance, dmusic, dsound); @@ -2053,7 +2053,7 @@ static void test_performance_InitAudio(void) hr = IDirectMusicPort_SetNumChannelGroups(port, 1); ok(hr == S_OK, "SetNumChannelGroups failed: %#lx\n", hr); hr = IDirectMusicPerformance8_Init(performance, &dmusic, dsound, 0); - todo_wine ok(hr == S_OK, "Init failed: %#lx\n", hr); + ok(hr == S_OK, "Init failed: %#lx\n", hr); destroy_performance(performance, dmusic, dsound); /* InitAudio with perf channel count not a multiple of 16 rounds up */
1
0
0
0
Rémi Bernon : dmime: Set the port direct sound before activating it.
by Alexandre Julliard
28 Sep '23
28 Sep '23
Module: wine Branch: master Commit: 50b09dcf11b2939a5702104b6726d10ad44df43b URL:
https://gitlab.winehq.org/wine/wine/-/commit/50b09dcf11b2939a5702104b6726d1…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Mon Sep 25 19:10:17 2023 +0200 dmime: Set the port direct sound before activating it. --- dlls/dmime/performance.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index d8624427423..e2d070b0fbe 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -651,10 +651,14 @@ static HRESULT perf_dmport_create(struct performance *perf, DMUS_PORTPARAMS *par if (FAILED(hr = IDirectMusic8_CreatePort(perf->dmusic, &guid, params, &port, NULL))) return hr; - if (FAILED(hr = IDirectMusicPort_Activate(port, TRUE))) { + + if (FAILED(hr = IDirectMusicPort_SetDirectSound(port, perf->dsound, NULL)) + || FAILED(hr = IDirectMusicPort_Activate(port, TRUE))) + { IDirectMusicPort_Release(port); return hr; } + for (i = 0; i < params->dwChannelGroups; i++) pchannel_block_set(&perf->pchannels, i, port, i + 1, FALSE);
1
0
0
0
Rémi Bernon : dmime/tests: Test performance Init with a created port.
by Alexandre Julliard
28 Sep '23
28 Sep '23
Module: wine Branch: master Commit: 3400e41d5cca6a2eb869fad7cf2fc68680a1b11a URL:
https://gitlab.winehq.org/wine/wine/-/commit/3400e41d5cca6a2eb869fad7cf2fc6…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Thu Sep 28 08:26:45 2023 +0200 dmime/tests: Test performance Init with a created port. Final Fantasy VIII does this, more or less, and needs Init to succeed. --- dlls/dmime/tests/dmime.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/dlls/dmime/tests/dmime.c b/dlls/dmime/tests/dmime.c index 12056f15376..f016af2f9e6 100644 --- a/dlls/dmime/tests/dmime.c +++ b/dlls/dmime/tests/dmime.c @@ -1895,6 +1895,12 @@ static void test_parsedescriptor(void) static void test_performance_InitAudio(void) { + DMUS_PORTPARAMS params = + { + .dwSize = sizeof(params), + .dwValidParams = DMUS_PORTPARAMS_EFFECTS, + .dwEffectFlags = 1, + }; IDirectMusicPerformance8 *performance; IDirectMusic *dmusic; IDirectSound *dsound; @@ -2036,6 +2042,20 @@ static void test_performance_InitAudio(void) ok(ref == 2, "dmusic ref count got %ld expected 2\n", ref); destroy_performance(performance, dmusic, dsound); + /* Provided dmusic and dsound, dmusic initialized with SetDirectSound, port created and activated */ + create_performance(&performance, &dmusic, &dsound, TRUE); + hr = IDirectMusic_SetDirectSound(dmusic, dsound, NULL); + ok(hr == S_OK, "SetDirectSound failed: %#lx\n", hr); + hr = IDirectMusic_CreatePort(dmusic, &CLSID_DirectMusicSynth, ¶ms, &port, NULL); + ok(hr == S_OK, "CreatePort failed: %#lx\n", hr); + hr = IDirectMusicPort_Activate(port, TRUE); + ok(hr == S_OK, "Activate failed: %#lx\n", hr); + hr = IDirectMusicPort_SetNumChannelGroups(port, 1); + ok(hr == S_OK, "SetNumChannelGroups failed: %#lx\n", hr); + hr = IDirectMusicPerformance8_Init(performance, &dmusic, dsound, 0); + todo_wine ok(hr == S_OK, "Init failed: %#lx\n", hr); + destroy_performance(performance, dmusic, dsound); + /* InitAudio with perf channel count not a multiple of 16 rounds up */ create_performance(&performance, NULL, NULL, TRUE); hr = IDirectMusicPerformance8_InitAudio(performance, NULL, NULL, NULL,
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
92
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
Results per page:
10
25
50
100
200