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
July
June
May
April
March
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
September 2023
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 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
920 discussions
Start a n
N
ew thread
Rémi Bernon : dmime: Get rid of the DMUS_PMSGItem typedef.
by Alexandre Julliard
18 Sep '23
18 Sep '23
Module: wine Branch: master Commit: 419ab9284ab10627a0d068a0846b7c79e2fb1b3c URL:
https://gitlab.winehq.org/wine/wine/-/commit/419ab9284ab10627a0d068a0846b7c…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Sep 5 10:55:52 2023 +0200 dmime: Get rid of the DMUS_PMSGItem typedef. --- dlls/dmime/performance.c | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index c2681c4b150..786ad817cd4 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -62,24 +62,24 @@ struct performance DWORD procThreadId; BOOL procThreadTicStarted; CRITICAL_SECTION safe; - struct DMUS_PMSGItem *head; - struct DMUS_PMSGItem *imm_head; + struct message *head; + struct message *imm_head; IReferenceClock *master_clock; REFERENCE_TIME init_time; }; -typedef struct DMUS_PMSGItem DMUS_PMSGItem; -struct DMUS_PMSGItem { - DMUS_PMSGItem* next; - DMUS_PMSGItem* prev; +struct message +{ + struct message *next; + struct message *prev; - BOOL bInUse; - DWORD cb; - DMUS_PMSG pMsg; + BOOL bInUse; + DWORD cb; + DMUS_PMSG pMsg; }; -#define DMUS_PMSGToItem(pMSG) ((DMUS_PMSGItem *)(((unsigned char *)pMSG) - offsetof(DMUS_PMSGItem, pMsg))) +#define DMUS_PMSGToItem(pMSG) ((struct message *)(((unsigned char *)pMSG) - offsetof(struct message, pMsg))) #define DMUS_ItemRemoveFromQueue(This,pItem) \ {\ if (pItem->prev) pItem->prev->next = pItem->next;\ @@ -95,7 +95,8 @@ struct DMUS_PMSGItem { #define PROCESSMSG_ADD (WM_APP + 4) -static DMUS_PMSGItem* ProceedMsg(struct performance *This, DMUS_PMSGItem* cur) { +static struct message *ProceedMsg(struct performance *This, struct message *cur) +{ if (cur->pMsg.dwType == DMUS_PMSGT_NOTIFICATION) { SetEvent(This->hNotification); } @@ -117,9 +118,9 @@ static DWORD WINAPI ProcessMsgThread(LPVOID lpParam) { MSG msg; HRESULT hr; REFERENCE_TIME rtCurTime; - DMUS_PMSGItem* it = NULL; - DMUS_PMSGItem* cur = NULL; - DMUS_PMSGItem* it_next = NULL; + struct message *it = NULL; + struct message *cur = NULL; + struct message *it_next = NULL; while (TRUE) { DWORD dwDec = This->rtLatencyTime + This->dwBumperLength; @@ -401,10 +402,10 @@ static HRESULT WINAPI performance_GetBumperLength(IDirectMusicPerformance8 *ifac static HRESULT WINAPI performance_SendPMsg(IDirectMusicPerformance8 *iface, DMUS_PMSG *msg) { struct performance *This = impl_from_IDirectMusicPerformance8(iface); - DMUS_PMSGItem *message; - DMUS_PMSGItem *it = NULL; - DMUS_PMSGItem *prev_it = NULL; - DMUS_PMSGItem **queue; + struct message *message; + struct message *it = NULL; + struct message *prev_it = NULL; + struct message **queue; HRESULT hr; FIXME("(%p, %p): semi-stub\n", This, msg); @@ -535,14 +536,14 @@ static HRESULT WINAPI performance_GetTime(IDirectMusicPerformance8 *iface, REFER static HRESULT WINAPI performance_AllocPMsg(IDirectMusicPerformance8 *iface, ULONG size, DMUS_PMSG **msg) { struct performance *This = impl_from_IDirectMusicPerformance8(iface); - DMUS_PMSGItem *message; + struct message *message; TRACE("(%p, %ld, %p)\n", This, size, msg); if (!msg) return E_POINTER; if (size < sizeof(DMUS_PMSG)) return E_INVALIDARG; - if (!(message = calloc(1, size - sizeof(DMUS_PMSG) + sizeof(DMUS_PMSGItem)))) return E_OUTOFMEMORY; + if (!(message = calloc(1, size - sizeof(DMUS_PMSG) + sizeof(struct message)))) return E_OUTOFMEMORY; message->pMsg.dwSize = size; *msg = &message->pMsg; @@ -552,7 +553,7 @@ static HRESULT WINAPI performance_AllocPMsg(IDirectMusicPerformance8 *iface, ULO static HRESULT WINAPI performance_FreePMsg(IDirectMusicPerformance8 *iface, DMUS_PMSG *msg) { struct performance *This = impl_from_IDirectMusicPerformance8(iface); - DMUS_PMSGItem *message; + struct message *message; HRESULT hr; TRACE("(%p, %p)\n", This, msg);
1
0
0
0
Rémi Bernon : dmime: Convert DMUS_PMSG music and reference times in SendPMsg.
by Alexandre Julliard
18 Sep '23
18 Sep '23
Module: wine Branch: master Commit: 6cd1c4e64aa0c9bd82b1b307f40edfc1ea4258f6 URL:
https://gitlab.winehq.org/wine/wine/-/commit/6cd1c4e64aa0c9bd82b1b307f40edf…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Tue Sep 5 11:03:39 2023 +0200 dmime: Convert DMUS_PMSG music and reference times in SendPMsg. --- dlls/dmime/performance.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c index b3fd4851d45..c2681c4b150 100644 --- a/dlls/dmime/performance.c +++ b/dlls/dmime/performance.c @@ -74,7 +74,6 @@ struct DMUS_PMSGItem { DMUS_PMSGItem* next; DMUS_PMSGItem* prev; - REFERENCE_TIME rtItemTime; BOOL bInUse; DWORD cb; DMUS_PMSG pMsg; @@ -141,14 +140,14 @@ static DWORD WINAPI ProcessMsgThread(LPVOID lpParam) { it = it_next; } - for (it = This->head; NULL != it && it->rtItemTime < rtCurTime + dwDec; ) { + for (it = This->head; NULL != it && it->pMsg.rtTime < rtCurTime + dwDec; ) { it_next = it->next; cur = ProceedMsg(This, it); free(cur); it = it_next; } if (NULL != it) { - timeOut = ( it->rtItemTime - rtCurTime ) + This->rtLatencyTime; + timeOut = ( it->pMsg.rtTime - rtCurTime ) + This->rtLatencyTime; } outrefresh: @@ -425,11 +424,22 @@ static HRESULT WINAPI performance_SendPMsg(IDirectMusicPerformance8 *iface, DMUS hr = DMUS_E_ALREADY_SENT; else { - /* TODO: Valid Flags */ - /* TODO: DMUS_PMSGF_MUSICTIME */ - message->rtItemTime = msg->rtTime; + if (!(msg->dwFlags & DMUS_PMSGF_MUSICTIME)) + { + if (FAILED(hr = IDirectMusicPerformance8_ReferenceToMusicTime(iface, + msg->rtTime, &msg->mtTime))) + goto done; + msg->dwFlags |= DMUS_PMSGF_MUSICTIME; + } + if (!(msg->dwFlags & DMUS_PMSGF_REFTIME)) + { + if (FAILED(hr = IDirectMusicPerformance8_MusicToReferenceTime(iface, + msg->mtTime, &msg->rtTime))) + goto done; + msg->dwFlags |= DMUS_PMSGF_REFTIME; + } - for (it = *queue; NULL != it && it->rtItemTime < message->rtItemTime; it = it->next) + for (it = *queue; NULL != it && it->pMsg.rtTime < message->pMsg.rtTime; it = it->next) prev_it = it; if (!prev_it) @@ -452,6 +462,7 @@ static HRESULT WINAPI performance_SendPMsg(IDirectMusicPerformance8 *iface, DMUS hr = S_OK; } +done: LeaveCriticalSection(&This->safe); return hr;
1
0
0
0
Rémi Bernon : dmime/tests: Test that SendPMsg also converts reference time.
by Alexandre Julliard
18 Sep '23
18 Sep '23
Module: wine Branch: master Commit: eedde528096aca8aa69b8c0c3b27084df79551f8 URL:
https://gitlab.winehq.org/wine/wine/-/commit/eedde528096aca8aa69b8c0c3b2708…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Sep 13 08:56:13 2023 +0200 dmime/tests: Test that SendPMsg also converts reference time. And avoid checking a possibly freed message. --- dlls/dmime/tests/dmime.c | 109 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 77 insertions(+), 32 deletions(-) diff --git a/dlls/dmime/tests/dmime.c b/dlls/dmime/tests/dmime.c index 26efdd4c72f..00cbd045bd8 100644 --- a/dlls/dmime/tests/dmime.c +++ b/dlls/dmime/tests/dmime.c @@ -1730,9 +1730,10 @@ static void test_performance_pmsg(void) static const DWORD delivery_flags[] = {DMUS_PMSGF_TOOL_IMMEDIATE, DMUS_PMSGF_TOOL_QUEUE, DMUS_PMSGF_TOOL_ATTIME}; static const DWORD message_types[] = {DMUS_PMSGT_MIDI, DMUS_PMSGT_USER}; IDirectMusicPerformance *performance; - IDirectMusicGraph *graph; + IDirectMusicGraph *graph, *performance_graph; IDirectMusicTool *tool; DMUS_PMSG *msg, *clone; + MUSIC_TIME music_time; REFERENCE_TIME time; HRESULT hr; DWORD ret; @@ -1744,6 +1745,8 @@ static void test_performance_pmsg(void) hr = CoCreateInstance(&CLSID_DirectMusicPerformance, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusicPerformance, (void **)&performance); ok(hr == S_OK, "got %#lx\n", hr); + hr = IDirectMusicPerformance_QueryInterface(performance, &IID_IDirectMusicGraph, (void **)&performance_graph); + ok(hr == S_OK, "got %#lx\n", hr); hr = IDirectMusicPerformance_AllocPMsg(performance, 0, NULL); @@ -1826,6 +1829,40 @@ static void test_performance_pmsg(void) ok(hr == S_OK, "got %#lx\n", hr); + /* SendPMsg skips all the tools unless messages are stamped beforehand */ + + hr = IDirectMusicPerformance_AllocPMsg(performance, sizeof(DMUS_PMSG), &msg); + ok(hr == S_OK, "got %#lx\n", hr); + ok(msg->dwSize == sizeof(DMUS_PMSG), "got %ld\n", msg->dwSize); + msg->mtTime = 0; + msg->dwFlags = DMUS_PMSGF_MUSICTIME; + msg->dwType = DMUS_PMSGT_USER; + hr = IDirectMusicPerformance_SendPMsg(performance, msg); + ok(hr == S_OK, "got %#lx\n", hr); + + ret = test_tool_wait_message(tool, 10, &msg); + ok(ret == WAIT_TIMEOUT, "got %#lx\n", ret); + ok(!msg, "got %p\n", msg); + + + /* SendPMsg converts music time to reference time if it is missing */ + + hr = IDirectMusicPerformance_AllocPMsg(performance, sizeof(DMUS_PMSG), &msg); + ok(hr == S_OK, "got %#lx\n", hr); + ok(msg->dwSize == sizeof(DMUS_PMSG), "got %ld\n", msg->dwSize); + msg->mtTime = 500; + msg->dwFlags = DMUS_PMSGF_MUSICTIME; + msg->dwType = DMUS_PMSGT_USER; + hr = IDirectMusicGraph_StampPMsg(performance_graph, msg); + ok(hr == S_OK, "got %#lx\n", hr); + hr = IDirectMusicPerformance_SendPMsg(performance, msg); + ok(hr == S_OK, "got %#lx\n", hr); + + ret = test_tool_wait_message(tool, 50, &msg); + todo_wine ok(!ret, "got %#lx\n", ret); + todo_wine ok(msg != NULL, "got %p\n", msg); + if (!msg) goto skip_rtime; + time = 0xdeadbeef; hr = IDirectMusicPerformance_MusicToReferenceTime(performance, msg->mtTime, &time); ok(hr == S_OK, "got %#lx\n", hr); @@ -1833,32 +1870,26 @@ static void test_performance_pmsg(void) todo_wine ok(msg->rtTime == time, "got %I64d\n", msg->rtTime); ok(msg->mtTime == 500, "got %ld\n", msg->mtTime); todo_wine ok(msg->dwFlags & DMUS_PMSGF_REFTIME, "got %#lx\n", msg->dwFlags); + todo_wine ok(msg->dwFlags & DMUS_PMSGF_MUSICTIME, "got %#lx\n", msg->dwFlags); todo_wine ok(msg->dwFlags & (DMUS_PMSGF_TOOL_QUEUE | DMUS_PMSGF_TOOL_IMMEDIATE), "got %#lx\n", msg->dwFlags); ok(!msg->dwPChannel, "got %ld\n", msg->dwPChannel); ok(!msg->dwVirtualTrackID, "got %ld\n", msg->dwVirtualTrackID); - ok(!msg->pTool, "got %p\n", msg->pTool); - ok(!msg->pGraph, "got %p\n", msg->pGraph); - ok(!msg->dwType, "got %#lx\n", msg->dwType); + ok(msg->pTool == tool, "got %p\n", msg->pTool); + ok(msg->pGraph == performance_graph, "got %p\n", msg->pGraph); + ok(msg->dwType == DMUS_PMSGT_USER, "got %#lx\n", msg->dwType); ok(!msg->dwVoiceID, "got %ld\n", msg->dwVoiceID); ok(!msg->dwGroupID, "got %ld\n", msg->dwGroupID); ok(!msg->punkUser, "got %p\n", msg->punkUser); - - /* SendPMsg skips all the tools unless messages are stamped beforehand */ - - hr = IDirectMusicPerformance_AllocPMsg(performance, sizeof(DMUS_PMSG), &msg); - ok(hr == S_OK, "got %#lx\n", hr); - ok(msg->dwSize == sizeof(DMUS_PMSG), "got %ld\n", msg->dwSize); - msg->rtTime = time; - msg->dwFlags = DMUS_PMSGF_REFTIME; - msg->dwType = DMUS_PMSGT_USER; - hr = IDirectMusicPerformance_SendPMsg(performance, msg); + hr = IDirectMusicPerformance_FreePMsg(performance, msg); ok(hr == S_OK, "got %#lx\n", hr); - ret = test_tool_wait_message(tool, 10, &msg); - ok(ret == WAIT_TIMEOUT, "got %#lx\n", ret); - ok(!msg, "got %p\n", msg); +skip_rtime: + /* SendPMsg converts reference time to music time if it is missing */ + + hr = IDirectMusicPerformance_GetTime(performance, &time, &music_time); + ok(hr == S_OK, "got %#lx\n", hr); hr = IDirectMusicPerformance_AllocPMsg(performance, sizeof(DMUS_PMSG), &msg); ok(hr == S_OK, "got %#lx\n", hr); @@ -1866,24 +1897,39 @@ static void test_performance_pmsg(void) msg->rtTime = time; msg->dwFlags = DMUS_PMSGF_REFTIME; msg->dwType = DMUS_PMSGT_USER; - - hr = IDirectMusicPerformance_QueryInterface(performance, &IID_IDirectMusicGraph, (void **)&graph); + hr = IDirectMusicGraph_StampPMsg(performance_graph, msg); ok(hr == S_OK, "got %#lx\n", hr); - hr = IDirectMusicGraph_StampPMsg(graph, msg); - ok(hr == S_OK, "got %#lx\n", hr); - IDirectMusicGraph_Release(graph); - hr = IDirectMusicPerformance_SendPMsg(performance, msg); ok(hr == S_OK, "got %#lx\n", hr); ret = test_tool_wait_message(tool, 50, &msg); todo_wine ok(!ret, "got %#lx\n", ret); todo_wine ok(msg != NULL, "got %p\n", msg); - if (!msg) hr = S_OK; - else hr = IDirectMusicPerformance_FreePMsg(performance, msg); + if (!msg) goto skip_mtime; + + music_time = 0xdeadbeef; + hr = IDirectMusicPerformance_ReferenceToMusicTime(performance, msg->rtTime, &music_time); + ok(hr == S_OK, "got %#lx\n", hr); + ok(msg->dwSize == sizeof(DMUS_PMSG), "got %ld\n", msg->dwSize); + todo_wine ok(msg->rtTime == time, "got %I64d\n", msg->rtTime); + todo_wine ok(msg->mtTime == music_time, "got %ld\n", msg->mtTime); + todo_wine ok(msg->dwFlags & DMUS_PMSGF_REFTIME, "got %#lx\n", msg->dwFlags); + todo_wine ok(msg->dwFlags & DMUS_PMSGF_MUSICTIME, "got %#lx\n", msg->dwFlags); + todo_wine ok(msg->dwFlags & (DMUS_PMSGF_TOOL_QUEUE | DMUS_PMSGF_TOOL_IMMEDIATE), "got %#lx\n", msg->dwFlags); + ok(!msg->dwPChannel, "got %ld\n", msg->dwPChannel); + ok(!msg->dwVirtualTrackID, "got %ld\n", msg->dwVirtualTrackID); + ok(msg->pTool == tool, "got %p\n", msg->pTool); + ok(msg->pGraph == performance_graph, "got %p\n", msg->pGraph); + ok(msg->dwType == DMUS_PMSGT_USER, "got %#lx\n", msg->dwType); + ok(!msg->dwVoiceID, "got %ld\n", msg->dwVoiceID); + ok(!msg->dwGroupID, "got %ld\n", msg->dwGroupID); + ok(!msg->punkUser, "got %p\n", msg->punkUser); + + hr = IDirectMusicPerformance_FreePMsg(performance, msg); ok(hr == S_OK, "got %#lx\n", hr); +skip_mtime: for (i = 0; i < ARRAY_SIZE(delivery_flags); i++) { DWORD duration = 0; @@ -1896,12 +1942,8 @@ static void test_performance_pmsg(void) msg->rtTime = time + 150 * 10000; msg->dwFlags = DMUS_PMSGF_REFTIME; msg->dwType = DMUS_PMSGT_USER; - - hr = IDirectMusicPerformance_QueryInterface(performance, &IID_IDirectMusicGraph, (void **)&graph); - ok(hr == S_OK, "got %#lx\n", hr); - hr = IDirectMusicGraph_StampPMsg(graph, msg); + hr = IDirectMusicGraph_StampPMsg(performance_graph, msg); ok(hr == S_OK, "got %#lx\n", hr); - IDirectMusicGraph_Release(graph); msg->dwFlags &= ~(DMUS_PMSGF_TOOL_IMMEDIATE | DMUS_PMSGF_TOOL_QUEUE | DMUS_PMSGF_TOOL_ATTIME); msg->dwFlags |= delivery_flags[i]; @@ -1921,8 +1963,8 @@ static void test_performance_pmsg(void) switch (delivery_flags[i]) { case DMUS_PMSGF_TOOL_IMMEDIATE: todo_wine ok(duration <= 50, "got %lu\n", duration); break; - case DMUS_PMSGF_TOOL_QUEUE: todo_wine ok(duration >= 50 && duration <= 100, "got %lu\n", duration); break; - case DMUS_PMSGF_TOOL_ATTIME: todo_wine ok(duration >= 150 && duration <= 500, "got %lu\n", duration); break; + case DMUS_PMSGF_TOOL_QUEUE: todo_wine ok(duration >= 50 && duration <= 125, "got %lu\n", duration); break; + case DMUS_PMSGF_TOOL_ATTIME: todo_wine ok(duration >= 125 && duration <= 500, "got %lu\n", duration); break; } } @@ -1931,7 +1973,10 @@ static void test_performance_pmsg(void) ok(hr == S_OK, "got %#lx\n", hr); + IDirectMusicGraph_Release(performance_graph); + IDirectMusicPerformance_Release(performance); + IDirectMusicTool_Release(tool); } START_TEST(dmime)
1
0
0
0
Eric Pouech : dbghelp: Check that dwarf unwinder did actually unwind.
by Alexandre Julliard
18 Sep '23
18 Sep '23
Module: wine Branch: master Commit: 9a28dbfb272491d584d5485c5eae44746b36c7bd URL:
https://gitlab.winehq.org/wine/wine/-/commit/9a28dbfb272491d584d5485c5eae44…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Mon Sep 18 10:00:08 2023 +0200 dbghelp: Check that dwarf unwinder did actually unwind. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55560
Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/dbghelp/cpu_x86_64.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/dbghelp/cpu_x86_64.c b/dlls/dbghelp/cpu_x86_64.c index c653c5fa9dd..957ce36cc5d 100644 --- a/dlls/dbghelp/cpu_x86_64.c +++ b/dlls/dbghelp/cpu_x86_64.c @@ -611,7 +611,8 @@ static BOOL fetch_next_frame(struct cpu_stack_walk *csw, union ctx *pcontext, DWORD64 cfa; RUNTIME_FUNCTION* rtf; DWORD64 base; - CONTEXT *context = &pcontext->ctx; + CONTEXT *context = &pcontext->ctx; + DWORD64 input_Rip = context->Rip; if (!curr_pc || !(base = sw_module_base(csw, curr_pc))) return FALSE; rtf = sw_table_access(csw, curr_pc); @@ -620,7 +621,7 @@ static BOOL fetch_next_frame(struct cpu_stack_walk *csw, union ctx *pcontext, { return interpret_function_table_entry(csw, context, rtf, base); } - else if (dwarf2_virtual_unwind(csw, curr_pc, pcontext, &cfa)) + else if (dwarf2_virtual_unwind(csw, curr_pc, pcontext, &cfa) && input_Rip != context->Rip) { context->Rsp = cfa; TRACE("next function rip=%016Ix\n", context->Rip);
1
0
0
0
Connor McAdams : include: Add missing WinEvent definitions.
by Alexandre Julliard
18 Sep '23
18 Sep '23
Module: wine Branch: master Commit: 80a9c0efa80434afbd16949a3f42f05121bb5180 URL:
https://gitlab.winehq.org/wine/wine/-/commit/80a9c0efa80434afbd16949a3f42f0…
Author: Connor McAdams <cmcadams(a)codeweavers.com> Date: Wed Jul 26 12:48:42 2023 -0400 include: Add missing WinEvent definitions. Signed-off-by: Connor McAdams <cmcadams(a)codeweavers.com> --- include/winuser.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/include/winuser.h b/include/winuser.h index 453f561e62f..4ed29e86616 100644 --- a/include/winuser.h +++ b/include/winuser.h @@ -3235,6 +3235,17 @@ typedef struct /* User event Id limits */ #define EVENT_MIN 0x00000001 #define EVENT_MAX 0x7FFFFFFF +#define EVENT_SYSTEM_END 0x000000FF +#define EVENT_OEM_DEFINED_START 0x00000101 +#define EVENT_OEM_DEFINED_END 0x000001FF +#define EVENT_CONSOLE_END 0x000040FF +#define EVENT_UIA_EVENTID_START 0x00004E00 +#define EVENT_UIA_EVENTID_END 0x00004EFF +#define EVENT_UIA_PROPID_START 0x00007500 +#define EVENT_UIA_PROPID_END 0x000075FF +#define EVENT_OBJECT_END 0x000080FF +#define EVENT_AIA_START 0x0000A000 +#define EVENT_AIA_END 0x0000AFFF /* System events */ #define EVENT_SYSTEM_SOUND 0x01 @@ -3260,6 +3271,13 @@ typedef struct #define EVENT_SYSTEM_SWITCHEND 0x15 #define EVENT_SYSTEM_MINIMIZESTART 0x16 #define EVENT_SYSTEM_MINIMIZEEND 0x17 +#define EVENT_SYSTEM_DESKTOPSWITCH 0x20 +#define EVENT_SYSTEM_SWITCHER_APPGRABBED 0x24 +#define EVENT_SYSTEM_SWITCHER_APPOVERTARGET 0x25 +#define EVENT_SYSTEM_SWITCHER_APPDROPPED 0x26 +#define EVENT_SYSTEM_SWITCHER_CANCELLED 0x27 +#define EVENT_SYSTEM_IME_KEY_NOTIFICATION 0x29 + /* Console events */ #define EVENT_CONSOLE_CARET 0x4001 @@ -3295,6 +3313,24 @@ typedef struct #define EVENT_OBJECT_DEFACTIONCHANGE 0x8011 #define EVENT_OBJECT_ACCELERATORCHANGE 0x8012 #define EVENT_OBJECT_INVOKED 0x8013 +#define EVENT_OBJECT_TEXTSELECTIONCHANGED 0x8014 +#define EVENT_OBJECT_CONTENTSCROLLED 0x8015 +/* Typo matches Window's headers, ARRANGMENT should be ARRANGEMENT presumably. */ +#define EVENT_SYSTEM_ARRANGMENTPREVIEW 0x8016 +#define EVENT_OBJECT_CLOAKED 0x8017 +#define EVENT_OBJECT_UNCLOAKED 0x8018 +#define EVENT_OBJECT_LIVEREGIONCHANGED 0x8019 +#define EVENT_OBJECT_HOSTEDOBJECTSINVALIDATED 0x8020 +#define EVENT_OBJECT_DRAGSTART 0x8021 +#define EVENT_OBJECT_DRAGCANCEL 0x8022 +#define EVENT_OBJECT_DRAGCOMPLETE 0x8023 +#define EVENT_OBJECT_DRAGENTER 0x8024 +#define EVENT_OBJECT_DRAGLEAVE 0x8025 +#define EVENT_OBJECT_DRAGDROPPED 0x8026 +#define EVENT_OBJECT_IME_SHOW 0x8027 +#define EVENT_OBJECT_IME_HIDE 0x8028 +#define EVENT_OBJECT_IME_CHANGE 0x8029 +#define EVENT_OBJECT_TEXTEDIT_CONVERSIONTARGETCHANGED 0x8030 /* Sound events */ #define SOUND_SYSTEM_STARTUP 1
1
0
0
0
Ally Sommers : server: Return WSAEOPNOTSUPP on listen() if the socket's type is SOCK_DGRAM.
by Alexandre Julliard
18 Sep '23
18 Sep '23
Module: wine Branch: master Commit: 998febf7cf33cbd37ce3c3d031d2cf8578bfb207 URL:
https://gitlab.winehq.org/wine/wine/-/commit/998febf7cf33cbd37ce3c3d031d2cf…
Author: Ally Sommers <dropbear.sh(a)gmail.com> Date: Mon Sep 18 03:21:16 2023 -0700 server: Return WSAEOPNOTSUPP on listen() if the socket's type is SOCK_DGRAM. --- dlls/ws2_32/tests/sock.c | 12 ++++++++++++ server/sock.c | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 31dff1a11c7..5ab21060a62 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -3945,6 +3945,18 @@ static void test_listen(void) ret = WSAGetLastError(); ok (ret == WSAENOTSOCK, "expected 10038, received %d\n", ret); + /* udp test */ + SetLastError(0xdeadbeef); + fdA = socket(AF_INET, SOCK_DGRAM, 0); + ok ((fdA != INVALID_SOCKET), "socket failed unexpectedly: %d\n", WSAGetLastError() ); + + ok ((listen(fdA, 1) == SOCKET_ERROR), "listen did not fail\n"); + ret = WSAGetLastError(); + ok (ret == WSAEOPNOTSUPP, "expected 10045, received %d\n", ret); + + ret = closesocket(fdA); + ok (ret == 0, "closesocket failed unexpectedly: %d\n", ret); + /* tcp tests */ fdA = socket(AF_INET, SOCK_STREAM, 0); ok ((fdA != INVALID_SOCKET), "socket failed unexpectedly: %d\n", WSAGetLastError() ); diff --git a/server/sock.c b/server/sock.c index ac55a5448f7..52175b08987 100644 --- a/server/sock.c +++ b/server/sock.c @@ -2533,6 +2533,12 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async ) return; } + if (sock->type == WS_SOCK_DGRAM) + { + set_error( STATUS_NOT_SUPPORTED ); + return; + } + if (!sock->bound) { set_error( STATUS_INVALID_PARAMETER );
1
0
0
0
Esme Povirk : user32/tests: Account for some messages from dual-monitor setups.
by Alexandre Julliard
18 Sep '23
18 Sep '23
Module: wine Branch: master Commit: bf6f255c1439ae44b22d914a4fe5bee3bfc4c381 URL:
https://gitlab.winehq.org/wine/wine/-/commit/bf6f255c1439ae44b22d914a4fe5be…
Author: Esme Povirk <esme(a)codeweavers.com> Date: Sat Sep 16 12:27:56 2023 -0500 user32/tests: Account for some messages from dual-monitor setups. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54031
--- dlls/user32/tests/msg.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index b5c4de23bc1..90bbe6146cd 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -19560,6 +19560,13 @@ static const struct message send_message_3[] = { { WM_USER+1, sent|wparam|lparam, 0, 0 }, { 0 } }; +static const struct message send_message_5[] = { + { WM_WINDOWPOSCHANGING, sent|wparam|lparam|optional, 0, SWP_NOACTIVATE|SWP_NOZORDER }, /* win7+ dual monitor */ + { WM_GETMINMAXINFO, sent|defwinproc|optional }, /* win7+ dual monitor */ + { WM_WINDOWPOSCHANGING, sent|wparam|lparam|optional, 0, SWP_NOACTIVATE|SWP_NOZORDER }, /* win7+ dual monitor */ + { WM_GETMINMAXINFO, sent|defwinproc|optional }, /* win7+ dual monitor */ + { 0 } +}; static DWORD WINAPI SendMessage_thread_1(void *param) { @@ -19693,7 +19700,7 @@ static void test_SendMessage_other_thread(int thread_n) while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) { ok(ignore_message(msg.message), "got unexpected message %04x from PeekMessageA\n", msg.message); } - ok_sequence(WmEmptySeq, "SendMessage from other thread 5", thread_n == 2); + ok_sequence(send_message_5, "SendMessage from other thread 5", thread_n == 2); ret = GetQueueStatus(QS_SENDMESSAGE|QS_POSTMESSAGE); ok(ret == 0, "wrong status %08lx\n", ret);
1
0
0
0
Alistair Leslie-Hughes : mfreadwrite/reader: Update to IMFSourceReaderEx.
by Alexandre Julliard
18 Sep '23
18 Sep '23
Module: wine Branch: master Commit: 07f50ee66b45b550b8e973f71e01640fb78ee0e0 URL:
https://gitlab.winehq.org/wine/wine/-/commit/07f50ee66b45b550b8e973f71e0164…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Sat Sep 16 19:24:20 2023 +0200 mfreadwrite/reader: Update to IMFSourceReaderEx. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/mfreadwrite/reader.c | 110 ++++++++++++++++++++++++++-------------- dlls/mfreadwrite/tests/mfplat.c | 23 +++++++++ 2 files changed, 96 insertions(+), 37 deletions(-)
1
0
0
0
Jinoh Kang : wbemprox: Fix out-of-bounds access caused by codepoints above U+00FF.
by Alexandre Julliard
18 Sep '23
18 Sep '23
Module: wine Branch: master Commit: 67fbcff74598f26638544533f08fc39a9fbef50b URL:
https://gitlab.winehq.org/wine/wine/-/commit/67fbcff74598f26638544533f08fc3…
Author: Jinoh Kang <jinoh.kang.kr(a)gmail.com> Date: Wed Oct 26 23:32:22 2022 +0900 wbemprox: Fix out-of-bounds access caused by codepoints above U+00FF. Windows seems to recognize Unicode codepoints above U+007F as a valid identifier character regardless of their actual character class. Mimic that behaviour. --- dlls/wbemprox/tests/query.c | 6 ++++++ dlls/wbemprox/wql.y | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/dlls/wbemprox/tests/query.c b/dlls/wbemprox/tests/query.c index 23b4c86d33a..825ad2459f5 100644 --- a/dlls/wbemprox/tests/query.c +++ b/dlls/wbemprox/tests/query.c @@ -94,6 +94,12 @@ static void test_select( IWbemServices *services ) L"SELECT * FROM Win32_BIOS WHERE NULL = NAME", L"SELECT * FROM Win32_LogicalDiskToPartition", L"SELECT * FROM Win32_DiskDriveToDiskPartition", + L"SELECT \x80 FROM \x80", + L"SELECT \xC6 FROM \xC6", + L"SELECT \xFF FROM \xFF", + L"SELECT \x200C FROM \x200C", + L"SELECT \xFF21 FROM \xFF21", + L"SELECT \xFFFD FROM \xFFFD", }; HRESULT hr; IEnumWbemClassObject *result; diff --git a/dlls/wbemprox/wql.y b/dlls/wbemprox/wql.y index 637eb6f05fa..ba33396ddeb 100644 --- a/dlls/wbemprox/wql.y +++ b/dlls/wbemprox/wql.y @@ -645,6 +645,11 @@ static const char id_char[] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, }; +static int is_idchar(WCHAR chr) +{ + return chr >= ARRAY_SIZE(id_char) || id_char[chr]; +} + struct wql_keyword { const WCHAR *name; @@ -802,9 +807,9 @@ static int get_token( const WCHAR *s, int *token ) for (i = 1; is_digit( s[i] ); i++) {} return i; default: - if (!id_char[*s]) break; + if (!is_idchar(*s)) break; - for (i = 1; id_char[s[i]]; i++) {} + for (i = 1; is_idchar(s[i]); i++) {} *token = keyword_type( s, i ); return i; }
1
0
0
0
Nikolay Sivov : d3d10/effect: Implement 'mov' opcode for expressions.
by Alexandre Julliard
18 Sep '23
18 Sep '23
Module: wine Branch: master Commit: 0fac6c11f243512ef04b46b49abe75d7c65d8f6c URL:
https://gitlab.winehq.org/wine/wine/-/commit/0fac6c11f243512ef04b46b49abe75…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Sep 15 17:04:16 2023 +0200 d3d10/effect: Implement 'mov' opcode for expressions. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/d3d10/effect.c | 10 +++++++ dlls/d3d10/tests/effect.c | 72 ++++++++++++++++++++++++++++++++++++----------- 2 files changed, 65 insertions(+), 17 deletions(-) diff --git a/dlls/d3d10/effect.c b/dlls/d3d10/effect.c index 779bf878651..1d6acf53162 100644 --- a/dlls/d3d10/effect.c +++ b/dlls/d3d10/effect.c @@ -207,6 +207,15 @@ struct preshader_instr typedef void (*pres_op_func)(float **args, unsigned int n, const struct preshader_instr *instr); +static void pres_mov(float **args, unsigned int n, const struct preshader_instr *instr) +{ + float *retval = args[1]; + unsigned int i; + + for (i = 0; i < instr->comp_count; ++i) + retval[i] = args[0][i]; +} + static void pres_neg(float **args, unsigned int n, const struct preshader_instr *instr) { float *retval = args[1]; @@ -487,6 +496,7 @@ struct preshader_op_info static const struct preshader_op_info preshader_ops[] = { + { 0x100, "mov", pres_mov }, { 0x101, "neg", pres_neg }, { 0x103, "rcp", pres_rcp }, { 0x104, "frc", pres_frc }, diff --git a/dlls/d3d10/tests/effect.c b/dlls/d3d10/tests/effect.c index 7261ef2a80a..b1fdc357f7d 100644 --- a/dlls/d3d10/tests/effect.c +++ b/dlls/d3d10/tests/effect.c @@ -7761,13 +7761,17 @@ technique10 tech SetBlendState(NULL, fv1_a[1], i2_a[1]); SetDepthStencilState(NULL, i1_a[1]); } + pass P2 + { + SetBlendState(NULL, f1, 0); + } } #endif static DWORD fx_test_effect_dynamic_numeric_field[] = { - 0x43425844, 0xc53c7634, 0x9d90c190, 0x5a0b43ea, 0x77aab553, 0x00000001, 0x000003af, 0x00000001, - 0x00000024, 0x30315846, 0x00000383, 0xfeff1001, 0x00000001, 0x00000007, 0x00000000, 0x00000000, - 0x00000000, 0x00000000, 0x00000001, 0x00000197, 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x43425844, 0xec585518, 0x7c866383, 0xf6e767fd, 0x019e1f41, 0x00000001, 0x00000562, 0x00000001, + 0x00000024, 0x30315846, 0x00000536, 0xfeff1001, 0x00000001, 0x00000007, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000001, 0x0000030e, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x6f6c4724, 0x736c6162, 0x6e697500, 0x000d0074, 0x00010000, 0x00000000, 0x00040000, 0x00100000, 0x00040000, 0x09190000, 0x31690000, 0x00000d00, 0x00000100, 0x00000200, 0x00001400, 0x00001000, 0x00000800, @@ -7781,20 +7785,34 @@ static DWORD fx_test_effect_dynamic_numeric_field[] = 0x00000000, 0x00000400, 0x00001000, 0x00000400, 0x00090900, 0x00316600, 0x3e99999a, 0x68636574, 0x00305000, 0x00000001, 0x00000002, 0x00000000, 0x00000001, 0x00000002, 0x00000000, 0xa5003150, 0x04000000, 0x0e000000, 0x04000001, 0x01000000, 0x02000000, 0x00000000, 0x4d000000, 0x04000000, - 0x01000000, 0x02000000, 0x00000000, 0x04000000, 0x90000000, 0x00000000, 0x07000000, 0xff000000, - 0x00ffffff, 0x2e000000, 0x12000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, - 0x4d000000, 0x31000000, 0x00000000, 0x10000000, 0x00000000, 0x00000000, 0x00000000, 0x75000000, - 0x59000000, 0x00000000, 0x30000000, 0x79000000, 0x00000000, 0x00000000, 0xa5000000, 0x89000000, - 0x00000000, 0x40000000, 0xab000000, 0x00000000, 0x00000000, 0xeb000000, 0xcf000000, 0x00000000, - 0x60000000, 0xee000000, 0x00000000, 0x00000000, 0x0e000000, 0xf2000001, 0x00000000, 0x70000000, - 0x13000000, 0x00000001, 0x00000000, 0x3d000000, 0x21000001, 0x00000001, 0x84000000, 0x40000000, - 0x00000001, 0x00000000, 0x44000000, 0x02000001, 0x00000000, 0x49000000, 0x05000001, 0x00000000, - 0x0a000000, 0x00000000, 0x02000000, 0x75000000, 0x0b000000, 0x00000000, 0x02000000, 0xeb000000, - 0x02000000, 0x00000000, 0x01000000, 0x4c000000, 0x09000001, 0x00000000, 0x02000000, 0x2e000000, - 0x01000000, 0x00000000, 0x01000000, 0x58000000, 0x64000001, 0x05000001, 0x00000000, 0x0a000000, - 0x00000000, 0x03000000, 0x67000000, 0x0b000001, 0x00000000, 0x03000000, 0x6f000000, 0x02000001, - 0x00000000, 0x01000000, 0x77000000, 0x09000001, 0x00000000, 0x03000000, 0x83000000, 0x01000001, - 0x00000000, 0x01000000, 0x8b000000, 0x00000001, + 0x01000000, 0x02000000, 0x00000000, 0x50000000, 0x01580032, 0x58440000, 0x4df04342, 0xad7a0608, + 0xb4963c34, 0xe74c5ab9, 0x000151a3, 0x01580000, 0x00030000, 0x002c0000, 0x00b40000, 0x00c00000, + 0x54430000, 0x00804241, 0x001c0000, 0x00570000, 0x04000000, 0x00014658, 0x001c0000, 0x01000000, + 0x00540000, 0x00300000, 0x00020000, 0x00010000, 0x00340000, 0x00440000, 0x31660000, 0x0000ab00, + 0x00010003, 0x00010001, 0x00000000, 0x999a0000, 0x00003e99, 0x00000000, 0x00000000, 0x78740000, + 0x63694d00, 0x6f736f72, 0x28207466, 0x48202952, 0x204c534c, 0x64616853, 0x43207265, 0x69706d6f, + 0x2072656c, 0x312e3031, 0x4c43ab00, 0x00043449, 0x00000000, 0x58460000, 0x0090434c, 0x00040000, + 0x00010000, 0x00011000, 0x00000000, 0x00020000, 0x00000000, 0x00000000, 0x00040000, 0x00000000, + 0x00010000, 0x00011000, 0x00000000, 0x00020000, 0x00000000, 0x00000000, 0x00040000, 0x00010000, + 0x00010000, 0x00011000, 0x00000000, 0x00020000, 0x00000000, 0x00000000, 0x00040000, 0x00020000, + 0x00010000, 0x00011000, 0x00000000, 0x00020000, 0x00000000, 0x00000000, 0x00040000, 0x00030000, + 0xf0f00000, 0x0f0ff0f0, 0xffff0f0f, 0x00010000, 0x00020000, 0x00000000, 0x00010000, 0x00020000, + 0x00000000, 0x00040000, 0x00900000, 0x00000000, 0x00070000, 0xffff0000, 0x0000ffff, 0x002e0000, + 0x00120000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x004d0000, 0x00310000, + 0x00000000, 0x00100000, 0x00000000, 0x00000000, 0x00000000, 0x00750000, 0x00590000, 0x00000000, + 0x00300000, 0x00790000, 0x00000000, 0x00000000, 0x00a50000, 0x00890000, 0x00000000, 0x00400000, + 0x00ab0000, 0x00000000, 0x00000000, 0x00eb0000, 0x00cf0000, 0x00000000, 0x00600000, 0x00ee0000, + 0x00000000, 0x00000000, 0x010e0000, 0x00f20000, 0x00000000, 0x00700000, 0x01130000, 0x00000000, + 0x00000000, 0x013d0000, 0x01210000, 0x00000000, 0x00840000, 0x01400000, 0x00000000, 0x00000000, + 0x01440000, 0x00030000, 0x00000000, 0x01490000, 0x00050000, 0x00000000, 0x000a0000, 0x00000000, + 0x00020000, 0x00750000, 0x000b0000, 0x00000000, 0x00020000, 0x00eb0000, 0x00020000, 0x00000000, + 0x00010000, 0x014c0000, 0x00090000, 0x00000000, 0x00020000, 0x002e0000, 0x00010000, 0x00000000, + 0x00010000, 0x01580000, 0x01640000, 0x00050000, 0x00000000, 0x000a0000, 0x00000000, 0x00030000, + 0x01670000, 0x000b0000, 0x00000000, 0x00030000, 0x016f0000, 0x00020000, 0x00000000, 0x00010000, + 0x01770000, 0x00090000, 0x00000000, 0x00030000, 0x01830000, 0x00010000, 0x00000000, 0x00010000, + 0x018b0000, 0x01970000, 0x00030000, 0x00000000, 0x000a0000, 0x00000000, 0x00060000, 0x019a0000, + 0x000b0000, 0x00000000, 0x00010000, 0x02f60000, 0x00020000, 0x00000000, 0x00010000, 0x03020000, + 0x00000000, }; static void test_effect_dynamic_numeric_field(void) @@ -7882,6 +7900,26 @@ static void test_effect_dynamic_numeric_field(void) ok(blend_factor[3] == 0.4f, "Got unexpected blend_factor[3] %.8e.\n", blend_factor[3]); ok(sample_mask == 0x2, "Unexpected sample mask %#x.\n", sample_mask); + pass = tech->lpVtbl->GetPassByName(tech, "P2"); + + v = effect->lpVtbl->GetVariableByName(effect, "f1"); + scalar = v->lpVtbl->AsScalar(v); + hr = scalar->lpVtbl->SetFloat(scalar, 0.123f); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + + memset(blend_factor, 0, sizeof(blend_factor)); + ID3D10Device_OMSetBlendState(device, NULL, blend_factor, 0); + hr = pass->lpVtbl->Apply(pass, 0); + ok(hr == S_OK, "Got unexpected hr %#lx.\n", hr); + ID3D10Device_OMGetDepthStencilState(device, &ds_state, &stencil_ref); + ok(stencil_ref == 0x4, "Unexpected stencil ref value %#x.\n", stencil_ref); + ID3D10Device_OMGetBlendState(device, &blend_state, blend_factor, &sample_mask); + ok(blend_factor[0] == 0.123f, "Got unexpected blend_factor[0] %.8e.\n", blend_factor[0]); + ok(blend_factor[1] == 0.123f, "Got unexpected blend_factor[1] %.8e.\n", blend_factor[1]); + ok(blend_factor[2] == 0.123f, "Got unexpected blend_factor[2] %.8e.\n", blend_factor[2]); + ok(blend_factor[3] == 0.123f, "Got unexpected blend_factor[3] %.8e.\n", blend_factor[3]); + ok(!sample_mask, "Unexpected sample mask %#x.\n", sample_mask); + effect->lpVtbl->Release(effect); refcount = ID3D10Device_Release(device);
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
92
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
Results per page:
10
25
50
100
200