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
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
March 2019
----- 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
2 participants
1097 discussions
Start a n
N
ew thread
Zebediah Figura : quartz/tests: Add some tests for querying AVI decompressor pin information.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 4576a93b5d160e4d418af1908fc5da64662e0ef9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4576a93b5d160e4d418af190…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 5 23:28:40 2019 -0600 quartz/tests: Add some tests for querying AVI decompressor pin information. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/avidec.c | 74 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index 67e10be..0506544 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -251,6 +251,79 @@ static void test_find_pin(void) ok(!ref, "Got outstanding refcount %d.\n", ref); } +static void test_pin_info(void) +{ + IBaseFilter *filter = create_avi_dec(); + PIN_DIRECTION dir; + PIN_INFO info; + HRESULT hr; + WCHAR *id; + ULONG ref; + IPin *pin; + + hr = IBaseFilter_FindPin(filter, sink_id, &pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ref = get_refcount(filter); + todo_wine ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ref = get_refcount(pin); + ok(ref == 2, "Got unexpected refcount %d.\n", ref); + + hr = IPin_QueryPinInfo(pin, &info); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); + ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); + todo_wine ok(!lstrcmpW(info.achName, sink_name), "Got name %s.\n", wine_dbgstr_w(info.achName)); + ref = get_refcount(filter); + todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ref = get_refcount(pin); + todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + IBaseFilter_Release(info.pFilter); + + hr = IPin_QueryDirection(pin, &dir); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(dir == PINDIR_INPUT, "Got direction %d.\n", dir); + + hr = IPin_QueryId(pin, &id); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(!lstrcmpW(id, sink_id), "Got id %s.\n", wine_dbgstr_w(id)); + CoTaskMemFree(id); + + hr = IPin_QueryInternalConnections(pin, NULL, NULL); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + + IPin_Release(pin); + + hr = IBaseFilter_FindPin(filter, source_id, &pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + check_interface(pin, &IID_IPin, TRUE); + check_interface(pin, &IID_IMediaSeeking, TRUE); + + hr = IPin_QueryPinInfo(pin, &info); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(info.pFilter == filter, "Expected filter %p, got %p.\n", filter, info.pFilter); + ok(info.dir == PINDIR_OUTPUT, "Got direction %d.\n", info.dir); + todo_wine ok(!lstrcmpW(info.achName, source_name), "Got name %s.\n", wine_dbgstr_w(info.achName)); + IBaseFilter_Release(info.pFilter); + + hr = IPin_QueryDirection(pin, &dir); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(dir == PINDIR_OUTPUT, "Got direction %d.\n", dir); + + hr = IPin_QueryId(pin, &id); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(!lstrcmpW(id, source_id), "Got id %s.\n", wine_dbgstr_w(id)); + CoTaskMemFree(id); + + hr = IPin_QueryInternalConnections(pin, NULL, NULL); + ok(hr == E_NOTIMPL, "Got hr %#x.\n", hr); + + IPin_Release(pin); + + ref = IBaseFilter_Release(filter); + ok(!ref, "Got outstanding refcount %d.\n", ref); +} + START_TEST(avidec) { CoInitialize(NULL); @@ -258,6 +331,7 @@ START_TEST(avidec) test_interfaces(); test_enum_pins(); test_find_pin(); + test_pin_info(); CoUninitialize(); }
1
0
0
0
Zebediah Figura : quartz/tests: Add some tests for IBaseFilter_FindPin() on the AVI decompressor.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 6824f2464c3269bf8225e41786863d4c77b1bc79 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6824f2464c3269bf8225e417…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 5 23:28:39 2019 -0600 quartz/tests: Add some tests for IBaseFilter_FindPin() on the AVI decompressor. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/avidec.c | 49 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index 39882db..67e10be 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -22,6 +22,11 @@ #include "dshow.h" #include "wine/test.h" +static const WCHAR sink_id[] = {'I','n',0}; +static const WCHAR source_id[] = {'O','u','t',0}; +static const WCHAR sink_name[] = {'X','F','o','r','m',' ','I','n',0}; +static const WCHAR source_name[] = {'X','F','o','r','m',' ','O','u','t',0}; + static IBaseFilter *create_avi_dec(void) { IBaseFilter *filter = NULL; @@ -203,12 +208,56 @@ todo_wine ok(!ref, "Got outstanding refcount %d.\n", ref); } +static void test_find_pin(void) +{ + static const WCHAR input_pinW[] = {'i','n','p','u','t',' ','p','i','n',0}; + static const WCHAR output_pinW[] = {'o','u','t','p','u','t',' ','p','i','n',0}; + IBaseFilter *filter = create_avi_dec(); + IEnumPins *enum_pins; + IPin *pin, *pin2; + HRESULT hr; + ULONG ref; + + hr = IBaseFilter_EnumPins(filter, &enum_pins); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IBaseFilter_FindPin(filter, sink_id, &pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(pin == pin2, "Pins didn't match.\n"); + IPin_Release(pin); + IPin_Release(pin2); + + hr = IBaseFilter_FindPin(filter, source_id, &pin); + ok(hr == S_OK, "Got hr %#x.\n", hr); + hr = IEnumPins_Next(enum_pins, 1, &pin2, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(pin == pin2, "Pins didn't match.\n"); + IPin_Release(pin); + IPin_Release(pin2); + + hr = IBaseFilter_FindPin(filter, sink_name, &pin); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + hr = IBaseFilter_FindPin(filter, source_name, &pin); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + hr = IBaseFilter_FindPin(filter, input_pinW, &pin); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + hr = IBaseFilter_FindPin(filter, output_pinW, &pin); + ok(hr == VFW_E_NOT_FOUND, "Got hr %#x.\n", hr); + + IEnumPins_Release(enum_pins); + ref = IBaseFilter_Release(filter); + ok(!ref, "Got outstanding refcount %d.\n", ref); +} + START_TEST(avidec) { CoInitialize(NULL); test_interfaces(); test_enum_pins(); + test_find_pin(); CoUninitialize(); }
1
0
0
0
Zebediah Figura : strmbase/transform: Fix pin IDs.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: f5a8694c1a2f049b2e2cad3b84db17cc0dd06aaa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=f5a8694c1a2f049b2e2cad3b…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 5 23:28:38 2019 -0600 strmbase/transform: Fix pin IDs. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/strmbase/transform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index 58533bd..c62e49a 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -39,8 +39,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(strmbase); -static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0}; -static const WCHAR wcsOutputPinName[] = {'o','u','t','p','u','t',' ','p','i','n',0}; +static const WCHAR wcsInputPinName[] = {'I','n',0}; +static const WCHAR wcsOutputPinName[] = {'O','u','t',0}; static const IPinVtbl TransformFilter_InputPin_Vtbl; static const IPinVtbl TransformFilter_OutputPin_Vtbl;
1
0
0
0
Zebediah Figura : strmbase/transform: Get rid of superfluous npins field.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 1cabe7e4a399b764754c5a733bc5df8254c7bd0e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1cabe7e4a399b764754c5a73…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 5 23:28:37 2019 -0600 strmbase/transform: Get rid of superfluous npins field. Also return the correct number of pins in TransformFilter_GetPinCount(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/avidec.c | 2 -- dlls/strmbase/transform.c | 17 +++++++---------- include/wine/strmbase.h | 1 - 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index 5b85804..39882db 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -182,11 +182,9 @@ todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IEnumPins_Skip(enum1, 3); -todo_wine ok(hr == S_FALSE, "Got hr %#x.\n", hr); hr = IEnumPins_Skip(enum1, 2); -todo_wine ok(hr == S_OK, "Got hr %#x.\n", hr); hr = IEnumPins_Skip(enum1, 1); diff --git a/dlls/strmbase/transform.c b/dlls/strmbase/transform.c index 2fdd2ba..58533bd 100644 --- a/dlls/strmbase/transform.c +++ b/dlls/strmbase/transform.c @@ -144,22 +144,20 @@ static HRESULT WINAPI TransformFilter_Output_GetMediaType(BasePin *This, int iPo return S_OK; } -static IPin* WINAPI TransformFilter_GetPin(BaseFilter *iface, int pos) +static IPin *WINAPI TransformFilter_GetPin(BaseFilter *iface, int index) { - TransformFilter *This = impl_from_BaseFilter(iface); + TransformFilter *filter = impl_from_BaseFilter(iface); - if (pos >= This->npins || pos < 0) + if (index >= 2 || index < 0) return NULL; - IPin_AddRef(This->ppPins[pos]); - return This->ppPins[pos]; + IPin_AddRef(filter->ppPins[index]); + return filter->ppPins[index]; } static LONG WINAPI TransformFilter_GetPinCount(BaseFilter *iface) { - TransformFilter *This = impl_from_BaseFilter(iface); - - return (This->npins+1); + return 2; } static const BaseFilterFuncTable tfBaseFuncTable = { @@ -203,7 +201,6 @@ static HRESULT TransformFilter_Init(const IBaseFilterVtbl *pVtbl, const CLSID* p /* pTransformFilter is already allocated */ pTransformFilter->pFuncsTable = pFuncsTable; ZeroMemory(&pTransformFilter->pmt, sizeof(pTransformFilter->pmt)); - pTransformFilter->npins = 2; pTransformFilter->ppPins = CoTaskMemAlloc(2 * sizeof(IPin *)); @@ -314,7 +311,7 @@ ULONG WINAPI TransformFilterImpl_Release(IBaseFilter * iface) { ULONG i; - for (i = 0; i < This->npins; i++) + for (i = 0; i < 2; i++) { IPin *pConnectedTo; diff --git a/include/wine/strmbase.h b/include/wine/strmbase.h index 83a9084..a3890ae 100644 --- a/include/wine/strmbase.h +++ b/include/wine/strmbase.h @@ -212,7 +212,6 @@ typedef struct TransformFilter BaseFilter filter; IPin **ppPins; - ULONG npins; AM_MEDIA_TYPE pmt; CRITICAL_SECTION csReceive;
1
0
0
0
Zebediah Figura : quartz/tests: Add some tests for IBaseFilter_EnumPins() on the AVI decompressor.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: 36efe783af03041b511b741a5085b32dc2b077ff URL:
https://source.winehq.org/git/wine.git/?a=commit;h=36efe783af03041b511b741a…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 5 23:28:36 2019 -0600 quartz/tests: Add some tests for IBaseFilter_EnumPins() on the AVI decompressor. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/avidec.c | 135 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c index f008fe1..5b85804 100644 --- a/dlls/quartz/tests/avidec.c +++ b/dlls/quartz/tests/avidec.c @@ -31,6 +31,13 @@ static IBaseFilter *create_avi_dec(void) return filter; } +static ULONG get_refcount(void *iface) +{ + IUnknown *unknown = iface; + IUnknown_AddRef(unknown); + return IUnknown_Release(unknown); +} + #define check_interface(a, b, c) check_interface_(__LINE__, a, b, c) static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOOL supported) { @@ -71,11 +78,139 @@ static void test_interfaces(void) IBaseFilter_Release(filter); } +static void test_enum_pins(void) +{ + IBaseFilter *filter = create_avi_dec(); + IEnumPins *enum1, *enum2; + ULONG count, ref; + IPin *pins[3]; + HRESULT hr; + + ref = get_refcount(filter); + ok(ref == 1, "Got unexpected refcount %d.\n", ref); + + hr = IBaseFilter_EnumPins(filter, NULL); + ok(hr == E_POINTER, "Got hr %#x.\n", hr); + + hr = IBaseFilter_EnumPins(filter, &enum1); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ref = get_refcount(filter); + ok(ref == 2, "Got unexpected refcount %d.\n", ref); + ref = get_refcount(enum1); + ok(ref == 1, "Got unexpected refcount %d.\n", ref); + + hr = IEnumPins_Next(enum1, 1, NULL, NULL); + ok(hr == E_POINTER, "Got hr %#x.\n", hr); + + hr = IEnumPins_Next(enum1, 1, pins, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ref = get_refcount(filter); +todo_wine + ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ref = get_refcount(pins[0]); +todo_wine + ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ref = get_refcount(enum1); + ok(ref == 1, "Got unexpected refcount %d.\n", ref); + IPin_Release(pins[0]); + ref = get_refcount(filter); + ok(ref == 2, "Got unexpected refcount %d.\n", ref); + + hr = IEnumPins_Next(enum1, 1, pins, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ref = get_refcount(filter); +todo_wine + ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ref = get_refcount(pins[0]); +todo_wine + ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ref = get_refcount(enum1); + ok(ref == 1, "Got unexpected refcount %d.\n", ref); + IPin_Release(pins[0]); + ref = get_refcount(filter); + ok(ref == 2, "Got unexpected refcount %d.\n", ref); + + hr = IEnumPins_Next(enum1, 1, pins, NULL); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IEnumPins_Reset(enum1); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IEnumPins_Next(enum1, 1, pins, &count); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(count == 1, "Got count %u.\n", count); + IPin_Release(pins[0]); + + hr = IEnumPins_Next(enum1, 1, pins, &count); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(count == 1, "Got count %u.\n", count); + IPin_Release(pins[0]); + + hr = IEnumPins_Next(enum1, 1, pins, &count); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(!count, "Got count %u.\n", count); + + hr = IEnumPins_Reset(enum1); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IEnumPins_Next(enum1, 2, pins, NULL); + ok(hr == E_INVALIDARG, "Got hr %#x.\n", hr); + + hr = IEnumPins_Next(enum1, 2, pins, &count); + ok(hr == S_OK, "Got hr %#x.\n", hr); + ok(count == 2, "Got count %u.\n", count); + IPin_Release(pins[0]); + IPin_Release(pins[1]); + + hr = IEnumPins_Next(enum1, 2, pins, &count); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(!count, "Got count %u.\n", count); + + hr = IEnumPins_Reset(enum1); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IEnumPins_Next(enum1, 3, pins, &count); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + ok(count == 2, "Got count %u.\n", count); + IPin_Release(pins[0]); + IPin_Release(pins[1]); + + hr = IEnumPins_Reset(enum1); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IEnumPins_Clone(enum1, &enum2); + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IEnumPins_Skip(enum1, 3); +todo_wine + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IEnumPins_Skip(enum1, 2); +todo_wine + ok(hr == S_OK, "Got hr %#x.\n", hr); + + hr = IEnumPins_Skip(enum1, 1); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IEnumPins_Next(enum1, 1, pins, NULL); + ok(hr == S_FALSE, "Got hr %#x.\n", hr); + + hr = IEnumPins_Next(enum2, 1, pins, NULL); + ok(hr == S_OK, "Got hr %#x.\n", hr); + IPin_Release(pins[0]); + + IEnumPins_Release(enum2); + IEnumPins_Release(enum1); + ref = IBaseFilter_Release(filter); + ok(!ref, "Got outstanding refcount %d.\n", ref); +} + START_TEST(avidec) { CoInitialize(NULL); test_interfaces(); + test_enum_pins(); CoUninitialize(); }
1
0
0
0
Zebediah Figura : quartz/tests: Add some tests for AVI decompressor filter interfaces.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: wine Branch: master Commit: cba1f10e6d81aa0c9164e295b51ad48042f4478e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=cba1f10e6d81aa0c9164e295…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 5 23:28:35 2019 -0600 quartz/tests: Add some tests for AVI decompressor filter interfaces. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/quartz/tests/Makefile.in | 1 + dlls/quartz/tests/avidec.c | 81 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) diff --git a/dlls/quartz/tests/Makefile.in b/dlls/quartz/tests/Makefile.in index 34a1114..569bbcb 100644 --- a/dlls/quartz/tests/Makefile.in +++ b/dlls/quartz/tests/Makefile.in @@ -2,6 +2,7 @@ TESTDLL = quartz.dll IMPORTS = oleaut32 ole32 advapi32 user32 C_SRCS = \ + avidec.c \ avisplit.c \ dsoundrender.c \ filesource.c \ diff --git a/dlls/quartz/tests/avidec.c b/dlls/quartz/tests/avidec.c new file mode 100644 index 0000000..f008fe1 --- /dev/null +++ b/dlls/quartz/tests/avidec.c @@ -0,0 +1,81 @@ +/* + * AVI decompressor filter unit tests + * + * Copyright 2018 Zebediah Figura + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#define COBJMACROS +#include "dshow.h" +#include "wine/test.h" + +static IBaseFilter *create_avi_dec(void) +{ + IBaseFilter *filter = NULL; + HRESULT hr = CoCreateInstance(&CLSID_AVIDec, NULL, CLSCTX_INPROC_SERVER, + &IID_IBaseFilter, (void **)&filter); + ok(hr == S_OK, "Got hr %#x.\n", hr); + return filter; +} + +#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c) +static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOOL supported) +{ + IUnknown *iface = iface_ptr; + HRESULT hr, expected_hr; + IUnknown *unk; + + expected_hr = supported ? S_OK : E_NOINTERFACE; + + hr = IUnknown_QueryInterface(iface, iid, (void **)&unk); + ok_(__FILE__, line)(hr == expected_hr, "Got hr %#x, expected %#x.\n", hr, expected_hr); + if (SUCCEEDED(hr)) + IUnknown_Release(unk); +} + +static void test_interfaces(void) +{ + IBaseFilter *filter = create_avi_dec(); + + check_interface(filter, &IID_IBaseFilter, TRUE); + check_interface(filter, &IID_IMediaFilter, TRUE); + check_interface(filter, &IID_IPersist, TRUE); + check_interface(filter, &IID_IUnknown, TRUE); + + check_interface(filter, &IID_IAMFilterMiscFlags, FALSE); + check_interface(filter, &IID_IBasicAudio, FALSE); + check_interface(filter, &IID_IBasicVideo, FALSE); + check_interface(filter, &IID_IKsPropertySet, FALSE); + todo_wine check_interface(filter, &IID_IMediaPosition, FALSE); + todo_wine check_interface(filter, &IID_IMediaSeeking, FALSE); + check_interface(filter, &IID_IPersistPropertyBag, FALSE); + check_interface(filter, &IID_IPin, FALSE); + todo_wine check_interface(filter, &IID_IQualityControl, FALSE); + check_interface(filter, &IID_IQualProp, FALSE); + check_interface(filter, &IID_IReferenceClock, FALSE); + check_interface(filter, &IID_IVideoWindow, FALSE); + + IBaseFilter_Release(filter); +} + +START_TEST(avidec) +{ + CoInitialize(NULL); + + test_interfaces(); + + CoUninitialize(); +}
1
0
0
0
Józef Kucia : tests: Use vkd3d_test_set_context() in test_null_cbv().
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: vkd3d Branch: master Commit: cb2a9b261190b2e5d2a00ca060efc5f7f85e4c6e URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=cb2a9b261190b2e5d2a00ca…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Mar 5 18:17:05 2019 +0100 tests: Use vkd3d_test_set_context() in test_null_cbv(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tests/d3d12.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/d3d12.c b/tests/d3d12.c index 5c3f38d..5f869d2 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -15552,6 +15552,8 @@ static void test_null_cbv(void) for (index = 0; index < 1200; index += 100) { + vkd3d_test_set_context("index %u", index); + ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL); ID3D12GraphicsCommandList_OMSetRenderTargets(command_list, 1, &context.rtv, FALSE, NULL); @@ -15568,12 +15570,13 @@ static void test_null_cbv(void) transition_sub_resource_state(command_list, context.render_target, 0, D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); - check_sub_resource_float(context.render_target, 0, queue, command_list, 0x00000000, 0); + check_sub_resource_uint(context.render_target, 0, queue, command_list, 0x00000000, 0); reset_command_list(command_list, context.allocator); transition_sub_resource_state(command_list, context.render_target, 0, D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET); } + vkd3d_test_set_context(NULL); ID3D12DescriptorHeap_Release(heap); destroy_test_context(&context);
1
0
0
0
Józef Kucia : tests: Add test for hull shader fork phase.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: vkd3d Branch: master Commit: 1941491823dee80a610109d659f013ce947ac015 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=1941491823dee80a610109d…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Mar 5 18:17:04 2019 +0100 tests: Add test for hull shader fork phase. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tests/d3d12.c | 233 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 233 insertions(+) Diff:
https://source.winehq.org/git/vkd3d.git/?a=commitdiff;h=1941491823dee80a610…
1
0
0
0
Józef Kucia : vkd3d-shader: Use epilogue functions for fork and join phases.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: vkd3d Branch: master Commit: 19f9745adf479bfd98f157c21cf6af09b101355b URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=19f9745adf479bfd98f157c…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Mar 5 18:17:03 2019 +0100 vkd3d-shader: Use epilogue functions for fork and join phases. In order to handle packed outputs properly. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/spirv.c | 59 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 43 insertions(+), 16 deletions(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 53aa74a..a734539 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -2024,8 +2024,10 @@ struct vkd3d_dxbc_compiler *vkd3d_dxbc_compiler_create(const struct vkd3d_shader const struct vkd3d_shader_compile_arguments *compile_args, const struct vkd3d_shader_scan_info *scan_info) { + const struct vkd3d_shader_signature *patch_constant_signature = &shader_desc->patch_constant_signature; const struct vkd3d_shader_signature *output_signature = &shader_desc->output_signature; struct vkd3d_dxbc_compiler *compiler; + unsigned int max_element_count; unsigned int i; if (!(compiler = vkd3d_malloc(sizeof(*compiler)))) @@ -2033,7 +2035,8 @@ struct vkd3d_dxbc_compiler *vkd3d_dxbc_compiler_create(const struct vkd3d_shader memset(compiler, 0, sizeof(*compiler)); - if (!(compiler->output_info = vkd3d_calloc(output_signature->element_count, sizeof(*compiler->output_info)))) + max_element_count = max(output_signature->element_count, patch_constant_signature->element_count); + if (!(compiler->output_info = vkd3d_calloc(max_element_count, sizeof(*compiler->output_info)))) { vkd3d_free(compiler); return NULL; @@ -4005,11 +4008,8 @@ static void vkd3d_dxbc_compiler_emit_output(struct vkd3d_dxbc_compiler *compiler vkd3d_dxbc_compiler_decorate_xfb_output(compiler, id, output_component_count, signature_element); } - if (!is_patch_constant) - { - compiler->output_info[signature_idx].id = id; - compiler->output_info[signature_idx].component_type = component_type; - } + compiler->output_info[signature_idx].id = id; + compiler->output_info[signature_idx].component_type = component_type; use_private_variable = component_count != VKD3D_VEC4_SIZE || get_shader_output_swizzle(compiler, signature_element->register_index) != VKD3D_NO_SWIZZLE @@ -4047,10 +4047,7 @@ static void vkd3d_dxbc_compiler_emit_output(struct vkd3d_dxbc_compiler *compiler vkd3d_dxbc_compiler_emit_register_debug_name(builder, var_id, reg); } - if (use_private_variable && is_patch_constant) - FIXME("Private variables not supported for patch constants.\n"); - - if (use_private_variable && !is_patch_constant) + if (use_private_variable) { unsigned int idx = vkd3d_dxbc_compiler_get_output_variable_index(compiler, reg->idx[0].offset); compiler->private_output_variable[idx] = var_id; @@ -4115,6 +4112,9 @@ static void vkd3d_dxbc_compiler_emit_store_shader_output(struct vkd3d_dxbc_compi write_mask &= dst_write_mask; use_mask = (output->mask >> 8) & 0xff; + if (!write_mask) + return; + if (output_info->component_type != VKD3D_TYPE_FLOAT) { type_id = vkd3d_spirv_get_type_id(builder, output_info->component_type, VKD3D_VEC4_SIZE); @@ -4177,11 +4177,12 @@ static void vkd3d_dxbc_compiler_emit_store_shader_output(struct vkd3d_dxbc_compi static void vkd3d_dxbc_compiler_emit_shader_epilogue_function(struct vkd3d_dxbc_compiler *compiler) { uint32_t param_type_id[MAX_REG_OUTPUT + 1], param_id[MAX_REG_OUTPUT + 1] = {}; - const struct vkd3d_shader_signature *signature = compiler->output_signature; uint32_t void_id, type_id, ptr_type_id, function_type_id, function_id; struct vkd3d_spirv_builder *builder = &compiler->spirv_builder; + const struct vkd3d_shader_signature *signature; const struct vkd3d_shader_phase *phase; uint32_t output_index_id = 0; + bool is_patch_constant; unsigned int i, count; DWORD variable_idx; @@ -4190,6 +4191,9 @@ static void vkd3d_dxbc_compiler_emit_shader_epilogue_function(struct vkd3d_dxbc_ STATIC_ASSERT(ARRAY_SIZE(compiler->private_output_variable) == ARRAY_SIZE(compiler->private_output_variable_write_mask)); phase = vkd3d_dxbc_compiler_get_current_shader_phase(compiler); + is_patch_constant = phase && (phase->type == VKD3DSIH_HS_FORK_PHASE || phase->type == VKD3DSIH_HS_JOIN_PHASE); + + signature = is_patch_constant ? compiler->patch_constant_signature : compiler->output_signature; function_id = compiler->epilogue_function_id; @@ -4251,7 +4255,10 @@ static void vkd3d_dxbc_compiler_emit_shader_epilogue_function(struct vkd3d_dxbc_ vkd3d_spirv_build_op_return(&compiler->spirv_builder); vkd3d_spirv_build_op_function_end(builder); - memset(compiler->output_info, 0, signature->element_count * sizeof(*compiler->output_info)); + /* Fork and join phases share output registers (patch constants). */ + if (!phase || is_control_point_phase(phase)) + memset(compiler->output_info, 0, signature->element_count * sizeof(*compiler->output_info)); + memset(compiler->private_output_variable, 0, sizeof(compiler->private_output_variable)); memset(compiler->private_output_variable_write_mask, 0, sizeof(compiler->private_output_variable_write_mask)); compiler->epilogue_function_id = 0; @@ -5284,6 +5291,29 @@ static void vkd3d_dxbc_compiler_leave_shader_phase(struct vkd3d_dxbc_compiler *c } } + if (phase->type == VKD3DSIH_HS_FORK_PHASE || phase->type == VKD3DSIH_HS_JOIN_PHASE) + { + signature = compiler->patch_constant_signature; + + memset(®, 0, sizeof(reg)); + reg.idx[1].offset = ~0u; + + for (i = 0; i < signature->element_count; ++i) + { + const struct vkd3d_shader_signature_element *e = &signature->elements[i]; + + reg.type = VKD3DSPR_OUTPUT; + reg.idx[0].offset = e->register_index; + vkd3d_symbol_make_register(®_symbol, ®); + + if ((entry = rb_get(&compiler->symbol_table, ®_symbol))) + { + rb_remove(&compiler->symbol_table, entry); + vkd3d_symbol_free(entry, NULL); + } + } + } + if (phase->instance_count) { reg.type = phase->type == VKD3DSIH_HS_FORK_PHASE ? VKD3DSPR_FORKINSTID : VKD3DSPR_JOININSTID; @@ -6152,11 +6182,8 @@ static void vkd3d_dxbc_compiler_emit_return(struct vkd3d_dxbc_compiler *compiler const struct vkd3d_shader_instruction *instruction) { struct vkd3d_spirv_builder *builder = &compiler->spirv_builder; - const struct vkd3d_shader_phase *phase; - if (compiler->shader_type != VKD3D_SHADER_TYPE_GEOMETRY - && (!(phase = vkd3d_dxbc_compiler_get_current_shader_phase(compiler)) - || phase->type == VKD3DSIH_HS_CONTROL_POINT_PHASE)) + if (compiler->shader_type != VKD3D_SHADER_TYPE_GEOMETRY) vkd3d_dxbc_compiler_emit_shader_epilogue_invocation(compiler); vkd3d_spirv_build_op_return(builder);
1
0
0
0
Józef Kucia : vkd3d-shader: Add basic support for vocp registers.
by Alexandre Julliard
06 Mar '19
06 Mar '19
Module: vkd3d Branch: master Commit: 74c8ca0f64ed0765c9eeb9228e2087d4212ca51a URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=74c8ca0f64ed0765c9eeb92…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Mar 5 18:17:02 2019 +0100 vkd3d-shader: Add basic support for vocp registers. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/spirv.c | 28 ++++++++++++++++++++++------ libs/vkd3d-shader/vkd3d_shader_private.h | 2 +- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index c8e0c37..53aa74a 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -3761,6 +3761,9 @@ static void vkd3d_dxbc_compiler_emit_shader_phase_input(struct vkd3d_dxbc_compil case VKD3DSPR_JOININSTID: val_id = phase->instance_id; break; + case VKD3DSPR_OUTCONTROLPOINT: + /* See vkd3d_dxbc_compiler_leave_shader_phase(). */ + return; default: FIXME("Unhandled shader phase input register %#x.\n", reg->type); return; @@ -5227,8 +5230,8 @@ static void vkd3d_dxbc_compiler_leave_shader_phase(struct vkd3d_dxbc_compiler *c { const struct vkd3d_shader_signature *signature = compiler->output_signature; struct vkd3d_spirv_builder *builder = &compiler->spirv_builder; + struct vkd3d_symbol reg_symbol, *symbol; struct vkd3d_shader_register reg; - struct vkd3d_symbol reg_symbol; struct rb_entry *entry; unsigned int i; @@ -5244,26 +5247,39 @@ static void vkd3d_dxbc_compiler_leave_shader_phase(struct vkd3d_dxbc_compiler *c compiler->temp_count = 0; /* - * Output regsiters have a different purpose in the control point phase and - * in fork/join phases. We have to remove all output registers' symbols - * when leaving the control point phase. + * vocp inputs in fork and join shader phases are outputs of the control + * point phase. Reinsert symbols for vocp registers while leaving the + * control point phase. */ if (is_control_point_phase(phase)) { memset(®, 0, sizeof(reg)); - reg.type = VKD3DSPR_OUTPUT; reg.idx[1].offset = ~0u; for (i = 0; i < signature->element_count; ++i) { const struct vkd3d_shader_signature_element *e = &signature->elements[i]; + reg.type = VKD3DSPR_OUTPUT; reg.idx[0].offset = e->register_index; vkd3d_symbol_make_register(®_symbol, ®); if ((entry = rb_get(&compiler->symbol_table, ®_symbol))) { rb_remove(&compiler->symbol_table, entry); - vkd3d_symbol_free(entry, NULL); + + symbol = RB_ENTRY_VALUE(entry, struct vkd3d_symbol, entry); + + reg.type = VKD3DSPR_OUTCONTROLPOINT; + reg.idx[1].offset = reg.idx[0].offset; + reg.idx[0].offset = compiler->output_control_point_count; + vkd3d_symbol_make_register(symbol, ®); + symbol->info.reg.is_aggregate = false; + + if (rb_put(&compiler->symbol_table, symbol, entry) == -1) + { + ERR("Failed to insert vocp symbol entry (%s).\n", debug_vkd3d_symbol(symbol)); + vkd3d_symbol_free(entry, NULL); + } } } } diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index 7ffcdd9..a686096 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -765,7 +765,7 @@ static inline bool vkd3d_shader_instruction_has_texel_offset(const struct vkd3d_ static inline bool vkd3d_shader_register_is_input(const struct vkd3d_shader_register *reg) { - return reg->type == VKD3DSPR_INPUT || reg->type == VKD3DSPR_INCONTROLPOINT; + return reg->type == VKD3DSPR_INPUT || reg->type == VKD3DSPR_INCONTROLPOINT || reg->type == VKD3DSPR_OUTCONTROLPOINT; } static inline bool vkd3d_shader_register_is_output(const struct vkd3d_shader_register *reg)
1
0
0
0
← Newer
1
...
79
80
81
82
83
84
85
...
110
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
Results per page:
10
25
50
100
200