winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
February 2022
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
1495 discussions
Start a n
N
ew thread
Zebediah Figura : amstream/tests: Use IMemAllocator::GetBuffer() directly.
by Alexandre Julliard
07 Feb '22
07 Feb '22
Module: wine Branch: master Commit: 2552a4843646e8a842bbbf728389862a6b2027c5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2552a4843646e8a842bbbf72…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Feb 6 20:59:40 2022 -0600 amstream/tests: Use IMemAllocator::GetBuffer() directly. BaseOutputPinImpl_GetDeliveryBuffer() is doing nothing helpful here. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/amstream/tests/amstream.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/amstream/tests/amstream.c b/dlls/amstream/tests/amstream.c index d27bf801482..5b3e78e0583 100644 --- a/dlls/amstream/tests/amstream.c +++ b/dlls/amstream/tests/amstream.c @@ -4256,7 +4256,7 @@ static void test_audiostream_begin_flush_end_flush(void) hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); ok(hr == S_OK, "Got hr %#x.\n", hr); - hr = BaseOutputPinImpl_GetDeliveryBuffer(&source.source, &media_sample, NULL, NULL, 0); + hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0); ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -4272,7 +4272,7 @@ static void test_audiostream_begin_flush_end_flush(void) ref = IMediaSample_Release(media_sample); ok(!ref, "Got outstanding refcount %d.\n", ref); - hr = BaseOutputPinImpl_GetDeliveryBuffer(&source.source, &media_sample, NULL, NULL, 0); + hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0); ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); ok(hr == S_FALSE, "Got hr %#x.\n", hr); @@ -4289,7 +4289,7 @@ static void test_audiostream_begin_flush_end_flush(void) hr = IPin_EndFlush(pin); ok(hr == S_OK, "Got hr %#x.\n", hr); - hr = BaseOutputPinImpl_GetDeliveryBuffer(&source.source, &media_sample, NULL, NULL, 0); + hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0); ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); ok(hr == S_OK, "Got hr %#x.\n", hr); @@ -4408,7 +4408,7 @@ static IMediaSample *ammediastream_allocate_sample(struct testfilter *source, co BYTE *sample_data; HRESULT hr; - hr = BaseOutputPinImpl_GetDeliveryBuffer(&source->source, &sample, NULL, NULL, 0); + hr = IMemAllocator_GetBuffer(source->source.pAllocator, &sample, NULL, NULL, 0); ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IMediaSample_GetPointer(sample, &sample_data); @@ -5848,7 +5848,7 @@ static void test_ddrawstream_begin_flush_end_flush(void) hr = IAMMultiMediaStream_SetState(mmstream, STREAMSTATE_RUN); ok(hr == S_OK, "Got hr %#x.\n", hr); - hr = BaseOutputPinImpl_GetDeliveryBuffer(&source.source, &media_sample, NULL, NULL, 0); + hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0); ok(hr == S_OK, "Got hr %#x.\n", hr); ammediastream_mem_input_pin = source.source.pMemInputPin; @@ -5866,7 +5866,7 @@ static void test_ddrawstream_begin_flush_end_flush(void) ref = IMediaSample_Release(media_sample); ok(!ref, "Got outstanding refcount %d.\n", ref); - hr = BaseOutputPinImpl_GetDeliveryBuffer(&source.source, &media_sample, NULL, NULL, 0); + hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0); ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); ok(hr == S_FALSE, "Got hr %#x.\n", hr); @@ -5883,7 +5883,7 @@ static void test_ddrawstream_begin_flush_end_flush(void) hr = IPin_EndFlush(pin); ok(hr == S_OK, "Got hr %#x.\n", hr); - hr = BaseOutputPinImpl_GetDeliveryBuffer(&source.source, &media_sample, NULL, NULL, 0); + hr = IMemAllocator_GetBuffer(source.source.pAllocator, &media_sample, NULL, NULL, 0); ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IMemInputPin_Receive(source.source.pMemInputPin, media_sample); ok(hr == S_OK, "Got hr %#x.\n", hr);
1
0
0
0
Zebediah Figura : winegstreamer: Use IMemAllocator::GetBuffer() directly.
by Alexandre Julliard
07 Feb '22
07 Feb '22
Module: wine Branch: master Commit: 8c7ad5fc397e4814c33fa4b85be505db94d70016 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8c7ad5fc397e4814c33fa4b8…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Feb 6 20:59:39 2022 -0600 winegstreamer: Use IMemAllocator::GetBuffer() directly. BaseOutputPinImpl_GetDeliveryBuffer() is doing nothing helpful here. Note that we cannot be unconnected at this point, or stream_thread() would not even be running. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/quartz_parser.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/dlls/winegstreamer/quartz_parser.c b/dlls/winegstreamer/quartz_parser.c index 331bc9a888a..45313ebda27 100644 --- a/dlls/winegstreamer/quartz_parser.c +++ b/dlls/winegstreamer/quartz_parser.c @@ -753,12 +753,9 @@ static void send_buffer(struct parser_source *pin, const struct wg_parser_event { uint32_t advance; - hr = BaseOutputPinImpl_GetDeliveryBuffer(&pin->pin, &sample, NULL, NULL, 0); - - if (FAILED(hr)) + if (FAILED(hr = IMemAllocator_GetBuffer(pin->pin.pAllocator, &sample, NULL, NULL, 0))) { - if (hr != VFW_E_NOT_CONNECTED) - ERR("Failed to get a sample, hr %#lx.\n", hr); + ERR("Failed to get a sample, hr %#lx.\n", hr); break; } @@ -776,12 +773,9 @@ static void send_buffer(struct parser_source *pin, const struct wg_parser_event } else { - hr = BaseOutputPinImpl_GetDeliveryBuffer(&pin->pin, &sample, NULL, NULL, 0); - - if (FAILED(hr)) + if (FAILED(hr = IMemAllocator_GetBuffer(pin->pin.pAllocator, &sample, NULL, NULL, 0))) { - if (hr != VFW_E_NOT_CONNECTED) - ERR("Failed to get a sample, hr %#lx.\n", hr); + ERR("Failed to get a sample, hr %#lx.\n", hr); } else {
1
0
0
0
Zebediah Figura : quartz: Use IMemAllocator::GetBuffer() directly.
by Alexandre Julliard
07 Feb '22
07 Feb '22
Module: wine Branch: master Commit: 9d5d8df6f0503a46b15deadb2bd856b405ec0db9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9d5d8df6f0503a46b15deadb…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Sun Feb 6 20:59:38 2022 -0600 quartz: Use IMemAllocator::GetBuffer() directly. BaseOutputPinImpl_GetDeliveryBuffer() is doing nothing helpful here. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/acmwrapper.c | 3 +-- dlls/quartz/avidec.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/dlls/quartz/acmwrapper.c b/dlls/quartz/acmwrapper.c index 12d96f69376..cf8e7cd125d 100644 --- a/dlls/quartz/acmwrapper.c +++ b/dlls/quartz/acmwrapper.c @@ -140,8 +140,7 @@ static HRESULT WINAPI acm_wrapper_sink_Receive(struct strmbase_sink *iface, IMed while(hr == S_OK && ash.cbSrcLength) { - hr = BaseOutputPinImpl_GetDeliveryBuffer(&This->source, &pOutSample, NULL, NULL, 0); - if (FAILED(hr)) + if (FAILED(hr = IMemAllocator_GetBuffer(This->source.pAllocator, &pOutSample, NULL, NULL, 0))) { ERR("Failed to get sample, hr %#lx.\n", hr); return hr; diff --git a/dlls/quartz/avidec.c b/dlls/quartz/avidec.c index 30b6c741eed..f8660890273 100644 --- a/dlls/quartz/avidec.c +++ b/dlls/quartz/avidec.c @@ -139,8 +139,8 @@ static HRESULT WINAPI avi_decompressor_sink_Receive(struct strmbase_sink *iface, /* Update input size to match sample size */ This->pBihIn->biSizeImage = cbSrcStream; - hr = BaseOutputPinImpl_GetDeliveryBuffer(&This->source, &pOutSample, NULL, NULL, 0); - if (FAILED(hr)) { + if (FAILED(hr = IMemAllocator_GetBuffer(This->source.pAllocator, &pOutSample, NULL, NULL, 0))) + { ERR("Failed to get sample, hr %#lx.\n", hr); return hr; }
1
0
0
0
Alistair Leslie-Hughes : msdasql: ICommandText Execute use ODBC to fetch results.
by Alexandre Julliard
07 Feb '22
07 Feb '22
Module: wine Branch: master Commit: 50fc9d7ddce7d2abe03549aa28df192b6cd944ac URL:
https://source.winehq.org/git/wine.git/?a=commit;h=50fc9d7ddce7d2abe03549aa…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Sun Feb 6 19:07:36 2022 +1100 msdasql: ICommandText Execute use ODBC to fetch results. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msdasql/session.c | 59 ++++++++++++++++++++++++++++++++----------- dlls/msdasql/tests/provider.c | 15 ++++++++--- 2 files changed, 56 insertions(+), 18 deletions(-) diff --git a/dlls/msdasql/session.c b/dlls/msdasql/session.c index 0f74c126138..199eb0830d6 100644 --- a/dlls/msdasql/session.c +++ b/dlls/msdasql/session.c @@ -477,6 +477,7 @@ struct msdasql_rowset IColumnsRowset IColumnsRowset_iface; IUnknown *caller; LONG refs; + SQLHSTMT hstmt; }; static inline struct msdasql_rowset *impl_from_IRowset( IRowset *iface ) @@ -575,6 +576,8 @@ static ULONG WINAPI msdasql_rowset_Release(IRowset *iface) { TRACE( "destroying %p\n", rowset ); + SQLFreeHandle(SQL_HANDLE_STMT, rowset->hstmt); + if (rowset->caller) IUnknown_Release(rowset->caller); @@ -845,27 +848,53 @@ static HRESULT WINAPI command_Execute(ICommandText *iface, IUnknown *outer, REFI { struct command *command = impl_from_ICommandText( iface ); struct msdasql_rowset *msrowset; - HRESULT hr; + HRESULT hr = S_OK; + RETCODE ret; + SQLHSTMT hstmt = command->hstmt; + SQLLEN results = -1; - FIXME("%p, %p, %s, %p %p %p Semi Stub\n", command, outer, debugstr_guid(riid), params, affected, rowset); + TRACE("%p, %p, %s, %p %p %p\n", command, outer, debugstr_guid(riid), params, affected, rowset); - msrowset = heap_alloc(sizeof(*msrowset)); - if (!msrowset) - return E_OUTOFMEMORY; + if (!hstmt) + SQLAllocHandle(SQL_HANDLE_STMT, command->hdbc, &hstmt); - msrowset->IRowset_iface.lpVtbl = &msdasql_rowset_vtbl; - msrowset->IRowsetInfo_iface.lpVtbl = &rowset_info_vtbl; - msrowset->IColumnsInfo_iface.lpVtbl = &rowset_columninfo_vtbll; - msrowset->IAccessor_iface.lpVtbl = &accessor_vtbl; - msrowset->IColumnsRowset_iface.lpVtbl = &columnrs_rs_vtbl; - msrowset->refs = 1; - ICommandText_QueryInterface(iface, &IID_IUnknown, (void**)&msrowset->caller); + ret = SQLExecDirectW(hstmt, command->query, SQL_NTS); + if (ret != SQL_SUCCESS) + { + dump_sql_diag_records(SQL_HANDLE_STMT, hstmt); + return E_FAIL; + } + + ret = SQLRowCount(hstmt, &results); + if (ret != SQL_SUCCESS) + ERR("SQLRowCount failed (%d)\n", ret); if (affected) - *affected = 0; /* FIXME */ + *affected = results; + + *rowset = NULL; + if (!wcsnicmp( command->query, L"select ", 7 )) + { + msrowset = heap_alloc(sizeof(*msrowset)); + if (!msrowset) + return E_OUTOFMEMORY; - hr = IRowset_QueryInterface(&msrowset->IRowset_iface, riid, (void**)rowset); - IRowset_Release(&msrowset->IRowset_iface); + command->hstmt = NULL; + + msrowset->IRowset_iface.lpVtbl = &msdasql_rowset_vtbl; + msrowset->IRowsetInfo_iface.lpVtbl = &rowset_info_vtbl; + msrowset->IColumnsInfo_iface.lpVtbl = &rowset_columninfo_vtbll; + msrowset->IAccessor_iface.lpVtbl = &accessor_vtbl; + msrowset->IColumnsRowset_iface.lpVtbl = &columnrs_rs_vtbl; + msrowset->refs = 1; + ICommandText_QueryInterface(iface, &IID_IUnknown, (void**)&msrowset->caller); + msrowset->hstmt = hstmt; + + hr = IRowset_QueryInterface(&msrowset->IRowset_iface, riid, (void**)rowset); + IRowset_Release(&msrowset->IRowset_iface); + } + else + SQLFreeStmt(hstmt, SQL_CLOSE); return hr; } diff --git a/dlls/msdasql/tests/provider.c b/dlls/msdasql/tests/provider.c index 7a5175fa050..d261e34e987 100644 --- a/dlls/msdasql/tests/provider.c +++ b/dlls/msdasql/tests/provider.c @@ -382,11 +382,20 @@ static void test_command_rowset(IUnknown *cmd) affected = 9999; hr = ICommandText_Execute(command_text, NULL, &IID_IRowset, NULL, &affected, &unk); ok(hr == S_OK, "got 0x%08lx\n", hr); - todo_wine ok(unk == NULL, "Unexpected value\n"); - todo_wine ok(affected == -1, "got %Id\n", affected); + ok(unk == NULL, "Unexpected value\n"); + ok(affected == -1, "got %Id\n", affected); if (unk) IUnknown_Release(unk); + hr = ICommandText_SetCommandText(command_text, &DBGUID_DEFAULT, L"insert into testing values(1, 0)"); + ok(hr == S_OK, "got 0x%08lx\n", hr); + + affected = 9999; + hr = ICommandText_Execute(command_text, NULL, &IID_IRowset, NULL, &affected, &unk); + ok(hr == S_OK, "got 0x%08lx\n", hr); + ok(affected == 1, "got %Id\n", affected); + ok(unk == NULL, "Unexpected value\n"); + hr = ICommandText_SetCommandText(command_text, &DBGUID_DEFAULT, L"select * from testing"); ok(hr == S_OK, "got 0x%08lx\n", hr); @@ -396,7 +405,7 @@ static void test_command_rowset(IUnknown *cmd) ok(unk != NULL, "Unexpected value\n"); if (hr == S_OK) { - ok(affected == -1, "wrong affected value\n"); + ok(affected == -1, "got %Id\n", affected); hr = IUnknown_QueryInterface(unk, &IID_IRowset, (void**)&rowset); ok(hr == S_OK, "got 0x%08lx\n", hr);
1
0
0
0
Alistair Leslie-Hughes : xactengine3_7/tests: Build without -DWINE_NO_LONG_TYPES.
by Alexandre Julliard
07 Feb '22
07 Feb '22
Module: wine Branch: master Commit: 111c87f444b167f56633462f778d9f5aa6ef53ea URL:
https://source.winehq.org/git/wine.git/?a=commit;h=111c87f444b167f56633462f…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Sun Feb 6 13:47:16 2022 +1100 xactengine3_7/tests: Build without -DWINE_NO_LONG_TYPES. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/xactengine3_7/tests/Makefile.in | 1 - dlls/xactengine3_7/tests/xact3.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/xactengine3_7/tests/Makefile.in b/dlls/xactengine3_7/tests/Makefile.in index 693c3687728..c32b2562546 100644 --- a/dlls/xactengine3_7/tests/Makefile.in +++ b/dlls/xactengine3_7/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = xactengine3_7.dll IMPORTS = ole32 diff --git a/dlls/xactengine3_7/tests/xact3.c b/dlls/xactengine3_7/tests/xact3.c index 6b04c36a9f0..623a1c97db8 100644 --- a/dlls/xactengine3_7/tests/xact3.c +++ b/dlls/xactengine3_7/tests/xact3.c @@ -84,7 +84,7 @@ static void test_interfaces(void) trace("%d %s not registered. Skipping\n", i, wine_dbgstr_guid(xact_interfaces[i].clsid) ); continue; } - ok(hr == xact_interfaces[i].expected, "%d, Unexpected value 0x%08x\n", i, hr); + ok(hr == xact_interfaces[i].expected, "%d, Unexpected value 0x%08lx\n", i, hr); if (hr == S_OK) IUnknown_Release(unk); }
1
0
0
0
Conor McCarthy : vkd3d: Use a helper function to copy descriptor set layouts to an array.
by Alexandre Julliard
07 Feb '22
07 Feb '22
Module: vkd3d Branch: master Commit: de031bfb297419b249b43d536e9fcc20a43a1162 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=de031bfb297419b249b43d5…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Sat Feb 5 01:55:19 2022 +1000 vkd3d: Use a helper function to copy descriptor set layouts to an array. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/state.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index 034aedb..1d4f91e 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -1126,6 +1126,17 @@ static HRESULT vkd3d_create_pipeline_layout(struct d3d12_device *device, return S_OK; } +static unsigned int d3d12_root_signature_copy_descriptor_set_layouts(const struct d3d12_root_signature *root_signature, + VkDescriptorSetLayout *vk_set_layouts) +{ + unsigned int i; + + for (i = 0; i < root_signature->vk_set_count; ++i) + vk_set_layouts[i] = root_signature->descriptor_set_layouts[i].vk_layout; + + return i; +} + static HRESULT d3d12_root_signature_init(struct d3d12_root_signature *root_signature, struct d3d12_device *device, const D3D12_ROOT_SIGNATURE_DESC *desc) { @@ -1222,12 +1233,8 @@ static HRESULT d3d12_root_signature_init(struct d3d12_root_signature *root_signa vkd3d_free(binding_desc); binding_desc = NULL; - for (i = 0; i < root_signature->vk_set_count; ++i) - { - vk_layouts[i] = root_signature->descriptor_set_layouts[i].vk_layout; - } - - if (FAILED(hr = vkd3d_create_pipeline_layout(device, root_signature->vk_set_count, + i = d3d12_root_signature_copy_descriptor_set_layouts(root_signature, vk_layouts); + if (FAILED(hr = vkd3d_create_pipeline_layout(device, i, vk_layouts, root_signature->push_constant_range_count, root_signature->push_constant_ranges, &root_signature->vk_pipeline_layout))) goto fail; @@ -1833,8 +1840,7 @@ static HRESULT d3d12_pipeline_state_init_uav_counters(struct d3d12_pipeline_stat state->uav_counters.binding_count = uav_counter_count; descriptor_binding = 0; - for (set_index = 0; set_index < root_signature->vk_set_count; ++set_index) - set_layouts[set_index] = root_signature->descriptor_set_layouts[set_index].vk_layout; + set_index = d3d12_root_signature_copy_descriptor_set_layouts(root_signature, set_layouts); for (i = 0, j = 0; i < shader_info->descriptor_count; ++i) {
1
0
0
0
Conor McCarthy : vkd3d: Use a helper function to find and init UAV counters.
by Alexandre Julliard
07 Feb '22
07 Feb '22
Module: vkd3d Branch: master Commit: ce243da81a5254175b03473e9784a38a0a8c0788 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=ce243da81a5254175b03473…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Sat Feb 5 01:55:18 2022 +1000 vkd3d: Use a helper function to find and init UAV counters. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/state.c | 61 +++++++++++++++++++++++++----------------------------- 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index ce00dfe..034aedb 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -1889,18 +1889,40 @@ static HRESULT d3d12_pipeline_state_init_uav_counters(struct d3d12_pipeline_stat return S_OK; } +static HRESULT d3d12_pipeline_state_find_and_init_uav_counters(struct d3d12_pipeline_state *state, + struct d3d12_device *device, const struct d3d12_root_signature *root_signature, + const D3D12_SHADER_BYTECODE *code, VkShaderStageFlags stage_flags) +{ + struct vkd3d_shader_scan_descriptor_info shader_info; + HRESULT hr; + int ret; + + shader_info.type = VKD3D_SHADER_STRUCTURE_TYPE_SCAN_DESCRIPTOR_INFO; + shader_info.next = NULL; + if ((ret = vkd3d_scan_dxbc(code, &shader_info)) < 0) + { + WARN("Failed to scan shader bytecode, stage %#x, vkd3d result %d.\n", stage_flags, ret); + return hresult_from_vkd3d_result(ret); + } + + if (FAILED(hr = d3d12_pipeline_state_init_uav_counters(state, device, root_signature, &shader_info, stage_flags))) + WARN("Failed to create descriptor set layout for UAV counters, hr %#x.\n", hr); + + vkd3d_shader_free_scan_descriptor_info(&shader_info); + + return hr; +} + static HRESULT d3d12_pipeline_state_init_compute(struct d3d12_pipeline_state *state, struct d3d12_device *device, const D3D12_COMPUTE_PIPELINE_STATE_DESC *desc) { const struct vkd3d_vk_device_procs *vk_procs = &device->vk_procs; - struct vkd3d_shader_scan_descriptor_info shader_info; struct vkd3d_shader_interface_info shader_interface; struct vkd3d_shader_descriptor_offset_info offset_info; const struct d3d12_root_signature *root_signature; struct vkd3d_shader_spirv_target_info target_info; VkPipelineLayout vk_pipeline_layout; HRESULT hr; - int ret; state->ID3D12PipelineState_iface.lpVtbl = &d3d12_pipeline_state_vtbl; state->refcount = 1; @@ -1913,21 +1935,9 @@ static HRESULT d3d12_pipeline_state_init_compute(struct d3d12_pipeline_state *st return E_INVALIDARG; } - shader_info.type = VKD3D_SHADER_STRUCTURE_TYPE_SCAN_DESCRIPTOR_INFO; - shader_info.next = NULL; - if ((ret = vkd3d_scan_dxbc(&desc->CS, &shader_info)) < 0) - { - WARN("Failed to scan shader bytecode, vkd3d result %d.\n", ret); - return hresult_from_vkd3d_result(ret); - } - - if (FAILED(hr = d3d12_pipeline_state_init_uav_counters(state, - device, root_signature, &shader_info, VK_SHADER_STAGE_COMPUTE_BIT))) - { - WARN("Failed to create descriptor set layout for UAV counters, hr %#x.\n", hr); + if (FAILED(hr = d3d12_pipeline_state_find_and_init_uav_counters(state, device, root_signature, + &desc->CS, VK_SHADER_STAGE_COMPUTE_BIT))) return hr; - } - vkd3d_shader_free_scan_descriptor_info(&shader_info); memset(&target_info, 0, sizeof(target_info)); target_info.type = VKD3D_SHADER_STRUCTURE_TYPE_SPIRV_TARGET_INFO; @@ -2724,30 +2734,15 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s for (i = 0; i < ARRAY_SIZE(shader_stages); ++i) { - struct vkd3d_shader_scan_descriptor_info shader_info = - { - .type = VKD3D_SHADER_STRUCTURE_TYPE_SCAN_DESCRIPTOR_INFO, - }; const D3D12_SHADER_BYTECODE *b = (const void *)((uintptr_t)desc + shader_stages[i].offset); const struct vkd3d_shader_code dxbc = {b->pShaderBytecode, b->BytecodeLength}; if (!b->pShaderBytecode) continue; - if ((ret = vkd3d_scan_dxbc(b, &shader_info)) < 0) - { - WARN("Failed to scan shader bytecode, stage %#x, vkd3d result %d.\n", - shader_stages[i].stage, ret); - hr = hresult_from_vkd3d_result(ret); + if (FAILED(hr = d3d12_pipeline_state_find_and_init_uav_counters(state, device, root_signature, + b, shader_stages[i].stage))) goto fail; - } - if (FAILED(hr = d3d12_pipeline_state_init_uav_counters(state, - device, root_signature, &shader_info, shader_stages[i].stage))) - { - WARN("Failed to create descriptor set layout for UAV counters, hr %#x.\n", hr); - goto fail; - } - vkd3d_shader_free_scan_descriptor_info(&shader_info); shader_interface.uav_counters = NULL; shader_interface.uav_counter_count = 0;
1
0
0
0
Conor McCarthy : vkd3d: Pass shader extension info to all graphics stages.
by Alexandre Julliard
07 Feb '22
07 Feb '22
Module: vkd3d Branch: master Commit: 3fe14928117bf5285dce3d97868dc522c21ee26c URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=3fe14928117bf5285dce3d9…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Sat Feb 5 01:55:17 2022 +1000 vkd3d: Pass shader extension info to all graphics stages. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/state.c | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index 12c7a9e..ce00dfe 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -2450,13 +2450,14 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s VkVertexInputBindingDivisorDescriptionEXT *binding_divisor; const struct vkd3d_vulkan_info *vk_info = &device->vk_info; uint32_t instance_divisors[D3D12_VS_INPUT_REGISTER_COUNT]; + struct vkd3d_shader_spirv_target_info *stage_target_info; uint32_t aligned_offsets[D3D12_VS_INPUT_REGISTER_COUNT]; + struct vkd3d_shader_descriptor_offset_info offset_info; struct vkd3d_shader_parameter ps_shader_parameters[1]; struct vkd3d_shader_transform_feedback_info xfb_info; struct vkd3d_shader_spirv_target_info ps_target_info; struct vkd3d_shader_interface_info shader_interface; - struct vkd3d_shader_descriptor_offset_info offset_info; - struct vkd3d_shader_spirv_target_info *target_info; + struct vkd3d_shader_spirv_target_info target_info; const struct d3d12_root_signature *root_signature; struct vkd3d_shader_signature input_signature; bool have_attachment, is_dsv_format_unknown; @@ -2661,6 +2662,12 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s } } + memset(&target_info, 0, sizeof(target_info)); + target_info.type = VKD3D_SHADER_STRUCTURE_TYPE_SPIRV_TARGET_INFO; + target_info.environment = VKD3D_SHADER_SPIRV_ENVIRONMENT_VULKAN_1_0; + target_info.extensions = vk_info->shader_extensions; + target_info.extension_count = vk_info->shader_extension_count; + graphics->xfb_enabled = false; if (so_desc->NumEntries) { @@ -2713,7 +2720,6 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s offset_info.descriptor_table_count = 0; offset_info.binding_offsets = root_signature->descriptor_offsets; offset_info.uav_counter_offsets = NULL; - vkd3d_prepend_struct(&shader_interface, &offset_info); } for (i = 0; i < ARRAY_SIZE(shader_stages); ++i) @@ -2745,7 +2751,7 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s shader_interface.uav_counters = NULL; shader_interface.uav_counter_count = 0; - target_info = NULL; + stage_target_info = &target_info; switch (shader_stages[i].stage) { case VK_SHADER_STAGE_VERTEX_BIT: @@ -2772,7 +2778,7 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s case VK_SHADER_STAGE_FRAGMENT_BIT: shader_interface.uav_counters = state->uav_counters.bindings; shader_interface.uav_counter_count = state->uav_counters.binding_count; - target_info = &ps_target_info; + stage_target_info = &ps_target_info; break; default: @@ -2781,10 +2787,15 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s } shader_interface.next = NULL; + xfb_info.next = NULL; + ps_target_info.next = NULL; + target_info.next = NULL; + offset_info.next = NULL; if (shader_stages[i].stage == xfb_stage) vkd3d_prepend_struct(&shader_interface, &xfb_info); - if (target_info) - vkd3d_prepend_struct(&shader_interface, target_info); + vkd3d_prepend_struct(&shader_interface, stage_target_info); + if (root_signature->descriptor_offsets) + vkd3d_prepend_struct(&shader_interface, &offset_info); if (FAILED(hr = create_shader_stage(device, &graphics->stages[graphics->stage_count], shader_stages[i].stage, b, &shader_interface)))
1
0
0
0
Alexandre Julliard : configure: Don't require pthread for Mingw builds.
by Alexandre Julliard
07 Feb '22
07 Feb '22
Module: vkd3d Branch: master Commit: ff5530d7ad0c0bac2a65796c83acec2998182b8e URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=ff5530d7ad0c0bac2a65796…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Feb 7 13:55:43 2022 +0100 configure: Don't require pthread for Mingw builds. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- configure.ac | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index d296dfd..45220f8 100644 --- a/configure.ac +++ b/configure.ac @@ -69,11 +69,10 @@ VKD3D_CHECK_MINGW32_PROG([CROSSCC32], [CROSSTARGET32], [no]) VKD3D_CHECK_MINGW64_PROG([CROSSCC64], [CROSSTARGET64], [no]) dnl Check for headers -AC_CHECK_HEADERS([dlfcn.h pthread.h \ +AC_CHECK_HEADERS([dlfcn.h \ vulkan/vulkan.h \ vulkan/spirv.h vulkan/GLSL.std.450.h \ spirv/unified1/spirv.h spirv/unified1/GLSL.std.450.h]) -AS_IF([test "x$ac_cv_header_pthread_h" != "xyes"], [AC_MSG_ERROR([pthread.h not found.])]) AS_IF([test "x$ac_cv_header_vulkan_vulkan_h" != "xyes"], [AC_MSG_ERROR([vulkan.h not found.])]) AS_IF([test "x$ac_cv_header_spirv_unified1_spirv_h" != "xyes" \ -a "x$ac_cv_header_vulkan_spirv_h" != "xyes"], @@ -103,8 +102,15 @@ AC_CHECK_LIB([dl], [dlopen], [DL_LIBS="-ldl"], [AS_IF([test "$ac_cv_header_dlfnc_h" = "xyes"], [AC_MSG_ERROR([libdl not found.])])]) -AC_ARG_VAR([PTHREAD_LIBS], [linker flags for pthreads]) -VKD3D_CHECK_PTHREAD +case $host_os in + mingw32*) ;; + *) AC_CHECK_HEADERS([pthread.h]) + AS_IF([test "x$ac_cv_header_pthread_h" != "xyes"], [AC_MSG_ERROR([pthread.h not found.])]) + AC_ARG_VAR([PTHREAD_LIBS], [linker flags for pthreads]) + VKD3D_CHECK_PTHREAD + VKD3D_CHECK_PTHREAD_SETNAME_NP + ;; +esac AC_ARG_VAR([VULKAN_LIBS], [linker flags for the Vulkan library]) VKD3D_CHECK_VULKAN @@ -132,8 +138,6 @@ VKD3D_CHECK_FUNC([HAVE_BUILTIN_ADD_OVERFLOW], [__builtin_add_overflow], [__built VKD3D_CHECK_FUNC([HAVE_SYNC_ADD_AND_FETCH], [__sync_add_and_fetch], [__sync_add_and_fetch((int *)0, 0)]) VKD3D_CHECK_FUNC([HAVE_SYNC_SUB_AND_FETCH], [__sync_sub_and_fetch], [__sync_sub_and_fetch((int *)0, 0)]) -VKD3D_CHECK_PTHREAD_SETNAME_NP - dnl Makefiles AS_IF([test "x$enable_demos" = "xyes" -a "x$HAVE_XCB" != "xyes"], [AC_MSG_ERROR([libxcb is required for demos.])])
1
0
0
0
Alexandre Julliard : vkd3d: Add a create thread implementation for Windows.
by Alexandre Julliard
07 Feb '22
07 Feb '22
Module: vkd3d Branch: master Commit: c78174f004d332609ef7e6c64cc090f7921e4b60 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=c78174f004d332609ef7e6c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Feb 7 13:54:35 2022 +0100 vkd3d: Add a create thread implementation for Windows. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- libs/vkd3d/device.c | 42 ++++++++++++++++++++++++++++++++++++++++++ libs/vkd3d/vkd3d_private.h | 14 ++++++++++---- 2 files changed, 52 insertions(+), 4 deletions(-) diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index fe90eb3..3360fd6 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -4037,6 +4037,23 @@ void d3d12_device_mark_as_removed(struct d3d12_device *device, HRESULT reason, device->removed_reason = reason; } + +#ifdef _WIN32 +struct thread_data +{ + PFN_vkd3d_thread main_pfn; + void *data; +}; + +static DWORD WINAPI call_thread_main(void *data) +{ + struct thread_data *thread_data = data; + thread_data->main_pfn(thread_data->data); + vkd3d_free(thread_data); + return 0; +} +#endif + HRESULT vkd3d_create_thread(struct vkd3d_instance *instance, PFN_vkd3d_thread thread_main, void *data, union vkd3d_thread_handle *thread) { @@ -4053,11 +4070,27 @@ HRESULT vkd3d_create_thread(struct vkd3d_instance *instance, } else { +#ifdef _WIN32 + struct thread_data *thread_data; + + if (!(thread_data = vkd3d_malloc(sizeof(*thread_data)))) + return E_OUTOFMEMORY; + + thread_data->main_pfn = thread_main; + thread_data->data = data; + if (!(thread->handle = CreateThread(NULL, 0, call_thread_main, thread_data, 0, NULL))) + { + ERR("Failed to create thread, error %d.\n", GetLastError()); + vkd3d_free(thread_data); + hr = E_FAIL; + } +#else if ((rc = pthread_create(&thread->pthread, NULL, thread_main, data))) { ERR("Failed to create thread, error %d.\n", rc); hr = hresult_from_errno(rc); } +#endif } return hr; @@ -4075,11 +4108,20 @@ HRESULT vkd3d_join_thread(struct vkd3d_instance *instance, union vkd3d_thread_ha } else { +#ifdef _WIN32 + if ((rc = WaitForSingleObject(thread->handle, INFINITE)) != WAIT_OBJECT_0) + { + ERR("Failed to wait for thread, ret %#x.\n", rc); + hr = E_FAIL; + } + CloseHandle(thread->handle); +#else if ((rc = pthread_join(thread->pthread, NULL))) { ERR("Failed to join thread, error %d.\n", rc); hr = hresult_from_errno(rc); } +#endif } return hr; diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index ece1113..67989c1 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -40,7 +40,6 @@ #include <assert.h> #include <inttypes.h> #include <limits.h> -#include <pthread.h> #include <stdbool.h> #define VK_CALL(f) (vk_procs->f) @@ -169,14 +168,13 @@ struct vkd3d_instance LONG refcount; }; +#ifdef _WIN32 + union vkd3d_thread_handle { - pthread_t pthread; void *handle; }; -#ifdef _WIN32 - struct vkd3d_mutex { CRITICAL_SECTION lock; @@ -241,6 +239,14 @@ static inline int vkd3d_cond_destroy(struct vkd3d_cond *cond) #else /* _WIN32 */ +#include <pthread.h> + +union vkd3d_thread_handle +{ + pthread_t pthread; + void *handle; +}; + struct vkd3d_mutex { pthread_mutex_t lock;
1
0
0
0
← Newer
1
...
122
123
124
125
126
127
128
...
150
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
Results per page:
10
25
50
100
200