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
August 2016
----- 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
777 discussions
Start a n
N
ew thread
Jacek Caban : wpc: Added class factory stub implementation.
by Alexandre Julliard
24 Aug '16
24 Aug '16
Module: wine Branch: master Commit: 14cf136a8c68fa45a72c09409a19d13bb44d3bcf URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14cf136a8c68fa45a72c09409…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Wed Aug 24 12:40:35 2016 +0200 wpc: Added class factory stub implementation. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wpc/wpc.c | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/dlls/wpc/wpc.c b/dlls/wpc/wpc.c index 48f8edf..20db3fc 100644 --- a/dlls/wpc/wpc.c +++ b/dlls/wpc/wpc.c @@ -16,6 +16,9 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#define COBJMACROS + +#include "initguid.h" #include "wpcapi.h" #include "rpcproxy.h" @@ -25,6 +28,61 @@ WINE_DEFAULT_DEBUG_CHANNEL(wpc); static HINSTANCE wpc_instance; +static HRESULT WINAPI WindowsParentalControls_CreateInstance(IClassFactory *iface, IUnknown *outer, REFIID riid, void **ppv) +{ + FIXME("(%s %p %p)\n", debugstr_guid(riid), outer, ppv); + return E_NOTIMPL; +} + +static HRESULT WINAPI ClassFactory_QueryInterface(IClassFactory *iface, REFIID riid, void **ppv) +{ + *ppv = NULL; + + if(IsEqualGUID(&IID_IUnknown, riid)) { + TRACE("(%p)->(IID_IUnknown %p)\n", iface, ppv); + *ppv = iface; + }else if(IsEqualGUID(&IID_IClassFactory, riid)) { + TRACE("(%p)->(IID_IClassFactory %p)\n", iface, ppv); + *ppv = iface; + } + + if(*ppv) { + IUnknown_AddRef((IUnknown*)*ppv); + return S_OK; + } + + FIXME("(%p)->(%s %p)\n", iface, debugstr_guid(riid), ppv); + return E_NOINTERFACE; +} + +static ULONG WINAPI ClassFactory_AddRef(IClassFactory *iface) +{ + TRACE("(%p)\n", iface); + return 2; +} + +static ULONG WINAPI ClassFactory_Release(IClassFactory *iface) +{ + TRACE("(%p)\n", iface); + return 1; +} + +static HRESULT WINAPI ClassFactory_LockServer(IClassFactory *iface, BOOL fLock) +{ + TRACE("(%p)->(%x)\n", iface, fLock); + return S_OK; +} + +static const IClassFactoryVtbl WPCFactoryVtbl = { + ClassFactory_QueryInterface, + ClassFactory_AddRef, + ClassFactory_Release, + WindowsParentalControls_CreateInstance, + ClassFactory_LockServer +}; + +static IClassFactory WPCFactory = { &WPCFactoryVtbl }; + /****************************************************************** * DllMain */ @@ -49,6 +107,11 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv) */ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) { + if(IsEqualGUID(&CLSID_WindowsParentalControls, rclsid)) { + TRACE("(CLSID_WindowsParentalControls %s %p)\n", debugstr_guid(riid), ppv); + return IClassFactory_QueryInterface(&WPCFactory, riid, ppv); + } + FIXME("Unknown object %s (iface %s)\n", debugstr_guid(rclsid), debugstr_guid(riid)); return CLASS_E_CLASSNOTAVAILABLE; }
1
0
0
0
Michael Müller : d3d11: Fix calculation of array size for 1D textures.
by Alexandre Julliard
24 Aug '16
24 Aug '16
Module: wine Branch: master Commit: 983b3577ca50ef7688b026093cfed1156acc76d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=983b3577ca50ef7688b026093…
Author: Michael Müller <michael(a)fds-team.de> Date: Tue Aug 23 22:48:27 2016 +0200 d3d11: Fix calculation of array size for 1D textures. Signed-off-by: Michael Müller <michael(a)fds-team.de> Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/view.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/d3d11/view.c b/dlls/d3d11/view.c index a13316f..205513d 100644 --- a/dlls/d3d11/view.c +++ b/dlls/d3d11/view.c @@ -184,7 +184,7 @@ static HRESULT normalize_dsv_desc(D3D11_DEPTH_STENCIL_VIEW_DESC *desc, ID3D11Res { case D3D11_DSV_DIMENSION_TEXTURE1DARRAY: if (desc->u.Texture1DArray.ArraySize == ~0u && desc->u.Texture1DArray.FirstArraySlice < layer_count) - desc->u.Texture1DArray.ArraySize = layer_count - desc->u.Texture1DArray.ArraySize; + desc->u.Texture1DArray.ArraySize = layer_count - desc->u.Texture1DArray.FirstArraySlice; break; case D3D11_DSV_DIMENSION_TEXTURE2DARRAY: @@ -412,7 +412,7 @@ static HRESULT normalize_rtv_desc(D3D11_RENDER_TARGET_VIEW_DESC *desc, ID3D11Res { case D3D11_RTV_DIMENSION_TEXTURE1DARRAY: if (desc->u.Texture1DArray.ArraySize == ~0u && desc->u.Texture1DArray.FirstArraySlice < layer_count) - desc->u.Texture1DArray.ArraySize = layer_count - desc->u.Texture1DArray.ArraySize; + desc->u.Texture1DArray.ArraySize = layer_count - desc->u.Texture1DArray.FirstArraySlice; break; case D3D11_RTV_DIMENSION_TEXTURE2DARRAY: @@ -915,7 +915,7 @@ static HRESULT normalize_uav_desc(D3D11_UNORDERED_ACCESS_VIEW_DESC *desc, ID3D11 { case D3D11_UAV_DIMENSION_TEXTURE1DARRAY: if (desc->u.Texture1DArray.ArraySize == ~0u && desc->u.Texture1DArray.FirstArraySlice < layer_count) - desc->u.Texture1DArray.ArraySize = layer_count - desc->u.Texture1DArray.ArraySize; + desc->u.Texture1DArray.ArraySize = layer_count - desc->u.Texture1DArray.FirstArraySlice; break; case D3D11_UAV_DIMENSION_TEXTURE2DARRAY:
1
0
0
0
Józef Kucia : d3d9: Forbid display mode and back buffer mismatch in IDirect3DDevice9Ex_ResetEx ().
by Alexandre Julliard
24 Aug '16
24 Aug '16
Module: wine Branch: master Commit: 53714bd6a892744aceefd5af51dce8c52b402e90 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=53714bd6a892744aceefd5af5…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Aug 22 14:53:50 2016 +0200 d3d9: Forbid display mode and back buffer mismatch in IDirect3DDevice9Ex_ResetEx(). 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> --- dlls/d3d9/device.c | 9 +++++++++ dlls/d3d9/tests/d3d9ex.c | 17 ++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 097b05f..5d1d292 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -3455,6 +3455,15 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_ResetEx(IDirect3DDevice9Ex * return D3DERR_INVALIDCALL; } + if (mode && (mode->Width != present_parameters->BackBufferWidth + || mode->Height != present_parameters->BackBufferHeight)) + { + WARN("Mode and back buffer mismatch (mode %ux%u, backbuffer %ux%u).\n", + mode->Width, mode->Height, + present_parameters->BackBufferWidth, present_parameters->BackBufferHeight); + return D3DERR_INVALIDCALL; + } + return d3d9_device_reset(device, present_parameters, mode); } diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 63e9a30..05f1580 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -1563,15 +1563,26 @@ static void test_reset_ex(void) d3dpp.BackBufferWidth = modes[i].Width - 10; d3dpp.BackBufferHeight = modes[i].Height - 10; hr = IDirect3DDevice9Ex_ResetEx(device, &d3dpp, &modes[i]); - todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); d3dpp.BackBufferWidth = modes[i].Width - 1; d3dpp.BackBufferHeight = modes[i].Height; hr = IDirect3DDevice9Ex_ResetEx(device, &d3dpp, &modes[i]); - todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); d3dpp.BackBufferWidth = modes[i].Width; d3dpp.BackBufferHeight = modes[i].Height - 1; hr = IDirect3DDevice9Ex_ResetEx(device, &d3dpp, &modes[i]); - todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + d3dpp.BackBufferWidth = 0; + d3dpp.BackBufferHeight = 0; + hr = IDirect3DDevice9Ex_ResetEx(device, &d3dpp, &modes[i]); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + d3dpp.BackBufferWidth = modes[i].Width; + d3dpp.BackBufferHeight = modes[i].Height; + mode2 = modes[i]; + mode2.Width = 0; + mode2.Height = 0; + hr = IDirect3DDevice9Ex_ResetEx(device, &d3dpp, &mode2); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_TestCooperativeLevel(device); ok(hr == D3D_OK, "Got unexpected cooperative level %#x.\n", hr);
1
0
0
0
Józef Kucia : d3d9: Allow passing "mode" to IDirect3DDevice9Ex_ResetEx() iff "Windowed" is FALSE.
by Alexandre Julliard
24 Aug '16
24 Aug '16
Module: wine Branch: master Commit: c1cc6e45dabbc695cc7b863d1750822c9598a5b7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c1cc6e45dabbc695cc7b863d1…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Aug 22 14:53:49 2016 +0200 d3d9: Allow passing "mode" to IDirect3DDevice9Ex_ResetEx() iff "Windowed" is FALSE. 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> --- dlls/d3d9/device.c | 6 ++++++ dlls/d3d9/tests/d3d9ex.c | 8 ++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 1c600ca..097b05f 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -3449,6 +3449,12 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_ResetEx(IDirect3DDevice9Ex * TRACE("iface %p, present_parameters %p, mode %p.\n", iface, present_parameters, mode); + if (!present_parameters->Windowed == !mode) + { + WARN("Mode can be passed if and only if Windowed is FALSE.\n"); + return D3DERR_INVALIDCALL; + } + return d3d9_device_reset(device, present_parameters, mode); } diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index c857e53..63e9a30 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -1465,7 +1465,7 @@ static void test_reset_ex(void) modes[i].RefreshRate = 0; modes[i].ScanLineOrdering = 0; hr = IDirect3DDevice9Ex_ResetEx(device, &d3dpp, NULL); - todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_ResetEx(device, &d3dpp, &modes[i]); ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr); hr = IDirect3DDevice9Ex_TestCooperativeLevel(device); @@ -1665,7 +1665,7 @@ static void test_reset_ex(void) d3dpp.BackBufferHeight = 400; d3dpp.BackBufferFormat = D3DFMT_A8R8G8B8; hr = IDirect3DDevice9Ex_ResetEx(device, &d3dpp, &mode); - todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_ResetEx(device, &d3dpp, NULL); ok(SUCCEEDED(hr), "Failed to reset device, hr %#x.\n", hr); hr = IDirect3DDevice9Ex_TestCooperativeLevel(device); @@ -1673,8 +1673,8 @@ static void test_reset_ex(void) width = GetSystemMetrics(SM_CXSCREEN); height = GetSystemMetrics(SM_CYSCREEN); - todo_wine ok(width == modes[1].Width, "Screen width is %u, expected %u.\n", width, modes[1].Width); - todo_wine ok(height == modes[1].Height, "Screen height is %u, expected %u.\n", height, modes[1].Height); + ok(width == modes[1].Width, "Screen width is %u, expected %u.\n", width, modes[1].Width); + ok(height == modes[1].Height, "Screen height is %u, expected %u.\n", height, modes[1].Height); hr = IDirect3DDevice9Ex_GetScissorRect(device, &rect); ok(SUCCEEDED(hr), "Failed to get scissor rect, hr %#x.\n", hr);
1
0
0
0
Józef Kucia : d3d9/tests: Add test for IDirect3DDevice9Ex_ResetEx().
by Alexandre Julliard
24 Aug '16
24 Aug '16
Module: wine Branch: master Commit: de3ca49952e929610b0e128fcc805730012273cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=de3ca49952e929610b0e128fc…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Aug 22 14:53:48 2016 +0200 d3d9/tests: Add test for IDirect3DDevice9Ex_ResetEx(). 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> --- dlls/d3d9/tests/d3d9ex.c | 405 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 405 insertions(+) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=de3ca49952e929610b0e1…
1
0
0
0
Józef Kucia : d3d9/tests: Restore display rotation in test_get_adapter_displaymode_ex().
by Alexandre Julliard
24 Aug '16
24 Aug '16
Module: wine Branch: master Commit: 677a9349c71e75278de2b26cc9d221fc23e14fee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=677a9349c71e75278de2b26cc…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Aug 22 14:53:47 2016 +0200 d3d9/tests: Restore display rotation in test_get_adapter_displaymode_ex(). 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> --- dlls/d3d9/tests/d3d9ex.c | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 695efa2..283f6e6 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -542,7 +542,7 @@ static void test_get_adapter_displaymode_ex(void) D3DDISPLAYMODE mode; D3DDISPLAYMODEEX mode_ex; D3DDISPLAYROTATION rotation; - DEVMODEW startmode; + DEVMODEW startmode, devmode; LONG retval; hr = pDirect3DCreate9Ex(D3D_SDK_VERSION, &d3d9ex); @@ -575,21 +575,22 @@ static void test_get_adapter_displaymode_ex(void) ok(retval, "Failed to retrieve current display mode, retval %d.\n", retval); if (!retval) goto out; - startmode.dmFields = DM_DISPLAYORIENTATION | DM_PELSWIDTH | DM_PELSHEIGHT; - S2(U1(startmode)).dmDisplayOrientation = DMDO_180; - retval = ChangeDisplaySettingsExW(NULL, &startmode, NULL, 0, NULL); - - if(retval == DISP_CHANGE_BADMODE) + devmode = startmode; + devmode.dmFields = DM_DISPLAYORIENTATION | DM_PELSWIDTH | DM_PELSHEIGHT; + S2(U1(devmode)).dmDisplayOrientation = DMDO_180; + retval = ChangeDisplaySettingsExW(NULL, &devmode, NULL, 0, NULL); + if (retval == DISP_CHANGE_BADMODE) { - trace(" Test skipped: graphics mode is not supported\n"); + skip("Graphics mode is not supported.\n"); goto out; } - ok(retval == DISP_CHANGE_SUCCESSFUL,"ChangeDisplaySettingsEx failed with %d\n", retval); + ok(retval == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsEx failed with %d.\n", retval); /* try retrieve orientation info with EnumDisplaySettingsEx*/ - startmode.dmFields = 0; - S2(U1(startmode)).dmDisplayOrientation = 0; - ok(EnumDisplaySettingsExW(NULL, ENUM_CURRENT_SETTINGS, &startmode, EDS_ROTATEDMODE), "EnumDisplaySettingsEx failed\n"); + devmode.dmFields = 0; + S2(U1(devmode)).dmDisplayOrientation = 0; + ok(EnumDisplaySettingsExW(NULL, ENUM_CURRENT_SETTINGS, &devmode, EDS_ROTATEDMODE), + "EnumDisplaySettingsEx failed.\n"); /*now that orientation has changed start tests for GetAdapterDisplayModeEx: invalid Size*/ memset(&mode_ex, 0, sizeof(mode_ex)); @@ -619,8 +620,8 @@ static void test_get_adapter_displaymode_ex(void) ok(mode_ex.ScanLineOrdering != 0, "ScanLineOrdering returned 0\n"); /* Check that orientation is returned correctly by GetAdapterDisplayModeEx * and EnumDisplaySettingsEx(). */ - todo_wine ok(S2(U1(startmode)).dmDisplayOrientation == DMDO_180 && rotation == D3DDISPLAYROTATION_180, - "rotation is %d instead of %d\n", rotation, S2(U1(startmode)).dmDisplayOrientation); + todo_wine ok(S2(U1(devmode)).dmDisplayOrientation == DMDO_180 && rotation == D3DDISPLAYROTATION_180, + "rotation is %d instead of %d\n", rotation, S2(U1(devmode)).dmDisplayOrientation); trace("GetAdapterDisplayModeEx returned Width = %d, Height = %d, RefreshRate = %d, Format = %x, ScanLineOrdering = %x, rotation = %d\n", mode_ex.Width, mode_ex.Height, mode_ex.RefreshRate, mode_ex.Format, mode_ex.ScanLineOrdering, rotation); @@ -643,10 +644,12 @@ static void test_get_adapter_displaymode_ex(void) ok(mode_ex.ScanLineOrdering != 0, "ScanLineOrdering returned 0\n"); /* return to the default mode */ - ChangeDisplaySettingsExW(NULL, NULL, NULL, 0, NULL); + retval = ChangeDisplaySettingsExW(NULL, &startmode, NULL, 0, NULL); + ok(retval == DISP_CHANGE_SUCCESSFUL, "ChangeDisplaySettingsEx failed with %d.\n", retval); out: IDirect3D9_Release(d3d9); IDirect3D9Ex_Release(d3d9ex); + DestroyWindow(window); } static void test_create_depth_stencil_surface_ex(void)
1
0
0
0
Józef Kucia : d3d8/tests: Add test for regression in IDirect3DDevice8_Reset().
by Alexandre Julliard
24 Aug '16
24 Aug '16
Module: wine Branch: master Commit: b2e8ca902b987688ad26acee56f95599622ead72 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b2e8ca902b987688ad26acee5…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Aug 22 14:53:46 2016 +0200 d3d8/tests: Add test for regression in IDirect3DDevice8_Reset(). This adds a test for regression introduced in cad279449c62a965a70a712a91b11ba52c4ff4f7. 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> --- dlls/d3d8/tests/device.c | 102 ++++++++++++++++++++++++++++++++++------------- 1 file changed, 75 insertions(+), 27 deletions(-) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 711c357..2f9c267 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -1284,6 +1284,7 @@ static void test_reset(void) UINT adapter_mode_count; D3DLOCKED_RECT lockrect; UINT mode_count = 0; + DEVMODEW devmode; IDirect3D8 *d3d8; RECT winrect; D3DVIEWPORT8 vp; @@ -1292,6 +1293,7 @@ static void test_reset(void) DWORD value; HWND window; HRESULT hr; + LONG ret; UINT i; static const DWORD decl[] = @@ -1387,15 +1389,12 @@ static void test_reset(void) hr = IDirect3DDevice8_GetViewport(device1, &vp); ok(SUCCEEDED(hr), "GetViewport failed, hr %#x.\n", hr); - if (SUCCEEDED(hr)) - { - ok(vp.X == 0, "D3DVIEWPORT->X = %u, expected 0.\n", vp.X); - ok(vp.Y == 0, "D3DVIEWPORT->Y = %u, expected 0.\n", vp.Y); - ok(vp.Width == modes[i].w, "D3DVIEWPORT->Width = %u, expected %u.\n", vp.Width, modes[i].w); - ok(vp.Height == modes[i].h, "D3DVIEWPORT->Height = %u, expected %u.\n", vp.Height, modes[i].h); - ok(vp.MinZ == 0, "D3DVIEWPORT->MinZ = %.8e, expected 0.\n", vp.MinZ); - ok(vp.MaxZ == 1, "D3DVIEWPORT->MaxZ = %.8e, expected 1.\n", vp.MaxZ); - } + ok(vp.X == 0, "D3DVIEWPORT->X = %u, expected 0.\n", vp.X); + ok(vp.Y == 0, "D3DVIEWPORT->Y = %u, expected 0.\n", vp.Y); + ok(vp.Width == modes[i].w, "D3DVIEWPORT->Width = %u, expected %u.\n", vp.Width, modes[i].w); + ok(vp.Height == modes[i].h, "D3DVIEWPORT->Height = %u, expected %u.\n", vp.Height, modes[i].h); + ok(vp.MinZ == 0, "D3DVIEWPORT->MinZ = %.8e, expected 0.\n", vp.MinZ); + ok(vp.MaxZ == 1, "D3DVIEWPORT->MaxZ = %.8e, expected 1.\n", vp.MaxZ); i = 1; vp.X = 10; @@ -1431,15 +1430,12 @@ static void test_reset(void) memset(&vp, 0, sizeof(vp)); hr = IDirect3DDevice8_GetViewport(device1, &vp); ok(SUCCEEDED(hr), "GetViewport failed, hr %#x.\n", hr); - if (SUCCEEDED(hr)) - { - ok(vp.X == 0, "D3DVIEWPORT->X = %u, expected 0.\n", vp.X); - ok(vp.Y == 0, "D3DVIEWPORT->Y = %u, expected 0.\n", vp.Y); - ok(vp.Width == modes[i].w, "D3DVIEWPORT->Width = %u, expected %u.\n", vp.Width, modes[i].w); - ok(vp.Height == modes[i].h, "D3DVIEWPORT->Height = %u, expected %u.\n", vp.Height, modes[i].h); - ok(vp.MinZ == 0, "D3DVIEWPORT->MinZ = %.8e, expected 0.\n", vp.MinZ); - ok(vp.MaxZ == 1, "D3DVIEWPORT->MaxZ = %.8e, expected 1.\n", vp.MaxZ); - } + ok(vp.X == 0, "D3DVIEWPORT->X = %u, expected 0.\n", vp.X); + ok(vp.Y == 0, "D3DVIEWPORT->Y = %u, expected 0.\n", vp.Y); + ok(vp.Width == modes[i].w, "D3DVIEWPORT->Width = %u, expected %u.\n", vp.Width, modes[i].w); + ok(vp.Height == modes[i].h, "D3DVIEWPORT->Height = %u, expected %u.\n", vp.Height, modes[i].h); + ok(vp.MinZ == 0, "D3DVIEWPORT->MinZ = %.8e, expected 0.\n", vp.MinZ); + ok(vp.MaxZ == 1, "D3DVIEWPORT->MaxZ = %.8e, expected 1.\n", vp.MaxZ); width = GetSystemMetrics(SM_CXSCREEN); height = GetSystemMetrics(SM_CYSCREEN); @@ -1470,15 +1466,12 @@ static void test_reset(void) memset(&vp, 0, sizeof(vp)); hr = IDirect3DDevice8_GetViewport(device1, &vp); ok(SUCCEEDED(hr), "GetViewport failed, hr %#x.\n", hr); - if (SUCCEEDED(hr)) - { - ok(vp.X == 0, "D3DVIEWPORT->X = %u, expected 0.\n", vp.X); - ok(vp.Y == 0, "D3DVIEWPORT->Y = %u, expected 0.\n", vp.Y); - ok(vp.Width == 400, "D3DVIEWPORT->Width = %u, expected 400.\n", vp.Width); - ok(vp.Height == 300, "D3DVIEWPORT->Height = %u, expected 300.\n", vp.Height); - ok(vp.MinZ == 0, "D3DVIEWPORT->MinZ = %.8e, expected 0.\n", vp.MinZ); - ok(vp.MaxZ == 1, "D3DVIEWPORT->MaxZ = %.8e, expected 1.\n", vp.MaxZ); - } + ok(vp.X == 0, "D3DVIEWPORT->X = %u, expected 0.\n", vp.X); + ok(vp.Y == 0, "D3DVIEWPORT->Y = %u, expected 0.\n", vp.Y); + ok(vp.Width == 400, "D3DVIEWPORT->Width = %u, expected 400.\n", vp.Width); + ok(vp.Height == 300, "D3DVIEWPORT->Height = %u, expected 300.\n", vp.Height); + ok(vp.MinZ == 0, "D3DVIEWPORT->MinZ = %.8e, expected 0.\n", vp.MinZ); + ok(vp.MaxZ == 1, "D3DVIEWPORT->MaxZ = %.8e, expected 1.\n", vp.MaxZ); width = GetSystemMetrics(SM_CXSCREEN); height = GetSystemMetrics(SM_CYSCREEN); @@ -1495,6 +1488,61 @@ static void test_reset(void) surface_desc.Height); IDirect3DSurface8_Release(surface); + memset(&devmode, 0, sizeof(devmode)); + devmode.dmSize = sizeof(devmode); + devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; + devmode.dmPelsWidth = modes[1].w; + devmode.dmPelsHeight = modes[1].h; + ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); + ok(ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", ret); + width = GetSystemMetrics(SM_CXSCREEN); + height = GetSystemMetrics(SM_CYSCREEN); + ok(width == modes[1].w, "Screen width is %u, expected %u.\n", width, modes[1].w); + ok(height == modes[1].h, "Screen height is %u, expected %u.\n", height, modes[1].h); + + d3dpp.BackBufferWidth = 500; + d3dpp.BackBufferHeight = 400; + d3dpp.BackBufferFormat = D3DFMT_A8R8G8B8; + hr = IDirect3DDevice8_Reset(device1, &d3dpp); + ok(SUCCEEDED(hr), "Reset failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_TestCooperativeLevel(device1); + ok(SUCCEEDED(hr), "TestCooperativeLevel failed, hr %#x.\n", hr); + + width = GetSystemMetrics(SM_CXSCREEN); + height = GetSystemMetrics(SM_CYSCREEN); + ok(width == modes[1].w, "Screen width is %u, expected %u.\n", width, modes[1].w); + ok(height == modes[1].h, "Screen height is %u, expected %u.\n", height, modes[1].h); + + ZeroMemory(&vp, sizeof(vp)); + hr = IDirect3DDevice8_GetViewport(device1, &vp); + ok(SUCCEEDED(hr), "GetViewport failed, hr %#x.\n", hr); + ok(vp.X == 0, "D3DVIEWPORT->X = %d.\n", vp.X); + ok(vp.Y == 0, "D3DVIEWPORT->Y = %d.\n", vp.Y); + ok(vp.Width == 500, "D3DVIEWPORT->Width = %d.\n", vp.Width); + ok(vp.Height == 400, "D3DVIEWPORT->Height = %d.\n", vp.Height); + ok(vp.MinZ == 0, "D3DVIEWPORT->MinZ = %f.\n", vp.MinZ); + ok(vp.MaxZ == 1, "D3DVIEWPORT->MaxZ = %f.\n", vp.MaxZ); + + hr = IDirect3DDevice8_GetRenderTarget(device1, &surface); + ok(SUCCEEDED(hr), "GetRenderTarget failed, hr %#x.\n", hr); + hr = IDirect3DSurface8_GetDesc(surface, &surface_desc); + ok(hr == D3D_OK, "GetDesc failed, hr %#x.\n", hr); + ok(surface_desc.Width == 500, "Back buffer width is %u, expected 500.\n", + surface_desc.Width); + ok(surface_desc.Height == 400, "Back buffer height is %u, expected 400.\n", + surface_desc.Height); + IDirect3DSurface8_Release(surface); + + devmode.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT; + devmode.dmPelsWidth = orig_width; + devmode.dmPelsHeight = orig_height; + ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN); + ok(ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x.\n", ret); + width = GetSystemMetrics(SM_CXSCREEN); + height = GetSystemMetrics(SM_CYSCREEN); + ok(width == orig_width, "Got screen width %u, expected %u.\n", width, orig_width); + ok(height == orig_height, "Got screen height %u, expected %u.\n", height, orig_height); + winrect.left = 0; winrect.top = 0; winrect.right = 200;
1
0
0
0
Józef Kucia : d3d8/tests: Skip test_reset() when device is initially lost.
by Alexandre Julliard
24 Aug '16
24 Aug '16
Module: wine Branch: master Commit: f37a438e79c9f46f9e45df27bfe9edfc00f61f87 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f37a438e79c9f46f9e45df27b…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Aug 22 14:53:44 2016 +0200 d3d8/tests: Skip test_reset() when device is initially lost. 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> --- dlls/d3d8/tests/device.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index ffb18bd..711c357 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -1369,6 +1369,12 @@ static void test_reset(void) goto cleanup; } hr = IDirect3DDevice8_TestCooperativeLevel(device1); + /* This skips the test on testbot Win 8 VMs. */ + if (hr == D3DERR_DEVICELOST) + { + skip("Device is lost.\n"); + goto cleanup; + } ok(SUCCEEDED(hr), "TestCooperativeLevel failed, hr %#x.\n", hr); hr = IDirect3DDevice8_GetDeviceCaps(device1, &caps);
1
0
0
0
Kimmo Myllyvirta : d3d11: Add tests for WINED3DFMT_BC6H_UF16/SF16 formats.
by Alexandre Julliard
24 Aug '16
24 Aug '16
Module: wine Branch: master Commit: e38f52f17aa82308d5f2f98f408b22c63b94efef URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e38f52f17aa82308d5f2f98f4…
Author: Kimmo Myllyvirta <kimmo.myllyvirta(a)gmail.com> Date: Mon Aug 22 15:25:49 2016 +0300 d3d11: Add tests for WINED3DFMT_BC6H_UF16/SF16 formats. Signed-off-by: Kimmo Myllyvirta <kimmo.myllyvirta(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/tests/d3d11.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index cc2c22d..c2b2535 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -5541,6 +5541,20 @@ static void test_texture(void) 0x10, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x7f, 0xb6, 0x6d, 0xdb, 0xb6, 0x6d, 0xdb, 0x10, 0x7f, 0xb6, 0x6d, 0xdb, 0xb6, 0x6d, 0xdb, }; + static const BYTE bc6h_u_data[] = + { + 0xe3, 0x5e, 0x00, 0x00, 0x78, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x80, 0x7b, 0x01, 0x00, 0xe0, 0x3d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0xee, 0x05, 0x00, 0x80, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xe3, 0xde, 0x7b, 0xef, 0x7d, 0xef, 0xbd, 0xf7, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; + static const BYTE bc6h_s_data[] = + { + 0x63, 0x2f, 0x00, 0x00, 0xb8, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x80, 0xbd, 0x00, 0x00, 0xe0, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0xf6, 0x02, 0x00, 0x80, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x63, 0xaf, 0xbd, 0xf6, 0xba, 0xe7, 0x9e, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + }; static const BYTE bc7_data[] = { 0x02, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -5568,6 +5582,8 @@ static void test_texture(void) static const struct texture bc3_texture = {8, 8, 1, 1, DXGI_FORMAT_BC3_UNORM, {{bc3_data, 2 * 16}}}; static const struct texture bc4_texture = {8, 8, 1, 1, DXGI_FORMAT_BC4_UNORM, {{bc4_data, 2 * 8}}}; static const struct texture bc5_texture = {8, 8, 1, 1, DXGI_FORMAT_BC5_UNORM, {{bc5_data, 2 * 16}}}; + static const struct texture bc6h_u_texture = {8, 8, 1, 1, DXGI_FORMAT_BC6H_UF16, {{bc6h_u_data, 2 * 16}}}; + static const struct texture bc6h_s_texture = {8, 8, 1, 1, DXGI_FORMAT_BC6H_SF16, {{bc6h_s_data, 2 * 16}}}; static const struct texture bc7_texture = {8, 8, 1, 1, DXGI_FORMAT_BC7_UNORM, {{bc7_data, 2 * 16}}}; static const struct texture bc1_texture_srgb = {8, 8, 1, 1, DXGI_FORMAT_BC1_UNORM_SRGB, {{bc1_data, 2 * 8}}}; static const struct texture bc2_texture_srgb = {8, 8, 1, 1, DXGI_FORMAT_BC2_UNORM_SRGB, {{bc2_data, 2 * 16}}}; @@ -5708,6 +5724,8 @@ static void test_texture(void) {&ps_ld, &bc3_texture_srgb, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc_colors}, {&ps_ld, &bc4_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc4_colors}, {&ps_ld, &bc5_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc5_colors}, + {&ps_ld, &bc6h_u_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc_colors}, + {&ps_ld, &bc6h_s_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc_colors}, {&ps_ld, &bc7_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc7_colors}, {&ps_ld, &bc7_texture_srgb, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc7_colors}, {&ps_ld, NULL, POINT, 0.0f, 0.0f, 0.0f, 0.0f, zero_colors}, @@ -5719,6 +5737,8 @@ static void test_texture(void) {&ps_sample, &bc3_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc_colors}, {&ps_sample, &bc4_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc4_colors}, {&ps_sample, &bc5_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc5_colors}, + {&ps_sample, &bc6h_u_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc_colors}, + {&ps_sample, &bc6h_s_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc_colors}, {&ps_sample, &bc7_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc7_colors}, {&ps_sample, &bc7_texture_srgb, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc7_colors}, {&ps_sample, &rgba_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, rgba_level_0}, @@ -5891,6 +5911,14 @@ static void test_texture(void) continue; } + if (test->texture && (test->texture->format == DXGI_FORMAT_BC6H_UF16 + || test->texture->format == DXGI_FORMAT_BC6H_SF16) + && feature_level < D3D_FEATURE_LEVEL_11_0) + { + skip("Feature level >= 11.0 is required for BC6H tests.\n"); + continue; + } + if (current_ps != test->ps) { if (ps)
1
0
0
0
Kimmo Myllyvirta : d3d11: Add tests for WINED3DFMT_BC7_UNORM format.
by Alexandre Julliard
24 Aug '16
24 Aug '16
Module: wine Branch: master Commit: 5bb67ff9e607aecea0d17831e07e8a0f175b367f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5bb67ff9e607aecea0d17831e…
Author: Kimmo Myllyvirta <kimmo.myllyvirta(a)gmail.com> Date: Mon Aug 22 15:18:36 2016 +0300 d3d11: Add tests for WINED3DFMT_BC7_UNORM format. Signed-off-by: Kimmo Myllyvirta <kimmo.myllyvirta(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/tests/d3d11.c | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 8624ef5..cc2c22d 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -5541,6 +5541,13 @@ static void test_texture(void) 0x10, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x10, 0x7f, 0xb6, 0x6d, 0xdb, 0xb6, 0x6d, 0xdb, 0x10, 0x7f, 0xb6, 0x6d, 0xdb, 0xb6, 0x6d, 0xdb, }; + static const BYTE bc7_data[] = + { + 0x02, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, + }; static const struct texture rgba_texture = { 4, 4, 3, 1, DXGI_FORMAT_R8G8B8A8_UNORM, @@ -5561,9 +5568,11 @@ static void test_texture(void) static const struct texture bc3_texture = {8, 8, 1, 1, DXGI_FORMAT_BC3_UNORM, {{bc3_data, 2 * 16}}}; static const struct texture bc4_texture = {8, 8, 1, 1, DXGI_FORMAT_BC4_UNORM, {{bc4_data, 2 * 8}}}; static const struct texture bc5_texture = {8, 8, 1, 1, DXGI_FORMAT_BC5_UNORM, {{bc5_data, 2 * 16}}}; + static const struct texture bc7_texture = {8, 8, 1, 1, DXGI_FORMAT_BC7_UNORM, {{bc7_data, 2 * 16}}}; static const struct texture bc1_texture_srgb = {8, 8, 1, 1, DXGI_FORMAT_BC1_UNORM_SRGB, {{bc1_data, 2 * 8}}}; static const struct texture bc2_texture_srgb = {8, 8, 1, 1, DXGI_FORMAT_BC2_UNORM_SRGB, {{bc2_data, 2 * 16}}}; static const struct texture bc3_texture_srgb = {8, 8, 1, 1, DXGI_FORMAT_BC3_UNORM_SRGB, {{bc3_data, 2 * 16}}}; + static const struct texture bc7_texture_srgb = {8, 8, 1, 1, DXGI_FORMAT_BC7_UNORM_SRGB, {{bc7_data, 2 * 16}}}; static const struct texture bc1_typeless = {8, 8, 1, 1, DXGI_FORMAT_BC1_TYPELESS, {{bc1_data, 2 * 8}}}; static const struct texture bc2_typeless = {8, 8, 1, 1, DXGI_FORMAT_BC2_TYPELESS, {{bc2_data, 2 * 16}}}; static const struct texture bc3_typeless = {8, 8, 1, 1, DXGI_FORMAT_BC3_TYPELESS, {{bc3_data, 2 * 16}}}; @@ -5650,6 +5659,13 @@ static void test_texture(void) 0xff00ffff, 0xff00ffff, 0xff000000, 0xff000000, 0xff00ffff, 0xff00ffff, 0xff000000, 0xff000000, }; + static const DWORD bc7_colors[] = + { + 0xff0000fc, 0xff0000fc, 0xff00fc00, 0xff00fc00, + 0xff0000fc, 0xff0000fc, 0xff00fc00, 0xff00fc00, + 0xfffc0000, 0xfffc0000, 0xffffffff, 0xffffffff, + 0xfffc0000, 0xfffc0000, 0xffffffff, 0xffffffff, + }; static const DWORD sint8_colors[] = { 0x7e80807e, 0x7e807e7e, 0x7e807e80, 0x7e7e7e80, @@ -5692,6 +5708,8 @@ static void test_texture(void) {&ps_ld, &bc3_texture_srgb, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc_colors}, {&ps_ld, &bc4_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc4_colors}, {&ps_ld, &bc5_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc5_colors}, + {&ps_ld, &bc7_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc7_colors}, + {&ps_ld, &bc7_texture_srgb, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc7_colors}, {&ps_ld, NULL, POINT, 0.0f, 0.0f, 0.0f, 0.0f, zero_colors}, {&ps_ld, NULL, POINT, 0.0f, 0.0f, MIP_MAX, 0.0f, zero_colors}, {&ps_ld_sint8, &sint8_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, sint8_colors}, @@ -5701,6 +5719,8 @@ static void test_texture(void) {&ps_sample, &bc3_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc_colors}, {&ps_sample, &bc4_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc4_colors}, {&ps_sample, &bc5_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc5_colors}, + {&ps_sample, &bc7_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc7_colors}, + {&ps_sample, &bc7_texture_srgb, POINT, 0.0f, 0.0f, 0.0f, 0.0f, bc7_colors}, {&ps_sample, &rgba_texture, POINT, 0.0f, 0.0f, 0.0f, 0.0f, rgba_level_0}, {&ps_sample, &rgba_texture, POINT, 0.0f, 0.0f, MIP_MAX, 0.0f, rgba_level_0}, {&ps_sample, &rgba_texture, POINT, 2.0f, 0.0f, MIP_MAX, 0.0f, rgba_level_0}, @@ -5863,6 +5883,14 @@ static void test_texture(void) { const struct texture_test *test = &texture_tests[i]; + if (test->texture && (test->texture->format == DXGI_FORMAT_BC7_UNORM + || test->texture->format == DXGI_FORMAT_BC7_UNORM_SRGB) + && feature_level < D3D_FEATURE_LEVEL_11_0) + { + skip("Feature level >= 11.0 is required for BC7 tests.\n"); + continue; + } + if (current_ps != test->ps) { if (ps) @@ -5940,7 +5968,7 @@ static void test_texture(void) for (x = 0; x < 4; ++x) { color = get_readback_color(&rb, 80 + x * 160, 60 + y * 120); - ok(compare_color(color, test->expected_colors[y * 4 + x], 1), + ok(compare_color(color, test->expected_colors[y * 4 + x], 2), "Test %u: Got unexpected color 0x%08x at (%u, %u).\n", i, color, x, y); } }
1
0
0
0
← Newer
1
...
13
14
15
16
17
18
19
...
78
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
Results per page:
10
25
50
100
200