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
June 2019
----- 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
865 discussions
Start a n
N
ew thread
Zebediah Figura : winegstreamer: Share sink pin and filter reference counts.
by Alexandre Julliard
18 Jun '19
18 Jun '19
Module: wine Branch: master Commit: 8d249e1863f3aee2b52633b199215103876880e1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8d249e1863f3aee2b52633b1…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Jun 17 20:41:57 2019 -0500 winegstreamer: Share sink pin and filter reference counts. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winegstreamer/gstdemux.c | 45 +++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/dlls/winegstreamer/gstdemux.c b/dlls/winegstreamer/gstdemux.c index 2ec540a..3640fd9 100644 --- a/dlls/winegstreamer/gstdemux.c +++ b/dlls/winegstreamer/gstdemux.c @@ -1211,7 +1211,6 @@ static void gstdemux_destroy(BaseFilter *iface) { GSTImpl *filter = impl_from_IBaseFilter(&iface->IBaseFilter_iface); IPin *connected = NULL; - ULONG pinref; HRESULT hr; CloseHandle(filter->no_more_pads_event); @@ -1227,16 +1226,16 @@ static void gstdemux_destroy(BaseFilter *iface) hr = IPin_Disconnect(&filter->pInputPin.pin.IPin_iface); assert(hr == S_OK); } - pinref = IPin_Release(&filter->pInputPin.pin.IPin_iface); - if (pinref) - { - /* Valgrind could find this, if I kill it here */ - ERR("pinref should be null, is %u, destroying anyway\n", pinref); - assert((LONG)pinref > 0); - while (pinref) - pinref = IPin_Release(&filter->pInputPin.pin.IPin_iface); - } + FreeMediaType(&filter->pInputPin.pin.mtCurrent); + if (filter->pInputPin.pAlloc) + IMemAllocator_Release(filter->pInputPin.pAlloc); + filter->pInputPin.pAlloc = NULL; + if (filter->pInputPin.pReader) + IAsyncReader_Release(filter->pInputPin.pReader); + filter->pInputPin.pReader = NULL; + filter->pInputPin.pin.IPin_iface.lpVtbl = NULL; + if (filter->bus) { gst_bus_set_sync_handler(filter->bus, NULL, NULL, NULL); @@ -1892,24 +1891,16 @@ static inline GSTInPin *impl_sink_from_IPin(IPin *iface) return CONTAINING_RECORD(iface, GSTInPin, pin.IPin_iface); } -static ULONG WINAPI GSTInPin_Release(IPin *iface) +static ULONG WINAPI GSTInPin_AddRef(IPin *iface) { - GSTInPin *This = impl_sink_from_IPin(iface); - ULONG refCount = InterlockedDecrement(&This->pin.refCount); + GSTInPin *pin = impl_sink_from_IPin(iface); + return IBaseFilter_AddRef(pin->pin.pinInfo.pFilter); +} - TRACE("(%p)->() Release from %d\n", iface, refCount + 1); - if (!refCount) { - FreeMediaType(&This->pin.mtCurrent); - if (This->pAlloc) - IMemAllocator_Release(This->pAlloc); - This->pAlloc = NULL; - if (This->pReader) - IAsyncReader_Release(This->pReader); - This->pReader = NULL; - This->pin.IPin_iface.lpVtbl = NULL; - return 0; - } else - return refCount; +static ULONG WINAPI GSTInPin_Release(IPin *iface) +{ + GSTInPin *pin = impl_sink_from_IPin(iface); + return IBaseFilter_Release(pin->pin.pinInfo.pFilter); } static HRESULT WINAPI GSTInPin_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt) @@ -2094,7 +2085,7 @@ static HRESULT WINAPI GSTInPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppE static const IPinVtbl GST_InputPin_Vtbl = { GSTInPin_QueryInterface, - BasePinImpl_AddRef, + GSTInPin_AddRef, GSTInPin_Release, BaseInputPinImpl_Connect, GSTInPin_ReceiveConnection,
1
0
0
0
Zebediah Figura : qcap/vfwcapture: Share pin and filter reference counts.
by Alexandre Julliard
18 Jun '19
18 Jun '19
Module: wine Branch: master Commit: dae86f1e5ef2db9d079caa33f3df4029066b18be URL:
https://source.winehq.org/git/wine.git/?a=commit;h=dae86f1e5ef2db9d079caa33…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Jun 17 20:41:56 2019 -0500 qcap/vfwcapture: Share pin and filter reference counts. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qcap/vfwcapture.c | 33 +++++++++++++++------------------ 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/dlls/qcap/vfwcapture.c b/dlls/qcap/vfwcapture.c index 0bf8c45..2cb1f7d 100644 --- a/dlls/qcap/vfwcapture.c +++ b/dlls/qcap/vfwcapture.c @@ -97,6 +97,11 @@ typedef struct VfwPinImpl VfwCapture *parent; } VfwPinImpl; +static inline VfwPinImpl *impl_from_IPin(IPin *iface) +{ + return CONTAINING_RECORD(iface, VfwPinImpl, pin.pin.IPin_iface); +} + static IPin *vfw_capture_get_pin(BaseFilter *iface, unsigned int index) { VfwCapture *This = impl_from_BaseFilter(iface); @@ -125,7 +130,7 @@ static void vfw_capture_destroy(BaseFilter *iface) IPin_Disconnect(filter->pOutputPin); IPin_Release(peer); } - IPin_Release(filter->pOutputPin); + BaseOutputPin_Destroy(&impl_from_IPin(filter->pOutputPin)->pin); strmbase_filter_cleanup(&filter->filter); CoTaskMemFree(filter); ObjectRefCount(FALSE); @@ -648,11 +653,6 @@ VfwPin_Construct( IBaseFilter * pBaseFilter, LPCRITICAL_SECTION pCritSec, return hr; } -static inline VfwPinImpl *impl_from_IPin(IPin *iface) -{ - return CONTAINING_RECORD(iface, VfwPinImpl, pin.pin.IPin_iface); -} - static HRESULT WINAPI VfwPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * ppv) { VfwPinImpl *This = impl_from_IPin(iface); @@ -677,20 +677,17 @@ static HRESULT WINAPI VfwPin_QueryInterface(IPin * iface, REFIID riid, LPVOID * return E_NOINTERFACE; } +static ULONG WINAPI VfwPin_AddRef(IPin *iface) +{ + VfwPinImpl *pin = impl_from_IPin(iface); + return IBaseFilter_AddRef(pin->pin.pin.pinInfo.pFilter); +} + static ULONG WINAPI VfwPin_Release(IPin * iface) { - VfwPinImpl *This = impl_from_IPin(iface); - ULONG refCount = InterlockedDecrement(&This->pin.pin.refCount); - - TRACE("() -> new refcount: %u\n", refCount); - - if (!refCount) - { - BaseOutputPin_Destroy(&This->pin); - ObjectRefCount(FALSE); - } - return refCount; + VfwPinImpl *pin = impl_from_IPin(iface); + return IBaseFilter_Release(pin->pin.pin.pinInfo.pFilter); } static HRESULT WINAPI @@ -719,7 +716,7 @@ VfwPin_QueryInternalConnections(IPin * iface, IPin ** apPin, ULONG * cPin) static const IPinVtbl VfwPin_Vtbl = { VfwPin_QueryInterface, - BasePinImpl_AddRef, + VfwPin_AddRef, VfwPin_Release, BaseOutputPinImpl_Connect, BaseOutputPinImpl_ReceiveConnection,
1
0
0
0
Zebediah Figura : strmbase/renderer: Share pin and filter reference counts.
by Alexandre Julliard
18 Jun '19
18 Jun '19
Module: wine Branch: master Commit: 6f7d1065d50185f9db0f8b8a1189b5ec94ef0f8e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6f7d1065d50185f9db0f8b8a…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Mon Jun 17 20:41:55 2019 -0500 strmbase/renderer: Share pin and filter reference counts. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/qedit/tests/nullrenderer.c | 10 +++++----- dlls/quartz/tests/dsoundrender.c | 8 +++----- dlls/quartz/tests/videorenderer.c | 8 +++----- dlls/quartz/tests/vmr7.c | 4 ++-- dlls/quartz/tests/vmr9.c | 4 ++-- dlls/strmbase/renderer.c | 18 +++++++++++++++--- 6 files changed, 30 insertions(+), 22 deletions(-) diff --git a/dlls/qedit/tests/nullrenderer.c b/dlls/qedit/tests/nullrenderer.c index a45f30a..d39b28d 100644 --- a/dlls/qedit/tests/nullrenderer.c +++ b/dlls/qedit/tests/nullrenderer.c @@ -122,9 +122,9 @@ static void test_enum_pins(void) 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); + 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); + 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]); @@ -226,7 +226,7 @@ static void test_pin_info(void) 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); + ok(ref == 2, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pin); ok(ref == 2, "Got unexpected refcount %d.\n", ref); @@ -236,9 +236,9 @@ static void test_pin_info(void) ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!lstrcmpW(info.achName, sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pin); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); IBaseFilter_Release(info.pFilter); hr = IPin_QueryDirection(pin, &dir); diff --git a/dlls/quartz/tests/dsoundrender.c b/dlls/quartz/tests/dsoundrender.c index 44c7119..cf7b0e3 100644 --- a/dlls/quartz/tests/dsoundrender.c +++ b/dlls/quartz/tests/dsoundrender.c @@ -288,10 +288,8 @@ static void test_enum_pins(void) 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); @@ -399,7 +397,7 @@ static void test_pin_info(void) 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); + ok(ref == 2, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pin); ok(ref == 2, "Got unexpected refcount %d.\n", ref); @@ -409,9 +407,9 @@ static void test_pin_info(void) ok(info.dir == PINDIR_INPUT, "Got direction %d.\n", info.dir); ok(!lstrcmpW(info.achName, sink_id), "Got name %s.\n", wine_dbgstr_w(info.achName)); ref = get_refcount(filter); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pin); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); IBaseFilter_Release(info.pFilter); hr = IPin_QueryDirection(pin, &dir); diff --git a/dlls/quartz/tests/videorenderer.c b/dlls/quartz/tests/videorenderer.c index fdd4dfb..0b9ea3f 100644 --- a/dlls/quartz/tests/videorenderer.c +++ b/dlls/quartz/tests/videorenderer.c @@ -221,10 +221,8 @@ static void test_enum_pins(void) 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); @@ -329,7 +327,7 @@ static void test_pin_info(void) 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); + ok(ref == 2, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pin); ok(ref == 2, "Got unexpected refcount %d.\n", ref); @@ -340,9 +338,9 @@ static void test_pin_info(void) 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); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); ref = get_refcount(pin); - todo_wine ok(ref == 3, "Got unexpected refcount %d.\n", ref); + ok(ref == 3, "Got unexpected refcount %d.\n", ref); IBaseFilter_Release(info.pFilter); hr = IPin_QueryDirection(pin, &dir); diff --git a/dlls/quartz/tests/vmr7.c b/dlls/quartz/tests/vmr7.c index ee80590..e702be7 100644 --- a/dlls/quartz/tests/vmr7.c +++ b/dlls/quartz/tests/vmr7.c @@ -427,9 +427,9 @@ static void test_enum_pins(void) 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); + 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); + 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]); diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 13f6e19..d14a970 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -435,9 +435,9 @@ static void test_enum_pins(void) 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); + 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); + 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]); diff --git a/dlls/strmbase/renderer.c b/dlls/strmbase/renderer.c index b1b318f..36e934f 100644 --- a/dlls/strmbase/renderer.c +++ b/dlls/strmbase/renderer.c @@ -45,6 +45,18 @@ static const IQualityControlVtbl Renderer_QualityControl_Vtbl = { QualityControlImpl_SetSink }; +static ULONG WINAPI BaseRenderer_InputPin_AddRef(IPin *iface) +{ + BaseInputPin *pin = impl_BaseInputPin_from_IPin(iface); + return IBaseFilter_AddRef(pin->pin.pinInfo.pFilter); +} + +static ULONG WINAPI BaseRenderer_InputPin_Release(IPin *iface) +{ + BaseInputPin *pin = impl_BaseInputPin_from_IPin(iface); + return IBaseFilter_Release(pin->pin.pinInfo.pFilter); +} + static HRESULT WINAPI BaseRenderer_InputPin_ReceiveConnection(IPin * iface, IPin * pReceivePin, const AM_MEDIA_TYPE * pmt) { BaseInputPin *This = impl_BaseInputPin_from_IPin(iface); @@ -164,8 +176,8 @@ static HRESULT WINAPI BaseRenderer_InputPin_EndFlush(IPin * iface) static const IPinVtbl BaseRenderer_InputPin_Vtbl = { BaseInputPinImpl_QueryInterface, - BasePinImpl_AddRef, - BaseInputPinImpl_Release, + BaseRenderer_InputPin_AddRef, + BaseRenderer_InputPin_Release, BaseInputPinImpl_Connect, BaseRenderer_InputPin_ReceiveConnection, BaseRenderer_InputPin_Disconnect, @@ -298,7 +310,7 @@ void strmbase_renderer_cleanup(BaseRenderer *filter) IPin_Release(peer); } IPin_Disconnect(&filter->pInputPin->pin.IPin_iface); - IPin_Release(&filter->pInputPin->pin.IPin_iface); + BaseInputPin_Destroy(filter->pInputPin); if (filter->pPosition) IUnknown_Release(filter->pPosition);
1
0
0
0
Henri Verbeet : wined3d: Use wined3d_texture_gl_load_sysmem() in texture3d_load_location().
by Alexandre Julliard
18 Jun '19
18 Jun '19
Module: wine Branch: master Commit: 19470fc870649e385817b35cf9deb19feff8fb02 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=19470fc870649e385817b35c…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jun 18 02:51:36 2019 +0430 wined3d: Use wined3d_texture_gl_load_sysmem() in texture3d_load_location(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/texture.c | 47 ++++------------------------------------------- 1 file changed, 4 insertions(+), 43 deletions(-) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 13ebd31..2971e45 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -3266,6 +3266,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in struct wined3d_context *context, DWORD location) { struct wined3d_texture_sub_resource *sub_resource = &texture->sub_resources[sub_resource_idx]; + struct wined3d_texture_gl *texture_gl = wined3d_texture_gl(texture); struct wined3d_context_gl *context_gl = wined3d_context_gl(context); unsigned int row_pitch, slice_pitch; @@ -3282,8 +3283,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in struct wined3d_box src_box; data.addr += sub_resource->offset; - wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(texture), - context_gl, location == WINED3D_LOCATION_TEXTURE_SRGB); + wined3d_texture_gl_bind_and_dirtify(texture_gl, context_gl, location == WINED3D_LOCATION_TEXTURE_SRGB); wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch); wined3d_texture_get_level_box(texture, sub_resource_idx % texture->level_count, &src_box); wined3d_texture_upload_data(texture, sub_resource_idx, context, texture->resource.format, @@ -3294,8 +3294,7 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in struct wined3d_const_bo_address data = {sub_resource->buffer_object, NULL}; struct wined3d_box src_box; - wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(texture), - context_gl, location == WINED3D_LOCATION_TEXTURE_SRGB); + wined3d_texture_gl_bind_and_dirtify(texture_gl, context_gl, location == WINED3D_LOCATION_TEXTURE_SRGB); wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch); wined3d_texture_get_level_box(texture, sub_resource_idx % texture->level_count, &src_box); wined3d_texture_upload_data(texture, sub_resource_idx, context, texture->resource.format, @@ -3317,46 +3316,8 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in break; case WINED3D_LOCATION_SYSMEM: - if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) - { - struct wined3d_bo_address data = {0, texture->resource.heap_memory}; - - data.addr += sub_resource->offset; - if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB) - wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(texture), context_gl, FALSE); - else - wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(texture), context_gl, TRUE); - - wined3d_texture_download_data(texture, sub_resource_idx, context, &data); - ++texture->download_count; - } - else - { - FIXME("Implement WINED3D_LOCATION_SYSMEM loading from %s.\n", - wined3d_debug_location(sub_resource->locations)); - return FALSE; - } - break; - case WINED3D_LOCATION_BUFFER: - if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) - { - struct wined3d_bo_address data = {sub_resource->buffer_object, NULL}; - - if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB) - wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(texture), context_gl, FALSE); - else - wined3d_texture_gl_bind_and_dirtify(wined3d_texture_gl(texture), context_gl, TRUE); - - wined3d_texture_download_data(texture, sub_resource_idx, context, &data); - } - else - { - FIXME("Implement WINED3D_LOCATION_BUFFER loading from %s.\n", - wined3d_debug_location(sub_resource->locations)); - return FALSE; - } - break; + return wined3d_texture_gl_load_sysmem(texture_gl, sub_resource_idx, context_gl, location); default: FIXME("Implement %s loading from %s.\n", wined3d_debug_location(location),
1
0
0
0
Henri Verbeet : wined3d: Pass a wined3d_context_gl structure to draw_primitive_arrays().
by Alexandre Julliard
18 Jun '19
18 Jun '19
Module: wine Branch: master Commit: 578e7cd56620f9f1432f8dfdfeb4c6e06c9cad0a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=578e7cd56620f9f1432f8dfd…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jun 18 02:51:35 2019 +0430 wined3d: Pass a wined3d_context_gl structure to draw_primitive_arrays(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index d7c9252..6a7aafc 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -4347,15 +4347,15 @@ void dispatch_compute(struct wined3d_device *device, const struct wined3d_state } /* Context activation is done by the caller. */ -static void draw_primitive_arrays(struct wined3d_context *context, const struct wined3d_state *state, - const void *idx_data, unsigned int idx_size, int base_vertex_idx, unsigned int start_idx, - unsigned int count, unsigned int start_instance, unsigned int instance_count) +static void wined3d_context_gl_draw_primitive_arrays(struct wined3d_context_gl *context_gl, + const struct wined3d_state *state, const void *idx_data, unsigned int idx_size, int base_vertex_idx, + unsigned int start_idx, unsigned int count, unsigned int start_instance, unsigned int instance_count) { - const struct wined3d_ffp_attrib_ops *ops = &context->d3d_info->ffp_attrib_ops; + const struct wined3d_ffp_attrib_ops *ops = &context_gl->c.d3d_info->ffp_attrib_ops; GLenum idx_type = idx_size == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT; - const struct wined3d_stream_info *si = &context->stream_info; + const struct wined3d_stream_info *si = &context_gl->c.stream_info; + const struct wined3d_gl_info *gl_info = context_gl->c.gl_info; unsigned int instanced_elements[ARRAY_SIZE(si->elements)]; - const struct wined3d_gl_info *gl_info = context->gl_info; unsigned int instanced_element_count = 0; GLenum mode = state->gl_primitive_type; const void *indices; @@ -4460,7 +4460,8 @@ static void draw_primitive_arrays(struct wined3d_context *context, const struct element = &si->elements[element_idx]; ptr = element->data.addr + element->stride * i; if (element->data.buffer_object) - ptr += (ULONG_PTR)wined3d_buffer_load_sysmem(state->streams[element->stream_idx].buffer, context); + ptr += (ULONG_PTR)wined3d_buffer_load_sysmem(state->streams[element->stream_idx].buffer, + &context_gl->c); ops->generic[element->format->emit_idx](element_idx, ptr); } @@ -4991,9 +4992,9 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s idx_size, parameters->u.direct.base_vertex_idx, parameters->u.direct.start_idx, parameters->u.direct.index_count, instance_count); else - draw_primitive_arrays(context, state, idx_data, idx_size, parameters->u.direct.base_vertex_idx, - parameters->u.direct.start_idx, parameters->u.direct.index_count, - parameters->u.direct.start_instance, instance_count); + wined3d_context_gl_draw_primitive_arrays(context_gl, state, idx_data, idx_size, + parameters->u.direct.base_vertex_idx, parameters->u.direct.start_idx, + parameters->u.direct.index_count, parameters->u.direct.start_instance, instance_count); } if (context->uses_uavs)
1
0
0
0
Henri Verbeet : wined3d: Pass a wined3d_context_gl structure to context_setup_target().
by Alexandre Julliard
18 Jun '19
18 Jun '19
Module: wine Branch: master Commit: 3dce7bcffd3788e5404bbbc5dbd6532d48375b10 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3dce7bcffd3788e5404bbbc5…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jun 18 02:51:34 2019 +0430 wined3d: Pass a wined3d_context_gl structure to context_setup_target(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 6bd6d43..d7c9252 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -4122,27 +4122,26 @@ static void wined3d_context_gl_pause_transform_feedback(struct wined3d_context_g wined3d_context_gl_end_transform_feedback(context_gl); } -static void context_setup_target(struct wined3d_context *context, +static void wined3d_context_gl_setup_target(struct wined3d_context_gl *context_gl, struct wined3d_texture *texture, unsigned int sub_resource_idx) { - BOOL old_render_offscreen = context->render_offscreen, render_offscreen; - struct wined3d_context_gl *context_gl = wined3d_context_gl(context); + BOOL old_render_offscreen = context_gl->c.render_offscreen, render_offscreen; render_offscreen = wined3d_resource_is_offscreen(&texture->resource); - if (context->current_rt.texture == texture - && context->current_rt.sub_resource_idx == sub_resource_idx + if (context_gl->c.current_rt.texture == texture + && context_gl->c.current_rt.sub_resource_idx == sub_resource_idx && render_offscreen == old_render_offscreen) return; /* To compensate the lack of format switching with some offscreen rendering methods and on onscreen buffers * the alpha blend state changes with different render target formats. */ - if (!context->current_rt.texture) + if (!context_gl->c.current_rt.texture) { - context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE)); + context_invalidate_state(&context_gl->c, STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE)); } else { - const struct wined3d_format *old = context->current_rt.texture->resource.format; + const struct wined3d_format *old = context_gl->c.current_rt.texture->resource.format; const struct wined3d_format *new = texture->resource.format; if (old->id != new->id) @@ -4150,12 +4149,12 @@ static void context_setup_target(struct wined3d_context *context, /* Disable blending when the alpha mask has changed and when a format doesn't support blending. */ if ((old->alpha_size && !new->alpha_size) || (!old->alpha_size && new->alpha_size) || !(texture->resource.format_flags & WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING)) - context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE)); + context_invalidate_state(&context_gl->c, STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE)); /* Update sRGB writing when switching between formats that do/do not support sRGB writing */ - if ((context->current_rt.texture->resource.format_flags & WINED3DFMT_FLAG_SRGB_WRITE) + if ((context_gl->c.current_rt.texture->resource.format_flags & WINED3DFMT_FLAG_SRGB_WRITE) != (texture->resource.format_flags & WINED3DFMT_FLAG_SRGB_WRITE)) - context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE)); + context_invalidate_state(&context_gl->c, STATE_RENDER(WINED3D_RS_SRGBWRITEENABLE)); } /* When switching away from an offscreen render target, and we're not @@ -4166,22 +4165,22 @@ static void context_setup_target(struct wined3d_context *context, * has to be called with the old rendertarget active, otherwise a * wrong drawable is read. */ if (wined3d_settings.offscreen_rendering_mode != ORM_FBO - && old_render_offscreen && (context->current_rt.texture != texture - || context->current_rt.sub_resource_idx != sub_resource_idx)) + && old_render_offscreen && (context_gl->c.current_rt.texture != texture + || context_gl->c.current_rt.sub_resource_idx != sub_resource_idx)) { - struct wined3d_texture_gl *prev_texture = wined3d_texture_gl(context->current_rt.texture); - unsigned int prev_sub_resource_idx = context->current_rt.sub_resource_idx; + struct wined3d_texture_gl *prev_texture = wined3d_texture_gl(context_gl->c.current_rt.texture); + unsigned int prev_sub_resource_idx = context_gl->c.current_rt.sub_resource_idx; /* Read the back buffer of the old drawable into the destination texture. */ if (prev_texture->texture_srgb.name) - wined3d_texture_load(&prev_texture->t, context, TRUE); - wined3d_texture_load(&prev_texture->t, context, FALSE); + wined3d_texture_load(&prev_texture->t, &context_gl->c, TRUE); + wined3d_texture_load(&prev_texture->t, &context_gl->c, FALSE); wined3d_texture_invalidate_location(&prev_texture->t, prev_sub_resource_idx, WINED3D_LOCATION_DRAWABLE); } } - context->current_rt.texture = texture; - context->current_rt.sub_resource_idx = sub_resource_idx; + context_gl->c.current_rt.texture = texture; + context_gl->c.current_rt.sub_resource_idx = sub_resource_idx; wined3d_context_gl_set_render_offscreen(context_gl, render_offscreen); } @@ -4190,7 +4189,7 @@ static void wined3d_context_gl_activate(struct wined3d_context_gl *context_gl, { wined3d_context_gl_enter(context_gl); wined3d_context_gl_update_window(context_gl); - context_setup_target(&context_gl->c, texture, sub_resource_idx); + wined3d_context_gl_setup_target(context_gl, texture, sub_resource_idx); if (!context_gl->valid) return;
1
0
0
0
Henri Verbeet : wined3d: Pass a wined3d_context_gl structure to context_pause_transform_feedback() .
by Alexandre Julliard
18 Jun '19
18 Jun '19
Module: wine Branch: master Commit: 50d8290b25c237e0c914d0b9cf7cee39802d91f4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=50d8290b25c237e0c914d0b9…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jun 18 02:51:33 2019 +0430 wined3d: Pass a wined3d_context_gl structure to context_pause_transform_feedback(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index bc4e214..6bd6d43 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -4101,19 +4101,18 @@ void wined3d_context_gl_end_transform_feedback(struct wined3d_context_gl *contex } } -static void context_pause_transform_feedback(struct wined3d_context *context, BOOL force) +static void wined3d_context_gl_pause_transform_feedback(struct wined3d_context_gl *context_gl, BOOL force) { - struct wined3d_context_gl *context_gl = wined3d_context_gl(context); - const struct wined3d_gl_info *gl_info = context->gl_info; + const struct wined3d_gl_info *gl_info = context_gl->c.gl_info; - if (!context->transform_feedback_active || context->transform_feedback_paused) + if (!context_gl->c.transform_feedback_active || context_gl->c.transform_feedback_paused) return; if (gl_info->supported[ARB_TRANSFORM_FEEDBACK2]) { GL_EXTCALL(glPauseTransformFeedback()); checkGLcall("glPauseTransformFeedback"); - context->transform_feedback_paused = 1; + context_gl->c.transform_feedback_paused = 1; return; } @@ -4833,7 +4832,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s gl_info = context->gl_info; if (!use_transform_feedback(state)) - context_pause_transform_feedback(context, TRUE); + wined3d_context_gl_pause_transform_feedback(context_gl, TRUE); for (i = 0; i < gl_info->limits.buffers; ++i) { @@ -5004,7 +5003,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s checkGLcall("glMemoryBarrier"); } - context_pause_transform_feedback(context, FALSE); + wined3d_context_gl_pause_transform_feedback(context_gl, FALSE); if (rasterizer_discard) {
1
0
0
0
Henri Verbeet : wined3d: Pass a wined3d_context_gl structure to context_bind_unordered_access_views ().
by Alexandre Julliard
18 Jun '19
18 Jun '19
Module: wine Branch: master Commit: 9c746674e0cfc550cefc04abec4ded1f91f758ed URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9c746674e0cfc550cefc04ab…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jun 18 02:51:32 2019 +0430 wined3d: Pass a wined3d_context_gl structure to context_bind_unordered_access_views(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index ea9f176..bc4e214 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -3842,10 +3842,10 @@ static void context_load_unordered_access_resources(struct wined3d_context *cont } } -static void context_bind_unordered_access_views(struct wined3d_context *context, +static void wined3d_context_gl_bind_unordered_access_views(struct wined3d_context_gl *context_gl, const struct wined3d_shader *shader, struct wined3d_unordered_access_view * const *views) { - const struct wined3d_gl_info *gl_info = context->gl_info; + const struct wined3d_gl_info *gl_info = context_gl->c.gl_info; struct wined3d_unordered_access_view_gl *view_gl; const struct wined3d_format_gl *format_gl; GLuint texture_name; @@ -3874,7 +3874,7 @@ static void context_bind_unordered_access_views(struct wined3d_context *context, else if (view_gl->v.resource->type != WINED3D_RTYPE_BUFFER) { struct wined3d_texture_gl *texture_gl = wined3d_texture_gl(texture_from_resource(view_gl->v.resource)); - texture_name = wined3d_texture_gl_get_texture_name(texture_gl, context, FALSE); + texture_name = wined3d_texture_gl_get_texture_name(texture_gl, &context_gl->c, FALSE); level = view_gl->v.desc.u.texture.level_idx; } else @@ -4002,7 +4002,7 @@ static BOOL context_apply_draw_state(struct wined3d_context *context, if (context->update_unordered_access_view_bindings) { - context_bind_unordered_access_views(context, + wined3d_context_gl_bind_unordered_access_views(context_gl, state->shader[WINED3D_SHADER_TYPE_PIXEL], state->unordered_access_view[WINED3D_PIPELINE_GRAPHICS]); context->update_unordered_access_view_bindings = 0; @@ -4059,7 +4059,7 @@ static void wined3d_context_gl_apply_compute_state(struct wined3d_context_gl *co if (context_gl->c.update_compute_unordered_access_view_bindings) { - context_bind_unordered_access_views(&context_gl->c, + wined3d_context_gl_bind_unordered_access_views(context_gl, state->shader[WINED3D_SHADER_TYPE_COMPUTE], state->unordered_access_view[WINED3D_PIPELINE_COMPUTE]); context_gl->c.update_compute_unordered_access_view_bindings = 0;
1
0
0
0
Józef Kucia : tests: Add test to confirm predicate must not be read before every rendering command.
by Alexandre Julliard
18 Jun '19
18 Jun '19
Module: vkd3d Branch: master Commit: b59b6b87f00e6da5d9392141d5fb975a7b3e3c50 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=b59b6b87f00e6da5d939214…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jun 18 10:07:53 2019 +0200 tests: Add test to confirm predicate must not be read before every rendering command. In Vulkan both behaviors are allowed. 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 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/d3d12.c b/tests/d3d12.c index a077c60..c2d5bb5 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -31047,6 +31047,39 @@ static void test_conditional_rendering(void) transition_resource_state(command_list, context.render_target, D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET); + /* Direct3D latches the value of the predicate upon beginning predicated rendering. */ + buffer = create_default_buffer(context.device, sizeof(predicate_args), + D3D12_RESOURCE_FLAG_NONE, D3D12_RESOURCE_STATE_COPY_DEST); + transition_resource_state(command_list, conditions, + D3D12_RESOURCE_STATE_PREDICATION, D3D12_RESOURCE_STATE_COPY_SOURCE); + ID3D12GraphicsCommandList_CopyResource(command_list, buffer, conditions); + transition_resource_state(command_list, + buffer, D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_PREDICATION); + + ID3D12GraphicsCommandList_ClearRenderTargetView(command_list, context.rtv, white, 0, NULL); + prepare_instanced_draw(&context); + ID3D12GraphicsCommandList_SetPredication(command_list, buffer, 0, D3D12_PREDICATION_OP_NOT_EQUAL_ZERO); + + transition_resource_state(command_list, buffer, + D3D12_RESOURCE_STATE_PREDICATION, D3D12_RESOURCE_STATE_COPY_DEST); + ID3D12GraphicsCommandList_CopyBufferRegion(command_list, buffer, 0, conditions, sizeof(uint64_t), sizeof(uint64_t)); + transition_resource_state(command_list, + buffer, D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_PREDICATION); + transition_resource_state(command_list, + conditions, D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_PREDICATION); + + ID3D12GraphicsCommandList_DrawInstanced(command_list, 3, 1, 0, 0); + ID3D12GraphicsCommandList_SetPredication(command_list, NULL, 0, 0); + + transition_resource_state(command_list, context.render_target, + D3D12_RESOURCE_STATE_RENDER_TARGET, D3D12_RESOURCE_STATE_COPY_SOURCE); + check_sub_resource_uint(context.render_target, 0, queue, command_list, 0xff00ff00, 0); + + ID3D12Resource_Release(buffer); + reset_command_list(command_list, context.allocator); + transition_resource_state(command_list, context.render_target, + D3D12_RESOURCE_STATE_COPY_SOURCE, D3D12_RESOURCE_STATE_RENDER_TARGET); + /* ExecuteIndirect(). */ buffer = create_upload_buffer(context.device, sizeof(draw_args), &draw_args);
1
0
0
0
Józef Kucia : vkd3d: Implement D3D12_RESOURCE_STATE_PREDICATION resource barriers.
by Alexandre Julliard
18 Jun '19
18 Jun '19
Module: vkd3d Branch: master Commit: ed8bd8cd59702b602d972243510656fb979a3044 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=ed8bd8cd59702b602d97224…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Jun 18 10:07:52 2019 +0200 vkd3d: Implement D3D12_RESOURCE_STATE_PREDICATION resource barriers. 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/command.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 99f607a..47f7a13 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -1870,7 +1870,7 @@ static void d3d12_command_list_invalidate_bindings(struct d3d12_command_list *li } static bool vk_barrier_parameters_from_d3d12_resource_state(unsigned int state, - const struct d3d12_resource *resource, VkQueueFlags vk_queue_flags, + const struct d3d12_resource *resource, VkQueueFlags vk_queue_flags, const struct vkd3d_vulkan_info *vk_info, VkAccessFlags *access_mask, VkPipelineStageFlags *stage_flags, VkImageLayout *image_layout) { bool is_swapchain_image = resource && (resource->flags & VKD3D_RESOURCE_PRESENT_STATE_TRANSITION); @@ -1909,7 +1909,7 @@ static bool vk_barrier_parameters_from_d3d12_resource_state(unsigned int state, else if (resource->present_state != D3D12_RESOURCE_STATE_COMMON) { vk_barrier_parameters_from_d3d12_resource_state(resource->present_state, - resource, vk_queue_flags, access_mask, stage_flags, image_layout); + resource, vk_queue_flags, vk_info, access_mask, stage_flags, image_layout); return true; } } @@ -2044,6 +2044,11 @@ static bool vk_barrier_parameters_from_d3d12_resource_state(unsigned int state, { *access_mask |= VK_ACCESS_INDIRECT_COMMAND_READ_BIT; *stage_flags |= VK_PIPELINE_STAGE_DRAW_INDIRECT_BIT; + if (vk_info->EXT_conditional_rendering) + { + *access_mask |= VK_ACCESS_CONDITIONAL_RENDERING_READ_BIT_EXT; + *stage_flags |= VK_PIPELINE_STAGE_CONDITIONAL_RENDERING_BIT_EXT; + } state &= ~D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT; } @@ -2066,6 +2071,7 @@ static void d3d12_command_list_transition_resource_to_initial_state(struct d3d12 struct d3d12_resource *resource) { const struct vkd3d_vk_device_procs *vk_procs = &list->device->vk_procs; + const struct vkd3d_vulkan_info *vk_info = &list->device->vk_info; VkPipelineStageFlags src_stage_mask, dst_stage_mask; const struct vkd3d_format *format; VkImageMemoryBarrier barrier; @@ -2088,7 +2094,7 @@ static void d3d12_command_list_transition_resource_to_initial_state(struct d3d12 VK_IMAGE_LAYOUT_PREINITIALIZED : VK_IMAGE_LAYOUT_UNDEFINED; if (!vk_barrier_parameters_from_d3d12_resource_state(resource->initial_state, - resource, list->vk_queue_flags, &barrier.dstAccessMask, &dst_stage_mask, &barrier.newLayout)) + resource, list->vk_queue_flags, vk_info, &barrier.dstAccessMask, &dst_stage_mask, &barrier.newLayout)) { FIXME("Unhandled state %#x.\n", resource->initial_state); return; @@ -3710,11 +3716,13 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsC struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface); bool have_aliasing_barriers = false, have_split_barriers = false; const struct vkd3d_vk_device_procs *vk_procs; + const struct vkd3d_vulkan_info *vk_info; unsigned int i; TRACE("iface %p, barrier_count %u, barriers %p.\n", iface, barrier_count, barriers); vk_procs = &list->device->vk_procs; + vk_info = &list->device->vk_info; d3d12_command_list_end_current_render_pass(list); @@ -3762,13 +3770,13 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsC sub_resource_idx = transition->Subresource; if (!vk_barrier_parameters_from_d3d12_resource_state(transition->StateBefore, - resource, list->vk_queue_flags, &src_access_mask, &src_stage_mask, &layout_before)) + resource, list->vk_queue_flags, vk_info, &src_access_mask, &src_stage_mask, &layout_before)) { FIXME("Unhandled state %#x.\n", transition->StateBefore); continue; } if (!vk_barrier_parameters_from_d3d12_resource_state(transition->StateAfter, - resource, list->vk_queue_flags, &dst_access_mask, &dst_stage_mask, &layout_after)) + resource, list->vk_queue_flags, vk_info, &dst_access_mask, &dst_stage_mask, &layout_after)) { FIXME("Unhandled state %#x.\n", transition->StateAfter); continue; @@ -3788,7 +3796,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ResourceBarrier(ID3D12GraphicsC resource = unsafe_impl_from_ID3D12Resource(uav->pResource); vk_barrier_parameters_from_d3d12_resource_state(D3D12_RESOURCE_STATE_UNORDERED_ACCESS, - resource, list->vk_queue_flags, &access_mask, &stage_mask, &image_layout); + resource, list->vk_queue_flags, vk_info, &access_mask, &stage_mask, &image_layout); src_access_mask = dst_access_mask = access_mask; src_stage_mask = dst_stage_mask = stage_mask; layout_before = layout_after = image_layout; @@ -4658,6 +4666,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID { struct d3d12_command_list *list = impl_from_ID3D12GraphicsCommandList1(iface); const struct vkd3d_vk_device_procs *vk_procs; + const struct vkd3d_vulkan_info *vk_info; const struct d3d12_desc *cpu_descriptor; struct d3d12_resource *resource_impl; VkBufferMemoryBarrier buffer_barrier; @@ -4670,6 +4679,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID iface, gpu_handle.ptr, cpu_handle.ptr, resource, values, rect_count, rects); vk_procs = &list->device->vk_procs; + vk_info = &list->device->vk_info; resource_impl = unsafe_impl_from_ID3D12Resource(resource); @@ -4706,7 +4716,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID buffer_barrier.size = cpu_descriptor->uav.buffer.size; vk_barrier_parameters_from_d3d12_resource_state(D3D12_RESOURCE_STATE_UNORDERED_ACCESS, - resource_impl, list->vk_queue_flags, &buffer_barrier.dstAccessMask, &stage_mask, NULL); + resource_impl, list->vk_queue_flags, vk_info, &buffer_barrier.dstAccessMask, &stage_mask, NULL); VK_CALL(vkCmdPipelineBarrier(list->vk_command_buffer, VK_PIPELINE_STAGE_TRANSFER_BIT, stage_mask, 0, @@ -4739,7 +4749,7 @@ static void STDMETHODCALLTYPE d3d12_command_list_ClearUnorderedAccessViewUint(ID image_barrier.subresourceRange = range; vk_barrier_parameters_from_d3d12_resource_state(D3D12_RESOURCE_STATE_UNORDERED_ACCESS, - resource_impl, list->vk_queue_flags, &image_barrier.dstAccessMask, &stage_mask, NULL); + resource_impl, list->vk_queue_flags, vk_info, &image_barrier.dstAccessMask, &stage_mask, NULL); VK_CALL(vkCmdPipelineBarrier(list->vk_command_buffer, VK_PIPELINE_STAGE_TRANSFER_BIT, stage_mask, 0,
1
0
0
0
← Newer
1
...
35
36
37
38
39
40
41
...
87
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
Results per page:
10
25
50
100
200