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
March 2023
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
910 discussions
Start a n
N
ew thread
Rémi Bernon : imm32/tests: Add explicit ImmLoadIME / ImmFreeLayout calls.
by Alexandre Julliard
29 Mar '23
29 Mar '23
Module: wine Branch: master Commit: 4b04d357739f261457316d55b79ecbcff9c0be84 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4b04d357739f261457316d55b79ecb…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Mar 29 14:18:38 2023 +0200 imm32/tests: Add explicit ImmLoadIME / ImmFreeLayout calls. --- dlls/imm32/tests/imm32.c | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/dlls/imm32/tests/imm32.c b/dlls/imm32/tests/imm32.c index e8116081f52..e5949b89dec 100644 --- a/dlls/imm32/tests/imm32.c +++ b/dlls/imm32/tests/imm32.c @@ -2981,7 +2981,7 @@ static HKL ime_install(void) return hkl; } -static void ime_cleanup( HKL hkl ) +static void ime_cleanup( HKL hkl, BOOL free ) { HMODULE module = GetModuleHandleW( L"winetest_ime.dll" ); WCHAR buffer[MAX_PATH], value[MAX_PATH]; @@ -2992,6 +2992,8 @@ static void ime_cleanup( HKL hkl ) todo_wine ok( ret, "UnloadKeyboardLayout failed, error %lu\n", GetLastError() ); + if (free) ok_ret( 1, ImmFreeLayout( hkl ) ); + swprintf( buffer, ARRAY_SIZE(buffer), L"System\\CurrentControlSet\\Control\\Keyboard Layouts\\%08x", hkl ); ret = RegDeleteKeyW( HKEY_LOCAL_MACHINE, buffer ); ok( !ret, "RegDeleteKeyW returned %#lx, error %lu\n", ret, GetLastError() ); @@ -3094,7 +3096,7 @@ static void test_ImmInstallIME(void) ret = ImmFreeLayout( hkl ); ok( ret, "ImmFreeLayout returned %#x\n", ret ); - ime_cleanup( hkl ); + ime_cleanup( hkl, FALSE ); ime_info.fdwProperty = 0; @@ -3120,7 +3122,7 @@ static void test_ImmInstallIME(void) ret = ImmFreeLayout( hkl ); ok( ret, "ImmFreeLayout returned %#x\n", ret ); - ime_cleanup( hkl ); + ime_cleanup( hkl, FALSE ); cleanup: SET_ENABLE( IME_DLL_PROCESS_ATTACH, FALSE ); @@ -3159,7 +3161,7 @@ static void test_ImmIsIME(void) todo_ImeInquire = FALSE; todo_ImeDestroy = FALSE; - ime_cleanup( hkl ); + ime_cleanup( hkl, FALSE ); cleanup: SET_ENABLE( IME_DLL_PROCESS_ATTACH, FALSE ); @@ -3254,7 +3256,7 @@ static void test_ImmGetProperty(void) todo_ImeDestroy = FALSE; called_ImeDestroy = FALSE; - ime_cleanup( hkl ); + ime_cleanup( hkl, FALSE ); cleanup: SET_ENABLE( ImeInquire, FALSE ); @@ -3327,7 +3329,7 @@ static void test_ImmGetDescription(void) ok( ret == 12, "ImmGetDescriptionA returned %lu\n", ret ); ok( !strcmp( bufferA, "WineTest IME" ), "got bufferA %s\n", debugstr_a(bufferA) ); - ime_cleanup( hkl ); + ime_cleanup( hkl, FALSE ); cleanup: SET_ENABLE( IME_DLL_PROCESS_ATTACH, FALSE ); @@ -3406,7 +3408,7 @@ static void test_ImmGetIMEFileName(void) ok( ret == 12, "ImmGetIMEFileNameA returned %lu\n", ret ); ok( !strcmp( bufferA, expectA ), "got bufferA %s\n", debugstr_a(bufferA) ); - ime_cleanup( hkl ); + ime_cleanup( hkl, FALSE ); cleanup: SET_ENABLE( IME_DLL_PROCESS_ATTACH, FALSE ); @@ -3514,7 +3516,7 @@ static void test_ImmEscape( BOOL unicode ) winetest_pop_context(); } - ime_cleanup( hkl ); + ime_cleanup( hkl, FALSE ); cleanup: SET_ENABLE( ImeEscape, FALSE ); @@ -3582,7 +3584,7 @@ static void test_ImmEnumRegisterWord( BOOL unicode ) ok_ret( 0xdeadbeef, ImmEnumRegisterWordA( hkl, enum_register_wordA, "Reading", 0xdeadbeef, "String", NULL ) ); CHECK_CALLED( ImeEnumRegisterWord ); - ime_cleanup( hkl ); + ime_cleanup( hkl, FALSE ); cleanup: SET_ENABLE( ImeEnumRegisterWord, FALSE ); @@ -3644,7 +3646,7 @@ static void test_ImmRegisterWord( BOOL unicode ) ok_ret( 0, ImmRegisterWordA( hkl, NULL, 0, "String" ) ); CHECK_CALLED( ImeRegisterWord ); - ime_cleanup( hkl ); + ime_cleanup( hkl, FALSE ); cleanup: SET_ENABLE( ImeRegisterWord, FALSE ); @@ -3721,7 +3723,7 @@ skip_null: } CHECK_CALLED( ImeGetRegisterWordStyle ); - ime_cleanup( hkl ); + ime_cleanup( hkl, FALSE ); cleanup: SET_ENABLE( ImeGetRegisterWordStyle, FALSE ); @@ -3783,7 +3785,7 @@ static void test_ImmUnregisterWord( BOOL unicode ) ok_ret( 0, ImmUnregisterWordA( hkl, NULL, 0, "String" ) ); CHECK_CALLED( ImeUnregisterWord ); - ime_cleanup( hkl ); + ime_cleanup( hkl, FALSE ); cleanup: SET_ENABLE( ImeUnregisterWord, FALSE ); @@ -3852,6 +3854,7 @@ static void test_ImmActivateLayout(void) ok_ret( 1, ImmActivateLayout( hkl ) ); ok_seq( activate_seq ); CHECK_CALLED( ImeInquire ); + ok_ret( 1, ImmLoadIME( hkl ) ); ok_eq( hkl, GetKeyboardLayout( 0 ), HKL, "%p" ); @@ -3865,7 +3868,7 @@ static void test_ImmActivateLayout(void) ok_eq( old_hkl, GetKeyboardLayout( 0 ), HKL, "%p" ); - ime_cleanup( hkl ); + ime_cleanup( hkl, FALSE ); ok_seq( empty_sequence ); @@ -3892,6 +3895,9 @@ static void test_ImmActivateLayout(void) todo_wine CHECK_CALLED( ImeInquire ); ok_seq( activate_with_window_seq ); + todo_ImeInquire = TRUE; + ok_ret( 1, ImmLoadIME( hkl ) ); + todo_ImeInquire = FALSE; ok_eq( hkl, GetKeyboardLayout( 0 ), HKL, "%p" ); @@ -3900,15 +3906,8 @@ static void test_ImmActivateLayout(void) ok_eq( old_hkl, GetKeyboardLayout( 0 ), HKL, "%p" ); - ime_cleanup( hkl ); - ok_seq( empty_sequence ); - - /* ImmActivateLayout leaks the IME, we need to free it manually */ - SET_EXPECT( ImeDestroy ); - ret = ImmFreeLayout( hkl ); - ok( ret, "ImmFreeLayout returned %u\n", ret ); - todo_wine + ime_cleanup( hkl, TRUE ); CHECK_CALLED( ImeDestroy ); ok_seq( empty_sequence ); @@ -4015,6 +4014,7 @@ static void test_ImmCreateInputContext(void) if (!(hkl = ime_install())) goto cleanup; + ok_ret( 1, ImmLoadIME( hkl ) ); /* Activating the layout calls ImeSelect 1 on existing HIMC */ @@ -4063,8 +4063,7 @@ static void test_ImmCreateInputContext(void) ok_eq( old_hkl, GetKeyboardLayout( 0 ), HKL, "%p" ); - ok_ret( 1, ImmFreeLayout( hkl ) ); - ime_cleanup( hkl ); + ime_cleanup( hkl, TRUE ); ok_seq( empty_sequence ); cleanup:
1
0
0
0
Zebediah Figura : ddraw/tests: Make test_texture_wrong_caps() a bit clearer.
by Alexandre Julliard
29 Mar '23
29 Mar '23
Module: wine Branch: master Commit: 99cbab729b79321340bb08874f079a6ae997991a URL:
https://gitlab.winehq.org/wine/wine/-/commit/99cbab729b79321340bb08874f079a…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Thu Mar 23 16:15:05 2023 -0500 ddraw/tests: Make test_texture_wrong_caps() a bit clearer. * Disable lighting, which affects rendering tests in non-obvious ways. * Show that the texture is explicitly never set in ddraw7. * Show that the diffuse color is rendered in ddraw4 and ddraw7, which is consistent with the texture being unset in ddraw7 and suggests that the same applies to ddraw4. This may or may not help with bug 54069, but if it does not, it hopefully will at least make the reason for failure clearer. --- dlls/ddraw/tests/ddraw1.c | 1 + dlls/ddraw/tests/ddraw2.c | 8 +++++++- dlls/ddraw/tests/ddraw4.c | 24 ++++++++++++++++-------- dlls/ddraw/tests/ddraw7.c | 20 +++++++++++++------- 4 files changed, 37 insertions(+), 16 deletions(-) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index d52824dbc43..cde80c58e99 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -14748,6 +14748,7 @@ static void test_texture_wrong_caps(const GUID *device_guid) ptr = (BYTE *)exec_desc.lpData + sizeof(quad); emit_process_vertices(&ptr, D3DPROCESSVERTICES_COPY, 0, 4); emit_set_rs(&ptr, D3DRENDERSTATE_TEXTUREHANDLE, texture_handle); + emit_set_rs(&ptr, D3DRENDERSTATE_LIGHTING, FALSE); emit_tquad(&ptr, 0); emit_end(&ptr); inst_length = (BYTE *)ptr - (BYTE *)exec_desc.lpData - sizeof(quad); diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index c24975daa92..86056014f96 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -15651,9 +15651,9 @@ static void test_texture_wrong_caps(const GUID *device_guid) {32}, {0x00ff0000}, {0x0000ff00}, {0x000000ff}, {0xff000000} }; D3DRECT clear_rect = {{0}, {0}, {640}, {480}}; + D3DTEXTUREHANDLE texture_handle, ret_handle; unsigned int color, expected_color; IDirectDrawSurface *surface, *rt; - D3DTEXTUREHANDLE texture_handle; IDirect3DMaterial2 *background; IDirect3DViewport2 *viewport; IDirect3DTexture2 *texture; @@ -15698,8 +15698,14 @@ static void test_texture_wrong_caps(const GUID *device_guid) hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice2_SetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, texture_handle); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + hr = IDirect3DDevice2_GetRenderState(device, D3DRENDERSTATE_TEXTUREHANDLE, &ret_handle); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + todo_wine_if (!is_software_device_type(device_guid)) + ok(ret_handle == texture_handle, "Got handle %#lx.\n", ret_handle); background = create_diffuse_material(device, 1.0f, 0.0f, 0.0f, 1.0f); viewport_set_background(device, viewport, background); diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 8bd3f3eac53..4458cea5145 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -18697,14 +18697,15 @@ static void test_texture_wrong_caps(const GUID *device_guid) static struct { struct vec3 position; + unsigned int diffuse; struct vec2 texcoord; } quad[] = { - {{-1.0f, -1.0f, 0.0f}, {0.0f, 1.0f}}, - {{-1.0f, 1.0f, 0.0f}, {0.0f, 0.0f}}, - {{ 1.0f, -1.0f, 0.0f}, {1.0f, 1.0f}}, - {{ 1.0f, 1.0f, 0.0f}, {1.0f, 0.0f}}, + {{-1.0f, -1.0f, 0.0f}, 0x00ff0000, {0.0f, 1.0f}}, + {{-1.0f, 1.0f, 0.0f}, 0x00ff0000, {0.0f, 0.0f}}, + {{ 1.0f, -1.0f, 0.0f}, 0x00ff0000, {1.0f, 1.0f}}, + {{ 1.0f, 1.0f, 0.0f}, 0x00ff0000, {1.0f, 0.0f}}, }; static DDPIXELFORMAT fmt = { @@ -18712,10 +18713,10 @@ static void test_texture_wrong_caps(const GUID *device_guid) {32}, {0x00ff0000}, {0x0000ff00}, {0x000000ff}, {0xff000000} }; D3DRECT clear_rect = {{0}, {0}, {640}, {480}}; + IDirect3DTexture2 *texture, *ret_texture; unsigned int color, expected_color; IDirectDrawSurface4 *surface, *rt; IDirect3DViewport3 *viewport; - IDirect3DTexture2 *texture; IDirect3DDevice3 *device; IDirectDraw4 *ddraw; DDSURFACEDESC2 ddsd; @@ -18758,6 +18759,8 @@ static void test_texture_wrong_caps(const GUID *device_guid) hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + hr = IDirect3DDevice3_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); @@ -18766,21 +18769,26 @@ static void test_texture_wrong_caps(const GUID *device_guid) hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TEXTURE); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_SetTextureStageState(device, 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE); - ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + hr = IDirect3DDevice3_SetTexture(device, 0, texture); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + hr = IDirect3DDevice3_GetTexture(device, 0, &ret_texture); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + todo_wine_if (!is_software_device_type(device_guid)) + ok(ret_texture == texture, "Got texture %p.\n", ret_texture); + hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0x000000ff, 0.0f, 0); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_BeginScene(device); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, - D3DFVF_XYZ | D3DFVF_TEX1, quad, 4, 0); + D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1, quad, 4, 0); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice3_EndScene(device); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); - expected_color = is_software_device_type(device_guid) ? 0x0000ff00 : 0x00ffffff; + expected_color = is_software_device_type(device_guid) ? 0x0000ff00 : 0x00ff0000; color = get_surface_color(rt, 320, 240); ok(color == expected_color, "Got color 0x%08x, expected 0x%08x.\n", color, expected_color); diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 1980fbc993e..bbb78169aea 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -19031,21 +19031,22 @@ static void test_texture_wrong_caps(const GUID *device_guid) static struct { struct vec3 position; + unsigned int diffuse; struct vec2 texcoord; } quad[] = { - {{-1.0f, -1.0f, 0.0f}, {0.0f, 1.0f}}, - {{-1.0f, 1.0f, 0.0f}, {0.0f, 0.0f}}, - {{ 1.0f, -1.0f, 0.0f}, {1.0f, 1.0f}}, - {{ 1.0f, 1.0f, 0.0f}, {1.0f, 0.0f}}, + {{-1.0f, -1.0f, 0.0f}, 0x00ff0000, {0.0f, 1.0f}}, + {{-1.0f, 1.0f, 0.0f}, 0x00ff0000, {0.0f, 0.0f}}, + {{ 1.0f, -1.0f, 0.0f}, 0x00ff0000, {1.0f, 1.0f}}, + {{ 1.0f, 1.0f, 0.0f}, 0x00ff0000, {1.0f, 0.0f}}, }; static DDPIXELFORMAT fmt = { sizeof(DDPIXELFORMAT), DDPF_RGB | DDPF_ALPHAPIXELS, 0, {32}, {0x00ff0000}, {0x0000ff00}, {0x000000ff}, {0xff000000} }; - IDirectDrawSurface7 *surface, *rt; + IDirectDrawSurface7 *surface, *rt, *ret_surface; IDirect3DDevice7 *device; IDirectDraw7 *ddraw; DDSURFACEDESC2 ddsd; @@ -19083,6 +19084,8 @@ static void test_texture_wrong_caps(const GUID *device_guid) hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, FALSE); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_SetTextureStageState(device, 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); @@ -19095,6 +19098,9 @@ static void test_texture_wrong_caps(const GUID *device_guid) hr = IDirect3DDevice7_SetTexture(device, 0, surface); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + hr = IDirect3DDevice7_GetTexture(device, 0, &ret_surface); + ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); + ok(!ret_surface, "Got surface %p.\n", ret_surface); hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x000000ff, 0.0f, 0); ok(hr == DD_OK, "Got unexpected hr %#lx.\n", hr); @@ -19104,13 +19110,13 @@ static void test_texture_wrong_caps(const GUID *device_guid) hr = IDirect3DDevice7_BeginScene(device); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, - D3DFVF_XYZ | D3DFVF_TEX1, quad, 4, 0); + D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_TEX1, quad, 4, 0); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); hr = IDirect3DDevice7_EndScene(device); ok(hr == D3D_OK, "Got unexpected hr %#lx.\n", hr); color = get_surface_color(rt, 320, 240); - ok(color == 0, "Got unexpected color 0x%08x.\n", color); + ok(color == 0x00ff0000, "Got unexpected color 0x%08x.\n", color); IDirectDrawSurface7_Release(surface); IDirectDrawSurface7_Release(rt);
1
0
0
0
Zebediah Figura : ddraw: Reimplement SetSurfaceDesc() by recreating the wined3d texture(s).
by Alexandre Julliard
29 Mar '23
29 Mar '23
Module: wine Branch: master Commit: 4ac9d12522c0824e27c19a0914db800799d21948 URL:
https://gitlab.winehq.org/wine/wine/-/commit/4ac9d12522c0824e27c19a0914db80…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Mon Dec 26 13:16:41 2022 -0600 ddraw: Reimplement SetSurfaceDesc() by recreating the wined3d texture(s). --- dlls/ddraw/surface.c | 210 +++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 172 insertions(+), 38 deletions(-)
1
0
0
0
Zebediah Figura : wined3d: Pass parent ops to wined3d_rendertarget_view_set_parent().
by Alexandre Julliard
29 Mar '23
29 Mar '23
Module: wine Branch: master Commit: 5a37d94beac0b1efface4d2f82af3261d2e04b21 URL:
https://gitlab.winehq.org/wine/wine/-/commit/5a37d94beac0b1efface4d2f82af32…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Dec 25 18:21:14 2022 -0600 wined3d: Pass parent ops to wined3d_rendertarget_view_set_parent(). --- dlls/ddraw/surface.c | 3 ++- dlls/wined3d/view.c | 6 ++++-- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index 2695a0c260e..38d2d882144 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -31,6 +31,7 @@ static struct ddraw_surface *unsafe_impl_from_IDirectDrawSurface3(IDirectDrawSur static const struct wined3d_parent_ops ddraw_surface_wined3d_parent_ops; static const struct wined3d_parent_ops ddraw_texture_wined3d_parent_ops; +static const struct wined3d_parent_ops ddraw_view_wined3d_parent_ops; static inline struct ddraw_surface *impl_from_IDirectDrawGammaControl(IDirectDrawGammaControl *iface) { @@ -1340,7 +1341,7 @@ static void ddraw_texture_rename_to(struct ddraw_texture *dst_texture, struct wi current_rtv = wined3d_device_context_get_rendertarget_view(dst_surface->ddraw->immediate_context, 0); if (current_rtv == dst_surface->wined3d_rtv) wined3d_device_context_set_rendertarget_views(dst_surface->ddraw->immediate_context, 0, 1, &rtv, FALSE); - wined3d_rendertarget_view_set_parent(rtv, dst_surface); + wined3d_rendertarget_view_set_parent(rtv, dst_surface, &ddraw_view_wined3d_parent_ops); dst_surface->wined3d_rtv = rtv; if (dst_surface->sub_resource_idx) diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c index 11f099b7ec5..9d62c4a5089 100644 --- a/dlls/wined3d/view.c +++ b/dlls/wined3d/view.c @@ -414,11 +414,13 @@ void * CDECL wined3d_rendertarget_view_get_sub_resource_parent(const struct wine return texture->sub_resources[view->sub_resource_idx].parent; } -void CDECL wined3d_rendertarget_view_set_parent(struct wined3d_rendertarget_view *view, void *parent) +void CDECL wined3d_rendertarget_view_set_parent(struct wined3d_rendertarget_view *view, + void *parent, const struct wined3d_parent_ops *parent_ops) { - TRACE("view %p, parent %p.\n", view, parent); + TRACE("view %p, parent %p, parent_ops %p.\n", view, parent, parent_ops); view->parent = parent; + view->parent_ops = parent_ops; } struct wined3d_resource * CDECL wined3d_rendertarget_view_get_resource(const struct wined3d_rendertarget_view *view) diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 300fc2978da..8560c1a1bb6 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -188,7 +188,7 @@ @ cdecl wined3d_rendertarget_view_get_resource(ptr) @ cdecl wined3d_rendertarget_view_get_sub_resource_parent(ptr) @ cdecl wined3d_rendertarget_view_incref(ptr) -@ cdecl wined3d_rendertarget_view_set_parent(ptr ptr) +@ cdecl wined3d_rendertarget_view_set_parent(ptr ptr ptr) @ cdecl wined3d_resource_get_desc(ptr ptr) @ cdecl wined3d_resource_get_parent(ptr) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 9dd6352f599..0e921a9a6ad 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2695,7 +2695,8 @@ void * __cdecl wined3d_rendertarget_view_get_parent(const struct wined3d_rendert struct wined3d_resource * __cdecl wined3d_rendertarget_view_get_resource(const struct wined3d_rendertarget_view *view); void * __cdecl wined3d_rendertarget_view_get_sub_resource_parent(const struct wined3d_rendertarget_view *view); ULONG __cdecl wined3d_rendertarget_view_incref(struct wined3d_rendertarget_view *view); -void __cdecl wined3d_rendertarget_view_set_parent(struct wined3d_rendertarget_view *view, void *parent); +void __cdecl wined3d_rendertarget_view_set_parent(struct wined3d_rendertarget_view *view, + void *parent, const struct wined3d_parent_ops *parent_ops); HRESULT __cdecl wined3d_sampler_create(struct wined3d_device *device, const struct wined3d_sampler_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_sampler **sampler);
1
0
0
0
Zebediah Figura : ddraw/tests: Add some tests for creating surfaces with user memory.
by Alexandre Julliard
29 Mar '23
29 Mar '23
Module: wine Branch: master Commit: c81d05064fa50272dd7a71fde39ae772d7596d3d URL:
https://gitlab.winehq.org/wine/wine/-/commit/c81d05064fa50272dd7a71fde39ae7…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sat Dec 24 15:04:31 2022 -0600 ddraw/tests: Add some tests for creating surfaces with user memory. --- dlls/ddraw/tests/ddraw7.c | 303 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 303 insertions(+)
1
0
0
0
Torge Matthies : msvcr100: Implement _StructuredTaskCollection::_IsCanceling.
by Alexandre Julliard
29 Mar '23
29 Mar '23
Module: wine Branch: master Commit: 9e865967140f00680ffe2983ca4fa994ab6bf3d8 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9e865967140f00680ffe2983ca4fa9…
Author: Torge Matthies <tmatthies(a)codeweavers.com> Date: Tue Mar 28 16:25:39 2023 +0200 msvcr100: Implement _StructuredTaskCollection::_IsCanceling. Signed-off-by: Torge Matthies <tmatthies(a)codeweavers.com> --- dlls/msvcr120/tests/msvcr120.c | 2 +- dlls/msvcrt/concurrency.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/msvcr120/tests/msvcr120.c b/dlls/msvcr120/tests/msvcr120.c index 607048ab9da..fd8e42fd35d 100644 --- a/dlls/msvcr120/tests/msvcr120.c +++ b/dlls/msvcr120/tests/msvcr120.c @@ -1403,7 +1403,7 @@ static void __cdecl chore_proc(_UnrealizedChore *_this) MSVCRT_bool canceling = call_func1( p__StructuredTaskCollection__IsCanceling, chore->chore.task_collection); - todo_wine ok(canceling, "Task is not canceling\n"); + ok(canceling, "Task is not canceling\n"); } } diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index 3606fe16482..d148aadd13a 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -2288,8 +2288,8 @@ DEFINE_THISCALL_WRAPPER(_StructuredTaskCollection__IsCanceling, 4) bool __thiscall _StructuredTaskCollection__IsCanceling( _StructuredTaskCollection *this) { - FIXME("(%p): stub!\n", this); - return FALSE; + TRACE("(%p)\n", this); + return !!((ULONG_PTR)this->exception & STRUCTURED_TASK_COLLECTION_CANCELLED); } /* ?_CheckTaskCollection@_UnrealizedChore@details@Concurrency@@IAEXXZ */
1
0
0
0
Torge Matthies : msvcr100: Implement _StructuredTaskCollection canceling.
by Alexandre Julliard
29 Mar '23
29 Mar '23
Module: wine Branch: master Commit: 58d516f00f587e855c1476f926de81e3db698a75 URL:
https://gitlab.winehq.org/wine/wine/-/commit/58d516f00f587e855c1476f926de81…
Author: Torge Matthies <tmatthies(a)codeweavers.com> Date: Tue Mar 28 19:32:01 2023 +0200 msvcr100: Implement _StructuredTaskCollection canceling. Signed-off-by: Torge Matthies <tmatthies(a)codeweavers.com> --- dlls/msvcr120/tests/msvcr120.c | 12 ++++++- dlls/msvcrt/concurrency.c | 72 ++++++++++++++++++++++++++++++++++++------ 2 files changed, 73 insertions(+), 11 deletions(-) diff --git a/dlls/msvcr120/tests/msvcr120.c b/dlls/msvcr120/tests/msvcr120.c index 0a4fb383e0e..607048ab9da 100644 --- a/dlls/msvcr120/tests/msvcr120.c +++ b/dlls/msvcr120/tests/msvcr120.c @@ -1587,7 +1587,17 @@ static void test_StructuredTaskCollection(void) ok(b, "SetEvent failed\n"); status = p__StructuredTaskCollection__RunAndWait(&task_coll, NULL); - todo_wine ok(status == 2, "_StructuredTaskCollection::_RunAndWait failed: %d\n", status); + ok(status == 2, "_StructuredTaskCollection::_RunAndWait failed: %d\n", status); + call_func1(p__StructuredTaskCollection_dtor, &task_coll); + + /* cancel task collection without scheduled tasks */ + call_func2(p__StructuredTaskCollection_ctor, &task_coll, NULL); + call_func1(p__StructuredTaskCollection__Cancel, &task_coll); + ok(task_coll.context == context, "Unexpected context: %p != %p\n", task_coll.context, context); + chore_ctor(&chore1); + status = p__StructuredTaskCollection__RunAndWait(&task_coll, NULL); + ok(status == 2, "_StructuredTaskCollection::_RunAndWait failed: %d\n", status); + ok(!chore1.executed, "Canceled collection executed chore\n"); call_func1(p__StructuredTaskCollection_dtor, &task_coll); CloseHandle(chore_start_evt); diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index c8c6752deec..3606fe16482 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -1967,6 +1967,64 @@ struct execute_chore_data { _StructuredTaskCollection *task_collection; }; +/* ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QAAXXZ */ +/* ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QAEXXZ */ +/* ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QEAAXXZ */ +DEFINE_THISCALL_WRAPPER(_StructuredTaskCollection__Cancel, 4) +void __thiscall _StructuredTaskCollection__Cancel( + _StructuredTaskCollection *this) +{ + ThreadScheduler *scheduler; + void *prev_exception, *new_exception; + struct scheduled_chore *sc, *next; + LONG removed = 0; + LONG prev_finished, new_finished; + + TRACE("(%p)\n", this); + + if (!this->context) + this->context = get_current_context(); + scheduler = get_thread_scheduler_from_context(this->context); + if (!scheduler) + return; + + new_exception = this->exception; + do { + prev_exception = new_exception; + if ((ULONG_PTR)prev_exception & STRUCTURED_TASK_COLLECTION_CANCELLED) + return; + new_exception = (void*)((ULONG_PTR)prev_exception | + STRUCTURED_TASK_COLLECTION_CANCELLED); + } while ((new_exception = InterlockedCompareExchangePointer( + &this->exception, new_exception, prev_exception)) + != prev_exception); + + EnterCriticalSection(&scheduler->cs); + LIST_FOR_EACH_ENTRY_SAFE(sc, next, &scheduler->scheduled_chores, + struct scheduled_chore, entry) { + if (sc->chore->task_collection != this) + continue; + sc->chore->task_collection = NULL; + list_remove(&sc->entry); + removed++; + operator_delete(sc); + } + LeaveCriticalSection(&scheduler->cs); + if (!removed) + return; + + new_finished = this->finished; + do { + prev_finished = new_finished; + if (prev_finished == FINISHED_INITIAL) + new_finished = removed; + else + new_finished = prev_finished + removed; + } while ((new_finished = InterlockedCompareExchange(&this->finished, + new_finished, prev_finished)) != prev_finished); + RtlWakeAddressAll((LONG*)&this->finished); +} + static LONG CALLBACK execute_chore_except(EXCEPTION_POINTERS *pexc, void *_data) { struct execute_chore_data *data = _data; @@ -1976,6 +2034,8 @@ static LONG CALLBACK execute_chore_except(EXCEPTION_POINTERS *pexc, void *_data) if (pexc->ExceptionRecord->ExceptionCode != CXX_EXCEPTION) return EXCEPTION_CONTINUE_SEARCH; + _StructuredTaskCollection__Cancel(data->task_collection); + ptr = operator_new(sizeof(*ptr)); __ExceptionPtrCreate(ptr); exception_ptr_from_record(ptr, pexc->ExceptionRecord); @@ -2216,19 +2276,11 @@ _TaskCollectionStatus __stdcall _StructuredTaskCollection__RunAndWait( } __FINALLY_CTX(exception_ptr_rethrow_finally, ep) } + if (exception & STRUCTURED_TASK_COLLECTION_CANCELLED) + return TASK_COLLECTION_CANCELLED; return TASK_COLLECTION_SUCCESS; } -/* ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QAAXXZ */ -/* ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QAEXXZ */ -/* ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QEAAXXZ */ -DEFINE_THISCALL_WRAPPER(_StructuredTaskCollection__Cancel, 4) -void __thiscall _StructuredTaskCollection__Cancel( - _StructuredTaskCollection *this) -{ - FIXME("(%p): stub!\n", this); -} - /* ?_IsCanceling@_StructuredTaskCollection@details@Concurrency@@QAA_NXZ */ /* ?_IsCanceling@_StructuredTaskCollection@details@Concurrency@@QAE_NXZ */ /* ?_IsCanceling@_StructuredTaskCollection@details@Concurrency@@QEAA_NXZ */
1
0
0
0
Torge Matthies : msvcr100: Use enum for _StructuredTaskCollection status bits.
by Alexandre Julliard
29 Mar '23
29 Mar '23
Module: wine Branch: master Commit: a3fc7a423f20b929295a089594402031beddaad0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/a3fc7a423f20b929295a0895944020…
Author: Torge Matthies <tmatthies(a)codeweavers.com> Date: Tue Mar 28 19:15:57 2023 +0200 msvcr100: Use enum for _StructuredTaskCollection status bits. Signed-off-by: Torge Matthies <tmatthies(a)codeweavers.com> --- dlls/msvcrt/concurrency.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index 69551db3c8b..c8c6752deec 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -186,6 +186,12 @@ typedef enum TASK_COLLECTION_CANCELLED } _TaskCollectionStatus; +typedef enum +{ + STRUCTURED_TASK_COLLECTION_CANCELLED = 0x2, + STRUCTURED_TASK_COLLECTION_STATUS_MASK = 0x7 +} _StructuredTaskCollectionStatusBits; + typedef struct _UnrealizedChore { const vtable_ptr *vtable; @@ -1976,7 +1982,7 @@ static LONG CALLBACK execute_chore_except(EXCEPTION_POINTERS *pexc, void *_data) new_exception = data->task_collection->exception; do { - if ((ULONG_PTR)new_exception & ~0x7) { + if ((ULONG_PTR)new_exception & ~STRUCTURED_TASK_COLLECTION_STATUS_MASK) { __ExceptionPtrDestroy(ptr); operator_delete(ptr); break; @@ -1999,7 +2005,8 @@ static void execute_chore(_UnrealizedChore *chore, __TRY { - if (!((ULONG_PTR)task_collection->exception & ~0x7) && chore->chore_proc) + if (!((ULONG_PTR)task_collection->exception & ~STRUCTURED_TASK_COLLECTION_STATUS_MASK) && + chore->chore_proc) chore->chore_proc(chore); } __EXCEPT_CTX(execute_chore_except, &data) @@ -2172,6 +2179,7 @@ _TaskCollectionStatus __stdcall _StructuredTaskCollection__RunAndWait( { LONG expected, val; ULONG_PTR exception; + exception_ptr *ep; TRACE("(%p %p)\n", this, chore); @@ -2199,8 +2207,8 @@ _TaskCollectionStatus __stdcall _StructuredTaskCollection__RunAndWait( this->count = 0; exception = (ULONG_PTR)this->exception; - if (exception & ~0x7) { - exception_ptr *ep = (exception_ptr*)(exception & ~0x7); + ep = (exception_ptr*)(exception & ~STRUCTURED_TASK_COLLECTION_STATUS_MASK); + if (ep) { this->exception = 0; __TRY {
1
0
0
0
Torge Matthies : msvcr100: Use enum for _StructuredTaskCollection return value.
by Alexandre Julliard
29 Mar '23
29 Mar '23
Module: wine Branch: master Commit: c71dca838ef47bb28cca634cde2ac25f8171c64f URL:
https://gitlab.winehq.org/wine/wine/-/commit/c71dca838ef47bb28cca634cde2ac2…
Author: Torge Matthies <tmatthies(a)codeweavers.com> Date: Tue Mar 28 19:28:03 2023 +0200 msvcr100: Use enum for _StructuredTaskCollection return value. Signed-off-by: Torge Matthies <tmatthies(a)codeweavers.com> --- dlls/msvcrt/concurrency.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index a7447518302..69551db3c8b 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -180,6 +180,12 @@ typedef struct void *event; } _StructuredTaskCollection; +typedef enum +{ + TASK_COLLECTION_SUCCESS = 1, + TASK_COLLECTION_CANCELLED +} _TaskCollectionStatus; + typedef struct _UnrealizedChore { const vtable_ptr *vtable; @@ -2161,7 +2167,7 @@ static void CALLBACK exception_ptr_rethrow_finally(BOOL normal, void *data) /* ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAA?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z */ /* ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QAG?AW4_TaskCollectionStatus@23@PAV_UnrealizedChore@23@@Z */ /* ?_RunAndWait@_StructuredTaskCollection@details@Concurrency@@QEAA?AW4_TaskCollectionStatus@23@PEAV_UnrealizedChore@23@@Z */ -/*_TaskCollectionStatus*/int __stdcall _StructuredTaskCollection__RunAndWait( +_TaskCollectionStatus __stdcall _StructuredTaskCollection__RunAndWait( _StructuredTaskCollection *this, _UnrealizedChore *chore) { LONG expected, val; @@ -2202,7 +2208,7 @@ static void CALLBACK exception_ptr_rethrow_finally(BOOL normal, void *data) } __FINALLY_CTX(exception_ptr_rethrow_finally, ep) } - return 1; + return TASK_COLLECTION_SUCCESS; } /* ?_Cancel@_StructuredTaskCollection@details@Concurrency@@QAAXXZ */
1
0
0
0
Torge Matthies : msvcr100: Only wake task collection waiters when finished >= count.
by Alexandre Julliard
29 Mar '23
29 Mar '23
Module: wine Branch: master Commit: fc2fa4fb02983d1915e3b2713a2c40ee316955c5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/fc2fa4fb02983d1915e3b2713a2c40…
Author: Torge Matthies <tmatthies(a)codeweavers.com> Date: Tue Mar 28 17:24:38 2023 +0200 msvcr100: Only wake task collection waiters when finished >= count. Signed-off-by: Torge Matthies <tmatthies(a)codeweavers.com> --- dlls/msvcrt/concurrency.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/concurrency.c b/dlls/msvcrt/concurrency.c index 01ba54308f0..a7447518302 100644 --- a/dlls/msvcrt/concurrency.c +++ b/dlls/msvcrt/concurrency.c @@ -2005,7 +2005,7 @@ static void execute_chore(_UnrealizedChore *chore, static void CALLBACK chore_wrapper_finally(BOOL normal, void *data) { _UnrealizedChore *chore = data; - LONG prev_finished, new_finished; + LONG count, prev_finished, new_finished; volatile LONG *ptr; TRACE("(%u %p)\n", normal, data); @@ -2013,6 +2013,7 @@ static void CALLBACK chore_wrapper_finally(BOOL normal, void *data) if (!chore->task_collection) return; ptr = &chore->task_collection->finished; + count = chore->task_collection->count; chore->task_collection = NULL; do { @@ -2023,7 +2024,8 @@ static void CALLBACK chore_wrapper_finally(BOOL normal, void *data) new_finished = prev_finished + 1; } while (InterlockedCompareExchange(ptr, new_finished, prev_finished) != prev_finished); - RtlWakeAddressSingle((LONG*)ptr); + if (new_finished >= count) + RtlWakeAddressSingle((LONG*)ptr); } static void __cdecl chore_wrapper(_UnrealizedChore *chore)
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
91
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
Results per page:
10
25
50
100
200