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
July 2015
----- 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
567 discussions
Start a n
N
ew thread
Sebastian Lackner : vcomp/tests: Add tests for atomic float functions.
by Alexandre Julliard
28 Jul '15
28 Jul '15
Module: wine Branch: master Commit: c14db31b9be37fb1b6d5384a0812384249c5f3a5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c14db31b9be37fb1b6d5384a0…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Mon Jul 27 01:38:28 2015 +0200 vcomp/tests: Add tests for atomic float functions. --- dlls/vcomp/tests/vcomp.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/dlls/vcomp/tests/vcomp.c b/dlls/vcomp/tests/vcomp.c index 4974831..5be6965 100644 --- a/dlls/vcomp/tests/vcomp.c +++ b/dlls/vcomp/tests/vcomp.c @@ -32,15 +32,19 @@ static BOOL (WINAPI *pDeactivateActCtx)(DWORD, ULONG_PTR); static VOID (WINAPI *pReleaseActCtx)(HANDLE); static void (CDECL *p_vcomp_atomic_add_i4)(int *dest, int val); +static void (CDECL *p_vcomp_atomic_add_r4)(float *dest, float val); static void (CDECL *p_vcomp_atomic_and_i4)(int *dest, int val); static void (CDECL *p_vcomp_atomic_div_i4)(int *dest, int val); +static void (CDECL *p_vcomp_atomic_div_r4)(float *dest, float val); static void (CDECL *p_vcomp_atomic_div_ui4)(unsigned int *dest, unsigned int val); static void (CDECL *p_vcomp_atomic_mul_i4)(int *dest, int val); +static void (CDECL *p_vcomp_atomic_mul_r4)(float *dest, float val); static void (CDECL *p_vcomp_atomic_or_i4)(int *dest, int val); static void (CDECL *p_vcomp_atomic_shl_i4)(int *dest, int val); static void (CDECL *p_vcomp_atomic_shr_i4)(int *dest, int val); static void (CDECL *p_vcomp_atomic_shr_ui4)(unsigned int *dest, unsigned int val); static void (CDECL *p_vcomp_atomic_sub_i4)(int *dest, int val); +static void (CDECL *p_vcomp_atomic_sub_r4)(float *dest, float val); static void (CDECL *p_vcomp_atomic_xor_i4)(int *dest, int val); static void (CDECL *p_vcomp_barrier)(void); static void (CDECL *p_vcomp_for_static_end)(void); @@ -187,15 +191,19 @@ static BOOL init_vcomp(void) } VCOMP_GET_PROC(_vcomp_atomic_add_i4); + VCOMP_GET_PROC(_vcomp_atomic_add_r4); VCOMP_GET_PROC(_vcomp_atomic_and_i4); VCOMP_GET_PROC(_vcomp_atomic_div_i4); + VCOMP_GET_PROC(_vcomp_atomic_div_r4); VCOMP_GET_PROC(_vcomp_atomic_div_ui4); VCOMP_GET_PROC(_vcomp_atomic_mul_i4); + VCOMP_GET_PROC(_vcomp_atomic_mul_r4); VCOMP_GET_PROC(_vcomp_atomic_or_i4); VCOMP_GET_PROC(_vcomp_atomic_shl_i4); VCOMP_GET_PROC(_vcomp_atomic_shr_i4); VCOMP_GET_PROC(_vcomp_atomic_shr_ui4); VCOMP_GET_PROC(_vcomp_atomic_sub_i4); + VCOMP_GET_PROC(_vcomp_atomic_sub_r4); VCOMP_GET_PROC(_vcomp_atomic_xor_i4); VCOMP_GET_PROC(_vcomp_barrier); VCOMP_GET_PROC(_vcomp_for_static_end); @@ -925,6 +933,31 @@ static void test_atomic_integer32(void) } } +static void test_atomic_float(void) +{ + struct + { + void (CDECL *func)(float *, float); + float v1, v2, expected; + } + tests[] = + { + { p_vcomp_atomic_add_r4, 42.0, 17.0, 42.0 + 17.0 }, + { p_vcomp_atomic_div_r4, 42.0, 17.0, 42.0 / 17.0 }, + { p_vcomp_atomic_mul_r4, 42.0, 17.0, 42.0 * 17.0 }, + { p_vcomp_atomic_sub_r4, 42.0, 17.0, 42.0 - 17.0 }, + }; + int i; + + for (i = 0; i < sizeof(tests)/sizeof(tests[0]); i++) + { + float val = tests[i].v1; + tests[i].func(&val, tests[i].v2); + ok(tests[i].expected - 0.001 < val && val < tests[i].expected + 0.001, + "test %d: expected val == %f, got %f\n", i, tests[i].expected, val); + } +} + START_TEST(vcomp) { if (!init_vcomp()) @@ -937,6 +970,7 @@ START_TEST(vcomp) test_vcomp_for_static_simple_init(); test_vcomp_for_static_init(); test_atomic_integer32(); + test_atomic_float(); release_vcomp(); }
1
0
0
0
Sebastian Lackner : vcomp: Implement atomic float functions.
by Alexandre Julliard
28 Jul '15
28 Jul '15
Module: wine Branch: master Commit: 2a0890fe55945d49ddaebe255a1694388b1bd099 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2a0890fe55945d49ddaebe255…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Mon Jul 27 01:38:03 2015 +0200 vcomp: Implement atomic float functions. --- dlls/vcomp/main.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ dlls/vcomp/vcomp.spec | 8 ++++---- dlls/vcomp100/vcomp100.spec | 8 ++++---- dlls/vcomp90/vcomp90.spec | 8 ++++---- 4 files changed, 56 insertions(+), 12 deletions(-) diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c index 6f0caf6..92c8eaf 100644 --- a/dlls/vcomp/main.c +++ b/dlls/vcomp/main.c @@ -286,6 +286,50 @@ void CDECL _vcomp_atomic_xor_i4(int *dest, int val) do old = *dest; while (interlocked_cmpxchg(dest, old ^ val, old) != old); } +void CDECL _vcomp_atomic_add_r4(float *dest, float val) +{ + int old, new; + do + { + old = *(int *)dest; + *(float *)&new = *(float *)&old + val; + } + while (interlocked_cmpxchg((int *)dest, new, old) != old); +} + +void CDECL _vcomp_atomic_div_r4(float *dest, float val) +{ + int old, new; + do + { + old = *(int *)dest; + *(float *)&new = *(float *)&old / val; + } + while (interlocked_cmpxchg((int *)dest, new, old) != old); +} + +void CDECL _vcomp_atomic_mul_r4(float *dest, float val) +{ + int old, new; + do + { + old = *(int *)dest; + *(float *)&new = *(float *)&old * val; + } + while (interlocked_cmpxchg((int *)dest, new, old) != old); +} + +void CDECL _vcomp_atomic_sub_r4(float *dest, float val) +{ + int old, new; + do + { + old = *(int *)dest; + *(float *)&new = *(float *)&old - val; + } + while (interlocked_cmpxchg((int *)dest, new, old) != old); +} + int CDECL omp_get_dynamic(void) { TRACE("stub\n"); diff --git a/dlls/vcomp/vcomp.spec b/dlls/vcomp/vcomp.spec index 768daef..bc963cb 100644 --- a/dlls/vcomp/vcomp.spec +++ b/dlls/vcomp/vcomp.spec @@ -2,7 +2,7 @@ @ stub _vcomp_atomic_add_i2 @ cdecl _vcomp_atomic_add_i4(ptr long) @ stub _vcomp_atomic_add_i8 -@ stub _vcomp_atomic_add_r4 +@ cdecl _vcomp_atomic_add_r4(ptr float) @ stub _vcomp_atomic_add_r8 @ stub _vcomp_atomic_and_i1 @ stub _vcomp_atomic_and_i2 @@ -12,7 +12,7 @@ @ stub _vcomp_atomic_div_i2 @ cdecl _vcomp_atomic_div_i4(ptr long) @ stub _vcomp_atomic_div_i8 -@ stub _vcomp_atomic_div_r4 +@ cdecl _vcomp_atomic_div_r4(ptr float) @ stub _vcomp_atomic_div_r8 @ stub _vcomp_atomic_div_ui1 @ stub _vcomp_atomic_div_ui2 @@ -22,7 +22,7 @@ @ stub _vcomp_atomic_mul_i2 @ cdecl _vcomp_atomic_mul_i4(ptr long) @ stub _vcomp_atomic_mul_i8 -@ stub _vcomp_atomic_mul_r4 +@ cdecl _vcomp_atomic_mul_r4(ptr float) @ stub _vcomp_atomic_mul_r8 @ stub _vcomp_atomic_or_i1 @ stub _vcomp_atomic_or_i2 @@ -44,7 +44,7 @@ @ stub _vcomp_atomic_sub_i2 @ cdecl _vcomp_atomic_sub_i4(ptr long) @ stub _vcomp_atomic_sub_i8 -@ stub _vcomp_atomic_sub_r4 +@ cdecl _vcomp_atomic_sub_r4(ptr float) @ stub _vcomp_atomic_sub_r8 @ stub _vcomp_atomic_xor_i1 @ stub _vcomp_atomic_xor_i2 diff --git a/dlls/vcomp100/vcomp100.spec b/dlls/vcomp100/vcomp100.spec index 7f77ce1..2f4401e 100644 --- a/dlls/vcomp100/vcomp100.spec +++ b/dlls/vcomp100/vcomp100.spec @@ -2,7 +2,7 @@ @ stub _vcomp_atomic_add_i2 @ cdecl _vcomp_atomic_add_i4(ptr long) vcomp._vcomp_atomic_add_i4 @ stub _vcomp_atomic_add_i8 -@ stub _vcomp_atomic_add_r4 +@ cdecl _vcomp_atomic_add_r4(ptr float) vcomp._vcomp_atomic_add_r4 @ stub _vcomp_atomic_add_r8 @ stub _vcomp_atomic_and_i1 @ stub _vcomp_atomic_and_i2 @@ -12,7 +12,7 @@ @ stub _vcomp_atomic_div_i2 @ cdecl _vcomp_atomic_div_i4(ptr long) vcomp._vcomp_atomic_div_i4 @ stub _vcomp_atomic_div_i8 -@ stub _vcomp_atomic_div_r4 +@ cdecl _vcomp_atomic_div_r4(ptr float) vcomp._vcomp_atomic_div_r4 @ stub _vcomp_atomic_div_r8 @ stub _vcomp_atomic_div_ui1 @ stub _vcomp_atomic_div_ui2 @@ -22,7 +22,7 @@ @ stub _vcomp_atomic_mul_i2 @ cdecl _vcomp_atomic_mul_i4(ptr long) vcomp._vcomp_atomic_mul_i4 @ stub _vcomp_atomic_mul_i8 -@ stub _vcomp_atomic_mul_r4 +@ cdecl _vcomp_atomic_mul_r4(ptr float) vcomp._vcomp_atomic_mul_r4 @ stub _vcomp_atomic_mul_r8 @ stub _vcomp_atomic_or_i1 @ stub _vcomp_atomic_or_i2 @@ -44,7 +44,7 @@ @ stub _vcomp_atomic_sub_i2 @ cdecl _vcomp_atomic_sub_i4(ptr long) vcomp._vcomp_atomic_sub_i4 @ stub _vcomp_atomic_sub_i8 -@ stub _vcomp_atomic_sub_r4 +@ cdecl _vcomp_atomic_sub_r4(ptr float) vcomp._vcomp_atomic_sub_r4 @ stub _vcomp_atomic_sub_r8 @ stub _vcomp_atomic_xor_i1 @ stub _vcomp_atomic_xor_i2 diff --git a/dlls/vcomp90/vcomp90.spec b/dlls/vcomp90/vcomp90.spec index 7f77ce1..2f4401e 100644 --- a/dlls/vcomp90/vcomp90.spec +++ b/dlls/vcomp90/vcomp90.spec @@ -2,7 +2,7 @@ @ stub _vcomp_atomic_add_i2 @ cdecl _vcomp_atomic_add_i4(ptr long) vcomp._vcomp_atomic_add_i4 @ stub _vcomp_atomic_add_i8 -@ stub _vcomp_atomic_add_r4 +@ cdecl _vcomp_atomic_add_r4(ptr float) vcomp._vcomp_atomic_add_r4 @ stub _vcomp_atomic_add_r8 @ stub _vcomp_atomic_and_i1 @ stub _vcomp_atomic_and_i2 @@ -12,7 +12,7 @@ @ stub _vcomp_atomic_div_i2 @ cdecl _vcomp_atomic_div_i4(ptr long) vcomp._vcomp_atomic_div_i4 @ stub _vcomp_atomic_div_i8 -@ stub _vcomp_atomic_div_r4 +@ cdecl _vcomp_atomic_div_r4(ptr float) vcomp._vcomp_atomic_div_r4 @ stub _vcomp_atomic_div_r8 @ stub _vcomp_atomic_div_ui1 @ stub _vcomp_atomic_div_ui2 @@ -22,7 +22,7 @@ @ stub _vcomp_atomic_mul_i2 @ cdecl _vcomp_atomic_mul_i4(ptr long) vcomp._vcomp_atomic_mul_i4 @ stub _vcomp_atomic_mul_i8 -@ stub _vcomp_atomic_mul_r4 +@ cdecl _vcomp_atomic_mul_r4(ptr float) vcomp._vcomp_atomic_mul_r4 @ stub _vcomp_atomic_mul_r8 @ stub _vcomp_atomic_or_i1 @ stub _vcomp_atomic_or_i2 @@ -44,7 +44,7 @@ @ stub _vcomp_atomic_sub_i2 @ cdecl _vcomp_atomic_sub_i4(ptr long) vcomp._vcomp_atomic_sub_i4 @ stub _vcomp_atomic_sub_i8 -@ stub _vcomp_atomic_sub_r4 +@ cdecl _vcomp_atomic_sub_r4(ptr float) vcomp._vcomp_atomic_sub_r4 @ stub _vcomp_atomic_sub_r8 @ stub _vcomp_atomic_xor_i1 @ stub _vcomp_atomic_xor_i2
1
0
0
0
Sebastian Lackner : vcomp/tests: Add tests for 32-bit atomic integer functions.
by Alexandre Julliard
28 Jul '15
28 Jul '15
Module: wine Branch: master Commit: c68a63e474f319807df87f5ddc8133c56fd59e6a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c68a63e474f319807df87f5dd…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Mon Jul 27 01:37:44 2015 +0200 vcomp/tests: Add tests for 32-bit atomic integer functions. --- dlls/vcomp/tests/vcomp.c | 77 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/dlls/vcomp/tests/vcomp.c b/dlls/vcomp/tests/vcomp.c index 17b37f2..4974831 100644 --- a/dlls/vcomp/tests/vcomp.c +++ b/dlls/vcomp/tests/vcomp.c @@ -31,6 +31,17 @@ static BOOL (WINAPI *pActivateActCtx)(HANDLE, ULONG_PTR*); static BOOL (WINAPI *pDeactivateActCtx)(DWORD, ULONG_PTR); static VOID (WINAPI *pReleaseActCtx)(HANDLE); +static void (CDECL *p_vcomp_atomic_add_i4)(int *dest, int val); +static void (CDECL *p_vcomp_atomic_and_i4)(int *dest, int val); +static void (CDECL *p_vcomp_atomic_div_i4)(int *dest, int val); +static void (CDECL *p_vcomp_atomic_div_ui4)(unsigned int *dest, unsigned int val); +static void (CDECL *p_vcomp_atomic_mul_i4)(int *dest, int val); +static void (CDECL *p_vcomp_atomic_or_i4)(int *dest, int val); +static void (CDECL *p_vcomp_atomic_shl_i4)(int *dest, int val); +static void (CDECL *p_vcomp_atomic_shr_i4)(int *dest, int val); +static void (CDECL *p_vcomp_atomic_shr_ui4)(unsigned int *dest, unsigned int val); +static void (CDECL *p_vcomp_atomic_sub_i4)(int *dest, int val); +static void (CDECL *p_vcomp_atomic_xor_i4)(int *dest, int val); static void (CDECL *p_vcomp_barrier)(void); static void (CDECL *p_vcomp_for_static_end)(void); static void (CDECL *p_vcomp_for_static_init)(int first, int last, int step, int chunksize, unsigned int *loops, @@ -175,6 +186,17 @@ static BOOL init_vcomp(void) return FALSE; } + VCOMP_GET_PROC(_vcomp_atomic_add_i4); + VCOMP_GET_PROC(_vcomp_atomic_and_i4); + VCOMP_GET_PROC(_vcomp_atomic_div_i4); + VCOMP_GET_PROC(_vcomp_atomic_div_ui4); + VCOMP_GET_PROC(_vcomp_atomic_mul_i4); + VCOMP_GET_PROC(_vcomp_atomic_or_i4); + VCOMP_GET_PROC(_vcomp_atomic_shl_i4); + VCOMP_GET_PROC(_vcomp_atomic_shr_i4); + VCOMP_GET_PROC(_vcomp_atomic_shr_ui4); + VCOMP_GET_PROC(_vcomp_atomic_sub_i4); + VCOMP_GET_PROC(_vcomp_atomic_xor_i4); VCOMP_GET_PROC(_vcomp_barrier); VCOMP_GET_PROC(_vcomp_for_static_end); VCOMP_GET_PROC(_vcomp_for_static_init); @@ -849,6 +871,60 @@ static void test_vcomp_for_static_init(void) pomp_set_num_threads(max_threads); } +static void test_atomic_integer32(void) +{ + struct + { + void (CDECL *func)(int *, int); + int v1, v2, expected; + } + tests1[] = + { + { p_vcomp_atomic_add_i4, 0x11223344, 0x77665544, -0x77777778 }, + { p_vcomp_atomic_and_i4, 0x11223344, 0x77665544, 0x11221144 }, + { p_vcomp_atomic_div_i4, 0x77665544, 0x11223344, 6 }, + { p_vcomp_atomic_div_i4, 0x77665544, -0x11223344, -6 }, + { p_vcomp_atomic_mul_i4, 0x11223344, 0x77665544, -0xecccdf0 }, + { p_vcomp_atomic_mul_i4, 0x11223344, -0x77665544, 0xecccdf0 }, + { p_vcomp_atomic_or_i4, 0x11223344, 0x77665544, 0x77667744 }, + { p_vcomp_atomic_shl_i4, 0x11223344, 3, -0x76ee65e0 }, + { p_vcomp_atomic_shl_i4, 0x11223344, 35, -0x76ee65e0 }, + { p_vcomp_atomic_shl_i4, -0x11223344, 3, 0x76ee65e0 }, + { p_vcomp_atomic_shr_i4, 0x11223344, 3, 0x2244668 }, + { p_vcomp_atomic_shr_i4, 0x11223344, 35, 0x2244668 }, + { p_vcomp_atomic_shr_i4, -0x11223344, 3, -0x2244669 }, + { p_vcomp_atomic_sub_i4, 0x11223344, 0x77665544, -0x66442200 }, + { p_vcomp_atomic_xor_i4, 0x11223344, 0x77665544, 0x66446600 }, + }; + struct + { + void (CDECL *func)(unsigned int *, unsigned int); + unsigned int v1, v2, expected; + } + tests2[] = + { + { p_vcomp_atomic_div_ui4, 0x77665544, 0x11223344, 6 }, + { p_vcomp_atomic_div_ui4, 0x77665544, 0xeeddccbc, 0 }, + { p_vcomp_atomic_shr_ui4, 0x11223344, 3, 0x2244668 }, + { p_vcomp_atomic_shr_ui4, 0x11223344, 35, 0x2244668 }, + { p_vcomp_atomic_shr_ui4, 0xeeddccbc, 3, 0x1ddbb997 }, + }; + int i; + + for (i = 0; i < sizeof(tests1)/sizeof(tests1[0]); i++) + { + int val = tests1[i].v1; + tests1[i].func(&val, tests1[i].v2); + ok(val == tests1[i].expected, "test %d: expected val == %d, got %d\n", i, tests1[i].expected, val); + } + for (i = 0; i < sizeof(tests2)/sizeof(tests2[0]); i++) + { + unsigned int val = tests2[i].v1; + tests2[i].func(&val, tests2[i].v2); + ok(val == tests2[i].expected, "test %d: expected val == %u, got %u\n", i, tests2[i].expected, val); + } +} + START_TEST(vcomp) { if (!init_vcomp()) @@ -860,6 +936,7 @@ START_TEST(vcomp) test_vcomp_sections_init(); test_vcomp_for_static_simple_init(); test_vcomp_for_static_init(); + test_atomic_integer32(); release_vcomp(); }
1
0
0
0
Sebastian Lackner : vcomp: Implement 32-bit atomic integer functions.
by Alexandre Julliard
28 Jul '15
28 Jul '15
Module: wine Branch: master Commit: 7bf779f3775549f49c01f91a3967dbc193bb24f3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7bf779f3775549f49c01f91a3…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Mon Jul 27 01:37:11 2015 +0200 vcomp: Implement 32-bit atomic integer functions. --- dlls/vcomp/main.c | 65 +++++++++++++++++++++++++++++++++++++++++++++ dlls/vcomp/vcomp.spec | 22 +++++++-------- dlls/vcomp100/vcomp100.spec | 22 +++++++-------- dlls/vcomp90/vcomp90.spec | 22 +++++++-------- 4 files changed, 98 insertions(+), 33 deletions(-) diff --git a/dlls/vcomp/main.c b/dlls/vcomp/main.c index ae5623b..6f0caf6 100644 --- a/dlls/vcomp/main.c +++ b/dlls/vcomp/main.c @@ -22,6 +22,7 @@ */ #include "config.h" +#include "wine/port.h" #include <stdarg.h> #include <assert.h> @@ -221,6 +222,70 @@ static void vcomp_free_thread_data(void) vcomp_set_thread_data(NULL); } +void CDECL _vcomp_atomic_add_i4(int *dest, int val) +{ + interlocked_xchg_add(dest, val); +} + +void CDECL _vcomp_atomic_and_i4(int *dest, int val) +{ + int old; + do old = *dest; while (interlocked_cmpxchg(dest, old & val, old) != old); +} + +void CDECL _vcomp_atomic_div_i4(int *dest, int val) +{ + int old; + do old = *dest; while (interlocked_cmpxchg(dest, old / val, old) != old); +} + +void CDECL _vcomp_atomic_div_ui4(unsigned int *dest, unsigned int val) +{ + unsigned int old; + do old = *dest; while (interlocked_cmpxchg((int *)dest, old / val, old) != old); +} + +void CDECL _vcomp_atomic_mul_i4(int *dest, int val) +{ + int old; + do old = *dest; while (interlocked_cmpxchg(dest, old * val, old) != old); +} + +void CDECL _vcomp_atomic_or_i4(int *dest, int val) +{ + int old; + do old = *dest; while (interlocked_cmpxchg(dest, old | val, old) != old); +} + +void CDECL _vcomp_atomic_shl_i4(int *dest, int val) +{ + int old; + do old = *dest; while (interlocked_cmpxchg(dest, old << val, old) != old); +} + +void CDECL _vcomp_atomic_shr_i4(int *dest, int val) +{ + int old; + do old = *dest; while (interlocked_cmpxchg(dest, old >> val, old) != old); +} + +void CDECL _vcomp_atomic_shr_ui4(unsigned int *dest, unsigned int val) +{ + unsigned int old; + do old = *dest; while (interlocked_cmpxchg((int *)dest, old >> val, old) != old); +} + +void CDECL _vcomp_atomic_sub_i4(int *dest, int val) +{ + interlocked_xchg_add(dest, -val); +} + +void CDECL _vcomp_atomic_xor_i4(int *dest, int val) +{ + int old; + do old = *dest; while (interlocked_cmpxchg(dest, old ^ val, old) != old); +} + int CDECL omp_get_dynamic(void) { TRACE("stub\n"); diff --git a/dlls/vcomp/vcomp.spec b/dlls/vcomp/vcomp.spec index 7083ce4..768daef 100644 --- a/dlls/vcomp/vcomp.spec +++ b/dlls/vcomp/vcomp.spec @@ -1,54 +1,54 @@ @ stub _vcomp_atomic_add_i1 @ stub _vcomp_atomic_add_i2 -@ stub _vcomp_atomic_add_i4 +@ cdecl _vcomp_atomic_add_i4(ptr long) @ stub _vcomp_atomic_add_i8 @ stub _vcomp_atomic_add_r4 @ stub _vcomp_atomic_add_r8 @ stub _vcomp_atomic_and_i1 @ stub _vcomp_atomic_and_i2 -@ stub _vcomp_atomic_and_i4 +@ cdecl _vcomp_atomic_and_i4(ptr long) @ stub _vcomp_atomic_and_i8 @ stub _vcomp_atomic_div_i1 @ stub _vcomp_atomic_div_i2 -@ stub _vcomp_atomic_div_i4 +@ cdecl _vcomp_atomic_div_i4(ptr long) @ stub _vcomp_atomic_div_i8 @ stub _vcomp_atomic_div_r4 @ stub _vcomp_atomic_div_r8 @ stub _vcomp_atomic_div_ui1 @ stub _vcomp_atomic_div_ui2 -@ stub _vcomp_atomic_div_ui4 +@ cdecl _vcomp_atomic_div_ui4(ptr long) @ stub _vcomp_atomic_div_ui8 @ stub _vcomp_atomic_mul_i1 @ stub _vcomp_atomic_mul_i2 -@ stub _vcomp_atomic_mul_i4 +@ cdecl _vcomp_atomic_mul_i4(ptr long) @ stub _vcomp_atomic_mul_i8 @ stub _vcomp_atomic_mul_r4 @ stub _vcomp_atomic_mul_r8 @ stub _vcomp_atomic_or_i1 @ stub _vcomp_atomic_or_i2 -@ stub _vcomp_atomic_or_i4 +@ cdecl _vcomp_atomic_or_i4(ptr long) @ stub _vcomp_atomic_or_i8 @ stub _vcomp_atomic_shl_i1 @ stub _vcomp_atomic_shl_i2 -@ stub _vcomp_atomic_shl_i4 +@ cdecl _vcomp_atomic_shl_i4(ptr long) @ stub _vcomp_atomic_shl_i8 @ stub _vcomp_atomic_shr_i1 @ stub _vcomp_atomic_shr_i2 -@ stub _vcomp_atomic_shr_i4 +@ cdecl _vcomp_atomic_shr_i4(ptr long) @ stub _vcomp_atomic_shr_i8 @ stub _vcomp_atomic_shr_ui1 @ stub _vcomp_atomic_shr_ui2 -@ stub _vcomp_atomic_shr_ui4 +@ cdecl _vcomp_atomic_shr_ui4(ptr long) @ stub _vcomp_atomic_shr_ui8 @ stub _vcomp_atomic_sub_i1 @ stub _vcomp_atomic_sub_i2 -@ stub _vcomp_atomic_sub_i4 +@ cdecl _vcomp_atomic_sub_i4(ptr long) @ stub _vcomp_atomic_sub_i8 @ stub _vcomp_atomic_sub_r4 @ stub _vcomp_atomic_sub_r8 @ stub _vcomp_atomic_xor_i1 @ stub _vcomp_atomic_xor_i2 -@ stub _vcomp_atomic_xor_i4 +@ cdecl _vcomp_atomic_xor_i4(ptr long) @ stub _vcomp_atomic_xor_i8 @ cdecl _vcomp_barrier() @ stub _vcomp_copyprivate_broadcast diff --git a/dlls/vcomp100/vcomp100.spec b/dlls/vcomp100/vcomp100.spec index 56c7ae3..7f77ce1 100644 --- a/dlls/vcomp100/vcomp100.spec +++ b/dlls/vcomp100/vcomp100.spec @@ -1,54 +1,54 @@ @ stub _vcomp_atomic_add_i1 @ stub _vcomp_atomic_add_i2 -@ stub _vcomp_atomic_add_i4 +@ cdecl _vcomp_atomic_add_i4(ptr long) vcomp._vcomp_atomic_add_i4 @ stub _vcomp_atomic_add_i8 @ stub _vcomp_atomic_add_r4 @ stub _vcomp_atomic_add_r8 @ stub _vcomp_atomic_and_i1 @ stub _vcomp_atomic_and_i2 -@ stub _vcomp_atomic_and_i4 +@ cdecl _vcomp_atomic_and_i4(ptr long) vcomp._vcomp_atomic_and_i4 @ stub _vcomp_atomic_and_i8 @ stub _vcomp_atomic_div_i1 @ stub _vcomp_atomic_div_i2 -@ stub _vcomp_atomic_div_i4 +@ cdecl _vcomp_atomic_div_i4(ptr long) vcomp._vcomp_atomic_div_i4 @ stub _vcomp_atomic_div_i8 @ stub _vcomp_atomic_div_r4 @ stub _vcomp_atomic_div_r8 @ stub _vcomp_atomic_div_ui1 @ stub _vcomp_atomic_div_ui2 -@ stub _vcomp_atomic_div_ui4 +@ cdecl _vcomp_atomic_div_ui4(ptr long) vcomp._vcomp_atomic_div_ui4 @ stub _vcomp_atomic_div_ui8 @ stub _vcomp_atomic_mul_i1 @ stub _vcomp_atomic_mul_i2 -@ stub _vcomp_atomic_mul_i4 +@ cdecl _vcomp_atomic_mul_i4(ptr long) vcomp._vcomp_atomic_mul_i4 @ stub _vcomp_atomic_mul_i8 @ stub _vcomp_atomic_mul_r4 @ stub _vcomp_atomic_mul_r8 @ stub _vcomp_atomic_or_i1 @ stub _vcomp_atomic_or_i2 -@ stub _vcomp_atomic_or_i4 +@ cdecl _vcomp_atomic_or_i4(ptr long) vcomp._vcomp_atomic_or_i4 @ stub _vcomp_atomic_or_i8 @ stub _vcomp_atomic_shl_i1 @ stub _vcomp_atomic_shl_i2 -@ stub _vcomp_atomic_shl_i4 +@ cdecl _vcomp_atomic_shl_i4(ptr long) vcomp._vcomp_atomic_shl_i4 @ stub _vcomp_atomic_shl_i8 @ stub _vcomp_atomic_shr_i1 @ stub _vcomp_atomic_shr_i2 -@ stub _vcomp_atomic_shr_i4 +@ cdecl _vcomp_atomic_shr_i4(ptr long) vcomp._vcomp_atomic_shr_i4 @ stub _vcomp_atomic_shr_i8 @ stub _vcomp_atomic_shr_ui1 @ stub _vcomp_atomic_shr_ui2 -@ stub _vcomp_atomic_shr_ui4 +@ cdecl _vcomp_atomic_shr_ui4(ptr long) vcomp._vcomp_atomic_shr_ui4 @ stub _vcomp_atomic_shr_ui8 @ stub _vcomp_atomic_sub_i1 @ stub _vcomp_atomic_sub_i2 -@ stub _vcomp_atomic_sub_i4 +@ cdecl _vcomp_atomic_sub_i4(ptr long) vcomp._vcomp_atomic_sub_i4 @ stub _vcomp_atomic_sub_i8 @ stub _vcomp_atomic_sub_r4 @ stub _vcomp_atomic_sub_r8 @ stub _vcomp_atomic_xor_i1 @ stub _vcomp_atomic_xor_i2 -@ stub _vcomp_atomic_xor_i4 +@ cdecl _vcomp_atomic_xor_i4(ptr long) vcomp._vcomp_atomic_xor_i4 @ stub _vcomp_atomic_xor_i8 @ cdecl _vcomp_barrier() vcomp._vcomp_barrier @ stub _vcomp_copyprivate_broadcast diff --git a/dlls/vcomp90/vcomp90.spec b/dlls/vcomp90/vcomp90.spec index 56c7ae3..7f77ce1 100644 --- a/dlls/vcomp90/vcomp90.spec +++ b/dlls/vcomp90/vcomp90.spec @@ -1,54 +1,54 @@ @ stub _vcomp_atomic_add_i1 @ stub _vcomp_atomic_add_i2 -@ stub _vcomp_atomic_add_i4 +@ cdecl _vcomp_atomic_add_i4(ptr long) vcomp._vcomp_atomic_add_i4 @ stub _vcomp_atomic_add_i8 @ stub _vcomp_atomic_add_r4 @ stub _vcomp_atomic_add_r8 @ stub _vcomp_atomic_and_i1 @ stub _vcomp_atomic_and_i2 -@ stub _vcomp_atomic_and_i4 +@ cdecl _vcomp_atomic_and_i4(ptr long) vcomp._vcomp_atomic_and_i4 @ stub _vcomp_atomic_and_i8 @ stub _vcomp_atomic_div_i1 @ stub _vcomp_atomic_div_i2 -@ stub _vcomp_atomic_div_i4 +@ cdecl _vcomp_atomic_div_i4(ptr long) vcomp._vcomp_atomic_div_i4 @ stub _vcomp_atomic_div_i8 @ stub _vcomp_atomic_div_r4 @ stub _vcomp_atomic_div_r8 @ stub _vcomp_atomic_div_ui1 @ stub _vcomp_atomic_div_ui2 -@ stub _vcomp_atomic_div_ui4 +@ cdecl _vcomp_atomic_div_ui4(ptr long) vcomp._vcomp_atomic_div_ui4 @ stub _vcomp_atomic_div_ui8 @ stub _vcomp_atomic_mul_i1 @ stub _vcomp_atomic_mul_i2 -@ stub _vcomp_atomic_mul_i4 +@ cdecl _vcomp_atomic_mul_i4(ptr long) vcomp._vcomp_atomic_mul_i4 @ stub _vcomp_atomic_mul_i8 @ stub _vcomp_atomic_mul_r4 @ stub _vcomp_atomic_mul_r8 @ stub _vcomp_atomic_or_i1 @ stub _vcomp_atomic_or_i2 -@ stub _vcomp_atomic_or_i4 +@ cdecl _vcomp_atomic_or_i4(ptr long) vcomp._vcomp_atomic_or_i4 @ stub _vcomp_atomic_or_i8 @ stub _vcomp_atomic_shl_i1 @ stub _vcomp_atomic_shl_i2 -@ stub _vcomp_atomic_shl_i4 +@ cdecl _vcomp_atomic_shl_i4(ptr long) vcomp._vcomp_atomic_shl_i4 @ stub _vcomp_atomic_shl_i8 @ stub _vcomp_atomic_shr_i1 @ stub _vcomp_atomic_shr_i2 -@ stub _vcomp_atomic_shr_i4 +@ cdecl _vcomp_atomic_shr_i4(ptr long) vcomp._vcomp_atomic_shr_i4 @ stub _vcomp_atomic_shr_i8 @ stub _vcomp_atomic_shr_ui1 @ stub _vcomp_atomic_shr_ui2 -@ stub _vcomp_atomic_shr_ui4 +@ cdecl _vcomp_atomic_shr_ui4(ptr long) vcomp._vcomp_atomic_shr_ui4 @ stub _vcomp_atomic_shr_ui8 @ stub _vcomp_atomic_sub_i1 @ stub _vcomp_atomic_sub_i2 -@ stub _vcomp_atomic_sub_i4 +@ cdecl _vcomp_atomic_sub_i4(ptr long) vcomp._vcomp_atomic_sub_i4 @ stub _vcomp_atomic_sub_i8 @ stub _vcomp_atomic_sub_r4 @ stub _vcomp_atomic_sub_r8 @ stub _vcomp_atomic_xor_i1 @ stub _vcomp_atomic_xor_i2 -@ stub _vcomp_atomic_xor_i4 +@ cdecl _vcomp_atomic_xor_i4(ptr long) vcomp._vcomp_atomic_xor_i4 @ stub _vcomp_atomic_xor_i8 @ cdecl _vcomp_barrier() vcomp._vcomp_barrier @ stub _vcomp_copyprivate_broadcast
1
0
0
0
Jacek Caban : ieframe: Improved debug traces.
by Alexandre Julliard
28 Jul '15
28 Jul '15
Module: wine Branch: master Commit: 3009244d9cabfc5a72df043957ccddf48c2b8d46 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3009244d9cabfc5a72df04395…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jul 28 15:19:04 2015 +0200 ieframe: Improved debug traces. --- dlls/ieframe/oleobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ieframe/oleobject.c b/dlls/ieframe/oleobject.c index d02562d..fb9e12f 100644 --- a/dlls/ieframe/oleobject.c +++ b/dlls/ieframe/oleobject.c @@ -841,7 +841,7 @@ static HRESULT WINAPI OleInPlaceObject_SetObjectRects(IOleInPlaceObject *iface, { WebBrowser *This = impl_from_IOleInPlaceObject(iface); - TRACE("(%p)->(%p %p)\n", This, lprcPosRect, lprcClipRect); + TRACE("(%p)->(%s %s)\n", This, wine_dbgstr_rect(lprcPosRect), wine_dbgstr_rect(lprcClipRect)); This->pos_rect = *lprcPosRect;
1
0
0
0
Jacek Caban : ieframe: Added support for OnFocus notifications.
by Alexandre Julliard
28 Jul '15
28 Jul '15
Module: wine Branch: master Commit: ca8114ff9ceaa11aaba484480fc00a6a7f87cc90 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ca8114ff9ceaa11aaba484480…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jul 28 15:18:30 2015 +0200 ieframe: Added support for OnFocus notifications. --- dlls/ieframe/oleobject.c | 28 ++++++++++++++++++++++++++-- dlls/ieframe/tests/webbrowser.c | 20 ++++++++++++-------- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/dlls/ieframe/oleobject.c b/dlls/ieframe/oleobject.c index 462cf74..d02562d 100644 --- a/dlls/ieframe/oleobject.c +++ b/dlls/ieframe/oleobject.c @@ -49,6 +49,22 @@ static LRESULT resize_window(WebBrowser *This, LONG width, LONG height) return 0; } +static void notify_on_focus(WebBrowser *This, BOOL got_focus) +{ + IOleControlSite *control_site; + HRESULT hres; + + if(!This->client) + return; + + hres = IOleClientSite_QueryInterface(This->client, &IID_IOleControlSite, (void**)&control_site); + if(FAILED(hres)) + return; + + IOleControlSite_OnFocus(control_site, got_focus); + IOleControlSite_Release(control_site); +} + static LRESULT WINAPI shell_embedding_proc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { WebBrowser *This; @@ -67,6 +83,12 @@ static LRESULT WINAPI shell_embedding_proc(HWND hwnd, UINT msg, WPARAM wParam, L return resize_window(This, LOWORD(lParam), HIWORD(lParam)); case WM_DOCHOSTTASK: return process_dochost_tasks(&This->doc_host); + case WM_SETFOCUS: + notify_on_focus(This, TRUE); + break; + case WM_KILLFOCUS: + notify_on_focus(This, FALSE); + break; } return DefWindowProcW(hwnd, msg, wParam, lParam); @@ -203,6 +225,7 @@ static HRESULT activate_ui(WebBrowser *This, IOleClientSite *active_site) IOleInPlaceFrame_SetMenu(This->doc_host.frame, NULL, NULL, This->shell_embedding_hwnd); SetFocus(This->shell_embedding_hwnd); + notify_on_focus(This, TRUE); return S_OK; } @@ -534,10 +557,11 @@ static HRESULT WINAPI OleObject_Close(IOleObject *iface, DWORD dwSaveOption) if(This->uiwindow) IOleInPlaceUIWindow_SetActiveObject(This->uiwindow, NULL, NULL); - if(This->inplace) { + if(This->inplace) IOleInPlaceSiteEx_OnUIDeactivate(This->inplace, FALSE); + notify_on_focus(This, FALSE); + if(This->inplace) IOleInPlaceSiteEx_OnInPlaceDeactivate(This->inplace); - } return IOleObject_SetClientSite(iface, NULL); } diff --git a/dlls/ieframe/tests/webbrowser.c b/dlls/ieframe/tests/webbrowser.c index 9ceed46..aa90755 100644 --- a/dlls/ieframe/tests/webbrowser.c +++ b/dlls/ieframe/tests/webbrowser.c @@ -143,7 +143,8 @@ DEFINE_EXPECT(OnUIDeactivate); DEFINE_EXPECT(OnInPlaceDeactivate); DEFINE_EXPECT(RequestUIActivate); DEFINE_EXPECT(ControlSite_TranslateAccelerator); -DEFINE_EXPECT(OnFocus); +DEFINE_EXPECT(OnFocus_TRUE); +DEFINE_EXPECT(OnFocus_FALSE); DEFINE_EXPECT(GetExternal); static const WCHAR wszItem[] = {'i','t','e','m',0}; @@ -1135,7 +1136,10 @@ static HRESULT WINAPI IOleControlSite_fnTranslateAccelerator(IOleControlSite* Th static HRESULT WINAPI IOleControlSite_fnOnFocus(IOleControlSite* This, BOOL fGotFocus) { - CHECK_EXPECT2(OnFocus); + if(fGotFocus) + CHECK_EXPECT2(OnFocus_TRUE); + else + CHECK_EXPECT2(OnFocus_FALSE); return E_NOTIMPL; } @@ -1813,7 +1817,7 @@ static void test_DoVerb(IWebBrowser2 *unk) SET_EXPECT(Frame_SetActiveObject); SET_EXPECT(UIWindow_SetActiveObject); SET_EXPECT(SetMenu); - SET_EXPECT(OnFocus); + SET_EXPECT(OnFocus_TRUE); hres = IOleObject_DoVerb(oleobj, OLEIVERB_SHOW, NULL, &ClientSite, 0, (HWND)0xdeadbeef, &rect); @@ -1830,7 +1834,7 @@ static void test_DoVerb(IWebBrowser2 *unk) CHECK_CALLED(Frame_SetActiveObject); CHECK_CALLED(UIWindow_SetActiveObject); CHECK_CALLED(SetMenu); - todo_wine CHECK_CALLED(OnFocus); + CHECK_CALLED(OnFocus_TRUE); hres = IOleObject_DoVerb(oleobj, OLEIVERB_SHOW, NULL, &ClientSite, 0, (HWND)0xdeadbeef, &rect); @@ -3213,7 +3217,7 @@ static void test_UIActivate(IWebBrowser2 *unk, BOOL activate) SET_EXPECT(RequestUIActivate); SET_EXPECT(ShowUI); SET_EXPECT(HideUI); - SET_EXPECT(OnFocus); + SET_EXPECT(OnFocus_FALSE); } hres = IOleDocumentView_UIActivate(docview, activate); @@ -3227,7 +3231,7 @@ static void test_UIActivate(IWebBrowser2 *unk, BOOL activate) CHECK_CALLED(RequestUIActivate); CHECK_CALLED(ShowUI); CHECK_CALLED(HideUI); - CHECK_CALLED(OnFocus); + CHECK_CALLED(OnFocus_FALSE); } } @@ -3490,7 +3494,7 @@ static void test_Close(IWebBrowser2 *wb, BOOL do_download) SET_EXPECT(Frame_SetActiveObject); SET_EXPECT(UIWindow_SetActiveObject); SET_EXPECT(OnUIDeactivate); - SET_EXPECT(OnFocus); + SET_EXPECT(OnFocus_FALSE); SET_EXPECT(OnInPlaceDeactivate); SET_EXPECT(Invoke_STATUSTEXTCHANGE); if(!do_download) { @@ -3513,7 +3517,7 @@ static void test_Close(IWebBrowser2 *wb, BOOL do_download) CHECK_CALLED(Frame_SetActiveObject); CHECK_CALLED(UIWindow_SetActiveObject); CHECK_CALLED(OnUIDeactivate); - todo_wine CHECK_CALLED(OnFocus); + CHECK_CALLED(OnFocus_FALSE); CHECK_CALLED(OnInPlaceDeactivate); CLEAR_CALLED(Invoke_STATUSTEXTCHANGE); /* Called by IE9 */ if(!do_download) {
1
0
0
0
Jacek Caban : ieframe: Release client site interface before destroying embedding window.
by Alexandre Julliard
28 Jul '15
28 Jul '15
Module: wine Branch: master Commit: 8c7a90775589511529513118d9ac620dac8dbc4b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8c7a90775589511529513118d…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Jul 28 15:18:18 2015 +0200 ieframe: Release client site interface before destroying embedding window. --- dlls/ieframe/oleobject.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/ieframe/oleobject.c b/dlls/ieframe/oleobject.c index 53c0e36..462cf74 100644 --- a/dlls/ieframe/oleobject.c +++ b/dlls/ieframe/oleobject.c @@ -264,6 +264,11 @@ static void release_client_site(WebBrowser *This) { release_dochost_client(&This->doc_host); + if(This->client) { + IOleClientSite_Release(This->client); + This->client = NULL; + } + if(This->shell_embedding_hwnd) { DestroyWindow(This->shell_embedding_hwnd); This->shell_embedding_hwnd = NULL; @@ -284,11 +289,6 @@ static void release_client_site(WebBrowser *This) This->uiwindow = NULL; } - if(This->client) { - IOleClientSite_Release(This->client); - This->client = NULL; - } - if(This->sink) { IAdviseSink_Release(This->sink); This->sink = NULL;
1
0
0
0
Michael Stefaniuc : wined3d: Merge two adjacent ifs with identical condition (PVS-Studio).
by Alexandre Julliard
28 Jul '15
28 Jul '15
Module: wine Branch: master Commit: d700dbbae7f67c674ffa90dad0d577ac45a0059a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d700dbbae7f67c674ffa90dad…
Author: Michael Stefaniuc <mstefani(a)redhat.de> Date: Tue Jul 28 11:04:46 2015 +0200 wined3d: Merge two adjacent ifs with identical condition (PVS-Studio). --- dlls/wined3d/device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index bff610d..c746d18 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -1272,10 +1272,9 @@ HRESULT CDECL wined3d_device_set_stream_source(struct wined3d_device *device, UI { stream->stride = stride; stream->offset = offset; + wined3d_buffer_incref(buffer); } - if (buffer) - wined3d_buffer_incref(buffer); if (!device->recording) wined3d_cs_emit_set_stream_source(device->cs, stream_idx, buffer, offset, stride); if (prev_buffer)
1
0
0
0
Matteo Bruni : wined3d: Only install emulation wrappers when required.
by Alexandre Julliard
28 Jul '15
28 Jul '15
Module: wine Branch: master Commit: f2989a25221ba47621e31c44496a3890799c9ac8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f2989a25221ba47621e31c444…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Mon Jul 27 14:29:57 2015 +0200 wined3d: Only install emulation wrappers when required. --- dlls/wined3d/arb_program_shader.c | 6 ++++++ dlls/wined3d/ati_fragment_shader.c | 6 ++++++ dlls/wined3d/directx.c | 10 +++++++--- dlls/wined3d/glsl_shader.c | 16 ++++++++++++++++ dlls/wined3d/nvidia_texture_shader.c | 7 +++++++ dlls/wined3d/state.c | 24 ++++++++++++++++++++++++ dlls/wined3d/wined3d_private.h | 5 +++++ 7 files changed, 71 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 0bd7c22..73b2218 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -5871,6 +5871,11 @@ static void arbfp_get_caps(const struct wined3d_gl_info *gl_info, struct fragmen caps->MaxSimultaneousTextures = min(gl_info->limits.fragment_samplers, 8); } +static DWORD arbfp_get_emul_mask(const struct wined3d_gl_info *gl_info) +{ + return GL_EXT_EMUL_ARB_MULTITEXTURE | GL_EXT_EMUL_EXT_FOG_COORD; +} + static void state_texfactor_arbfp(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { @@ -6871,6 +6876,7 @@ static void arbfp_free_context_data(struct wined3d_context *context) const struct fragment_pipeline arbfp_fragment_pipeline = { arbfp_enable, arbfp_get_caps, + arbfp_get_emul_mask, arbfp_alloc, arbfp_free, arbfp_alloc_context_data, diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index b41f5d9..6558f27 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -1310,6 +1310,11 @@ static void atifs_get_caps(const struct wined3d_gl_info *gl_info, struct fragmen caps->MaxSimultaneousTextures = 6; } +static DWORD atifs_get_emul_mask(const struct wined3d_gl_info *gl_info) +{ + return GL_EXT_EMUL_ARB_MULTITEXTURE | GL_EXT_EMUL_EXT_FOG_COORD; +} + static void *atifs_alloc(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv) { struct atifs_private_data *priv; @@ -1386,6 +1391,7 @@ static void atifs_free_context_data(struct wined3d_context *context) const struct fragment_pipeline atifs_fragment_pipeline = { atifs_enable, atifs_get_caps, + atifs_get_emul_mask, atifs_alloc, atifs_free, atifs_alloc_context_data, diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 0ed97c7..ce23c47 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -3434,7 +3434,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) const char *WGL_Extensions = NULL; enum wined3d_gl_vendor gl_vendor; enum wined3d_pci_device device; - DWORD gl_version; + DWORD gl_version, gl_ext_emul_mask; HDC hdc; unsigned int i, j; GLint context_profile = 0; @@ -3805,8 +3805,12 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) fixup_extensions(gl_info, gl_renderer_str, gl_vendor, card_vendor, device); init_driver_info(driver_info, card_vendor, device); - install_gl_compat_wrapper(gl_info, ARB_MULTITEXTURE); - install_gl_compat_wrapper(gl_info, EXT_FOG_COORD); + gl_ext_emul_mask = adapter->vertex_pipe->vp_get_emul_mask(gl_info) + | adapter->fragment_pipe->get_emul_mask(gl_info); + if (gl_ext_emul_mask & GL_EXT_EMUL_ARB_MULTITEXTURE) + install_gl_compat_wrapper(gl_info, ARB_MULTITEXTURE); + if (gl_ext_emul_mask & GL_EXT_EMUL_EXT_FOG_COORD) + install_gl_compat_wrapper(gl_info, EXT_FOG_COORD); return TRUE; } diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 301dc6f..9880df1 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -7742,6 +7742,13 @@ static void glsl_vertex_pipe_vp_get_caps(const struct wined3d_gl_info *gl_info, caps->raster_caps = WINED3DPRASTERCAPS_FOGRANGE; } +static DWORD glsl_vertex_pipe_vp_get_emul_mask(const struct wined3d_gl_info *gl_info) +{ + if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT]) + return GL_EXT_EMUL_ARB_MULTITEXTURE; + return 0; +} + static void *glsl_vertex_pipe_vp_alloc(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv) { struct shader_glsl_priv *priv; @@ -8121,6 +8128,7 @@ const struct wined3d_vertex_pipe_ops glsl_vertex_pipe = { glsl_vertex_pipe_vp_enable, glsl_vertex_pipe_vp_get_caps, + glsl_vertex_pipe_vp_get_emul_mask, glsl_vertex_pipe_vp_alloc, glsl_vertex_pipe_vp_free, glsl_vertex_pipe_vp_states, @@ -8167,6 +8175,13 @@ static void glsl_fragment_pipe_get_caps(const struct wined3d_gl_info *gl_info, s caps->MaxSimultaneousTextures = min(gl_info->limits.fragment_samplers, 8); } +static DWORD glsl_fragment_pipe_get_emul_mask(const struct wined3d_gl_info *gl_info) +{ + if (gl_info->supported[WINED3D_GL_LEGACY_CONTEXT]) + return GL_EXT_EMUL_ARB_MULTITEXTURE; + return 0; +} + static void *glsl_fragment_pipe_alloc(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv) { struct shader_glsl_priv *priv; @@ -8446,6 +8461,7 @@ const struct fragment_pipeline glsl_fragment_pipe = { glsl_fragment_pipe_enable, glsl_fragment_pipe_get_caps, + glsl_fragment_pipe_get_emul_mask, glsl_fragment_pipe_alloc, glsl_fragment_pipe_free, glsl_fragment_pipe_alloc_context_data, diff --git a/dlls/wined3d/nvidia_texture_shader.c b/dlls/wined3d/nvidia_texture_shader.c index 0dda7f5..30d15ad 100644 --- a/dlls/wined3d/nvidia_texture_shader.c +++ b/dlls/wined3d/nvidia_texture_shader.c @@ -738,6 +738,11 @@ static void nvrc_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct caps->MaxSimultaneousTextures = gl_info->limits.textures; } +static DWORD nvrc_fragment_get_emul_mask(const struct wined3d_gl_info *gl_info) +{ + return GL_EXT_EMUL_ARB_MULTITEXTURE | GL_EXT_EMUL_EXT_FOG_COORD; +} + static void *nvrc_fragment_alloc(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv) { return shader_priv; @@ -924,6 +929,7 @@ static void nvrc_context_free(struct wined3d_context *context) const struct fragment_pipeline nvts_fragment_pipeline = { nvts_enable, nvrc_fragment_get_caps, + nvrc_fragment_get_emul_mask, nvrc_fragment_alloc, nvrc_fragment_free, nvrc_context_alloc, @@ -935,6 +941,7 @@ const struct fragment_pipeline nvts_fragment_pipeline = { const struct fragment_pipeline nvrc_fragment_pipeline = { nvrc_enable, nvrc_fragment_get_caps, + nvrc_fragment_get_emul_mask, nvrc_fragment_alloc, nvrc_fragment_free, nvrc_context_alloc, diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 4751b37..e39b7b4 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -5582,10 +5582,16 @@ static void vp_ffp_get_caps(const struct wined3d_gl_info *gl_info, struct wined3 caps->raster_caps |= WINED3DPRASTERCAPS_FOGRANGE; } +static DWORD vp_ffp_get_emul_mask(const struct wined3d_gl_info *gl_info) +{ + return GL_EXT_EMUL_ARB_MULTITEXTURE | GL_EXT_EMUL_EXT_FOG_COORD; +} + const struct wined3d_vertex_pipe_ops ffp_vertex_pipe = { ffp_enable, vp_ffp_get_caps, + vp_ffp_get_emul_mask, ffp_alloc, ffp_free, vp_ffp_states, @@ -5632,6 +5638,11 @@ static void ffp_fragment_get_caps(const struct wined3d_gl_info *gl_info, struct caps->MaxSimultaneousTextures = gl_info->limits.textures; } +static DWORD ffp_fragment_get_emul_mask(const struct wined3d_gl_info *gl_info) +{ + return GL_EXT_EMUL_ARB_MULTITEXTURE | GL_EXT_EMUL_EXT_FOG_COORD; +} + static BOOL ffp_color_fixup_supported(struct color_fixup_desc fixup) { if (TRACE_ON(d3d)) @@ -5663,6 +5674,7 @@ static void ffp_none_context_free(struct wined3d_context *context) const struct fragment_pipeline ffp_fragment_pipeline = { ffp_enable, ffp_fragment_get_caps, + ffp_fragment_get_emul_mask, ffp_alloc, ffp_free, ffp_none_context_alloc, @@ -5685,10 +5697,16 @@ static void vp_none_get_caps(const struct wined3d_gl_info *gl_info, struct wined memset(caps, 0, sizeof(*caps)); } +static DWORD vp_none_get_emul_mask(const struct wined3d_gl_info *gl_info) +{ + return 0; +} + const struct wined3d_vertex_pipe_ops none_vertex_pipe = { none_enable, vp_none_get_caps, + vp_none_get_emul_mask, none_alloc, none_free, NULL, @@ -5699,6 +5717,11 @@ static void fp_none_get_caps(const struct wined3d_gl_info *gl_info, struct fragm memset(caps, 0, sizeof(*caps)); } +static DWORD fp_none_get_emul_mask(const struct wined3d_gl_info *gl_info) +{ + return 0; +} + static BOOL fp_none_color_fixup_supported(struct color_fixup_desc fixup) { return is_identity_fixup(fixup); @@ -5708,6 +5731,7 @@ const struct fragment_pipeline none_fragment_pipe = { none_enable, fp_none_get_caps, + fp_none_get_emul_mask, none_alloc, none_free, ffp_none_context_alloc, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d239ac1..a1331d3 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1287,10 +1287,14 @@ struct fragment_caps DWORD MaxSimultaneousTextures; }; +#define GL_EXT_EMUL_ARB_MULTITEXTURE 0x00000001 +#define GL_EXT_EMUL_EXT_FOG_COORD 0x00000002 + struct fragment_pipeline { void (*enable_extension)(const struct wined3d_gl_info *gl_info, BOOL enable); void (*get_caps)(const struct wined3d_gl_info *gl_info, struct fragment_caps *caps); + DWORD (*get_emul_mask)(const struct wined3d_gl_info *gl_info); void *(*alloc_private)(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv); void (*free_private)(struct wined3d_device *device); BOOL (*allocate_context_data)(struct wined3d_context *context); @@ -1316,6 +1320,7 @@ struct wined3d_vertex_pipe_ops { void (*vp_enable)(const struct wined3d_gl_info *gl_info, BOOL enable); void (*vp_get_caps)(const struct wined3d_gl_info *gl_info, struct wined3d_vertex_caps *caps); + DWORD (*vp_get_emul_mask)(const struct wined3d_gl_info *gl_info); void *(*vp_alloc)(const struct wined3d_shader_backend_ops *shader_backend, void *shader_priv); void (*vp_free)(struct wined3d_device *device); const struct StateEntryTemplate *vp_states;
1
0
0
0
Matteo Bruni : wined3d: Don't crash when emulating GL_EXT_fogcoord.
by Alexandre Julliard
28 Jul '15
28 Jul '15
Module: wine Branch: master Commit: 6244735f7ab863d912de7c3302ab02fad30bc823 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6244735f7ab863d912de7c330…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Mon Jul 27 14:29:56 2015 +0200 wined3d: Don't crash when emulating GL_EXT_fogcoord. --- dlls/wined3d/gl_compat.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/dlls/wined3d/gl_compat.c b/dlls/wined3d/gl_compat.c index c79a453..7e6b510 100644 --- a/dlls/wined3d/gl_compat.c +++ b/dlls/wined3d/gl_compat.c @@ -264,6 +264,14 @@ static void (WINE_GLAPI *old_fogcoord_glColor4f) (GLfloat r, GLfloat g, GLfloat static void WINE_GLAPI wine_glVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w) { struct wined3d_context *ctx = context_get_current(); + + /* This can be called from draw_test_quad() and at that point there is no + * wined3d_context current. */ + if (!ctx) + { + old_fogcoord_glVertex4f(x, y, z, w); + return; + } if(ctx->gl_fog_source == GL_FOG_COORDINATE_EXT && ctx->fog_enabled) { GLfloat c[4] = {ctx->color[0], ctx->color[1], ctx->color[2], ctx->color[3]}; GLfloat i; @@ -294,6 +302,14 @@ static void WINE_GLAPI wine_glVertex3fv(const GLfloat *pos) { static void WINE_GLAPI wine_glColor4f(GLfloat r, GLfloat g, GLfloat b, GLfloat a) { struct wined3d_context *ctx = context_get_current(); + + /* This can be called from draw_test_quad() and at that point there is no + * wined3d_context current. */ + if (!ctx) + { + old_fogcoord_glColor4f(r, g, b, a); + return; + } ctx->color[0] = r; ctx->color[1] = g; ctx->color[2] = b;
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
...
57
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
Results per page:
10
25
50
100
200