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
September 2015
----- 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
318 discussions
Start a n
N
ew thread
Józef Kucia : d3d11: Rename d3d10_texture3d to d3d_texture3d.
by Alexandre Julliard
01 Sep '15
01 Sep '15
Module: wine Branch: master Commit: 0707fa19129d32c4fa07546e6ffd85624d3a0588 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0707fa19129d32c4fa07546e6…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Sep 1 00:27:32 2015 +0200 d3d11: Rename d3d10_texture3d to d3d_texture3d. --- dlls/d3d11/d3d11_private.h | 4 ++-- dlls/d3d11/device.c | 4 ++-- dlls/d3d11/texture.c | 34 +++++++++++++++++----------------- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/dlls/d3d11/d3d11_private.h b/dlls/d3d11/d3d11_private.h index 8adf6a3..1da39d2 100644 --- a/dlls/d3d11/d3d11_private.h +++ b/dlls/d3d11/d3d11_private.h @@ -117,7 +117,7 @@ HRESULT d3d_texture2d_create(struct d3d_device *device, const D3D11_TEXTURE2D_DE struct d3d_texture2d *unsafe_impl_from_ID3D10Texture2D(ID3D10Texture2D *iface) DECLSPEC_HIDDEN; /* ID3D10Texture3D */ -struct d3d10_texture3d +struct d3d_texture3d { ID3D10Texture3D ID3D10Texture3D_iface; LONG refcount; @@ -128,7 +128,7 @@ struct d3d10_texture3d ID3D10Device1 *device; }; -HRESULT d3d10_texture3d_init(struct d3d10_texture3d *texture, struct d3d_device *device, +HRESULT d3d_texture3d_init(struct d3d_texture3d *texture, struct d3d_device *device, const D3D10_TEXTURE3D_DESC *desc, const D3D10_SUBRESOURCE_DATA *data) DECLSPEC_HIDDEN; /* ID3D10Buffer */ diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index b722280..7aef1f7 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -2044,7 +2044,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture3D(ID3D10Device1 *ifa ID3D10Texture3D **texture) { struct d3d_device *device = impl_from_ID3D10Device(iface); - struct d3d10_texture3d *object; + struct d3d_texture3d *object; HRESULT hr; TRACE("iface %p, desc %p, data %p, texture %p.\n", iface, desc, data, texture); @@ -2053,7 +2053,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateTexture3D(ID3D10Device1 *ifa if (!object) return E_OUTOFMEMORY; - if (FAILED(hr = d3d10_texture3d_init(object, device, desc, data))) + if (FAILED(hr = d3d_texture3d_init(object, device, desc, data))) { WARN("Failed to initialize texture, hr %#x.\n", hr); HeapFree(GetProcessHeap(), 0, object); diff --git a/dlls/d3d11/texture.c b/dlls/d3d11/texture.c index 8e9fa2f..31df894 100644 --- a/dlls/d3d11/texture.c +++ b/dlls/d3d11/texture.c @@ -542,9 +542,9 @@ HRESULT d3d_texture2d_create(struct d3d_device *device, const D3D11_TEXTURE2D_DE return S_OK; } -static inline struct d3d10_texture3d *impl_from_ID3D10Texture3D(ID3D10Texture3D *iface) +static inline struct d3d_texture3d *impl_from_ID3D10Texture3D(ID3D10Texture3D *iface) { - return CONTAINING_RECORD(iface, struct d3d10_texture3d, ID3D10Texture3D_iface); + return CONTAINING_RECORD(iface, struct d3d_texture3d, ID3D10Texture3D_iface); } static HRESULT STDMETHODCALLTYPE d3d10_texture3d_QueryInterface(ID3D10Texture3D *iface, REFIID riid, void **object) @@ -569,7 +569,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_QueryInterface(ID3D10Texture3D static ULONG STDMETHODCALLTYPE d3d10_texture3d_AddRef(ID3D10Texture3D *iface) { - struct d3d10_texture3d *texture = impl_from_ID3D10Texture3D(iface); + struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface); ULONG refcount = InterlockedIncrement(&texture->refcount); TRACE("%p increasing refcount to %u.\n", texture, refcount); @@ -585,9 +585,9 @@ static ULONG STDMETHODCALLTYPE d3d10_texture3d_AddRef(ID3D10Texture3D *iface) return refcount; } -static void STDMETHODCALLTYPE d3d10_texture3d_wined3d_object_released(void *parent) +static void STDMETHODCALLTYPE d3d_texture3d_wined3d_object_released(void *parent) { - struct d3d10_texture3d *texture = parent; + struct d3d_texture3d *texture = parent; wined3d_private_store_cleanup(&texture->private_store); HeapFree(GetProcessHeap(), 0, parent); @@ -595,7 +595,7 @@ static void STDMETHODCALLTYPE d3d10_texture3d_wined3d_object_released(void *pare static ULONG STDMETHODCALLTYPE d3d10_texture3d_Release(ID3D10Texture3D *iface) { - struct d3d10_texture3d *texture = impl_from_ID3D10Texture3D(iface); + struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface); ULONG refcount = InterlockedDecrement(&texture->refcount); TRACE("%p decreasing refcount to %u.\n", texture, refcount); @@ -617,7 +617,7 @@ static ULONG STDMETHODCALLTYPE d3d10_texture3d_Release(ID3D10Texture3D *iface) static void STDMETHODCALLTYPE d3d10_texture3d_GetDevice(ID3D10Texture3D *iface, ID3D10Device **device) { - struct d3d10_texture3d *texture = impl_from_ID3D10Texture3D(iface); + struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface); TRACE("iface %p, device %p.\n", iface, device); @@ -628,7 +628,7 @@ static void STDMETHODCALLTYPE d3d10_texture3d_GetDevice(ID3D10Texture3D *iface, static HRESULT STDMETHODCALLTYPE d3d10_texture3d_GetPrivateData(ID3D10Texture3D *iface, REFGUID guid, UINT *data_size, void *data) { - struct d3d10_texture3d *texture = impl_from_ID3D10Texture3D(iface); + struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface); TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data); @@ -639,7 +639,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_GetPrivateData(ID3D10Texture3D static HRESULT STDMETHODCALLTYPE d3d10_texture3d_SetPrivateData(ID3D10Texture3D *iface, REFGUID guid, UINT data_size, const void *data) { - struct d3d10_texture3d *texture = impl_from_ID3D10Texture3D(iface); + struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface); TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data); @@ -650,7 +650,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_SetPrivateData(ID3D10Texture3D static HRESULT STDMETHODCALLTYPE d3d10_texture3d_SetPrivateDataInterface(ID3D10Texture3D *iface, REFGUID guid, const IUnknown *data) { - struct d3d10_texture3d *texture = impl_from_ID3D10Texture3D(iface); + struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface); TRACE("iface %p, guid %s, data %p.\n", iface, debugstr_guid(guid), data); @@ -680,7 +680,7 @@ static UINT STDMETHODCALLTYPE d3d10_texture3d_GetEvictionPriority(ID3D10Texture3 static HRESULT STDMETHODCALLTYPE d3d10_texture3d_Map(ID3D10Texture3D *iface, UINT sub_resource_idx, D3D10_MAP map_type, UINT map_flags, D3D10_MAPPED_TEXTURE3D *mapped_texture) { - struct d3d10_texture3d *texture = impl_from_ID3D10Texture3D(iface); + struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface); struct wined3d_map_desc wined3d_map_desc; struct wined3d_resource *sub_resource; HRESULT hr; @@ -708,7 +708,7 @@ static HRESULT STDMETHODCALLTYPE d3d10_texture3d_Map(ID3D10Texture3D *iface, UIN static void STDMETHODCALLTYPE d3d10_texture3d_Unmap(ID3D10Texture3D *iface, UINT sub_resource_idx) { - struct d3d10_texture3d *texture = impl_from_ID3D10Texture3D(iface); + struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface); struct wined3d_resource *sub_resource; TRACE("iface %p, sub_resource_idx %u.\n", iface, sub_resource_idx); @@ -726,7 +726,7 @@ static void STDMETHODCALLTYPE d3d10_texture3d_Unmap(ID3D10Texture3D *iface, UINT static void STDMETHODCALLTYPE d3d10_texture3d_GetDesc(ID3D10Texture3D *iface, D3D10_TEXTURE3D_DESC *desc) { - struct d3d10_texture3d *texture = impl_from_ID3D10Texture3D(iface); + struct d3d_texture3d *texture = impl_from_ID3D10Texture3D(iface); TRACE("iface %p, desc %p.\n", iface, desc); @@ -754,12 +754,12 @@ static const struct ID3D10Texture3DVtbl d3d10_texture3d_vtbl = d3d10_texture3d_GetDesc, }; -static const struct wined3d_parent_ops d3d10_texture3d_wined3d_parent_ops = +static const struct wined3d_parent_ops d3d_texture3d_wined3d_parent_ops = { - d3d10_texture3d_wined3d_object_released, + d3d_texture3d_wined3d_object_released, }; -HRESULT d3d10_texture3d_init(struct d3d10_texture3d *texture, struct d3d_device *device, +HRESULT d3d_texture3d_init(struct d3d_texture3d *texture, struct d3d_device *device, const D3D10_TEXTURE3D_DESC *desc, const D3D10_SUBRESOURCE_DATA *data) { struct wined3d_resource_desc wined3d_desc; @@ -787,7 +787,7 @@ HRESULT d3d10_texture3d_init(struct d3d10_texture3d *texture, struct d3d_device if (FAILED(hr = wined3d_texture_create(device->wined3d_device, &wined3d_desc, levels, 0, (struct wined3d_sub_resource_data *)data, texture, - &d3d10_texture3d_wined3d_parent_ops, &texture->wined3d_texture))) + &d3d_texture3d_wined3d_parent_ops, &texture->wined3d_texture))) { WARN("Failed to create wined3d texture, hr %#x.\n", hr); wined3d_private_store_cleanup(&texture->private_store);
1
0
0
0
Józef Kucia : d3d10core/tests: Port test_texture2d_interfaces() from d3d11.
by Alexandre Julliard
01 Sep '15
01 Sep '15
Module: wine Branch: master Commit: f9ecce38efd22c8bf67e43a15e5891d1cad265f1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9ecce38efd22c8bf67e43a15…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Sep 1 00:27:31 2015 +0200 d3d10core/tests: Port test_texture2d_interfaces() from d3d11. --- dlls/d3d10core/tests/device.c | 141 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c index 5e12f14..847abd1 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c @@ -297,6 +297,146 @@ static void test_create_texture2d(void) ok(!refcount, "Device has %u references left.\n", refcount); } +static void test_texture2d_interfaces(void) +{ + ID3D11Texture2D *d3d11_texture; + D3D10_TEXTURE2D_DESC desc; + ID3D10Texture2D *texture; + IDXGISurface *surface; + ID3D10Device *device; + unsigned int i; + ULONG refcount; + HRESULT hr; + + static const struct test + { + UINT bind_flags; + UINT misc_flags; + UINT expected_bind_flags; + UINT expected_misc_flags; + } + desc_conversion_tests[] = + { + { + D3D10_BIND_RENDER_TARGET, 0, + D3D11_BIND_RENDER_TARGET, 0 + }, + { + 0, D3D10_RESOURCE_MISC_SHARED, + 0, D3D11_RESOURCE_MISC_SHARED + }, + }; + + if (!(device = create_device())) + { + skip("Failed to create device, skipping tests.\n"); + return; + } + + desc.Width = 512; + desc.Height = 512; + desc.MipLevels = 0; + desc.ArraySize = 1; + desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + desc.SampleDesc.Count = 1; + desc.SampleDesc.Quality = 0; + desc.Usage = D3D11_USAGE_DEFAULT; + desc.BindFlags = D3D11_BIND_RENDER_TARGET; + desc.CPUAccessFlags = 0; + desc.MiscFlags = 0; + + hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture); + ok(SUCCEEDED(hr), "Failed to create a 2d texture, hr %#x.\n", hr); + + hr = ID3D10Texture2D_QueryInterface(texture, &IID_IDXGISurface, (void **)&surface); + ok(hr == E_NOINTERFACE, "Texture should not implement IDXGISurface.\n"); + + hr = ID3D10Texture2D_QueryInterface(texture, &IID_ID3D11Texture2D, (void **)&d3d11_texture); + ok(SUCCEEDED(hr) || broken(hr == E_NOINTERFACE) /* Not available on all Windows versions. */, + "Texture should implement ID3D11Texture2D.\n"); + if (SUCCEEDED(hr)) ID3D11Texture2D_Release(d3d11_texture); + ID3D10Texture2D_Release(texture); + + if (FAILED(hr)) + { + win_skip("D3D11 is not available, skipping tests.\n"); + ID3D10Device_Release(device); + return; + } + + for (i = 0; i < sizeof(desc_conversion_tests) / sizeof(*desc_conversion_tests); ++i) + { + const struct test *current = &desc_conversion_tests[i]; + D3D11_TEXTURE2D_DESC d3d11_desc; + ID3D11Device *d3d11_device; + + desc.Width = 512; + desc.Height = 512; + desc.MipLevels = 1; + desc.ArraySize = 1; + desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + desc.SampleDesc.Count = 1; + desc.SampleDesc.Quality = 0; + desc.Usage = D3D10_USAGE_DEFAULT; + desc.BindFlags = current->bind_flags; + desc.CPUAccessFlags = 0; + desc.MiscFlags = current->misc_flags; + + hr = ID3D10Device_CreateTexture2D(device, &desc, NULL, &texture); + /* Shared resources are not supported by REF and WARP devices. */ + ok(SUCCEEDED(hr) || broken(hr == E_OUTOFMEMORY), + "Test %u: Failed to create a 2d texture, hr %#x.\n", i, hr); + if (FAILED(hr)) + { + win_skip("Failed to create ID3D10Texture2D, skipping test %u.\n", i); + continue; + } + + hr = ID3D10Texture2D_QueryInterface(texture, &IID_IDXGISurface, (void **)&surface); + ok(SUCCEEDED(hr), "Test %u: Texture should implement IDXGISurface.\n", i); + IDXGISurface_Release(surface); + + hr = ID3D10Texture2D_QueryInterface(texture, &IID_ID3D11Texture2D, (void **)&d3d11_texture); + ok(SUCCEEDED(hr), "Test %u: Texture should implement ID3D11Texture2D.\n", i); + ID3D10Texture2D_Release(texture); + + ID3D11Texture2D_GetDesc(d3d11_texture, &d3d11_desc); + + ok(d3d11_desc.Width == desc.Width, + "Test %u: Got unexpected Width %u.\n", i, d3d11_desc.Width); + ok(d3d11_desc.Height == desc.Height, + "Test %u: Got unexpected Height %u.\n", i, d3d11_desc.Height); + ok(d3d11_desc.MipLevels == desc.MipLevels, + "Test %u: Got unexpected MipLevels %u.\n", i, d3d11_desc.MipLevels); + ok(d3d11_desc.ArraySize == desc.ArraySize, + "Test %u: Got unexpected ArraySize %u.\n", i, d3d11_desc.ArraySize); + ok(d3d11_desc.Format == desc.Format, + "Test %u: Got unexpected Format %u.\n", i, d3d11_desc.Format); + ok(d3d11_desc.SampleDesc.Count == desc.SampleDesc.Count, + "Test %u: Got unexpected SampleDesc.Count %u.\n", i, d3d11_desc.SampleDesc.Count); + ok(d3d11_desc.SampleDesc.Quality == desc.SampleDesc.Quality, + "Test %u: Got unexpected SampleDesc.Quality %u.\n", i, d3d11_desc.SampleDesc.Quality); + ok(d3d11_desc.Usage == (D3D11_USAGE)desc.Usage, + "Test %u: Got unexpected Usage %u.\n", i, d3d11_desc.Usage); + ok(d3d11_desc.BindFlags == current->expected_bind_flags, + "Test %u: Got unexpected BindFlags %#x.\n", i, d3d11_desc.BindFlags); + ok(d3d11_desc.CPUAccessFlags == desc.CPUAccessFlags, + "Test %u: Got unexpected CPUAccessFlags %#x.\n", i, d3d11_desc.CPUAccessFlags); + ok(d3d11_desc.MiscFlags == current->expected_misc_flags, + "Test %u: Got unexpected MiscFlags %#x.\n", i, d3d11_desc.MiscFlags); + + d3d11_device = NULL; + ID3D11Texture2D_GetDevice(d3d11_texture, &d3d11_device); + ok(!!d3d11_device, "Test %u: Got NULL, expected device pointer.\n", i); + ID3D11Device_Release(d3d11_device); + + ID3D11Texture2D_Release(d3d11_texture); + } + + refcount = ID3D10Device_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +} + static void test_create_texture3d(void) { ULONG refcount, expected_refcount; @@ -3465,6 +3605,7 @@ START_TEST(device) { test_feature_level(); test_create_texture2d(); + test_texture2d_interfaces(); test_create_texture3d(); test_create_depthstencil_view(); test_create_rendertarget_view();
1
0
0
0
Nikolay Sivov : gdi32: Added GetFontRealizationInfo() export.
by Alexandre Julliard
01 Sep '15
01 Sep '15
Module: wine Branch: master Commit: 7889b17425d77f92af40bd53f80870ac024ed492 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7889b17425d77f92af40bd53f…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Aug 29 19:54:17 2015 +0300 gdi32: Added GetFontRealizationInfo() export. --- dlls/gdi32/dibdrv/dc.c | 4 ++-- dlls/gdi32/driver.c | 12 ++++++------ dlls/gdi32/enhmfdrv/init.c | 2 +- dlls/gdi32/font.c | 46 +++++++++++++++++++++++++++++++++++++++------- dlls/gdi32/freetype.c | 18 ++++++++++++------ dlls/gdi32/gdi32.spec | 1 + dlls/gdi32/gdi_private.h | 10 ++++++---- dlls/gdi32/mfdrv/init.c | 2 +- dlls/gdi32/path.c | 2 +- dlls/gdi32/tests/font.c | 2 ++ dlls/winemac.drv/gdi.c | 2 +- dlls/wineps.drv/init.c | 2 +- dlls/winex11.drv/init.c | 2 +- dlls/winex11.drv/xrender.c | 2 +- include/wine/gdi_driver.h | 4 ++-- 15 files changed, 77 insertions(+), 34 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=7889b17425d77f92af40b…
1
0
0
0
Nikolay Sivov : gdi32/tests: Add names to data structure GetFontRealizationInfo returns, explicitly test with older variant fields.
by Alexandre Julliard
01 Sep '15
01 Sep '15
Module: wine Branch: master Commit: adb0f582e03c63ce194868fbf3ea5355641e655f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=adb0f582e03c63ce194868fbf…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sat Aug 29 19:53:40 2015 +0300 gdi32/tests: Add names to data structure GetFontRealizationInfo returns, explicitly test with older variant fields. --- dlls/gdi32/tests/font.c | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 65685ac..fb603a4 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -4114,6 +4114,22 @@ todo_wine static void test_RealizationInfo(void) { + struct font_realization_info { + DWORD size; + DWORD flags; + DWORD cache_num; + DWORD instance_id; + DWORD unk; + DWORD face_index; + }; + + struct realization_info_t + { + DWORD flags; + DWORD cache_num; + DWORD instance_id; + }; + HDC hdc; DWORD info[4], info2[10]; BOOL r, have_file = FALSE; @@ -4166,6 +4182,9 @@ static void test_RealizationInfo(void) if (pGetFontRealizationInfo) { + struct font_realization_info *fri = (struct font_realization_info*)info2; + struct realization_info_t *ri = (struct realization_info_t*)info; + /* The first DWORD represents a struct size. On a newly rebooted system setting this to < 16 results in GetFontRealizationInfo failing. However there @@ -4180,9 +4199,11 @@ static void test_RealizationInfo(void) ok(r != 0, "ret 0\n"); /* We may get the '24' version here if that has been previously requested. */ - ok(info2[0] == 16 || info2[0] == 24, "got %d\n", info2[0]); - ok(!memcmp(info2 + 1, info, 3 * sizeof(DWORD)), "mismatch\n"); - ok(info2[6] == 0xcccccccc, "structure longer than 6 dwords\n"); + ok(fri->size == 16 || fri->size == 24, "got %d\n", info2[0]); + ok(fri->flags == ri->flags, "flags mismatch\n"); + ok(fri->cache_num == ri->cache_num, "cache_num mismatch\n"); + ok(fri->instance_id == ri->instance_id, "instance id mismatch\n"); + ok(info2[6] == 0xcccccccc, "got wrong dword 6, 0x%08x\n", info2[6]); memset(info2, 0xcc, sizeof(info2)); info2[0] = 28; @@ -4193,12 +4214,15 @@ static void test_RealizationInfo(void) info2[0] = 24; r = pGetFontRealizationInfo(hdc, info2); ok(r != 0, "ret 0\n"); - ok(info2[0] == 24, "got %d\n", info2[0]); - ok(!memcmp(info2 + 1, info, 3 * sizeof(DWORD)), "mismatch\n"); + ok(fri->size == 24, "got %d\n", fri->size); + ok(fri->flags == ri->flags, "flags mismatch\n"); + ok(fri->cache_num == ri->cache_num, "cache_num mismatch\n"); + ok(fri->instance_id == ri->instance_id, "instance id mismatch\n"); + ok(fri->face_index == 0, "got wrong face index %u\n", fri->face_index); ok(info2[6] == 0xcccccccc, "structure longer than 6 dwords\n"); /* Test GetFontFileInfo() */ - r = pGetFontFileInfo(info2[3], 0, &file_info, sizeof(file_info), &needed); + r = pGetFontFileInfo(fri->instance_id, 0, &file_info, sizeof(file_info), &needed); ok(r != 0 || GetLastError() == ERROR_NOACCESS, "ret %d gle %d\n", r, GetLastError()); if (r) @@ -4218,11 +4242,13 @@ static void test_RealizationInfo(void) } /* Get bytes 2 - 16 using GetFontFileData */ - r = pGetFontFileData(info2[3], 0, 2, data, sizeof(data)); + r = pGetFontFileData(fri->instance_id, 0, 2, data, sizeof(data)); ok(r != 0, "ret 0 gle %d\n", GetLastError()); if (have_file) ok(!memcmp(data, file + 2, sizeof(data)), "mismatch\n"); + else + win_skip("GetFontFileInfo() failed, skipping\n"); } DeleteObject(SelectObject(hdc, hfont_old));
1
0
0
0
Nikolay Sivov : dwrite: Force reported English family/ face names to resolved values.
by Alexandre Julliard
01 Sep '15
01 Sep '15
Module: wine Branch: master Commit: a22d5ed9489bb38bcb1ffd75a21cb2f0f0275e75 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a22d5ed9489bb38bcb1ffd75a…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Tue Sep 1 12:09:24 2015 +0300 dwrite: Force reported English family/face names to resolved values. --- dlls/dwrite/dwrite_private.h | 1 + dlls/dwrite/font.c | 32 ++++++++++++++++++++++---------- dlls/dwrite/main.c | 17 ++++++++++++++++- 3 files changed, 39 insertions(+), 11 deletions(-) diff --git a/dlls/dwrite/dwrite_private.h b/dlls/dwrite/dwrite_private.h index a7b8c46..70aadcc 100644 --- a/dlls/dwrite/dwrite_private.h +++ b/dlls/dwrite/dwrite_private.h @@ -122,6 +122,7 @@ extern void release_gdiinterop(IDWriteGdiInterop*) DECLSPEC_HIDDEN; extern HRESULT create_localizedstrings(IDWriteLocalizedStrings**) DECLSPEC_HIDDEN; extern HRESULT add_localizedstring(IDWriteLocalizedStrings*,const WCHAR*,const WCHAR*) DECLSPEC_HIDDEN; extern HRESULT clone_localizedstring(IDWriteLocalizedStrings *iface, IDWriteLocalizedStrings **strings) DECLSPEC_HIDDEN; +extern void set_en_localizedstring(IDWriteLocalizedStrings*,const WCHAR*) DECLSPEC_HIDDEN; extern HRESULT get_system_fontcollection(IDWriteFactory2*,IDWriteFontCollection**) DECLSPEC_HIDDEN; extern HRESULT get_eudc_fontcollection(IDWriteFactory2*,IDWriteFontCollection**) DECLSPEC_HIDDEN; extern HRESULT get_textanalyzer(IDWriteTextAnalyzer**) DECLSPEC_HIDDEN; diff --git a/dlls/dwrite/font.c b/dlls/dwrite/font.c index 63ad277..928222d 100644 --- a/dlls/dwrite/font.c +++ b/dlls/dwrite/font.c @@ -1985,7 +1985,8 @@ static int trim_spaces(WCHAR *in, WCHAR *ret) struct name_token { struct list entry; const WCHAR *ptr; - INT len; + INT len; /* token length */ + INT fulllen; /* full length including following separators */ }; static inline BOOL is_name_separator_char(WCHAR ch) @@ -2406,7 +2407,7 @@ static inline void font_name_token_to_str(const struct name_token *name, WCHAR * strW[name->len] = 0; } -static void font_apply_differentiation_rules(struct dwrite_font_data *font, WCHAR *familyW, WCHAR *faceW) +static BOOL font_apply_differentiation_rules(struct dwrite_font_data *font, WCHAR *familyW, WCHAR *faceW) { static const WCHAR bookW[] = {'B','o','o','k',0}; static const WCHAR normalW[] = {'N','o','r','m','a','l',0}; @@ -2473,15 +2474,19 @@ static void font_apply_differentiation_rules(struct dwrite_font_data *font, WCHA struct name_token *token = heap_alloc(sizeof(*token)); token->ptr = ptr; token->len = 0; + token->fulllen = 0; while (*ptr && !is_name_separator_char(*ptr)) { token->len++; + token->fulllen++; ptr++; } /* skip separators */ - while (is_name_separator_char(*ptr)) + while (is_name_separator_char(*ptr)) { + token->fulllen++; ptr++; + } list_add_head(&tokens, &token->entry); } @@ -2526,19 +2531,22 @@ static void font_apply_differentiation_rules(struct dwrite_font_data *font, WCHA /* get final combined string from what's left in token list, list is released */ ptrW = finalW; - *ptrW = 0; LIST_FOR_EACH_ENTRY_SAFE_REV(token, token2, &tokens, struct name_token, entry) { - if (*finalW) - *(ptrW++) = ' '; - memcpy(ptrW, token->ptr, token->len * sizeof(WCHAR)); - ptrW += token->len; + int len; + list_remove(&token->entry); + + /* don't include last separator */ + len = list_empty(&tokens) ? token->len : token->fulllen; + memcpy(ptrW, token->ptr, len * sizeof(WCHAR)); + ptrW += len; + heap_free(token); } *ptrW = 0; if (!strcmpW(familyW, finalW)) - return; + return FALSE; /* construct face name */ strcpyW(familyW, finalW); @@ -2620,6 +2628,7 @@ static void font_apply_differentiation_rules(struct dwrite_font_data *font, WCHA } TRACE("resolved family %s, face %s\n", debugstr_w(familyW), debugstr_w(faceW)); + return TRUE; } static HRESULT init_font_data(IDWriteFactory2 *factory, IDWriteFontFile *file, DWRITE_FONT_FACE_TYPE face_type, UINT32 face_index, @@ -2670,7 +2679,10 @@ static HRESULT init_font_data(IDWriteFactory2 *factory, IDWriteFontFile *file, D fontstrings_get_en_string(*family_name, familyW, sizeof(familyW)/sizeof(WCHAR)); fontstrings_get_en_string(data->names, faceW, sizeof(faceW)/sizeof(WCHAR)); - font_apply_differentiation_rules(data, familyW, faceW); + if (font_apply_differentiation_rules(data, familyW, faceW)) { + set_en_localizedstring(*family_name, familyW); + set_en_localizedstring(data->names, faceW); + } init_font_prop_vec(data->weight, data->stretch, data->style, &data->propvec); diff --git a/dlls/dwrite/main.c b/dlls/dwrite/main.c index 01a4012..ce4299c 100644 --- a/dlls/dwrite/main.c +++ b/dlls/dwrite/main.c @@ -438,7 +438,7 @@ HRESULT add_localizedstring(IDWriteLocalizedStrings *iface, const WCHAR *locale, } HRESULT clone_localizedstring(IDWriteLocalizedStrings *iface, IDWriteLocalizedStrings **ret) - { +{ struct localizedstrings *strings, *strings_clone; int i; @@ -471,6 +471,21 @@ HRESULT clone_localizedstring(IDWriteLocalizedStrings *iface, IDWriteLocalizedSt return S_OK; } +void set_en_localizedstring(IDWriteLocalizedStrings *iface, const WCHAR *string) +{ + static const WCHAR enusW[] = {'e','n','-','U','S',0}; + struct localizedstrings *This = impl_from_IDWriteLocalizedStrings(iface); + UINT32 i; + + for (i = 0; i < This->count; i++) { + if (!strcmpiW(This->data[i].locale, enusW)) { + heap_free(This->data[i].string); + This->data[i].string = heap_strdupW(string); + break; + } + } +} + struct collectionloader { struct list entry;
1
0
0
0
Thomas Faber : access.idl: Do not use annotation attribute on remote method (MIDL).
by Alexandre Julliard
01 Sep '15
01 Sep '15
Module: wine Branch: master Commit: d2d64bd74c9babfedecfb05b66de6fe9a6e7309d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d2d64bd74c9babfedecfb05b6…
Author: Thomas Faber <thomas.faber(a)reactos.org> Date: Tue Sep 1 08:52:27 2015 +0200 access.idl: Do not use annotation attribute on remote method (MIDL). --- include/access.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/access.idl b/include/access.idl index eaca1f6..e7beb99 100644 --- a/include/access.idl +++ b/include/access.idl @@ -34,7 +34,7 @@ interface IAccessor : IUnknown [call_as(AddRefAccessor)] HRESULT RemoteAddRefAccessor([in] HACCESSOR hAccessor, - [in, out, unique, annotation("__out_opt")] DBREFCOUNT *pcRefCount, + [in, out, unique] DBREFCOUNT *pcRefCount, [out] IErrorInfo **ppErrorInfoRem); [local]
1
0
0
0
Vincent Povirk : advapi32: RegOpenKeyEx can return special roots when asked for empty subkey.
by Alexandre Julliard
01 Sep '15
01 Sep '15
Module: wine Branch: master Commit: 997484964a30d7d1b95aa0456d20710d9941d2df URL:
http://source.winehq.org/git/wine.git/?a=commit;h=997484964a30d7d1b95aa0456…
Author: Vincent Povirk <vincent(a)codeweavers.com> Date: Mon Aug 31 15:29:37 2015 -0500 advapi32: RegOpenKeyEx can return special roots when asked for empty subkey. --- dlls/advapi32/registry.c | 16 ++++++++++++++++ dlls/advapi32/tests/registry.c | 40 +++++++++++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index cf5a1ac..2482b85 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -476,6 +476,14 @@ LSTATUS WINAPI RegOpenKeyExW( HKEY hkey, LPCWSTR name, DWORD options, REGSAM acc OBJECT_ATTRIBUTES attr; UNICODE_STRING nameW; + if (retkey && (!name || !name[0]) && + (HandleToUlong(hkey) >= HandleToUlong(HKEY_SPECIAL_ROOT_FIRST)) && + (HandleToUlong(hkey) <= HandleToUlong(HKEY_SPECIAL_ROOT_LAST))) + { + *retkey = hkey; + return ERROR_SUCCESS; + } + /* NT+ allows beginning backslash for HKEY_CLASSES_ROOT */ if (HandleToUlong(hkey) == HandleToUlong(HKEY_CLASSES_ROOT) && name && *name == '\\') name++; @@ -520,6 +528,14 @@ LSTATUS WINAPI RegOpenKeyExA( HKEY hkey, LPCSTR name, DWORD options, REGSAM acce STRING nameA; NTSTATUS status; + if (retkey && (!name || !name[0]) && + (HandleToUlong(hkey) >= HandleToUlong(HKEY_SPECIAL_ROOT_FIRST)) && + (HandleToUlong(hkey) <= HandleToUlong(HKEY_SPECIAL_ROOT_LAST))) + { + *retkey = hkey; + return ERROR_SUCCESS; + } + if (!is_version_nt()) access = MAXIMUM_ALLOWED; /* Win95 ignores the access mask */ else { diff --git a/dlls/advapi32/tests/registry.c b/dlls/advapi32/tests/registry.c index b8b7e1c..a8e783c 100644 --- a/dlls/advapi32/tests/registry.c +++ b/dlls/advapi32/tests/registry.c @@ -1075,7 +1075,6 @@ static void test_reg_open_key(void) ok(ret == ERROR_INVALID_HANDLE || ret == ERROR_BADKEY, /* Windows 95 returns BADKEY */ "expected ERROR_INVALID_HANDLE or ERROR_BADKEY, got %d\n", ret); ok(hkResult == hkPreserve, "expected hkResult == hkPreserve\n"); - RegCloseKey(hkResult); /* send in NULL hkResult */ ret = RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Wine\\Test", NULL); @@ -1101,6 +1100,45 @@ static void test_reg_open_key(void) "expected ERROR_SUCCESS, ERROR_BAD_PATHNAME or ERROR_FILE_NOT_FOUND, got %d\n", ret); RegCloseKey(hkResult); + /* NULL or empty subkey of special root */ + hkResult = NULL; + ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, NULL, 0, KEY_QUERY_VALUE, &hkResult); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(hkResult == HKEY_CLASSES_ROOT, "expected hkResult == HKEY_CLASSES_ROOT\n"); + + hkResult = NULL; + ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, "", 0, KEY_QUERY_VALUE, &hkResult); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(hkResult == HKEY_CLASSES_ROOT, "expected hkResult == HKEY_CLASSES_ROOT\n"); + + hkResult = NULL; + ret = RegOpenKeyExA(HKEY_CLASSES_ROOT, "\\", 0, KEY_QUERY_VALUE, &hkResult); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(hkResult != HKEY_CLASSES_ROOT, "expected hkResult to be a new key\n"); + ok(!RegCloseKey(hkResult), "got invalid hkey\n"); + + /* empty subkey of existing handle */ + hkResult = hkPreserve; + ret = RegOpenKeyExA(hkPreserve, "", 0, KEY_QUERY_VALUE, &hkResult); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(hkResult != hkPreserve, "expected hkResult != hkPreserve\n"); + ok(!RegCloseKey(hkResult), "got invalid hkey\n"); + + /* NULL subkey of existing handle */ + hkResult = hkPreserve; + ret = RegOpenKeyExA(hkPreserve, NULL, 0, KEY_QUERY_VALUE, &hkResult); + ok(ret == ERROR_SUCCESS, "expected ERROR_SUCCESS, got %d\n", ret); + ok(hkResult != hkPreserve, "expected hkResult != hkPreserve\n"); + ok(!RegCloseKey(hkResult), "got invalid hkey\n"); + + /* empty subkey of NULL */ + hkResult = hkPreserve; + ret = RegOpenKeyExA(NULL, "", 0, KEY_QUERY_VALUE, &hkResult); + ok(ret == ERROR_INVALID_HANDLE, "expected ERROR_INVALID_HANDLE, got %d\n", ret); + ok(hkResult == hkPreserve, "expected hkResult == hkPreserve\n"); + + RegCloseKey(hkPreserve); + /* WOW64 flags */ hkResult = NULL; ret = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software", 0, KEY_READ|KEY_WOW64_32KEY, &hkResult);
1
0
0
0
Jacek Caban : msi: Fixed varg0 leak in InstallerImpl_SummaryInformation.
by Alexandre Julliard
01 Sep '15
01 Sep '15
Module: wine Branch: master Commit: d8f79a037cfb29104a960c4e6422e4718e3ecf43 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d8f79a037cfb29104a960c4e6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Mon Aug 31 20:11:53 2015 +0200 msi: Fixed varg0 leak in InstallerImpl_SummaryInformation. --- dlls/msi/automation.c | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/dlls/msi/automation.c b/dlls/msi/automation.c index e974387..56823ee 100644 --- a/dlls/msi/automation.c +++ b/dlls/msi/automation.c @@ -1841,32 +1841,28 @@ static HRESULT InstallerImpl_SummaryInformation(WORD wFlags, if (!(wFlags & DISPATCH_PROPERTYGET)) return DISP_E_MEMBERNOTFOUND; - VariantInit(&varg0); - hr = DispGetParam(pDispParams, 0, VT_BSTR, &varg0, puArgErr); - if (FAILED(hr)) - return hr; - VariantInit(&varg1); hr = DispGetParam(pDispParams, 1, VT_I4, &varg1, puArgErr); if (FAILED(hr)) return hr; - V_VT(pVarResult) = VT_DISPATCH; + VariantInit(&varg0); + hr = DispGetParam(pDispParams, 0, VT_BSTR, &varg0, puArgErr); + if (FAILED(hr)) + return hr; ret = MsiGetSummaryInformationW(0, V_BSTR(&varg0), V_I4(&varg1), &hsuminfo); + VariantClear(&varg0); if (ret != ERROR_SUCCESS) - { - hr = DISP_E_EXCEPTION; - goto done; - } + return DISP_E_EXCEPTION; hr = create_summaryinfo(hsuminfo, &dispatch); - if (SUCCEEDED(hr)) - V_DISPATCH(pVarResult) = dispatch; + if (FAILED(hr)) + return hr; -done: - VariantClear(&varg0); - return hr; + V_VT(pVarResult) = VT_DISPATCH; + V_DISPATCH(pVarResult) = dispatch; + return S_OK; } static HRESULT InstallerImpl_UILevel(WORD wFlags,
1
0
0
0
← Newer
1
...
29
30
31
32
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
Results per page:
10
25
50
100
200