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
February 2022
----- 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
2 participants
1495 discussions
Start a n
N
ew thread
Huw Davies : winealsa: Store the session master volume in the stream.
by Alexandre Julliard
21 Feb '22
21 Feb '22
Module: wine Branch: master Commit: 4f8a2e456b805159ffd459fbdc23bb4c76e018da URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4f8a2e456b805159ffd459fb…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Feb 18 08:29:30 2022 +0000 winealsa: Store the session master volume in the stream. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winealsa.drv/mmdevdrv.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index 222decdb150..959157ade87 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -327,7 +327,7 @@ static void set_stream_volumes(ACImpl *This) unsigned int i; for(i = 0; i < stream->fmt->nChannels; i++) - stream->vols[i] = This->vols[i] * This->session->channel_vols[i]; + stream->vols[i] = This->vols[i] * This->session->channel_vols[i] * This->session->master_vol; } HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids_out, GUID **guids_out, @@ -1472,7 +1472,6 @@ static BYTE *remap_channels(struct alsa_stream *stream, BYTE *buf, snd_pcm_ufram static void adjust_buffer_volume(const ACImpl *This, BYTE *buf, snd_pcm_uframes_t frames, BOOL mute) { struct alsa_stream *stream = This->stream; - float vol[ARRAY_SIZE(stream->alsa_channel_map)]; BOOL adjust = FALSE; UINT32 i, channels; BYTE *end; @@ -1492,8 +1491,7 @@ static void adjust_buffer_volume(const ACImpl *This, BYTE *buf, snd_pcm_uframes_ /* Adjust the buffer based on the volume for each channel */ for (i = 0; i < channels; i++) { - vol[i] = stream->vols[i] * This->session->master_vol; - adjust |= vol[i] != 1.0f; + adjust |= stream->vols[i] != 1.0f; } if (!adjust) return; @@ -1510,7 +1508,7 @@ static void adjust_buffer_volume(const ACImpl *This, BYTE *buf, snd_pcm_uframes_ do \ { \ for (i = 0; i < channels; i++) \ - p[i] = p[i] * vol[i]; \ + p[i] = p[i] * stream->vols[i]; \ p += i; \ } while ((BYTE*)p != end); \ } while (0) @@ -1548,7 +1546,7 @@ static void adjust_buffer_volume(const ACImpl *This, BYTE *buf, snd_pcm_uframes_ v[3] = q[2] & ~0xff; for (k = 0; k < 4; k++) { - v[k] = (INT32)((INT32)v[k] * vol[i]); + v[k] = (INT32)((INT32)v[k] * stream->vols[i]); v[k] &= mask; if (++i == channels) i = 0; } @@ -1559,7 +1557,7 @@ static void adjust_buffer_volume(const ACImpl *This, BYTE *buf, snd_pcm_uframes_ p = (BYTE*)q; while (p != end) { - UINT32 v = (INT32)((INT32)(p[0] << 8 | p[1] << 16 | p[2] << 24) * vol[i]); + UINT32 v = (INT32)((INT32)(p[0] << 8 | p[1] << 16 | p[2] << 24) * stream->vols[i]); v &= mask; *p++ = v >> 8 & 0xff; *p++ = v >> 16 & 0xff; @@ -1575,7 +1573,7 @@ static void adjust_buffer_volume(const ACImpl *This, BYTE *buf, snd_pcm_uframes_ do { for (i = 0; i < channels; i++) - p[i] = (int)((p[i] - 128) * vol[i]) + 128; + p[i] = (int)((p[i] - 128) * stream->vols[i]) + 128; p += i; } while ((BYTE*)p != end); break; @@ -3086,6 +3084,7 @@ static HRESULT WINAPI SimpleAudioVolume_SetMasterVolume( { AudioSessionWrapper *This = impl_from_ISimpleAudioVolume(iface); AudioSession *session = This->session; + ACImpl *client; TRACE("(%p)->(%f, %s)\n", session, level, wine_dbgstr_guid(context)); @@ -3101,6 +3100,9 @@ static HRESULT WINAPI SimpleAudioVolume_SetMasterVolume( session->master_vol = level; + LIST_FOR_EACH_ENTRY(client, &session->clients, ACImpl, entry) + set_stream_volumes(client); + LeaveCriticalSection(&g_sessions_lock); return S_OK;
1
0
0
0
Huw Davies : winealsa: Store the session channel vols in the stream.
by Alexandre Julliard
21 Feb '22
21 Feb '22
Module: wine Branch: master Commit: a4de96a1f0d2d17329e8f94084e328069d73c6e7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a4de96a1f0d2d17329e8f940…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Feb 18 08:29:29 2022 +0000 winealsa: Store the session channel vols in the stream. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winealsa.drv/mmdevdrv.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index 8f198531cc0..222decdb150 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -327,7 +327,7 @@ static void set_stream_volumes(ACImpl *This) unsigned int i; for(i = 0; i < stream->fmt->nChannels; i++) - stream->vols[i] = This->vols[i]; + stream->vols[i] = This->vols[i] * This->session->channel_vols[i]; } HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids_out, GUID **guids_out, @@ -1493,7 +1493,6 @@ static void adjust_buffer_volume(const ACImpl *This, BYTE *buf, snd_pcm_uframes_ for (i = 0; i < channels; i++) { vol[i] = stream->vols[i] * This->session->master_vol; - vol[i] *= This->session->channel_vols[i]; adjust |= vol[i] != 1.0f; } if (!adjust) return; @@ -3375,6 +3374,7 @@ static HRESULT WINAPI ChannelAudioVolume_SetChannelVolume( { AudioSessionWrapper *This = impl_from_IChannelAudioVolume(iface); AudioSession *session = This->session; + ACImpl *client; TRACE("(%p)->(%d, %f, %s)\n", session, index, level, wine_dbgstr_guid(context)); @@ -3394,6 +3394,9 @@ static HRESULT WINAPI ChannelAudioVolume_SetChannelVolume( session->channel_vols[index] = level; + LIST_FOR_EACH_ENTRY(client, &session->clients, ACImpl, entry) + set_stream_volumes(client); + LeaveCriticalSection(&g_sessions_lock); return S_OK; @@ -3425,6 +3428,7 @@ static HRESULT WINAPI ChannelAudioVolume_SetAllVolumes( AudioSessionWrapper *This = impl_from_IChannelAudioVolume(iface); AudioSession *session = This->session; unsigned int i; + ACImpl *client; TRACE("(%p)->(%d, %p, %s)\n", session, count, levels, wine_dbgstr_guid(context)); @@ -3445,6 +3449,9 @@ static HRESULT WINAPI ChannelAudioVolume_SetAllVolumes( for(i = 0; i < count; ++i) session->channel_vols[i] = levels[i]; + LIST_FOR_EACH_ENTRY(client, &session->clients, ACImpl, entry) + set_stream_volumes(client); + LeaveCriticalSection(&g_sessions_lock); return S_OK;
1
0
0
0
Huw Davies : winealsa: Remove an unnecessary check on the session channel count.
by Alexandre Julliard
21 Feb '22
21 Feb '22
Module: wine Branch: master Commit: 8130371614b9845f23a935912493d501bbfb6574 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8130371614b9845f23a93591…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Feb 18 08:29:28 2022 +0000 winealsa: Remove an unnecessary check on the session channel count. This must always be at least equal to any given stream's channels. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winealsa.drv/mmdevdrv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index d1f9a1d35a4..8f198531cc0 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -1491,13 +1491,11 @@ static void adjust_buffer_volume(const ACImpl *This, BYTE *buf, snd_pcm_uframes_ /* Adjust the buffer based on the volume for each channel */ for (i = 0; i < channels; i++) - vol[i] = stream->vols[i] * This->session->master_vol; - for (i = 0; i < min(channels, This->session->channel_count); i++) { + vol[i] = stream->vols[i] * This->session->master_vol; vol[i] *= This->session->channel_vols[i]; adjust |= vol[i] != 1.0f; } - while (i < channels) adjust |= vol[i++] != 1.0f; if (!adjust) return; /* Skip the frames we've already adjusted before */
1
0
0
0
Huw Davies : winealsa: Store the channel volumes in the stream.
by Alexandre Julliard
21 Feb '22
21 Feb '22
Module: wine Branch: master Commit: f608d78910894de739d4f7bba08f03f179b270e5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f608d78910894de739d4f7bb…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Feb 18 08:29:27 2022 +0000 winealsa: Store the channel volumes in the stream. Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winealsa.drv/mmdevdrv.c | 24 +++++++++++++++++++++++- dlls/winealsa.drv/unixlib.h | 1 + 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index 48694710719..d1f9a1d35a4 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -321,6 +321,15 @@ static snd_pcm_stream_t alsa_get_direction(EDataFlow flow) return (flow == eRender) ? SND_PCM_STREAM_PLAYBACK : SND_PCM_STREAM_CAPTURE; } +static void set_stream_volumes(ACImpl *This) +{ + struct alsa_stream *stream = This->stream; + unsigned int i; + + for(i = 0; i < stream->fmt->nChannels; i++) + stream->vols[i] = This->vols[i]; +} + HRESULT WINAPI AUDDRV_GetEndpointIDs(EDataFlow flow, WCHAR ***ids_out, GUID **guids_out, UINT *num, UINT *def_index) { @@ -591,6 +600,7 @@ static ULONG WINAPI AudioClient_Release(IAudioClient3 *iface) HeapFree(GetProcessHeap(), 0, stream->tmp_buffer); HeapFree(GetProcessHeap(), 0, stream->hw_params); CoTaskMemFree(stream->fmt); + HeapFree(GetProcessHeap(), 0, stream->vols); HeapFree(GetProcessHeap(), 0, stream); } HeapFree(GetProcessHeap(), 0, This); @@ -1171,6 +1181,14 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface, for(i = 0; i < This->channel_count; ++i) This->vols[i] = 1.f; + stream->vols = HeapAlloc(GetProcessHeap(), 0, fmt->nChannels * sizeof(float)); + if(!stream->vols){ + hr = E_OUTOFMEMORY; + goto exit; + } + for(i = 0; i < fmt->nChannels; ++i) + stream->vols[i] = 1.f; + stream->share = mode; stream->flags = flags; @@ -1194,11 +1212,13 @@ exit: stream->local_buffer = NULL; CoTaskMemFree(stream->fmt); stream->fmt = NULL; + HeapFree(GetProcessHeap(), 0, stream->vols); HeapFree(GetProcessHeap(), 0, stream); HeapFree(GetProcessHeap(), 0, This->vols); This->vols = NULL; }else{ This->stream = stream; + set_stream_volumes(This); } LeaveCriticalSection(&This->lock); @@ -1471,7 +1491,7 @@ static void adjust_buffer_volume(const ACImpl *This, BYTE *buf, snd_pcm_uframes_ /* Adjust the buffer based on the volume for each channel */ for (i = 0; i < channels; i++) - vol[i] = This->vols[i] * This->session->master_vol; + vol[i] = stream->vols[i] * This->session->master_vol; for (i = 0; i < min(channels, This->session->channel_count); i++) { vol[i] *= This->session->channel_vols[i]; @@ -3214,6 +3234,7 @@ static HRESULT WINAPI AudioStreamVolume_SetChannelVolume( EnterCriticalSection(&This->lock); This->vols[index] = level; + set_stream_volumes(This); LeaveCriticalSection(&This->lock); @@ -3258,6 +3279,7 @@ static HRESULT WINAPI AudioStreamVolume_SetAllVolumes( for(i = 0; i < count; ++i) This->vols[i] = levels[i]; + set_stream_volumes(This); LeaveCriticalSection(&This->lock); diff --git a/dlls/winealsa.drv/unixlib.h b/dlls/winealsa.drv/unixlib.h index cd8d303b5d3..f121763952c 100644 --- a/dlls/winealsa.drv/unixlib.h +++ b/dlls/winealsa.drv/unixlib.h @@ -49,6 +49,7 @@ struct alsa_stream BYTE *local_buffer, *tmp_buffer, *remapping_buf, *silence_buf; LONG32 getbuf_last; /* <0 when using tmp_buffer */ + float *vols; }; struct endpoint
1
0
0
0
Zebediah Figura : wined3d: Introduce a wined3d_texture_update_sub_resource() helper.
by Alexandre Julliard
21 Feb '22
21 Feb '22
Module: wine Branch: master Commit: 81068b89d8e37a5fb82fe18432104bb92bb0b384 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=81068b89d8e37a5fb82fe184…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Feb 20 23:22:23 2022 -0600 wined3d: Introduce a wined3d_texture_update_sub_resource() helper. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/cs.c | 30 ++---------------------------- dlls/wined3d/texture.c | 26 ++++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 3 +++ 3 files changed, 31 insertions(+), 28 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 7280739b8b2..f294be29091 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -2739,43 +2739,17 @@ static void wined3d_cs_exec_update_sub_resource(struct wined3d_cs *cs, const voi const struct wined3d_cs_update_sub_resource *op = data; struct wined3d_resource *resource = op->resource; const struct wined3d_box *box = &op->box; - unsigned int width, height, depth, level; struct wined3d_context *context; - struct wined3d_texture *texture; - struct wined3d_box src_box; context = context_acquire(cs->c.device, NULL, 0); if (resource->type == WINED3D_RTYPE_BUFFER) - { wined3d_buffer_update_sub_resource(buffer_from_resource(resource), context, &op->bo, box->left, box->right - box->left); - goto done; - } - - texture = wined3d_texture_from_resource(resource); - - level = op->sub_resource_idx % texture->level_count; - width = wined3d_texture_get_level_width(texture, level); - height = wined3d_texture_get_level_height(texture, level); - depth = wined3d_texture_get_level_depth(texture, level); - - /* Only load the sub-resource for partial updates. */ - if (!box->left && !box->top && !box->front - && box->right == width && box->bottom == height && box->back == depth) - wined3d_texture_prepare_location(texture, op->sub_resource_idx, context, WINED3D_LOCATION_TEXTURE_RGB); else - wined3d_texture_load_location(texture, op->sub_resource_idx, context, WINED3D_LOCATION_TEXTURE_RGB); - - wined3d_box_set(&src_box, 0, 0, box->right - box->left, box->bottom - box->top, 0, box->back - box->front); - texture->texture_ops->texture_upload_data(context, &op->bo.addr, texture->resource.format, &src_box, - op->row_pitch, op->slice_pitch, texture, op->sub_resource_idx, - WINED3D_LOCATION_TEXTURE_RGB, box->left, box->top, box->front); - - wined3d_texture_validate_location(texture, op->sub_resource_idx, WINED3D_LOCATION_TEXTURE_RGB); - wined3d_texture_invalidate_location(texture, op->sub_resource_idx, ~WINED3D_LOCATION_TEXTURE_RGB); + wined3d_texture_update_sub_resource(texture_from_resource(resource), + op->sub_resource_idx, context, &op->bo, box, op->row_pitch, op->slice_pitch); -done: context_release(context); wined3d_resource_release(resource); diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 1323d533eff..3bbdb492998 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -4533,6 +4533,32 @@ void wined3d_texture_download_from_texture(struct wined3d_texture *dst_texture, wined3d_texture_invalidate_location(dst_texture, dst_sub_resource_idx, ~dst_location); } +void wined3d_texture_update_sub_resource(struct wined3d_texture *texture, unsigned int sub_resource_idx, + struct wined3d_context *context, const struct upload_bo *upload_bo, const struct wined3d_box *box, + unsigned int row_pitch, unsigned int slice_pitch) +{ + unsigned int level = sub_resource_idx % texture->level_count; + unsigned int width = wined3d_texture_get_level_width(texture, level); + unsigned int height = wined3d_texture_get_level_height(texture, level); + unsigned int depth = wined3d_texture_get_level_depth(texture, level); + struct wined3d_box src_box; + + /* Only load the sub-resource for partial updates. */ + if (!box->left && !box->top && !box->front + && box->right == width && box->bottom == height && box->back == depth) + wined3d_texture_prepare_location(texture, sub_resource_idx, context, WINED3D_LOCATION_TEXTURE_RGB); + else + wined3d_texture_load_location(texture, sub_resource_idx, context, WINED3D_LOCATION_TEXTURE_RGB); + + wined3d_box_set(&src_box, 0, 0, box->right - box->left, box->bottom - box->top, 0, box->back - box->front); + texture->texture_ops->texture_upload_data(context, &upload_bo->addr, texture->resource.format, + &src_box, row_pitch, slice_pitch, texture, sub_resource_idx, + WINED3D_LOCATION_TEXTURE_RGB, box->left, box->top, box->front); + + wined3d_texture_validate_location(texture, sub_resource_idx, WINED3D_LOCATION_TEXTURE_RGB); + wined3d_texture_invalidate_location(texture, sub_resource_idx, ~WINED3D_LOCATION_TEXTURE_RGB); +} + static void wined3d_texture_no3d_upload_data(struct wined3d_context *context, const struct wined3d_const_bo_address *src_bo_addr, const struct wined3d_format *src_format, const struct wined3d_box *src_box, unsigned int src_row_pitch, unsigned int src_slice_pitch, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 989fd33d2bf..277d5a94fb0 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4643,6 +4643,9 @@ BOOL wined3d_texture_can_use_pbo(const struct wined3d_texture *texture, const st void wined3d_texture_sub_resources_destroyed(struct wined3d_texture *texture) DECLSPEC_HIDDEN; void wined3d_texture_translate_drawable_coords(const struct wined3d_texture *texture, HWND window, RECT *rect) DECLSPEC_HIDDEN; +void wined3d_texture_update_sub_resource(struct wined3d_texture *texture, unsigned int sub_resource_idx, + struct wined3d_context *context, const struct upload_bo *upload_bo, const struct wined3d_box *box, + unsigned int row_pitch, unsigned int slice_pitch) DECLSPEC_HIDDEN; void wined3d_texture_upload_from_texture(struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, unsigned int dst_x, unsigned int dst_y, unsigned int dst_z, struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, const struct wined3d_box *src_box) DECLSPEC_HIDDEN;
1
0
0
0
Alexandre Julliard : ntdll: Load the apiset schema at startup.
by Alexandre Julliard
21 Feb '22
21 Feb '22
Module: wine Branch: master Commit: e3c9d73cd1d092542d846a368196e26cd5c44972 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e3c9d73cd1d092542d846a36…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Feb 21 22:23:03 2022 +0100 ntdll: Load the apiset schema at startup. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/loader.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/dlls/ntdll/unix/loader.c b/dlls/ntdll/unix/loader.c index 96301b1654e..98a5c933215 100644 --- a/dlls/ntdll/unix/loader.c +++ b/dlls/ntdll/unix/loader.c @@ -1992,6 +1992,82 @@ static void load_ntdll(void) } +/*********************************************************************** + * load_apiset_dll + */ +static void load_apiset_dll(void) +{ + static WCHAR path[] = {'\\','?','?','\\','C',':','\\','w','i','n','d','o','w','s','\\', + 's','y','s','t','e','m','3','2','\\', + 'a','p','i','s','e','t','s','c','h','e','m','a','.','d','l','l',0}; + const char *pe_dir = get_pe_dir( current_machine ); + const IMAGE_NT_HEADERS *nt; + const IMAGE_SECTION_HEADER *sec; + API_SET_NAMESPACE *map; + OBJECT_ATTRIBUTES attr; + UNICODE_STRING str; + NTSTATUS status; + HANDLE handle, mapping; + SIZE_T size; + char *name; + void *ptr; + UINT i; + + init_unicode_string( &str, path ); + InitializeObjectAttributes( &attr, &str, 0, 0, NULL ); + + name = malloc( strlen( ntdll_dir ) + strlen( pe_dir ) + sizeof("/apisetschema.dll") ); + if (build_dir) sprintf( name, "%s/dlls/apisetschema/apisetschema.dll", build_dir ); + else sprintf( name, "%s%s/apisetschema.dll", dll_dir, pe_dir ); + status = open_unix_file( &handle, name, GENERIC_READ | SYNCHRONIZE, &attr, 0, + FILE_SHARE_READ | FILE_SHARE_DELETE, FILE_OPEN, + FILE_SYNCHRONOUS_IO_NONALERT | FILE_NON_DIRECTORY_FILE, NULL, 0 ); + free( name ); + + if (!status) + { + status = NtCreateSection( &mapping, STANDARD_RIGHTS_REQUIRED | SECTION_QUERY | SECTION_MAP_READ, + NULL, NULL, PAGE_READONLY, SEC_COMMIT, handle ); + NtClose( handle ); + } + if (!status) + { + ptr = NULL; + size = 0; + status = NtMapViewOfSection( mapping, NtCurrentProcess(), &ptr, + is_win64 && wow_peb ? 0x7fffffff : 0, 0, NULL, + &size, ViewShare, 0, PAGE_READONLY ); + NtClose( mapping ); + } + if (!status) + { + nt = get_rva( ptr, ((IMAGE_DOS_HEADER *)ptr)->e_lfanew ); + sec = (IMAGE_SECTION_HEADER *)((char *)&nt->OptionalHeader + nt->FileHeader.SizeOfOptionalHeader); + + for (i = 0; i < nt->FileHeader.NumberOfSections; i++, sec++) + { + if (memcmp( (char *)sec->Name, ".apiset", 8 )) continue; + map = (API_SET_NAMESPACE *)((char *)ptr + sec->PointerToRawData); + if (sec->PointerToRawData < size && + size - sec->PointerToRawData >= sec->Misc.VirtualSize && + map->Version == 6 && + map->Size <= sec->Misc.VirtualSize) + { + NtCurrentTeb()->Peb->ApiSetMap = map; + if (wow_peb) wow_peb->ApiSetMap = PtrToUlong(map); + NtUnmapViewOfSection( NtCurrentProcess(), ptr ); + TRACE( "loaded %s apiset at %p\n", debugstr_w(path), map ); + return; + } + break; + } + NtUnmapViewOfSection( NtCurrentProcess(), ptr ); + status = STATUS_APISET_NOT_PRESENT; + } + ERR( "failed to load apiset: %x\n", status ); +} + + /*********************************************************************** * load_wow64_ntdll */ @@ -2098,6 +2174,7 @@ static void start_main_thread(void) NtCreateKeyedEvent( &keyed_event, GENERIC_READ | GENERIC_WRITE, NULL, 0 ); load_ntdll(); if (main_image_info.Machine != current_machine) load_wow64_ntdll( main_image_info.Machine ); + load_apiset_dll(); ntdll_init_syscalls( 0, &syscall_table, p__wine_syscall_dispatcher ); status = p__wine_set_unix_funcs( NTDLL_UNIXLIB_VERSION, &unix_funcs ); if (status == STATUS_REVISION_MISMATCH)
1
0
0
0
Alexandre Julliard : ntdll: Add a global variable for the WoW PEB.
by Alexandre Julliard
21 Feb '22
21 Feb '22
Module: wine Branch: master Commit: a31f3374e65c02f97829eb9ed712a35f484c4461 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a31f3374e65c02f97829eb9e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Feb 21 11:41:44 2022 +0100 ntdll: Add a global variable for the WoW PEB. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/unix/env.c | 44 ++++++++++++++++++++---------------------- dlls/ntdll/unix/server.c | 1 + dlls/ntdll/unix/unix_private.h | 4 ++++ 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index c7e0674e083..3f9f7f1b3b7 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -60,6 +60,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(environ); PEB *peb = NULL; +WOW_PEB *wow_peb = NULL; USHORT *uctable = NULL, *lctable = NULL; SIZE_T startup_info_size = 0; BOOL is_prefix_bootstrap = FALSE; @@ -2129,37 +2130,34 @@ static void init_peb( RTL_USER_PROCESS_PARAMETERS *params, void *module ) { NtCurrentTeb()->WowTebOffset = teb_offset; NtCurrentTeb()->Tib.ExceptionList = (void *)((char *)NtCurrentTeb() + teb_offset); + wow_peb = (PEB32 *)((char *)peb + page_size); set_thread_id( NtCurrentTeb(), GetCurrentProcessId(), GetCurrentThreadId() ); } #endif load_global_options( ¶ms->ImagePathName ); - if (NtCurrentTeb()->WowTebOffset) + if (wow_peb) { void *wow64_params = build_wow64_parameters( params ); -#ifdef _WIN64 - PEB32 *wow64_peb = (PEB32 *)((char *)peb + page_size); -#else - PEB64 *wow64_peb = (PEB64 *)((char *)peb - page_size); -#endif - wow64_peb->ImageBaseAddress = PtrToUlong( peb->ImageBaseAddress ); - wow64_peb->ProcessParameters = PtrToUlong( wow64_params ); - wow64_peb->NumberOfProcessors = peb->NumberOfProcessors; - wow64_peb->NtGlobalFlag = peb->NtGlobalFlag; - wow64_peb->CriticalSectionTimeout.QuadPart = peb->CriticalSectionTimeout.QuadPart; - wow64_peb->HeapSegmentReserve = peb->HeapSegmentReserve; - wow64_peb->HeapSegmentCommit = peb->HeapSegmentCommit; - wow64_peb->HeapDeCommitTotalFreeThreshold = peb->HeapDeCommitTotalFreeThreshold; - wow64_peb->HeapDeCommitFreeBlockThreshold = peb->HeapDeCommitFreeBlockThreshold; - wow64_peb->OSMajorVersion = peb->OSMajorVersion; - wow64_peb->OSMinorVersion = peb->OSMinorVersion; - wow64_peb->OSBuildNumber = peb->OSBuildNumber; - wow64_peb->OSPlatformId = peb->OSPlatformId; - wow64_peb->ImageSubSystem = peb->ImageSubSystem; - wow64_peb->ImageSubSystemMajorVersion = peb->ImageSubSystemMajorVersion; - wow64_peb->ImageSubSystemMinorVersion = peb->ImageSubSystemMinorVersion; - wow64_peb->SessionId = peb->SessionId; + + wow_peb->ImageBaseAddress = PtrToUlong( peb->ImageBaseAddress ); + wow_peb->ProcessParameters = PtrToUlong( wow64_params ); + wow_peb->NumberOfProcessors = peb->NumberOfProcessors; + wow_peb->NtGlobalFlag = peb->NtGlobalFlag; + wow_peb->CriticalSectionTimeout.QuadPart = peb->CriticalSectionTimeout.QuadPart; + wow_peb->HeapSegmentReserve = peb->HeapSegmentReserve; + wow_peb->HeapSegmentCommit = peb->HeapSegmentCommit; + wow_peb->HeapDeCommitTotalFreeThreshold = peb->HeapDeCommitTotalFreeThreshold; + wow_peb->HeapDeCommitFreeBlockThreshold = peb->HeapDeCommitFreeBlockThreshold; + wow_peb->OSMajorVersion = peb->OSMajorVersion; + wow_peb->OSMinorVersion = peb->OSMinorVersion; + wow_peb->OSBuildNumber = peb->OSBuildNumber; + wow_peb->OSPlatformId = peb->OSPlatformId; + wow_peb->ImageSubSystem = peb->ImageSubSystem; + wow_peb->ImageSubSystemMajorVersion = peb->ImageSubSystemMajorVersion; + wow_peb->ImageSubSystemMinorVersion = peb->ImageSubSystemMinorVersion; + wow_peb->SessionId = peb->SessionId; } } diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c index 9d0594d3374..ab9d99c4f47 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c @@ -1518,6 +1518,7 @@ size_t server_init_process(void) is_wow64 = TRUE; NtCurrentTeb()->GdiBatchCount = PtrToUlong( (char *)NtCurrentTeb() - teb_offset ); NtCurrentTeb()->WowTebOffset = -teb_offset; + wow_peb = (PEB64 *)((char *)peb - page_size); #endif } else diff --git a/dlls/ntdll/unix/unix_private.h b/dlls/ntdll/unix/unix_private.h index 75f03706401..b1595c792c0 100644 --- a/dlls/ntdll/unix/unix_private.h +++ b/dlls/ntdll/unix/unix_private.h @@ -393,12 +393,16 @@ static inline client_ptr_t iosb_client_ptr( IO_STATUS_BLOCK *io ) #ifdef _WIN64 typedef TEB32 WOW_TEB; +typedef PEB32 WOW_PEB; static inline TEB64 *NtCurrentTeb64(void) { return NULL; } #else typedef TEB64 WOW_TEB; +typedef PEB64 WOW_PEB; static inline TEB64 *NtCurrentTeb64(void) { return (TEB64 *)NtCurrentTeb()->GdiBatchCount; } #endif +extern WOW_PEB *wow_peb DECLSPEC_HIDDEN; + static inline WOW_TEB *get_wow_teb( TEB *teb ) { return teb->WowTebOffset ? (WOW_TEB *)((char *)teb + teb->WowTebOffset) : NULL;
1
0
0
0
Alexandre Julliard : include: Add API set definitions.
by Alexandre Julliard
21 Feb '22
21 Feb '22
Module: wine Branch: master Commit: 0d09268558e4ad26a74d0554af3e7a9671ee3681 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0d09268558e4ad26a74d0554…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Feb 21 11:40:43 2022 +0100 include: Add API set definitions. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/winternl.h | 44 +++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 41 insertions(+), 3 deletions(-) diff --git a/include/winternl.h b/include/winternl.h index 81fd5f45665..ae331562026 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -321,7 +321,7 @@ typedef struct _PEB PVOID KernelCallbackTable; /* 02c/058 */ ULONG Reserved; /* 030/060 */ ULONG AtlThunkSListPtr32; /* 034/064 */ - PVOID /*PPEB_FREE_BLOCK*/ FreeList; /* 038/068 */ + PVOID ApiSetMap; /* 038/068 */ ULONG TlsExpansionCounter; /* 03c/070 */ PRTL_BITMAP TlsBitmap; /* 040/078 */ ULONG TlsBitmapBits[2]; /* 044/080 */ @@ -731,7 +731,7 @@ typedef struct _PEB32 ULONG KernelCallbackTable; /* 002c */ ULONG Reserved; /* 0030 */ ULONG AtlThunkSListPtr32; /* 0034 */ - ULONG FreeList; /* 0038 */ + ULONG ApiSetMap; /* 0038 */ ULONG TlsExpansionCounter; /* 003c */ ULONG TlsBitmap; /* 0040 */ ULONG TlsBitmapBits[2]; /* 0044 */ @@ -822,7 +822,7 @@ typedef struct _PEB64 ULONG64 KernelCallbackTable; /* 0058 */ ULONG Reserved; /* 0060 */ ULONG AtlThunkSListPtr32; /* 0064 */ - ULONG64 FreeList; /* 0068 */ + ULONG64 ApiSetMap; /* 0068 */ ULONG TlsExpansionCounter; /* 0070 */ ULONG64 TlsBitmap; /* 0078 */ ULONG TlsBitmapBits[2]; /* 0080 */ @@ -3824,6 +3824,44 @@ typedef struct BYTE *ArgumentTable; } SYSTEM_SERVICE_TABLE; +/* ApiSet structures (format for version 6) */ + +typedef struct _API_SET_NAMESPACE +{ + ULONG Version; + ULONG Size; + ULONG Flags; + ULONG Count; + ULONG EntryOffset; + ULONG HashOffset; + ULONG HashFactor; +} API_SET_NAMESPACE; + +typedef struct _API_SET_HASH_ENTRY +{ + ULONG Hash; + ULONG Index; +} API_SET_HASH_ENTRY; + +typedef struct _API_SET_NAMESPACE_ENTRY +{ + ULONG Flags; + ULONG NameOffset; + ULONG NameLength; + ULONG HashedLength; + ULONG ValueOffset; + ULONG ValueCount; +} API_SET_NAMESPACE_ENTRY; + +typedef struct _API_SET_VALUE_ENTRY +{ + ULONG Flags; + ULONG NameOffset; + ULONG NameLength; + ULONG ValueOffset; + ULONG ValueLength; +} API_SET_VALUE_ENTRY; + /*********************************************************************** * Function declarations */
1
0
0
0
Eric Pouech : user32/tests: Don't outdent todo_wine*.
by Alexandre Julliard
21 Feb '22
21 Feb '22
Module: wine Branch: master Commit: ccf6204cf70071aa9215402f2e6b3f65aa359a86 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ccf6204cf70071aa9215402f…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Mon Feb 21 08:08:20 2022 +0100 user32/tests: Don't outdent todo_wine*. This prevents -Wmisleading-indentation warnings (Mingw GCC11). Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/scroll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/user32/tests/scroll.c b/dlls/user32/tests/scroll.c index 57bf759879c..40eb13943fc 100644 --- a/dlls/user32/tests/scroll.c +++ b/dlls/user32/tests/scroll.c @@ -358,7 +358,7 @@ static void scrollbar_test_default( DWORD style) if( !(style & WS_VSCROLL)) { if (bThemeActive || style != WS_HSCROLL) -todo_wine + todo_wine ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == ( style | WS_VSCROLL), "unexpected style change %08x/%08x\n", winstyle, style); else @@ -394,7 +394,7 @@ todo_wine if( !(style & WS_HSCROLL)) { if (bThemeActive || style != WS_VSCROLL) -todo_wine + todo_wine ok( (winstyle & (WS_HSCROLL|WS_VSCROLL)) == ( style | WS_HSCROLL), "unexpected style change %08x/%08x\n", winstyle, style); else
1
0
0
0
Eric Pouech : shell32/tests: Don't outdent todo_wine*.
by Alexandre Julliard
21 Feb '22
21 Feb '22
Module: wine Branch: master Commit: 0fc80c7db107a9a7bbf21fbdb3b79377b03b168e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=0fc80c7db107a9a7bbf21fbd…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Mon Feb 21 08:08:15 2022 +0100 shell32/tests: Don't outdent todo_wine*. This prevents -Wmisleading-indentation warnings (Mingw GCC11). Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/tests/shelldispatch.c | 2 +- dlls/shell32/tests/shlfolder.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/shell32/tests/shelldispatch.c b/dlls/shell32/tests/shelldispatch.c index f243ba053d0..860024ae6fa 100644 --- a/dlls/shell32/tests/shelldispatch.c +++ b/dlls/shell32/tests/shelldispatch.c @@ -1146,7 +1146,7 @@ static void test_ShellWindows(void) IDispatch_Release(app); hr = IWebBrowser2_get_Document(wb, &doc); -todo_wine + todo_wine ok(hr == S_OK, "got 0x%08x\n", hr); if (hr == S_OK) { test_dispatch_typeinfo(doc, viewdual_riids); diff --git a/dlls/shell32/tests/shlfolder.c b/dlls/shell32/tests/shlfolder.c index f593f8b821d..13108f92246 100644 --- a/dlls/shell32/tests/shlfolder.c +++ b/dlls/shell32/tests/shlfolder.c @@ -4423,7 +4423,7 @@ static void test_contextmenu(IContextMenu *menu, BOOL background) cmi.lpVerb = "foobar_wine_test"; hr = IContextMenu_InvokeCommand(menu, &cmi); - todo_wine_if(background) + todo_wine_if(background) ok((hr == E_INVALIDARG) || (hr == E_FAIL /* Win7 */) || (hr == HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION) /* Vista */), "Unexpected hr %#x.\n", hr);
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
150
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
Results per page:
10
25
50
100
200