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 2020
----- 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
874 discussions
Start a n
N
ew thread
Zebediah Figura : d3d8: Retrieve vertex shader constants from the primary stateblock.
by Alexandre Julliard
21 Feb '20
21 Feb '20
Module: wine Branch: master Commit: ffb8cc3623bde69ac80bfbcd5347581c0779a726 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ffb8cc3623bde69ac80bfbcd…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Feb 20 20:21:30 2020 -0600 d3d8: Retrieve vertex shader constants from the primary stateblock. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/d3d8_private.h | 2 ++ dlls/d3d8/device.c | 25 ++++++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/dlls/d3d8/d3d8_private.h b/dlls/d3d8/d3d8_private.h index 26451255c0..0fcc8bd7a0 100644 --- a/dlls/d3d8/d3d8_private.h +++ b/dlls/d3d8/d3d8_private.h @@ -131,6 +131,8 @@ struct d3d8_device DWORD in_destruction : 1; DWORD padding : 14; + unsigned int vs_uniform_count; + /* The d3d8 API supports only one implicit swapchain (no D3DCREATE_ADAPTERGROUP_DEVICE, * no GetSwapchain, GetBackBuffer doesn't accept a swapchain number). */ struct wined3d_swapchain *implicit_swapchain; diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index ef1b3afde9..90dec4aaa7 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -2991,26 +2991,29 @@ static HRESULT WINAPI d3d8_device_SetVertexShaderConstant(IDirect3DDevice8 *ifac } static HRESULT WINAPI d3d8_device_GetVertexShaderConstant(IDirect3DDevice8 *iface, - DWORD start_register, void *data, DWORD count) + DWORD start_idx, void *constants, DWORD count) { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); - HRESULT hr; + const struct wined3d_vec4 *src; - TRACE("iface %p, start_register %u, data %p, count %u.\n", - iface, start_register, data, count); + TRACE("iface %p, start_idx %u, constants %p, count %u.\n", iface, start_idx, constants, count); - if (start_register + count > D3D8_MAX_VERTEX_SHADER_CONSTANTF) + if (!constants) + return D3DERR_INVALIDCALL; + + if (start_idx >= device->vs_uniform_count || count > device->vs_uniform_count - start_idx) { - WARN("Trying to access %u constants, but d3d8 only supports %u\n", - start_register + count, D3D8_MAX_VERTEX_SHADER_CONSTANTF); + WARN("Trying to access %u constants, but d3d8 only supports %u.\n", + start_idx + count, device->vs_uniform_count); return D3DERR_INVALIDCALL; } wined3d_mutex_lock(); - hr = wined3d_device_get_vs_consts_f(device->wined3d_device, start_register, count, data); + src = wined3d_stateblock_get_state(device->state)->vs_consts_f; + memcpy(constants, &src[start_idx], count * sizeof(*src)); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d8_device_GetVertexShaderDeclaration(IDirect3DDevice8 *iface, @@ -3668,6 +3671,7 @@ HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wine struct wined3d_swapchain_desc swapchain_desc; struct wined3d_swapchain *wined3d_swapchain; struct d3d8_swapchain *d3d_swapchain; + struct wined3d_caps caps; HRESULT hr; static const enum wined3d_feature_level feature_levels[] = @@ -3702,6 +3706,9 @@ HRESULT device_init(struct d3d8_device *device, struct d3d8 *parent, struct wine return hr; } + wined3d_get_device_caps(wined3d, adapter, device_type, &caps); + device->vs_uniform_count = caps.MaxVertexShaderConst; + if (FAILED(hr = wined3d_stateblock_create(device->wined3d_device, NULL, WINED3D_SBT_PRIMARY, &device->state))) { ERR("Failed to create primary stateblock, hr %#x.\n", hr);
1
0
0
0
Matteo Bruni : wined3d: Get rid of the contained_*s_consts_* arrays.
by Alexandre Julliard
21 Feb '20
21 Feb '20
Module: wine Branch: master Commit: 07a96c46e3c60a09bb646af81e408e1813470758 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=07a96c46e3c60a09bb646af8…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Feb 20 22:40:15 2020 +0100 wined3d: Get rid of the contained_*s_consts_* arrays. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/stateblock.c | 169 ++++++++++++++++------------------------- dlls/wined3d/wined3d_private.h | 12 --- 2 files changed, 66 insertions(+), 115 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=07a96c46e3c60a09bb64…
1
0
0
0
Matteo Bruni : wined3d: Check the actual device limit in wined3d_stateblock_set_*s_consts_f().
by Alexandre Julliard
21 Feb '20
21 Feb '20
Module: wine Branch: master Commit: efeaf866a35ff002d32c35d4656f25f6bfb85839 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=efeaf866a35ff002d32c35d4…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Feb 20 22:40:14 2020 +0100 wined3d: Check the actual device limit in wined3d_stateblock_set_*s_consts_f(). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/stateblock.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 0f5e2d70ea..6e8bebd719 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -1367,10 +1367,13 @@ static void wined3d_bitmap_set_bits(uint32_t *bitmap, unsigned int start, unsign HRESULT CDECL wined3d_stateblock_set_vs_consts_f(struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants) { + const struct wined3d_d3d_info *d3d_info = &stateblock->device->adapter->d3d_info; + TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n", stateblock, start_idx, count, constants); - if (!constants || start_idx >= WINED3D_MAX_VS_CONSTS_F || count > WINED3D_MAX_VS_CONSTS_F - start_idx) + if (!constants || start_idx >= d3d_info->limits.vs_uniform_count + || count > d3d_info->limits.vs_uniform_count - start_idx) return WINED3DERR_INVALIDCALL; memcpy(&stateblock->stateblock_state.vs_consts_f[start_idx], constants, count * sizeof(*constants)); @@ -1433,10 +1436,13 @@ void CDECL wined3d_stateblock_set_pixel_shader(struct wined3d_stateblock *stateb HRESULT CDECL wined3d_stateblock_set_ps_consts_f(struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants) { + const struct wined3d_d3d_info *d3d_info = &stateblock->device->adapter->d3d_info; + TRACE("stateblock %p, start_idx %u, count %u, constants %p.\n", stateblock, start_idx, count, constants); - if (!constants || start_idx >= WINED3D_MAX_PS_CONSTS_F || count > WINED3D_MAX_PS_CONSTS_F - start_idx) + if (!constants || start_idx >= d3d_info->limits.ps_uniform_count + || count > d3d_info->limits.ps_uniform_count - start_idx) return WINED3DERR_INVALIDCALL; memcpy(&stateblock->stateblock_state.ps_consts_f[start_idx], constants, count * sizeof(*constants));
1
0
0
0
Matteo Bruni : wined3d: Use a bitmask for the {v, p}s_const_f fields in struct wined3d_saved_states.
by Alexandre Julliard
21 Feb '20
21 Feb '20
Module: wine Branch: master Commit: 316d675f88cae506fc29e1a5b4ebc8370f74b2ab URL:
https://source.winehq.org/git/wine.git/?a=commit;h=316d675f88cae506fc29e1a5…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Feb 20 22:40:13 2020 +0100 wined3d: Use a bitmask for the {v, p}s_const_f fields in struct wined3d_saved_states. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/device.c | 5 ++- dlls/wined3d/stateblock.c | 69 ++++++++++++++++++++++++++++++------------ dlls/wined3d/wined3d_private.h | 4 +-- 3 files changed, 54 insertions(+), 24 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 17d71b3b1a..3cf621ff46 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -27,7 +27,6 @@ #include "config.h" #include "wine/port.h" -#include <stdio.h> #ifdef HAVE_FLOAT_H # include <float.h> #endif @@ -3854,7 +3853,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, count = 0; for (i = 0; i < d3d_info->limits.vs_uniform_count; ++i) { - if (changed->vs_consts_f[i]) + if (wined3d_bitmap_is_set(changed->vs_consts_f, i)) ++count; else if (count) { @@ -3896,7 +3895,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, count = 0; for (i = 0; i < d3d_info->limits.ps_uniform_count; ++i) { - if (changed->ps_consts_f[i]) + if (wined3d_bitmap_is_set(changed->ps_consts_f, i)) ++count; else if (count) { diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index d787eef0d9..0f5e2d70ea 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -189,7 +189,7 @@ static const DWORD vertex_states_sampler[] = WINED3D_SAMP_DMAP_OFFSET, }; -static inline void stateblock_set_bits(DWORD *map, UINT map_size) +static inline void stateblock_set_all_bits(DWORD *map, UINT map_size) { DWORD mask = (1u << (map_size & 0x1f)) - 1; memset(map, 0xff, (map_size >> 5) * sizeof(*map)); @@ -201,7 +201,6 @@ static void stateblock_savedstates_set_all(struct wined3d_saved_states *states, { unsigned int i; - /* Single values */ states->indices = 1; states->material = 1; states->viewport = 1; @@ -211,12 +210,11 @@ static void stateblock_savedstates_set_all(struct wined3d_saved_states *states, states->scissorRect = 1; states->blend_state = 1; - /* Fixed size arrays */ states->streamSource = 0xffff; states->streamFreq = 0xffff; states->textures = 0xfffff; - stateblock_set_bits(states->transform, WINED3D_HIGHEST_TRANSFORM_STATE + 1); - stateblock_set_bits(states->renderState, WINEHIGHEST_RENDER_STATE + 1); + stateblock_set_all_bits(states->transform, WINED3D_HIGHEST_TRANSFORM_STATE + 1); + stateblock_set_all_bits(states->renderState, WINEHIGHEST_RENDER_STATE + 1); for (i = 0; i < WINED3D_MAX_TEXTURES; ++i) states->textureState[i] = 0x3ffff; for (i = 0; i < WINED3D_MAX_COMBINED_SAMPLERS; ++i) states->samplerState[i] = 0x3ffe; states->clipplane = (1u << WINED3D_MAX_CLIP_DISTANCES) - 1; @@ -225,9 +223,8 @@ static void stateblock_savedstates_set_all(struct wined3d_saved_states *states, states->vertexShaderConstantsB = 0xffff; states->vertexShaderConstantsI = 0xffff; - /* Dynamically sized arrays */ - memset(states->ps_consts_f, TRUE, sizeof(BOOL) * ps_consts); - memset(states->vs_consts_f, TRUE, sizeof(BOOL) * vs_consts); + memset(states->ps_consts_f, 0xffu, sizeof(states->ps_consts_f)); + memset(states->vs_consts_f, 0xffu, sizeof(states->vs_consts_f)); } static void stateblock_savedstates_set_pixel(struct wined3d_saved_states *states, const DWORD num_constants) @@ -253,7 +250,7 @@ static void stateblock_savedstates_set_pixel(struct wined3d_saved_states *states states->pixelShaderConstantsB = 0xffff; states->pixelShaderConstantsI = 0xffff; - memset(states->ps_consts_f, TRUE, sizeof(BOOL) * num_constants); + memset(states->ps_consts_f, 0xffu, sizeof(states->ps_consts_f)); } static void stateblock_savedstates_set_vertex(struct wined3d_saved_states *states, const DWORD num_constants) @@ -281,12 +278,12 @@ static void stateblock_savedstates_set_vertex(struct wined3d_saved_states *state states->vertexShaderConstantsB = 0xffff; states->vertexShaderConstantsI = 0xffff; - memset(states->vs_consts_f, TRUE, sizeof(BOOL) * num_constants); + memset(states->vs_consts_f, 0xffu, sizeof(states->vs_consts_f)); } void CDECL wined3d_stateblock_init_contained_states(struct wined3d_stateblock *stateblock) { - const struct wined3d_d3d_info *d3d_info = &stateblock->device->adapter->d3d_info; + const unsigned int word_bit_count = sizeof(*stateblock->changed.vs_consts_f) * CHAR_BIT; unsigned int i, j; for (i = 0; i <= WINEHIGHEST_RENDER_STATE >> 5; ++i) @@ -313,11 +310,14 @@ void CDECL wined3d_stateblock_init_contained_states(struct wined3d_stateblock *s } } - for (i = 0; i < d3d_info->limits.vs_uniform_count; ++i) + for (i = 0; i < ARRAY_SIZE(stateblock->changed.vs_consts_f); ++i) { - if (stateblock->changed.vs_consts_f[i]) + DWORD bitmask = stateblock->changed.vs_consts_f[i]; + + while (bitmask) { - stateblock->contained_vs_consts_f[stateblock->num_contained_vs_consts_f] = i; + j = wined3d_bit_scan(&bitmask); + stateblock->contained_vs_consts_f[stateblock->num_contained_vs_consts_f] = i * word_bit_count + j; ++stateblock->num_contained_vs_consts_f; } } @@ -340,11 +340,14 @@ void CDECL wined3d_stateblock_init_contained_states(struct wined3d_stateblock *s } } - for (i = 0; i < d3d_info->limits.ps_uniform_count; ++i) + for (i = 0; i < ARRAY_SIZE(stateblock->changed.ps_consts_f); ++i) { - if (stateblock->changed.ps_consts_f[i]) + DWORD bitmask = stateblock->changed.ps_consts_f[i]; + + while (bitmask) { - stateblock->contained_ps_consts_f[stateblock->num_contained_ps_consts_f] = i; + j = wined3d_bit_scan(&bitmask); + stateblock->contained_ps_consts_f[stateblock->num_contained_ps_consts_f] = i * word_bit_count + j; ++stateblock->num_contained_ps_consts_f; } } @@ -1333,6 +1336,34 @@ void CDECL wined3d_stateblock_set_vertex_shader(struct wined3d_stateblock *state stateblock->changed.vertexShader = TRUE; } +static void wined3d_bitmap_set_bits(uint32_t *bitmap, unsigned int start, unsigned int count) +{ + const unsigned int word_bit_count = sizeof(*bitmap) * CHAR_BIT; + const unsigned int shift = start % word_bit_count; + uint32_t mask, last_mask; + unsigned int mask_size; + + bitmap += start / word_bit_count; + mask = ~0u << shift; + mask_size = word_bit_count - shift; + last_mask = (1u << (start + count) % word_bit_count) - 1; + if (mask_size <= count) + { + *bitmap |= mask; + ++bitmap; + count -= mask_size; + mask = ~0u; + } + if (count >= word_bit_count) + { + memset(bitmap, 0xffu, count / word_bit_count * sizeof(*bitmap)); + bitmap += count / word_bit_count; + count = count % word_bit_count; + } + if (count) + *bitmap |= mask & last_mask; +} + HRESULT CDECL wined3d_stateblock_set_vs_consts_f(struct wined3d_stateblock *stateblock, unsigned int start_idx, unsigned int count, const struct wined3d_vec4 *constants) { @@ -1343,7 +1374,7 @@ HRESULT CDECL wined3d_stateblock_set_vs_consts_f(struct wined3d_stateblock *stat return WINED3DERR_INVALIDCALL; memcpy(&stateblock->stateblock_state.vs_consts_f[start_idx], constants, count * sizeof(*constants)); - memset(&stateblock->changed.vs_consts_f[start_idx], 1, count * sizeof(*stateblock->changed.vs_consts_f)); + wined3d_bitmap_set_bits(stateblock->changed.vs_consts_f, start_idx, count); return WINED3D_OK; } @@ -1409,7 +1440,7 @@ HRESULT CDECL wined3d_stateblock_set_ps_consts_f(struct wined3d_stateblock *stat return WINED3DERR_INVALIDCALL; memcpy(&stateblock->stateblock_state.ps_consts_f[start_idx], constants, count * sizeof(*constants)); - memset(&stateblock->changed.ps_consts_f[start_idx], 1, count * sizeof(*stateblock->changed.ps_consts_f)); + wined3d_bitmap_set_bits(stateblock->changed.ps_consts_f, start_idx, count); return WINED3D_OK; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 444e8fdf63..e4fca3d883 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3923,10 +3923,10 @@ struct wined3d_saved_states DWORD clipplane; /* WINED3D_MAX_USER_CLIP_PLANES, 32 */ WORD pixelShaderConstantsB; /* WINED3D_MAX_CONSTS_B, 16 */ WORD pixelShaderConstantsI; /* WINED3D_MAX_CONSTS_I, 16 */ - BOOL ps_consts_f[WINED3D_MAX_PS_CONSTS_F]; + DWORD ps_consts_f[WINED3D_MAX_PS_CONSTS_F >> 5]; WORD vertexShaderConstantsB; /* WINED3D_MAX_CONSTS_B, 16 */ WORD vertexShaderConstantsI; /* WINED3D_MAX_CONSTS_I, 16 */ - BOOL vs_consts_f[WINED3D_MAX_VS_CONSTS_F]; + DWORD vs_consts_f[WINED3D_MAX_VS_CONSTS_F >> 5]; DWORD textures : 20; /* WINED3D_MAX_COMBINED_SAMPLERS, 20 */ DWORD indices : 1; DWORD material : 1;
1
0
0
0
Nikolay Sivov : kernel32/tests: Link to activation context API directly.
by Alexandre Julliard
21 Feb '20
21 Feb '20
Module: wine Branch: master Commit: f1ff96cf5a94d7d6212c4d9885f3f801218023a1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f1ff96cf5a94d7d6212c4d98…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Feb 21 13:24:33 2020 +0300 kernel32/tests: Link to activation context API directly. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/path.c | 35 +++++++---------------------------- dlls/kernel32/tests/thread.c | 41 ++++++++++++----------------------------- 2 files changed, 19 insertions(+), 57 deletions(-) diff --git a/dlls/kernel32/tests/path.c b/dlls/kernel32/tests/path.c index 3d717f7b1f..7342a865af 100644 --- a/dlls/kernel32/tests/path.c +++ b/dlls/kernel32/tests/path.c @@ -80,12 +80,6 @@ static NTSTATUS (WINAPI *pRtlGetSearchPath)(LPWSTR*); static void (WINAPI *pRtlReleasePath)(LPWSTR); static NTSTATUS (WINAPI *pLdrGetDllPath)(LPCWSTR,ULONG,LPWSTR*,LPWSTR*); -static BOOL (WINAPI *pActivateActCtx)(HANDLE,ULONG_PTR*); -static HANDLE (WINAPI *pCreateActCtxW)(PCACTCTXW); -static BOOL (WINAPI *pDeactivateActCtx)(DWORD,ULONG_PTR); -static BOOL (WINAPI *pGetCurrentActCtx)(HANDLE *); -static void (WINAPI *pReleaseActCtx)(HANDLE); - static BOOL (WINAPI *pCheckNameLegalDOS8Dot3W)(const WCHAR *, char *, DWORD, BOOL *, BOOL *); static BOOL (WINAPI *pCheckNameLegalDOS8Dot3A)(const char *, char *, DWORD, BOOL *, BOOL *); @@ -1758,7 +1752,7 @@ static HANDLE test_create(const char *file) actctx.cbSize = sizeof(ACTCTXW); actctx.lpSource = manifest_path; - handle = pCreateActCtxW(&actctx); + handle = CreateActCtxW(&actctx); ok(handle != INVALID_HANDLE_VALUE, "failed to create context, error %u\n", GetLastError()); ok(actctx.cbSize == sizeof(actctx), "cbSize=%d\n", actctx.cbSize); @@ -1825,9 +1819,6 @@ static void test_SearchPathA(void) DeleteFileA(path2A); - if (!pActivateActCtx) - return; - GetWindowsDirectoryA(pathA, ARRAY_SIZE(pathA)); create_manifest_file("testdep1.manifest", manifest_dep); @@ -1844,7 +1835,7 @@ static void test_SearchPathA(void) ret = SearchPathA(NULL, kernel32A, NULL, ARRAY_SIZE(path2A), path2A, NULL); ok(ret && ret == strlen(path2A), "got %d\n", ret); - ret = pActivateActCtx(handle, &cookie); + ret = ActivateActCtx(handle, &cookie); ok(ret, "failed to activate context, %u\n", GetLastError()); /* works when activated */ @@ -1873,9 +1864,9 @@ static void test_SearchPathA(void) ok(ret && ret == strlen(buffA), "got %d\n", ret); ok(strcmp(buffA, path2A), "got wrong path %s, %s\n", buffA, path2A); - ret = pDeactivateActCtx(0, cookie); + ret = DeactivateActCtx(0, cookie); ok(ret, "failed to deactivate context, %u\n", GetLastError()); - pReleaseActCtx(handle); + ReleaseActCtx(handle); /* test the search path priority of the working directory */ GetTempPathA(sizeof(tmpdirA), tmpdirA); @@ -1957,9 +1948,6 @@ if (0) DeleteFileW(path2W); - if (!pActivateActCtx) - return; - GetWindowsDirectoryW(pathW, ARRAY_SIZE(pathW)); create_manifest_file("testdep1.manifest", manifest_dep); @@ -1983,7 +1971,7 @@ if (0) GetWindowsDirectoryW(pathW, ARRAY_SIZE(pathW)); - ret = pActivateActCtx(handle, &cookie); + ret = ActivateActCtx(handle, &cookie); ok(ret, "failed to activate context, %u\n", GetLastError()); /* works when activated */ @@ -2016,9 +2004,9 @@ if (0) ret = SearchPathW(NULL, ole32W, NULL, ARRAY_SIZE(buffW), buffW, NULL); ok(ret && ret == lstrlenW(buffW), "got %d\n", ret); - ret = pDeactivateActCtx(0, cookie); + ret = DeactivateActCtx(0, cookie); ok(ret, "failed to deactivate context, %u\n", GetLastError()); - pReleaseActCtx(handle); + ReleaseActCtx(handle); } static void test_GetFullPathNameA(void) @@ -2157,11 +2145,6 @@ static void init_pointers(void) MAKEFUNC(RemoveDllDirectory); MAKEFUNC(SetDllDirectoryW); MAKEFUNC(SetDefaultDllDirectories); - MAKEFUNC(ActivateActCtx); - MAKEFUNC(CreateActCtxW); - MAKEFUNC(DeactivateActCtx); - MAKEFUNC(GetCurrentActCtx); - MAKEFUNC(ReleaseActCtx); MAKEFUNC(CheckNameLegalDOS8Dot3W); MAKEFUNC(CheckNameLegalDOS8Dot3A); mod = GetModuleHandleA("ntdll.dll"); @@ -2695,10 +2678,6 @@ START_TEST(path) init_pointers(); - /* Report only once */ - if (!pActivateActCtx) - win_skip("Activation contexts not supported, some tests will be skipped\n"); - test_relative_path(); test_InitPathA(curdir, &curDrive, &otherDrive); test_CurrentDirectoryA(origdir,curdir); diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c index 8c27024cf2..3b9a407e73 100644 --- a/dlls/kernel32/tests/thread.c +++ b/dlls/kernel32/tests/thread.c @@ -90,11 +90,6 @@ static BOOL (WINAPI *pIsWow64Process)(HANDLE,PBOOL); static BOOL (WINAPI *pSetThreadErrorMode)(DWORD,PDWORD); static DWORD (WINAPI *pGetThreadErrorMode)(void); static DWORD (WINAPI *pRtlGetThreadErrorMode)(void); -static BOOL (WINAPI *pActivateActCtx)(HANDLE,ULONG_PTR*); -static HANDLE (WINAPI *pCreateActCtxW)(PCACTCTXW); -static BOOL (WINAPI *pDeactivateActCtx)(DWORD,ULONG_PTR); -static BOOL (WINAPI *pGetCurrentActCtx)(HANDLE *); -static void (WINAPI *pReleaseActCtx)(HANDLE); static PTP_POOL (WINAPI *pCreateThreadpool)(PVOID); static void (WINAPI *pCloseThreadpool)(PTP_POOL); static PTP_WORK (WINAPI *pCreateThreadpoolWork)(PTP_WORK_CALLBACK,PVOID,PTP_CALLBACK_ENVIRON); @@ -312,7 +307,7 @@ static DWORD WINAPI thread_actctx_func(void *p) BOOL ret; cur = (void*)0xdeadbeef; - ret = pGetCurrentActCtx(&cur); + ret = GetCurrentActCtx(&cur); ok(ret, "thread GetCurrentActCtx failed, %u\n", GetLastError()); ok(cur == param->handle, "got %p, expected %p\n", cur, param->handle); param->thread_context = cur; @@ -1852,7 +1847,7 @@ static HANDLE test_create(const char *file) actctx.cbSize = sizeof(ACTCTXW); actctx.lpSource = path; - handle = pCreateActCtxW(&actctx); + handle = CreateActCtxW(&actctx); ok(handle != INVALID_HANDLE_VALUE, "failed to create context, error %u\n", GetLastError()); ok(actctx.cbSize == sizeof(actctx), "cbSize=%d\n", actctx.cbSize); @@ -1876,12 +1871,6 @@ static void test_thread_actctx(void) DWORD tid, ret; BOOL b; - if (!pActivateActCtx) - { - win_skip("skipping activation context tests\n"); - return; - } - create_manifest_file("testdep1.manifest", manifest_dep); create_manifest_file("main.manifest", manifest_main); @@ -1890,7 +1879,7 @@ static void test_thread_actctx(void) DeleteFileA("main.manifest"); handle = (void*)0xdeadbeef; - b = pGetCurrentActCtx(&handle); + b = GetCurrentActCtx(&handle); ok(b, "GetCurrentActCtx failed: %u\n", GetLastError()); ok(handle == 0, "active context %p\n", handle); @@ -1905,17 +1894,17 @@ static void test_thread_actctx(void) ok(param.thread_context == NULL, "got wrong thread context %p\n", param.thread_context); CloseHandle(thread); - b = pActivateActCtx(context, &cookie); + b = ActivateActCtx(context, &cookie); ok(b, "activation failed: %u\n", GetLastError()); handle = 0; - b = pGetCurrentActCtx(&handle); + b = GetCurrentActCtx(&handle); ok(b, "GetCurrentActCtx failed: %u\n", GetLastError()); ok(handle != 0, "no active context\n"); - pReleaseActCtx(handle); + ReleaseActCtx(handle); param.handle = NULL; - b = pGetCurrentActCtx(¶m.handle); + b = GetCurrentActCtx(¶m.handle); ok(b && param.handle != NULL, "failed to get context, %u\n", GetLastError()); param.thread_context = (void*)0xdeadbeef; @@ -1925,7 +1914,7 @@ static void test_thread_actctx(void) ret = WaitForSingleObject(thread, 1000); ok(ret == WAIT_OBJECT_0, "wait timeout\n"); ok(param.thread_context == context, "got wrong thread context %p, %p\n", param.thread_context, context); - pReleaseActCtx(param.thread_context); + ReleaseActCtx(param.thread_context); CloseHandle(thread); /* similar test for CreateRemoteThread() */ @@ -1936,17 +1925,16 @@ static void test_thread_actctx(void) ret = WaitForSingleObject(thread, 1000); ok(ret == WAIT_OBJECT_0, "wait timeout\n"); ok(param.thread_context == context, "got wrong thread context %p, %p\n", param.thread_context, context); - pReleaseActCtx(param.thread_context); + ReleaseActCtx(param.thread_context); CloseHandle(thread); - pReleaseActCtx(param.handle); + ReleaseActCtx(param.handle); - b = pDeactivateActCtx(0, cookie); + b = DeactivateActCtx(0, cookie); ok(b, "DeactivateActCtx failed: %u\n", GetLastError()); - pReleaseActCtx(context); + ReleaseActCtx(context); } - static void WINAPI threadpool_workcallback(PTP_CALLBACK_INSTANCE instance, void *context, PTP_WORK work) { int *foo = (int*)context; @@ -2267,11 +2255,6 @@ static void init_funcs(void) X(IsWow64Process); X(SetThreadErrorMode); X(GetThreadErrorMode); - X(ActivateActCtx); - X(CreateActCtxW); - X(DeactivateActCtx); - X(GetCurrentActCtx); - X(ReleaseActCtx); X(CreateThreadpool); X(CloseThreadpool);
1
0
0
0
Nikolay Sivov : vcomp/tests: Link to activation context API directly.
by Alexandre Julliard
21 Feb '20
21 Feb '20
Module: wine Branch: master Commit: eb4c4b35049ab4e6f99f9063b5820040c61fd76c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=eb4c4b35049ab4e6f99f9063…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Feb 21 13:24:23 2020 +0300 vcomp/tests: Link to activation context API directly. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vcomp/tests/vcomp.c | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/dlls/vcomp/tests/vcomp.c b/dlls/vcomp/tests/vcomp.c index a8b80a0e22..0aea30815e 100644 --- a/dlls/vcomp/tests/vcomp.c +++ b/dlls/vcomp/tests/vcomp.c @@ -27,11 +27,6 @@ static HANDLE vcomp_actctx_hctx; static ULONG_PTR vcomp_actctx_cookie; static HMODULE vcomp_handle; -static HANDLE (WINAPI *pCreateActCtxA)(ACTCTXA*); -static BOOL (WINAPI *pActivateActCtx)(HANDLE, ULONG_PTR*); -static BOOL (WINAPI *pDeactivateActCtx)(DWORD, ULONG_PTR); -static VOID (WINAPI *pReleaseActCtx)(HANDLE); - typedef CRITICAL_SECTION *omp_lock_t; typedef CRITICAL_SECTION *omp_nest_lock_t; @@ -191,18 +186,10 @@ static const char vcomp_manifest[] = static void create_vcomp_manifest(void) { char temp_path[MAX_PATH]; - HMODULE kernel32; DWORD written; ACTCTXA ctx; HANDLE file; - kernel32 = GetModuleHandleA("kernel32.dll"); - pCreateActCtxA = (void *)GetProcAddress(kernel32, "CreateActCtxA"); - pActivateActCtx = (void *)GetProcAddress(kernel32, "ActivateActCtx"); - pDeactivateActCtx = (void *)GetProcAddress(kernel32, "DeactivateActCtx"); - pReleaseActCtx = (void *)GetProcAddress(kernel32, "ReleaseActCtx"); - if (!pCreateActCtxA) return; - if (!GetTempPathA(sizeof(temp_path), temp_path) || !GetTempFileNameA(temp_path, "vcomp", 0, vcomp_manifest_file)) { @@ -231,7 +218,7 @@ static void create_vcomp_manifest(void) memset(&ctx, 0, sizeof(ctx)); ctx.cbSize = sizeof(ctx); ctx.lpSource = vcomp_manifest_file; - vcomp_actctx_hctx = pCreateActCtxA(&ctx); + vcomp_actctx_hctx = CreateActCtxA(&ctx); if (!vcomp_actctx_hctx) { ok(0, "failed to create activation context\n"); @@ -239,10 +226,10 @@ static void create_vcomp_manifest(void) return; } - if (!pActivateActCtx(vcomp_actctx_hctx, &vcomp_actctx_cookie)) + if (!ActivateActCtx(vcomp_actctx_hctx, &vcomp_actctx_cookie)) { win_skip("failed to activate context\n"); - pReleaseActCtx(vcomp_actctx_hctx); + ReleaseActCtx(vcomp_actctx_hctx); DeleteFileA(vcomp_manifest_file); vcomp_actctx_hctx = NULL; } @@ -255,8 +242,8 @@ static void release_vcomp(void) if (vcomp_actctx_hctx) { - pDeactivateActCtx(0, vcomp_actctx_cookie); - pReleaseActCtx(vcomp_actctx_hctx); + DeactivateActCtx(0, vcomp_actctx_cookie); + ReleaseActCtx(vcomp_actctx_hctx); DeleteFileA(vcomp_manifest_file); } }
1
0
0
0
Nikolay Sivov : oleaut32/tests: Link to activation context API directly.
by Alexandre Julliard
21 Feb '20
21 Feb '20
Module: wine Branch: master Commit: bf39f2bf0f3ae498c2b1d32728d1440cfaab80eb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=bf39f2bf0f3ae498c2b1d327…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Feb 21 13:24:14 2020 +0300 oleaut32/tests: Link to activation context API directly. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/oleaut32/tests/typelib.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/dlls/oleaut32/tests/typelib.c b/dlls/oleaut32/tests/typelib.c index e8956fb3b1..75f8d78f07 100644 --- a/dlls/oleaut32/tests/typelib.c +++ b/dlls/oleaut32/tests/typelib.c @@ -89,10 +89,6 @@ static void _expect_ref(IUnknown* obj, ULONG ref, int line) static HRESULT (WINAPI *pRegisterTypeLibForUser)(ITypeLib*,OLECHAR*,OLECHAR*); static HRESULT (WINAPI *pUnRegisterTypeLibForUser)(REFGUID,WORD,WORD,LCID,SYSKIND); -static BOOL (WINAPI *pActivateActCtx)(HANDLE,ULONG_PTR*); -static HANDLE (WINAPI *pCreateActCtxW)(PCACTCTXW); -static BOOL (WINAPI *pDeactivateActCtx)(DWORD,ULONG_PTR); -static VOID (WINAPI *pReleaseActCtx)(HANDLE); static BOOL (WINAPI *pIsWow64Process)(HANDLE,LPBOOL); static LONG (WINAPI *pRegDeleteKeyExW)(HKEY,LPCWSTR,REGSAM,DWORD); @@ -296,10 +292,6 @@ static void init_function_pointers(void) pRegisterTypeLibForUser = (void *)GetProcAddress(hmod, "RegisterTypeLibForUser"); pUnRegisterTypeLibForUser = (void *)GetProcAddress(hmod, "UnRegisterTypeLibForUser"); - pActivateActCtx = (void *)GetProcAddress(hk32, "ActivateActCtx"); - pCreateActCtxW = (void *)GetProcAddress(hk32, "CreateActCtxW"); - pDeactivateActCtx = (void *)GetProcAddress(hk32, "DeactivateActCtx"); - pReleaseActCtx = (void *)GetProcAddress(hk32, "ReleaseActCtx"); pIsWow64Process = (void *)GetProcAddress(hk32, "IsWow64Process"); pRegDeleteKeyExW = (void*)GetProcAddress(hadv, "RegDeleteKeyExW"); } @@ -5744,7 +5736,7 @@ static HANDLE create_actctx(const char *file) actctx.cbSize = sizeof(ACTCTXW); actctx.lpSource = path; - handle = pCreateActCtxW(&actctx); + handle = CreateActCtxW(&actctx); ok(handle != INVALID_HANDLE_VALUE, "handle == INVALID_HANDLE_VALUE, error %u\n", GetLastError()); ok(actctx.cbSize == sizeof(actctx), "actctx.cbSize=%d\n", actctx.cbSize); @@ -5798,12 +5790,6 @@ static void test_LoadRegTypeLib(void) BSTR path; BOOL ret; - if (!pActivateActCtx) - { - win_skip("Activation contexts not supported, skipping LoadRegTypeLib tests\n"); - return; - } - create_manifest_file("testdep.manifest", manifest_dep); create_manifest_file("main.manifest", manifest_main); @@ -5824,7 +5810,7 @@ static void test_LoadRegTypeLib(void) hr = QueryPathOfRegTypeLib(&LIBID_TestTypelib, 2, 0, LOCALE_NEUTRAL, &path); ok(hr == TYPE_E_LIBNOTREGISTERED, "got 0x%08x\n", hr); - ret = pActivateActCtx(handle, &cookie); + ret = ActivateActCtx(handle, &cookie); ok(ret, "ActivateActCtx failed: %u\n", GetLastError()); path = NULL; @@ -5926,10 +5912,10 @@ static void test_LoadRegTypeLib(void) DeleteFileA("test_actctx_tlb.tlb"); DeleteFileA("test_actctx_tlb2.tlb"); - ret = pDeactivateActCtx(0, cookie); + ret = DeactivateActCtx(0, cookie); ok(ret, "DeactivateActCtx failed: %u\n", GetLastError()); - pReleaseActCtx(handle); + ReleaseActCtx(handle); } #define AUX_HREF 1
1
0
0
0
Nikolay Sivov : mf: Request another sample from sample grabber in clock-ignoring mode.
by Alexandre Julliard
21 Feb '20
21 Feb '20
Module: wine Branch: master Commit: a6d048f633e12b1d69d0345e87383236ec2695d3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a6d048f633e12b1d69d0345e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Feb 21 13:16:52 2020 +0300 mf: Request another sample from sample grabber in clock-ignoring mode. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/samplegrabber.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/dlls/mf/samplegrabber.c b/dlls/mf/samplegrabber.c index 205bc70b1b..f44df9f32b 100644 --- a/dlls/mf/samplegrabber.c +++ b/dlls/mf/samplegrabber.c @@ -315,7 +315,7 @@ static HRESULT WINAPI sample_grabber_stream_GetMediaTypeHandler(IMFStreamSink *i return S_OK; } -static HRESULT sample_grabber_report_sample(struct sample_grabber *grabber, IMFSample *sample) +static HRESULT sample_grabber_report_sample(struct sample_grabber *grabber, IMFSample *sample, BOOL *sample_delivered) { LONGLONG sample_time, sample_duration = 0; IMFMediaBuffer *buffer; @@ -324,6 +324,8 @@ static HRESULT sample_grabber_report_sample(struct sample_grabber *grabber, IMFS BYTE *data; HRESULT hr; + *sample_delivered = FALSE; + hr = IMFMediaType_GetMajorType(grabber->media_type, &major_type); if (SUCCEEDED(hr)) @@ -342,6 +344,8 @@ static HRESULT sample_grabber_report_sample(struct sample_grabber *grabber, IMFS if (SUCCEEDED(hr = IMFMediaBuffer_Lock(buffer, &data, NULL, &size))) { + *sample_delivered = TRUE; + if (grabber->callback2) { hr = IMFSample_CopyAllItems(sample, grabber->stream->sample_attributes); @@ -414,9 +418,15 @@ static HRESULT stream_queue_sample(struct sample_grabber_stream *stream, IMFSamp return hr; } +static void sample_grabber_stream_request_sample(struct sample_grabber_stream *stream) +{ + IMFStreamSink_QueueEvent(&stream->IMFStreamSink_iface, MEStreamSinkRequestSample, &GUID_NULL, S_OK, NULL); +} + static HRESULT WINAPI sample_grabber_stream_ProcessSample(IMFStreamSink *iface, IMFSample *sample) { struct sample_grabber_stream *stream = impl_from_IMFStreamSink(iface); + BOOL sample_delivered; LONGLONG sampletime; HRESULT hr = S_OK; @@ -437,7 +447,13 @@ static HRESULT WINAPI sample_grabber_stream_ProcessSample(IMFStreamSink *iface, if (SUCCEEDED(hr)) { if (stream->sink->ignore_clock) - hr = sample_grabber_report_sample(stream->sink, sample); + { + /* OnProcessSample() could return error code, which has to be propagated but isn't a blocker. + Use additional flag indicating that user callback was called at all. */ + hr = sample_grabber_report_sample(stream->sink, sample, &sample_delivered); + if (sample_delivered) + sample_grabber_stream_request_sample(stream); + } else hr = stream_queue_sample(stream, sample); } @@ -725,15 +741,11 @@ static struct scheduled_item *stream_get_next_item(struct sample_grabber_stream return item; } -static void sample_grabber_stream_request_sample(struct sample_grabber_stream *stream) -{ - IMFStreamSink_QueueEvent(&stream->IMFStreamSink_iface, MEStreamSinkRequestSample, &GUID_NULL, S_OK, NULL); -} - static HRESULT WINAPI sample_grabber_stream_timer_callback_Invoke(IMFAsyncCallback *iface, IMFAsyncResult *result) { struct sample_grabber_stream *stream = impl_from_IMFAsyncCallback(iface); struct scheduled_item *item; + BOOL sample_delivered; HRESULT hr; EnterCriticalSection(&stream->cs); @@ -746,7 +758,7 @@ static HRESULT WINAPI sample_grabber_stream_timer_callback_Invoke(IMFAsyncCallba switch (item->type) { case ITEM_TYPE_SAMPLE: - if (FAILED(hr = sample_grabber_report_sample(stream->sink, item->u.sample))) + if (FAILED(hr = sample_grabber_report_sample(stream->sink, item->u.sample, &sample_delivered))) WARN("Failed to report a sample, hr %#x.\n", hr); stream_release_pending_item(item); item = stream_get_next_item(stream);
1
0
0
0
Nikolay Sivov : mf: Shut down quality manager on session shutdown.
by Alexandre Julliard
21 Feb '20
21 Feb '20
Module: wine Branch: master Commit: 431afba5cf1c704e1159e2f5bccde4a59cb5f8ea URL:
https://source.winehq.org/git/wine.git/?a=commit;h=431afba5cf1c704e1159e2f5…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Feb 21 13:16:51 2020 +0300 mf: Shut down quality manager on session shutdown. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mf/session.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/mf/session.c b/dlls/mf/session.c index 6b5d590a25..5ee4074379 100644 --- a/dlls/mf/session.c +++ b/dlls/mf/session.c @@ -907,6 +907,8 @@ static HRESULT WINAPI mfsession_Shutdown(IMFMediaSession *iface) { session->state = SESSION_STATE_SHUT_DOWN; IMFMediaEventQueue_Shutdown(session->event_queue); + if (session->quality_manager) + IMFQualityManager_Shutdown(session->quality_manager); } LeaveCriticalSection(&session->cs);
1
0
0
0
Brendan Shanks : ntdll: Add system family and SKU to generated SMBIOS tables.
by Alexandre Julliard
21 Feb '20
21 Feb '20
Module: wine Branch: master Commit: 360b7ec299e3907a40c7cac9f3dab1d7e77dac09 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=360b7ec299e3907a40c7cac9…
Author: Brendan Shanks <bshanks(a)codeweavers.com> Date: Thu Feb 20 14:37:28 2020 -0800 ntdll: Add system family and SKU to generated SMBIOS tables. Signed-off-by: Brendan Shanks <bshanks(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/nt.c | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index b89602cee8..f88ded34c1 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -111,6 +111,11 @@ struct smbios_bios { BYTE date; BYTE size; UINT64 characteristics; + BYTE characteristics_ext[2]; + BYTE system_bios_major_release; + BYTE system_bios_minor_release; + BYTE ec_firmware_major_release; + BYTE ec_firmware_minor_release; }; struct smbios_system { @@ -120,6 +125,9 @@ struct smbios_system { BYTE version; BYTE serial; BYTE uuid[16]; + BYTE wake_up_type; + BYTE sku_number; + BYTE family; }; struct smbios_board { @@ -137,6 +145,10 @@ struct smbios_chassis { BYTE version; BYTE serial; BYTE asset_tag; + BYTE boot_state; + BYTE power_supply_state; + BYTE thermal_state; + BYTE security_status; }; #include "poppack.h" @@ -2142,6 +2154,8 @@ static NTSTATUS get_firmware_info(SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULONG size_t bios_vendor_len, bios_version_len, bios_date_len; char system_vendor[128], system_product[128], system_version[128], system_serial[128]; size_t system_vendor_len, system_product_len, system_version_len, system_serial_len; + char system_sku[128], system_family[128]; + size_t system_sku_len, system_family_len; char board_vendor[128], board_product[128], board_version[128], board_serial[128]; size_t board_vendor_len, board_product_len, board_version_len, board_serial_len; char chassis_vendor[128], chassis_version[128], chassis_serial[128], chassis_asset_tag[128]; @@ -2163,6 +2177,8 @@ static NTSTATUS get_firmware_info(SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULONG system_product_len = get_smbios_string("/sys/class/dmi/id/product_name", S(system_product)); system_version_len = get_smbios_string("/sys/class/dmi/id/product_version", S(system_version)); system_serial_len = get_smbios_string("/sys/class/dmi/id/product_serial", S(system_serial)); + system_sku_len = get_smbios_string("/sys/class/dmi/id/product_sku", S(system_sku)); + system_family_len = get_smbios_string("/sys/class/dmi/id/product_family", S(system_family)); board_vendor_len = get_smbios_string("/sys/class/dmi/id/board_vendor", S(board_vendor)); board_product_len = get_smbios_string("/sys/class/dmi/id/board_name", S(board_product)); board_version_len = get_smbios_string("/sys/class/dmi/id/board_version", S(board_version)); @@ -2181,7 +2197,7 @@ static NTSTATUS get_firmware_info(SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULONG *required_len += sizeof(struct smbios_system); *required_len += max(system_vendor_len + system_product_len + system_version_len + - system_serial_len + 5, 2); + system_serial_len + system_sku_len + system_family_len + 7, 2); *required_len += sizeof(struct smbios_board); *required_len += max(board_vendor_len + board_product_len + board_version_len + board_serial_len + 5, 2); @@ -2200,7 +2216,7 @@ static NTSTATUS get_firmware_info(SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULONG prologue = (struct smbios_prologue*)buffer; prologue->calling_method = 0; prologue->major_version = 2; - prologue->minor_version = 0; + prologue->minor_version = 4; prologue->revision = 0; prologue->length = sfti->TableBufferLength - sizeof(struct smbios_prologue); buffer += sizeof(struct smbios_prologue); @@ -2216,6 +2232,12 @@ static NTSTATUS get_firmware_info(SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULONG bios->date = bios_date_len ? ++string_count : 0; bios->size = 0; bios->characteristics = 0x4; /* not supported */ + bios->characteristics_ext[0] = 0; + bios->characteristics_ext[1] = 0; + bios->system_bios_major_release = 0xFF; /* not supported */ + bios->system_bios_minor_release = 0xFF; /* not supported */ + bios->ec_firmware_major_release = 0xFF; /* not supported */ + bios->ec_firmware_minor_release = 0xFF; /* not supported */ buffer += sizeof(struct smbios_bios); copy_smbios_string(&buffer, bios_vendor, bios_vendor_len); @@ -2234,12 +2256,17 @@ static NTSTATUS get_firmware_info(SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULONG system->version = system_version_len ? ++string_count : 0; system->serial = system_serial_len ? ++string_count : 0; get_system_uuid( (GUID *)system->uuid ); + system->wake_up_type = 0x02; /* unknown */ + system->sku_number = system_sku_len ? ++string_count : 0; + system->family = system_family_len ? ++string_count : 0; buffer += sizeof(struct smbios_system); copy_smbios_string(&buffer, system_vendor, system_vendor_len); copy_smbios_string(&buffer, system_product, system_product_len); copy_smbios_string(&buffer, system_version, system_version_len); copy_smbios_string(&buffer, system_serial, system_serial_len); + copy_smbios_string(&buffer, system_sku, system_sku_len); + copy_smbios_string(&buffer, system_family, system_family_len); if (!string_count) *buffer++ = 0; *buffer++ = 0; @@ -2271,6 +2298,10 @@ static NTSTATUS get_firmware_info(SYSTEM_FIRMWARE_TABLE_INFORMATION *sfti, ULONG chassis->version = chassis_version_len ? ++string_count : 0; chassis->serial = chassis_serial_len ? ++string_count : 0; chassis->asset_tag = chassis_asset_tag_len ? ++string_count : 0; + chassis->boot_state = 0x02; /* unknown */ + chassis->power_supply_state = 0x02; /* unknown */ + chassis->thermal_state = 0x02; /* unknown */ + chassis->security_status = 0x02; /* unknown */ buffer += sizeof(struct smbios_chassis); copy_smbios_string(&buffer, chassis_vendor, chassis_vendor_len);
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
88
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
Results per page:
10
25
50
100
200