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: Move get_mix_format to the unixlib.
by Alexandre Julliard
17 Feb '22
17 Feb '22
Module: wine Branch: master Commit: 7920275c56d39d773e5eb1354da1e5b0318cbae9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7920275c56d39d773e5eb135…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Feb 16 09:34:51 2022 +0000 winealsa: Move get_mix_format to the unixlib. 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/alsa.c | 178 +++++++++++++++++++++++++++++++++++++++++++ dlls/winealsa.drv/mmdevdrv.c | 126 +++--------------------------- dlls/winealsa.drv/unixlib.h | 9 +++ 3 files changed, 199 insertions(+), 114 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=7920275c56d39d773e5e…
1
0
0
0
Huw Davies : winealsa: Move the pcm device opening to a helper.
by Alexandre Julliard
17 Feb '22
17 Feb '22
Module: wine Branch: master Commit: 2df122934ebf29b9b595a0a0e3091942c2bae1ec URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2df122934ebf29b9b595a0a0…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Feb 16 09:34:50 2022 +0000 winealsa: Move the pcm device opening to a helper. This will allow GetMixFormat and IsFormatSupported to share this code without needing a 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 | 50 +++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index f1bc2fd0247..ecd74d373aa 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -442,10 +442,37 @@ static BOOL get_alsa_name_by_guid(GUID *guid, char *name, DWORD name_size, EData return FALSE; } +static HRESULT alsa_open_device(const char *alsa_name, EDataFlow flow, snd_pcm_t **pcm_handle, + snd_pcm_hw_params_t **hw_params) +{ + int err; + + if(flow != eRender && flow != eCapture) + return E_UNEXPECTED; + + err = snd_pcm_open(pcm_handle, alsa_name, alsa_get_direction(flow), SND_PCM_NONBLOCK); + if(err < 0){ + WARN("Unable to open PCM \"%s\": %d (%s)\n", alsa_name, err, snd_strerror(err)); + switch(err){ + case -EBUSY: + return AUDCLNT_E_DEVICE_IN_USE; + default: + return AUDCLNT_E_ENDPOINT_CREATE_FAILED; + } + } + + *hw_params = HeapAlloc(GetProcessHeap(), 0, snd_pcm_hw_params_sizeof()); + if(!*hw_params){ + snd_pcm_close(*pcm_handle); + return E_OUTOFMEMORY; + } + + return S_OK; +} + HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient **out) { ACImpl *This; - int err; char alsa_name[256]; EDataFlow dataflow; HRESULT hr; @@ -486,26 +513,11 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient return E_OUTOFMEMORY; } - err = snd_pcm_open(&This->stream->pcm_handle, alsa_name, alsa_get_direction(dataflow), SND_PCM_NONBLOCK); - if(err < 0){ - HeapFree(GetProcessHeap(), 0, This->stream); - HeapFree(GetProcessHeap(), 0, This); - WARN("Unable to open PCM \"%s\": %d (%s)\n", alsa_name, err, snd_strerror(err)); - switch(err){ - case -EBUSY: - return AUDCLNT_E_DEVICE_IN_USE; - default: - return AUDCLNT_E_ENDPOINT_CREATE_FAILED; - } - } - - This->stream->hw_params = HeapAlloc(GetProcessHeap(), 0, - snd_pcm_hw_params_sizeof()); - if(!This->stream->hw_params){ - snd_pcm_close(This->stream->pcm_handle); + hr = alsa_open_device(alsa_name, dataflow, &This->stream->pcm_handle, &This->stream->hw_params); + if(FAILED(hr)){ HeapFree(GetProcessHeap(), 0, This->stream); HeapFree(GetProcessHeap(), 0, This); - return E_OUTOFMEMORY; + return hr; } InitializeCriticalSection(&This->lock);
1
0
0
0
Huw Davies : winealsa: Introduce a stream structure.
by Alexandre Julliard
17 Feb '22
17 Feb '22
Module: wine Branch: master Commit: 04d01ee3c2cdedade9e3b7f4d80334ed2573df9b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=04d01ee3c2cdedade9e3b7f4…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Feb 16 09:34:49 2022 +0000 winealsa: Introduce a stream structure. 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 | 691 ++++++++++++++++++++++--------------------- dlls/winealsa.drv/unixlib.h | 35 +++ 2 files changed, 385 insertions(+), 341 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=04d01ee3c2cdedade9e3…
1
0
0
0
Huw Davies : winealsa: Use the global lock to lock the session.
by Alexandre Julliard
17 Feb '22
17 Feb '22
Module: wine Branch: master Commit: 10d44c9a8a402dd6bcd9853d3b566a2401cea6a2 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=10d44c9a8a402dd6bcd9853d…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Feb 16 09:34:48 2022 +0000 winealsa: Use the global lock to lock the session. Mainly just for simplicity. 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 | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index abec9dc969a..0549752dc3f 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -77,8 +77,6 @@ typedef struct _AudioSession { float *channel_vols; BOOL mute; - CRITICAL_SECTION lock; - struct list entry; } AudioSession; @@ -748,9 +746,6 @@ static AudioSession *create_session(const GUID *guid, IMMDevice *device, list_add_head(&g_sessions, &ret->entry); - InitializeCriticalSection(&ret->lock); - ret->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": AudioSession.lock"); - session_init_vols(ret, num_channels); ret->master_vol = 1.f; @@ -3283,11 +3278,11 @@ static HRESULT WINAPI SimpleAudioVolume_SetMasterVolume( TRACE("ALSA does not support volume control\n"); - EnterCriticalSection(&session->lock); + EnterCriticalSection(&g_sessions_lock); session->master_vol = level; - LeaveCriticalSection(&session->lock); + LeaveCriticalSection(&g_sessions_lock); return S_OK; } @@ -3573,11 +3568,11 @@ static HRESULT WINAPI ChannelAudioVolume_SetChannelVolume( TRACE("ALSA does not support volume control\n"); - EnterCriticalSection(&session->lock); + EnterCriticalSection(&g_sessions_lock); session->channel_vols[index] = level; - LeaveCriticalSection(&session->lock); + LeaveCriticalSection(&g_sessions_lock); return S_OK; } @@ -3623,12 +3618,12 @@ static HRESULT WINAPI ChannelAudioVolume_SetAllVolumes( TRACE("ALSA does not support volume control\n"); - EnterCriticalSection(&session->lock); + EnterCriticalSection(&g_sessions_lock); for(i = 0; i < count; ++i) session->channel_vols[i] = levels[i]; - LeaveCriticalSection(&session->lock); + LeaveCriticalSection(&g_sessions_lock); return S_OK; }
1
0
0
0
Huw Davies : winealsa: Explicitly store the name and channel count in the audio client.
by Alexandre Julliard
17 Feb '22
17 Feb '22
Module: wine Branch: master Commit: 8e13b4bd0c21e7fca51c033c384e6b2d7a8bc41c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8e13b4bd0c21e7fca51c033c…
Author: Huw Davies <huw(a)codeweavers.com> Date: Wed Feb 16 09:34:47 2022 +0000 winealsa: Explicitly store the name and channel count in the audio client. 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 | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/dlls/winealsa.drv/mmdevdrv.c b/dlls/winealsa.drv/mmdevdrv.c index 516bba1e5fc..abec9dc969a 100644 --- a/dlls/winealsa.drv/mmdevdrv.c +++ b/dlls/winealsa.drv/mmdevdrv.c @@ -119,6 +119,7 @@ struct ACImpl { AUDCLNT_SHAREMODE share; HANDLE event; float *vols; + UINT32 channel_count; BOOL need_remapping; int alsa_channels; @@ -145,6 +146,9 @@ struct ACImpl { AudioSessionWrapper *session_wrapper; struct list entry; + + /* Keep at end */ + char alsa_name[1]; }; typedef struct _SessionMgr { @@ -472,6 +476,7 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient char alsa_name[256]; EDataFlow dataflow; HRESULT hr; + int len; TRACE("%s %p %p\n", debugstr_guid(guid), dev, out); @@ -481,7 +486,8 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient if(dataflow != eRender && dataflow != eCapture) return E_UNEXPECTED; - This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(ACImpl)); + len = strlen(alsa_name); + This = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, offsetof(ACImpl, alsa_name[len + 1])); if(!This) return E_OUTOFMEMORY; @@ -499,6 +505,8 @@ HRESULT WINAPI AUDDRV_GetAudioEndpoint(GUID *guid, IMMDevice *dev, IAudioClient } This->dataflow = dataflow; + memcpy(This->alsa_name, alsa_name, len + 1); + err = snd_pcm_open(&This->pcm_handle, alsa_name, alsa_get_direction(dataflow), SND_PCM_NONBLOCK); if(err < 0){ HeapFree(GetProcessHeap(), 0, This); @@ -1159,19 +1167,20 @@ static HRESULT WINAPI AudioClient_Initialize(IAudioClient3 *iface, } silence_buffer(This, This->silence_buf, This->alsa_period_frames); - This->vols = HeapAlloc(GetProcessHeap(), 0, fmt->nChannels * sizeof(float)); + This->channel_count = fmt->nChannels; + This->vols = HeapAlloc(GetProcessHeap(), 0, This->channel_count * sizeof(float)); if(!This->vols){ hr = E_OUTOFMEMORY; goto exit; } - for(i = 0; i < fmt->nChannels; ++i) + for(i = 0; i < This->channel_count; ++i) This->vols[i] = 1.f; This->share = mode; This->flags = flags; - hr = get_audio_session(sessionguid, This->parent, fmt->nChannels, + hr = get_audio_session(sessionguid, This->parent, This->channel_count, &This->session); if(FAILED(hr)) goto exit; @@ -3385,7 +3394,7 @@ static HRESULT WINAPI AudioStreamVolume_GetChannelCount( if(!out) return E_POINTER; - *out = This->fmt->nChannels; + *out = This->channel_count; return S_OK; } @@ -3400,7 +3409,7 @@ static HRESULT WINAPI AudioStreamVolume_SetChannelVolume( if(level < 0.f || level > 1.f) return E_INVALIDARG; - if(index >= This->fmt->nChannels) + if(index >= This->channel_count) return E_INVALIDARG; TRACE("ALSA does not support volume control\n"); @@ -3424,7 +3433,7 @@ static HRESULT WINAPI AudioStreamVolume_GetChannelVolume( if(!level) return E_POINTER; - if(index >= This->fmt->nChannels) + if(index >= This->channel_count) return E_INVALIDARG; *level = This->vols[index]; @@ -3443,7 +3452,7 @@ static HRESULT WINAPI AudioStreamVolume_SetAllVolumes( if(!levels) return E_POINTER; - if(count != This->fmt->nChannels) + if(count != This->channel_count) return E_INVALIDARG; TRACE("ALSA does not support volume control\n"); @@ -3469,7 +3478,7 @@ static HRESULT WINAPI AudioStreamVolume_GetAllVolumes( if(!levels) return E_POINTER; - if(count != This->fmt->nChannels) + if(count != This->channel_count) return E_INVALIDARG; EnterCriticalSection(&This->lock);
1
0
0
0
Zebediah Figura : wined3d: Protect wined3d_chunk_gl map fields with a mutex.
by Alexandre Julliard
17 Feb '22
17 Feb '22
Module: wine Branch: master Commit: 4f54f4591af0bf8b060e716c3e622414338dd38b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4f54f4591af0bf8b060e716c…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Feb 17 00:13:52 2022 -0600 wined3d: Protect wined3d_chunk_gl map fields with a mutex. Parallel to a5efc1d5e06bf1d88148b4800dc489a527e797c8. Unlike with the Vulkan backend, we cannot map chunks from the client thread, but we can access the mapped pointer and increase the map count of already mapped chunks. 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/context_gl.c | 25 ++++++++++++++++++------- dlls/wined3d/device.c | 3 +-- dlls/wined3d/wined3d_private.h | 15 +++++++++++++++ 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c index 8217d04686c..b82849f8470 100644 --- a/dlls/wined3d/context_gl.c +++ b/dlls/wined3d/context_gl.c @@ -2778,9 +2778,12 @@ static void *wined3d_allocator_chunk_gl_map(struct wined3d_allocator_chunk_gl *c struct wined3d_context_gl *context_gl) { const struct wined3d_gl_info *gl_info = context_gl->gl_info; + void *map_ptr; TRACE("chunk %p, gl_buffer %u, map_ptr %p.\n", chunk_gl, chunk_gl->gl_buffer, chunk_gl->c.map_ptr); + wined3d_allocator_chunk_gl_lock(chunk_gl); + if (!chunk_gl->c.map_ptr) { unsigned int flags = wined3d_device_gl_get_memory_type_flags(chunk_gl->memory_type) & ~GL_CLIENT_STORAGE_BIT; @@ -2795,6 +2798,7 @@ static void *wined3d_allocator_chunk_gl_map(struct wined3d_allocator_chunk_gl *c 0, WINED3D_ALLOCATOR_CHUNK_SIZE, flags)); if (!chunk_gl->c.map_ptr) { + wined3d_allocator_chunk_gl_unlock(chunk_gl); ERR("Failed to map chunk memory.\n"); return NULL; } @@ -2803,8 +2807,11 @@ static void *wined3d_allocator_chunk_gl_map(struct wined3d_allocator_chunk_gl *c } ++chunk_gl->c.map_count; + map_ptr = chunk_gl->c.map_ptr; - return chunk_gl->c.map_ptr; + wined3d_allocator_chunk_gl_unlock(chunk_gl); + + return map_ptr; } static void wined3d_allocator_chunk_gl_unmap(struct wined3d_allocator_chunk_gl *chunk_gl, @@ -2814,14 +2821,18 @@ static void wined3d_allocator_chunk_gl_unmap(struct wined3d_allocator_chunk_gl * TRACE("chunk_gl %p, context_gl %p.\n", chunk_gl, context_gl); - if (--chunk_gl->c.map_count) - return; + wined3d_allocator_chunk_gl_lock(chunk_gl); - wined3d_context_gl_bind_bo(context_gl, GL_PIXEL_UNPACK_BUFFER, chunk_gl->gl_buffer); - GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER)); - chunk_gl->c.map_ptr = NULL; + if (!--chunk_gl->c.map_count) + { + wined3d_context_gl_bind_bo(context_gl, GL_PIXEL_UNPACK_BUFFER, chunk_gl->gl_buffer); + GL_EXTCALL(glUnmapBuffer(GL_PIXEL_UNPACK_BUFFER)); + chunk_gl->c.map_ptr = NULL; + + adapter_adjust_mapped_memory(context_gl->c.device->adapter, -WINED3D_ALLOCATOR_CHUNK_SIZE); + } - adapter_adjust_mapped_memory(context_gl->c.device->adapter, -WINED3D_ALLOCATOR_CHUNK_SIZE); + wined3d_allocator_chunk_gl_unlock(chunk_gl); } static void *wined3d_bo_gl_map(struct wined3d_bo_gl *bo, struct wined3d_context_gl *context_gl, uint32_t flags) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 9488e8c642e..f163e77fcf1 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -993,14 +993,13 @@ static struct wined3d_allocator_chunk *wined3d_allocator_gl_create_chunk(struct static void wined3d_allocator_gl_destroy_chunk(struct wined3d_allocator_chunk *chunk) { + struct wined3d_device_gl *device_gl = wined3d_device_gl_from_allocator(chunk->allocator); struct wined3d_allocator_chunk_gl *chunk_gl = wined3d_allocator_chunk_gl(chunk); const struct wined3d_gl_info *gl_info; struct wined3d_context_gl *context_gl; - struct wined3d_device_gl *device_gl; TRACE("chunk %p.\n", chunk); - device_gl = CONTAINING_RECORD(chunk_gl->c.allocator, struct wined3d_device_gl, allocator); context_gl = wined3d_context_gl(context_acquire(&device_gl->d, NULL, 0)); gl_info = context_gl->gl_info; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 96ce75fbb58..c8c9bb7c8c6 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -4213,6 +4213,11 @@ static inline struct wined3d_device_gl *wined3d_device_gl(struct wined3d_device return CONTAINING_RECORD(device, struct wined3d_device_gl, d); } +static inline struct wined3d_device_gl *wined3d_device_gl_from_allocator(struct wined3d_allocator *allocator) +{ + return CONTAINING_RECORD(allocator, struct wined3d_device_gl, allocator); +} + static inline void wined3d_device_gl_allocator_lock(struct wined3d_device_gl *device_gl) { EnterCriticalSection(&device_gl->allocator_cs); @@ -4223,6 +4228,16 @@ static inline void wined3d_device_gl_allocator_unlock(struct wined3d_device_gl * LeaveCriticalSection(&device_gl->allocator_cs); } +static inline void wined3d_allocator_chunk_gl_lock(struct wined3d_allocator_chunk_gl *chunk_gl) +{ + wined3d_device_gl_allocator_lock(wined3d_device_gl_from_allocator(chunk_gl->c.allocator)); +} + +static inline void wined3d_allocator_chunk_gl_unlock(struct wined3d_allocator_chunk_gl *chunk_gl) +{ + wined3d_device_gl_allocator_unlock(wined3d_device_gl_from_allocator(chunk_gl->c.allocator)); +} + bool wined3d_device_gl_create_bo(struct wined3d_device_gl *device_gl, struct wined3d_context_gl *context_gl, GLsizeiptr size, GLenum binding, GLenum usage, bool coherent, GLbitfield flags, struct wined3d_bo_gl *bo) DECLSPEC_HIDDEN;
1
0
0
0
Matteo Bruni : ddraw: Filter out redundant discard maps.
by Alexandre Julliard
17 Feb '22
17 Feb '22
Module: wine Branch: master Commit: 6784684abf7eae7d331fb95988ef1e85a97ddb1f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6784684abf7eae7d331fb959…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Feb 17 00:13:50 2022 -0600 ddraw: Filter out redundant discard maps. 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/ddraw/ddraw_private.h | 2 ++ dlls/ddraw/device.c | 4 ++++ dlls/ddraw/vertexbuffer.c | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 7929e9e1795..0c2a491d45b 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -22,6 +22,7 @@ #include <assert.h> #include <limits.h> #include <math.h> +#include <stdbool.h> #define COBJMACROS #define NONAMELESSSTRUCT #define NONAMELESSUNION @@ -598,6 +599,7 @@ struct d3d_vertex_buffer DWORD fvf; DWORD size; BOOL dynamic; + bool discarded; }; HRESULT d3d_vertex_buffer_create(struct d3d_vertex_buffer **buffer, struct ddraw *ddraw, diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index 6e8f109173b..860dffc5045 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -4293,6 +4293,8 @@ static HRESULT d3d_device7_DrawPrimitiveVB(IDirect3DDevice7 *iface, D3DPRIMITIVE return D3D_OK; } + vb_impl->discarded = false; + stride = get_flexible_vertex_size(vb_impl->fvf); if (vb_impl->Caps & D3DVBCAPS_SYSTEMMEMORY) @@ -4412,6 +4414,8 @@ static HRESULT d3d_device7_DrawIndexedPrimitiveVB(IDirect3DDevice7 *iface, return D3D_OK; } + vb_impl->discarded = false; + if (vb_impl->Caps & D3DVBCAPS_SYSTEMMEMORY) { TRACE("Drawing from D3DVBCAPS_SYSTEMMEMORY vertex buffer, forwarding to DrawIndexedPrimitive().\n"); diff --git a/dlls/ddraw/vertexbuffer.c b/dlls/ddraw/vertexbuffer.c index dd35b445cc5..fa0e4f4c41a 100644 --- a/dlls/ddraw/vertexbuffer.c +++ b/dlls/ddraw/vertexbuffer.c @@ -159,10 +159,14 @@ static HRESULT WINAPI d3d_vertex_buffer7_Lock(IDirect3DVertexBuffer7 *iface, if (buffer->version != 7) flags &= ~(DDLOCK_NOOVERWRITE | DDLOCK_DISCARDCONTENTS); + if (buffer->discarded) + flags &= ~DDLOCK_DISCARDCONTENTS; + if (!(flags & DDLOCK_WAIT)) flags |= DDLOCK_DONOTWAIT; if (flags & DDLOCK_DISCARDCONTENTS) { + buffer->discarded = true; if (!buffer->dynamic) { struct wined3d_buffer *new_buffer;
1
0
0
0
Eric Pouech : riched20: Enable compilation with long types.
by Alexandre Julliard
17 Feb '22
17 Feb '22
Module: wine Branch: master Commit: 42d0e56643740a0eac5913a9f176e789457cb475 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=42d0e56643740a0eac5913a9…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Thu Feb 17 07:11:43 2022 +0100 riched20: Enable compilation with long types. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/riched20/Makefile.in | 1 - dlls/riched20/caret.c | 2 +- dlls/riched20/clipboard.c | 20 +-- dlls/riched20/editor.c | 22 ++-- dlls/riched20/para.c | 16 +-- dlls/riched20/richole.c | 304 +++++++++++++++++++++++----------------------- dlls/riched20/run.c | 2 +- dlls/riched20/style.c | 4 +- dlls/riched20/txthost.c | 16 +-- dlls/riched20/txtsrv.c | 12 +- dlls/riched20/wrap.c | 6 +- dlls/riched20/writer.c | 38 +++--- 12 files changed, 221 insertions(+), 222 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=42d0e56643740a0eac59…
1
0
0
0
Eric Pouech : setupx.dll16: Enable compilation with long types.
by Alexandre Julliard
17 Feb '22
17 Feb '22
Module: wine Branch: master Commit: 422f362ada7245ab4a087c0a88fec942b39a066f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=422f362ada7245ab4a087c0a…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Thu Feb 17 07:13:09 2022 +0100 setupx.dll16: Enable compilation with long types. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupx.dll16/Makefile.in | 1 - dlls/setupx.dll16/devinst16.c | 2 +- dlls/setupx.dll16/setupx_main.c | 4 ++-- dlls/setupx.dll16/virtcopy.c | 6 +++--- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/setupx.dll16/Makefile.in b/dlls/setupx.dll16/Makefile.in index 3d7de3d3dff..d7d6555baf0 100644 --- a/dlls/setupx.dll16/Makefile.in +++ b/dlls/setupx.dll16/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = setupx.dll16 IMPORTS = setupapi user32 advapi32 diff --git a/dlls/setupx.dll16/devinst16.c b/dlls/setupx.dll16/devinst16.c index 55f38b021eb..9775c19329f 100644 --- a/dlls/setupx.dll16/devinst16.c +++ b/dlls/setupx.dll16/devinst16.c @@ -104,7 +104,7 @@ RETERR16 WINAPI DiCreateDeviceInfo16(LPLPDEVICE_INFO16 lplpdi, LPCSTR lpszClassName, HWND16 hwndParent) { LPDEVICE_INFO16 lpdi; - FIXME("(%p %s %08x %x %s %s %x): stub\n", lplpdi, + FIXME("(%p %s %08lx %x %s %s %x): stub\n", lplpdi, debugstr_a(lpszDescription), dnDevnode, hkey, debugstr_a(lpszRegsubkey), debugstr_a(lpszClassName), hwndParent); lpdi = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DEVICE_INFO16)); diff --git a/dlls/setupx.dll16/setupx_main.c b/dlls/setupx.dll16/setupx_main.c index 9245ead9c59..19de9480ee3 100644 --- a/dlls/setupx.dll16/setupx_main.c +++ b/dlls/setupx.dll16/setupx_main.c @@ -86,7 +86,7 @@ DWORD WINAPI SURegQueryValueEx( HKEY hkey, LPSTR lpszValueName, LPDWORD lpdwReserved, LPDWORD lpdwType, LPBYTE lpbData, LPDWORD lpcbData ) { - FIXME("(%p,%s,%p,%p,%p,%d), semi-stub.\n",hkey,debugstr_a(lpszValueName), + FIXME("(%p,%s,%p,%p,%p,%ld), semi-stub.\n",hkey,debugstr_a(lpszValueName), lpdwReserved,lpdwType,lpbData,lpcbData?*lpcbData:0); return RegQueryValueExA( hkey, lpszValueName, lpdwReserved, lpdwType, lpbData, lpcbData ); @@ -608,7 +608,7 @@ RETERR16 WINAPI CtlGetLddPath16(LOGDISKID16 ldid, LPSTR szPath) */ RETERR16 WINAPI DiInstallClass16(LPCSTR lpszInfFileName, DWORD dwFlags) { - FIXME("(%s, %u), stub.\n", lpszInfFileName, dwFlags); + FIXME("(%s, %lu), stub.\n", lpszInfFileName, dwFlags); return 0; } diff --git a/dlls/setupx.dll16/virtcopy.c b/dlls/setupx.dll16/virtcopy.c index d6bcab6611f..552db5a9895 100644 --- a/dlls/setupx.dll16/virtcopy.c +++ b/dlls/setupx.dll16/virtcopy.c @@ -408,7 +408,7 @@ LPCSTR WINAPI VcpExplain16(LPVIRTNODE lpVn, DWORD dwWhat) } break; default: - FIXME("%d unimplemented !\n", dwWhat); + FIXME("%ld unimplemented !\n", dwWhat); strcpy(buffer, "Unknown error"); break; } @@ -517,7 +517,7 @@ RETERR16 WINAPI vcpDefCallbackProc16(LPVOID lpvObj, UINT16 uMsg, WPARAM wParam, { static int count = 0; if (count < 10) - FIXME("(%p, %04x, %04lx, %08lx, %08lx) - what to do here ?\n", + FIXME("(%p, %04x, %04x, %08lx, %08lx) - what to do here ?\n", lpvObj, uMsg, wParam, lParam, lParamRef); count++; return OK; @@ -669,7 +669,7 @@ RETERR16 WINAPI vcpUICallbackProc16(LPVOID lpvObj, UINT16 uMsg, WPARAM wParam, RETERR16 res = VCPN_OK; if (count < 5) - FIXME("(%p, %04x, %04lx, %08lx, %08lx) - semi-stub\n", + FIXME("(%p, %04x, %04x, %08lx, %08lx) - semi-stub\n", lpvObj, uMsg, wParam, lParam, lParamRef); count++; switch (uMsg)
1
0
0
0
Eric Pouech : setupapi: Enable compilation with long types.
by Alexandre Julliard
17 Feb '22
17 Feb '22
Module: wine Branch: master Commit: e498e0ec9bf5a3f9cdb965f8668888697ac642ae URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e498e0ec9bf5a3f9cdb965f8…
Author: Eric Pouech <eric.pouech(a)gmail.com> Date: Thu Feb 17 07:13:03 2022 +0100 setupapi: Enable compilation with long types. Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/setupapi/Makefile.in | 2 +- dlls/setupapi/devinst.c | 160 ++++++++++++++++++++++---------------------- dlls/setupapi/dialog.c | 6 +- dlls/setupapi/dirid.c | 4 +- dlls/setupapi/diskspace.c | 2 +- dlls/setupapi/fakedll.c | 16 ++--- dlls/setupapi/install.c | 18 ++--- dlls/setupapi/misc.c | 16 ++--- dlls/setupapi/parser.c | 10 +-- dlls/setupapi/query.c | 24 +++---- dlls/setupapi/queue.c | 32 ++++----- dlls/setupapi/setupcab.c | 4 +- dlls/setupapi/stringtable.c | 14 ++-- dlls/setupapi/stubs.c | 100 +++++++++++++-------------- 14 files changed, 204 insertions(+), 204 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=e498e0ec9bf5a3f9cdb9…
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
...
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