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
July
June
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
March 2016
----- 2025 -----
July 2025
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
722 discussions
Start a n
N
ew thread
Theodore Dubois : shell32: Fix return value for ASSOCSTR_FRIENDLYDOCNAME and ASSOCSTR_DEFAULTICON when passed a ProgID.
by Alexandre Julliard
21 Mar '16
21 Mar '16
Module: wine Branch: master Commit: 04a339e770e790440042392a2411944bd6b733c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=04a339e770e790440042392a2…
Author: Theodore Dubois <tblodt(a)icloud.com> Date: Wed Mar 16 13:19:50 2016 -0700 shell32: Fix return value for ASSOCSTR_FRIENDLYDOCNAME and ASSOCSTR_DEFAULTICON when passed a ProgID. Signed-off-by: Theodore Dubois <tblodt(a)icloud.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/assoc.c | 133 ++++++++++++++++++++++++++++----------------------- 1 file changed, 72 insertions(+), 61 deletions(-) diff --git a/dlls/shell32/assoc.c b/dlls/shell32/assoc.c index 90d00a8..a3d21b9 100644 --- a/dlls/shell32/assoc.c +++ b/dlls/shell32/assoc.c @@ -88,6 +88,8 @@ static inline struct enumassochandlers *impl_from_IEnumAssocHandlers(IEnumAssocH return CONTAINING_RECORD(iface, struct enumassochandlers, IEnumAssocHandlers_iface); } +static HRESULT ASSOC_GetValue(HKEY hkey, const WCHAR *name, void **data, DWORD *data_size); + /************************************************************************** * IQueryAssociations_QueryInterface * @@ -196,10 +198,16 @@ static HRESULT WINAPI IQueryAssociations_fnInit( FIXME("unsupported flags: %x\n", cfFlags); RegCloseKey(This->hkeySource); - RegCloseKey(This->hkeyProgID); + if (This->hkeySource != This->hkeyProgID) + RegCloseKey(This->hkeyProgID); This->hkeySource = This->hkeyProgID = NULL; + + /* If the process of initializing hkeyProgID fails, just return S_OK. That's what Windows does. */ if (pszAssoc != NULL) { + WCHAR *progId; + HRESULT hr; + ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, pszAssoc, 0, @@ -207,22 +215,51 @@ static HRESULT WINAPI IQueryAssociations_fnInit( &This->hkeySource); if (ret) return S_OK; - /* if this is not a prog id */ - if ((*pszAssoc == '.') || (*pszAssoc == '{')) + /* if this is a progid */ + if (*pszAssoc != '.' && *pszAssoc != '{') { - RegOpenKeyExW(This->hkeySource, - szProgID, - 0, - KEY_READ, - &This->hkeyProgID); - } - else This->hkeyProgID = This->hkeySource; + return S_OK; + } + + /* if it's not a progid, it's a file extension or clsid */ + if (*pszAssoc == '.') + { + /* for a file extension, the progid is the default value */ + hr = ASSOC_GetValue(This->hkeySource, NULL, (void**)&progId, NULL); + if (FAILED(hr)) + return S_OK; + } + else /* if (*pszAssoc == '{') */ + { + HKEY progIdKey; + /* for a clsid, the progid is the default value of the ProgID subkey */ + ret = RegOpenKeyExW(This->hkeySource, + szProgID, + 0, + KEY_READ, + &progIdKey); + if (ret != ERROR_SUCCESS) + return S_OK; + hr = ASSOC_GetValue(progIdKey, NULL, (void**)&progId, NULL); + if (FAILED(hr)) + return S_OK; + RegCloseKey(progIdKey); + } + + /* open the actual progid key, the one with the shell subkey */ + ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, + progId, + 0, + KEY_READ, + &This->hkeyProgID); + HeapFree(GetProcessHeap(), 0, progId); + return S_OK; } else if (hkeyProgid != NULL) { - This->hkeyProgID = hkeyProgid; + This->hkeySource = This->hkeyProgID = hkeyProgid; return S_OK; } else @@ -507,33 +544,15 @@ static HRESULT WINAPI IQueryAssociations_fnGetString( case ASSOCSTR_FRIENDLYDOCNAME: { - WCHAR *pszFileType; - DWORD ret; - DWORD size; + WCHAR *docName; - hr = ASSOC_GetValue(This->hkeySource, NULL, (void**)&pszFileType, NULL); - if (FAILED(hr)) - return hr; - size = 0; - ret = RegGetValueW(HKEY_CLASSES_ROOT, pszFileType, NULL, RRF_RT_REG_SZ, NULL, NULL, &size); - if (ret == ERROR_SUCCESS) - { - WCHAR *docName = HeapAlloc(GetProcessHeap(), 0, size); - if (docName) - { - ret = RegGetValueW(HKEY_CLASSES_ROOT, pszFileType, NULL, RRF_RT_REG_SZ, NULL, docName, &size); - if (ret == ERROR_SUCCESS) - hr = ASSOC_ReturnString(flags, pszOut, pcchOut, docName, strlenW(docName) + 1); - else - hr = HRESULT_FROM_WIN32(ret); - HeapFree(GetProcessHeap(), 0, docName); - } - else - hr = E_OUTOFMEMORY; + hr = ASSOC_GetValue(This->hkeyProgID, NULL, (void**)&docName, NULL); + if (FAILED(hr)) { + /* hKeyProgID is NULL or there is no default value, so fail */ + return HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION); } - else - hr = HRESULT_FROM_WIN32(ret); - HeapFree(GetProcessHeap(), 0, pszFileType); + hr = ASSOC_ReturnString(flags, pszOut, pcchOut, docName, strlenW(docName) + 1); + HeapFree(GetProcessHeap(), 0, docName); return hr; } @@ -623,41 +642,33 @@ get_friendly_name_fail: case ASSOCSTR_DEFAULTICON: { static const WCHAR DefaultIconW[] = {'D','e','f','a','u','l','t','I','c','o','n',0}; - WCHAR *pszFileType; + static const WCHAR documentIcon[] = {'s','h','e','l','l','3','2','.','d','l','l',',','0',0}; DWORD ret; DWORD size; - HKEY hkeyFile; - hr = ASSOC_GetValue(This->hkeySource, NULL, (void**)&pszFileType, NULL); - if (FAILED(hr)) - return hr; - ret = RegOpenKeyExW(HKEY_CLASSES_ROOT, pszFileType, 0, KEY_READ, &hkeyFile); + size = 0; + ret = RegGetValueW(This->hkeyProgID, DefaultIconW, NULL, RRF_RT_REG_SZ, NULL, NULL, &size); if (ret == ERROR_SUCCESS) { - size = 0; - ret = RegGetValueW(hkeyFile, DefaultIconW, NULL, RRF_RT_REG_SZ, NULL, NULL, &size); - if (ret == ERROR_SUCCESS) + WCHAR *icon = HeapAlloc(GetProcessHeap(), 0, size); + if (icon) { - WCHAR *icon = HeapAlloc(GetProcessHeap(), 0, size); - if (icon) - { - ret = RegGetValueW(hkeyFile, DefaultIconW, NULL, RRF_RT_REG_SZ, NULL, icon, &size); - if (ret == ERROR_SUCCESS) - hr = ASSOC_ReturnString(flags, pszOut, pcchOut, icon, strlenW(icon) + 1); - else - hr = HRESULT_FROM_WIN32(ret); - HeapFree(GetProcessHeap(), 0, icon); - } + ret = RegGetValueW(This->hkeyProgID, DefaultIconW, NULL, RRF_RT_REG_SZ, NULL, icon, &size); + if (ret == ERROR_SUCCESS) + hr = ASSOC_ReturnString(flags, pszOut, pcchOut, icon, strlenW(icon) + 1); else - hr = E_OUTOFMEMORY; + hr = HRESULT_FROM_WIN32(ret); + HeapFree(GetProcessHeap(), 0, icon); } else - hr = HRESULT_FROM_WIN32(ret); - RegCloseKey(hkeyFile); + hr = E_OUTOFMEMORY; + } else { + /* there is no DefaultIcon subkey or hkeyProgID is NULL, so return the default document icon */ + if (This->hkeyProgID == NULL) + hr = ASSOC_ReturnString(flags, pszOut, pcchOut, documentIcon, strlenW(documentIcon) + 1); + else + return HRESULT_FROM_WIN32(ERROR_NO_ASSOCIATION); } - else - hr = HRESULT_FROM_WIN32(ret); - HeapFree(GetProcessHeap(), 0, pszFileType); return hr; } case ASSOCSTR_SHELLEXTENSION:
1
0
0
0
Józef Kucia : wined3d: Prevent possible integer overflow in buffer_invalidate_bo_range().
by Alexandre Julliard
21 Mar '16
21 Mar '16
Module: wine Branch: master Commit: 446ee50b904f9caa8556de6cc8607bea6f9a49d7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=446ee50b904f9caa8556de6cc…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Sun Mar 20 23:15:30 2016 +0100 wined3d: Prevent possible integer overflow in buffer_invalidate_bo_range(). 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/wined3d/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 70a7a20..3d4ab55 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -47,7 +47,7 @@ static void buffer_invalidate_bo_range(struct wined3d_buffer *buffer, unsigned i if (!offset && (!size || size == buffer->resource.size)) goto invalidate_all; - if (offset > buffer->resource.size || offset + size > buffer->resource.size) + if (offset > buffer->resource.size || size > buffer->resource.size - offset) { WARN("Invalid range specified, invalidating entire buffer.\n"); goto invalidate_all;
1
0
0
0
Józef Kucia : d3d11/tests: Add test for copying buffer resources.
by Alexandre Julliard
21 Mar '16
21 Mar '16
Module: wine Branch: master Commit: 654337e14d144bbad3774c4c459b8b5d743a8397 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=654337e14d144bbad3774c4c4…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Sun Mar 20 23:15:29 2016 +0100 d3d11/tests: Add test for copying buffer resources. 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/d3d11/tests/d3d11.c | 111 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 110 insertions(+), 1 deletion(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index 89f9c5b..819c547 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -4736,12 +4736,15 @@ static void test_copy_subresource_region(void) { ID3D11Texture2D *dst_texture, *src_texture; struct d3d11_test_context test_context; + ID3D11Buffer *dst_buffer, *src_buffer; D3D11_SUBRESOURCE_DATA resource_data; D3D11_TEXTURE2D_DESC texture_desc; ID3D11SamplerState *sampler_state; ID3D11ShaderResourceView *ps_srv; D3D11_SAMPLER_DESC sampler_desc; + D3D11_BUFFER_DESC buffer_desc; ID3D11DeviceContext *context; + struct vec4 float_colors[16]; struct texture_readback rb; ID3D11PixelShader *ps; ID3D11Device *device; @@ -4776,6 +4779,31 @@ static void test_copy_subresource_region(void) 0x3b088889, 0x00000000, 0x00000000, 0x09000045, 0x001020f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0100003e, }; + static const DWORD ps_buffer_code[] = + { +#if 0 + float4 buffer[16]; + + float4 main(float4 position : SV_POSITION) : SV_TARGET + { + float2 p = (float2)4; + p *= float2(position.x / 640.0f, position.y / 480.0f); + return buffer[(int)p.y * 4 + (int)p.x]; + } +#endif + 0x43425844, 0x57e7139f, 0x4f0c9e52, 0x598b77e3, 0x5a239132, 0x00000001, 0x0000016c, 0x00000003, + 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x5449534f, 0x004e4f49, + 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x45475241, 0xabab0054, 0x52444853, 0x000000d0, 0x00000040, + 0x00000034, 0x04000859, 0x00208e46, 0x00000000, 0x00000010, 0x04002064, 0x00101032, 0x00000000, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x0a000038, 0x00100032, + 0x00000000, 0x00101516, 0x00000000, 0x00004002, 0x3c088889, 0x3bcccccd, 0x00000000, 0x00000000, + 0x0500001b, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x07000029, 0x00100012, 0x00000000, + 0x0010000a, 0x00000000, 0x00004001, 0x00000002, 0x0700001e, 0x00100012, 0x00000000, 0x0010000a, + 0x00000000, 0x0010001a, 0x00000000, 0x07000036, 0x001020f2, 0x00000000, 0x04208e46, 0x00000000, + 0x0010000a, 0x00000000, 0x0100003e, + }; static const float red[] = {1.0f, 0.0f, 0.0f, 0.5f}; static const DWORD bitmap_data[] = { @@ -4900,10 +4928,91 @@ static void test_copy_subresource_region(void) release_texture_readback(&rb); ID3D11PixelShader_Release(ps); - ID3D11SamplerState_Release(sampler_state); + hr = ID3D11Device_CreatePixelShader(device, ps_buffer_code, sizeof(ps_buffer_code), NULL, &ps); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ID3D11ShaderResourceView_Release(ps_srv); + ps_srv = NULL; + + ID3D11SamplerState_Release(sampler_state); + sampler_state = NULL; + ID3D11Texture2D_Release(dst_texture); ID3D11Texture2D_Release(src_texture); + + ID3D11DeviceContext_PSSetShaderResources(context, 0, 1, &ps_srv); + ID3D11DeviceContext_PSSetSamplers(context, 0, 1, &sampler_state); + ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0); + + buffer_desc.ByteWidth = sizeof(float_colors); + buffer_desc.Usage = D3D11_USAGE_DEFAULT; + buffer_desc.BindFlags = D3D11_BIND_CONSTANT_BUFFER; + buffer_desc.CPUAccessFlags = 0; + buffer_desc.MiscFlags = 0; + buffer_desc.StructureByteStride = 0; + + hr = ID3D11Device_CreateBuffer(device, &buffer_desc, NULL, &dst_buffer); + ok(SUCCEEDED(hr), "Failed to create buffer, hr %#x.\n", hr); + + ID3D11DeviceContext_PSSetConstantBuffers(context, 0, 1, &dst_buffer); + + buffer_desc.ByteWidth = 256 * sizeof(*float_colors); + buffer_desc.BindFlags = 0; + + hr = ID3D11Device_CreateBuffer(device, &buffer_desc, NULL, &src_buffer); + ok(SUCCEEDED(hr), "Failed to create buffer, hr %#x.\n", hr); + + for (i = 0; i < 4; ++i) + { + for (j = 0; j < 4; ++j) + { + float_colors[j + i * 4].x = ((bitmap_data[j + i * 4] >> 0) & 0xff) / 255.0f; + float_colors[j + i * 4].y = ((bitmap_data[j + i * 4] >> 8) & 0xff) / 255.0f; + float_colors[j + i * 4].z = ((bitmap_data[j + i * 4] >> 16) & 0xff) / 255.0f; + float_colors[j + i * 4].w = ((bitmap_data[j + i * 4] >> 24) & 0xff) / 255.0f; + } + } + set_box(&box, 0, 0, 0, sizeof(float_colors), 1, 1); + ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)src_buffer, 0, &box, float_colors, 0, 0); + + set_box(&box, 0, 0, 0, sizeof(float_colors), 0, 1); + ID3D11DeviceContext_CopySubresourceRegion(context, (ID3D11Resource *)dst_buffer, 0, + 0, 0, 0, (ID3D11Resource *)src_buffer, 0, &box); + draw_quad(&test_context); + check_texture_color(test_context.backbuffer, 0x00000000, 0); + + set_box(&box, 0, 0, 0, sizeof(float_colors), 1, 0); + ID3D11DeviceContext_CopySubresourceRegion(context, (ID3D11Resource *)dst_buffer, 0, + 0, 0, 0, (ID3D11Resource *)src_buffer, 0, &box); + draw_quad(&test_context); + check_texture_color(test_context.backbuffer, 0x00000000, 0); + + set_box(&box, 0, 0, 0, sizeof(float_colors), 0, 0); + ID3D11DeviceContext_CopySubresourceRegion(context, (ID3D11Resource *)dst_buffer, 0, + 0, 0, 0, (ID3D11Resource *)src_buffer, 0, &box); + draw_quad(&test_context); + check_texture_color(test_context.backbuffer, 0x00000000, 0); + + set_box(&box, 0, 0, 0, sizeof(float_colors), 1, 1); + ID3D11DeviceContext_CopySubresourceRegion(context, (ID3D11Resource *)dst_buffer, 0, + 0, 0, 0, (ID3D11Resource *)src_buffer, 0, &box); + draw_quad(&test_context); + get_texture_readback(test_context.backbuffer, &rb); + for (i = 0; i < 4; ++i) + { + for (j = 0; j < 4; ++j) + { + color = get_readback_color(&rb, 80 + j * 160, 60 + i * 120); + ok(compare_color(color, bitmap_data[j + i * 4], 1), + "Got unexpected color 0x%08x at (%u, %u), expected 0x%08x.\n", + color, j, i, bitmap_data[j + i * 4]); + } + } + release_texture_readback(&rb); + + ID3D11Buffer_Release(dst_buffer); + ID3D11Buffer_Release(src_buffer); + ID3D11PixelShader_Release(ps); release_test_context(&test_context); }
1
0
0
0
Józef Kucia : d3d10core/tests: Add test for copying buffer resources.
by Alexandre Julliard
21 Mar '16
21 Mar '16
Module: wine Branch: master Commit: aaf36fb7b0bc79d2f515d0fc8ab2b2c0b077d310 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aaf36fb7b0bc79d2f515d0fc8…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Sun Mar 20 23:15:28 2016 +0100 d3d10core/tests: Add test for copying buffer resources. 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/d3d10core/tests/device.c | 110 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 109 insertions(+), 1 deletion(-) diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c index b7ac197..a402d60 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c @@ -4990,11 +4990,14 @@ static void test_copy_subresource_region(void) { struct d3d10core_test_context test_context; ID3D10Texture2D *dst_texture, *src_texture; + ID3D10Buffer *dst_buffer, *src_buffer; D3D10_SUBRESOURCE_DATA resource_data; D3D10_TEXTURE2D_DESC texture_desc; ID3D10SamplerState *sampler_state; ID3D10ShaderResourceView *ps_srv; D3D10_SAMPLER_DESC sampler_desc; + D3D10_BUFFER_DESC buffer_desc; + struct vec4 float_colors[16]; struct texture_readback rb; ID3D10PixelShader *ps; ID3D10Device *device; @@ -5029,6 +5032,31 @@ static void test_copy_subresource_region(void) 0x3b088889, 0x00000000, 0x00000000, 0x09000045, 0x001020f2, 0x00000000, 0x00100046, 0x00000000, 0x00107e46, 0x00000000, 0x00106000, 0x00000000, 0x0100003e, }; + static const DWORD ps_buffer_code[] = + { +#if 0 + float4 buffer[16]; + + float4 main(float4 position : SV_POSITION) : SV_TARGET + { + float2 p = (float2)4; + p *= float2(position.x / 640.0f, position.y / 480.0f); + return buffer[(int)p.y * 4 + (int)p.x]; + } +#endif + 0x43425844, 0x57e7139f, 0x4f0c9e52, 0x598b77e3, 0x5a239132, 0x00000001, 0x0000016c, 0x00000003, + 0x0000002c, 0x00000060, 0x00000094, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000030f, 0x505f5653, 0x5449534f, 0x004e4f49, + 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x545f5653, 0x45475241, 0xabab0054, 0x52444853, 0x000000d0, 0x00000040, + 0x00000034, 0x04000859, 0x00208e46, 0x00000000, 0x00000010, 0x04002064, 0x00101032, 0x00000000, + 0x00000001, 0x03000065, 0x001020f2, 0x00000000, 0x02000068, 0x00000001, 0x0a000038, 0x00100032, + 0x00000000, 0x00101516, 0x00000000, 0x00004002, 0x3c088889, 0x3bcccccd, 0x00000000, 0x00000000, + 0x0500001b, 0x00100032, 0x00000000, 0x00100046, 0x00000000, 0x07000029, 0x00100012, 0x00000000, + 0x0010000a, 0x00000000, 0x00004001, 0x00000002, 0x0700001e, 0x00100012, 0x00000000, 0x0010000a, + 0x00000000, 0x0010001a, 0x00000000, 0x07000036, 0x001020f2, 0x00000000, 0x04208e46, 0x00000000, + 0x0010000a, 0x00000000, 0x0100003e, + }; static const float red[] = {1.0f, 0.0f, 0.0f, 0.5f}; static const DWORD bitmap_data[] = { @@ -5152,10 +5180,90 @@ static void test_copy_subresource_region(void) release_texture_readback(&rb); ID3D10PixelShader_Release(ps); - ID3D10SamplerState_Release(sampler_state); + hr = ID3D10Device_CreatePixelShader(device, ps_buffer_code, sizeof(ps_buffer_code), &ps); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ID3D10ShaderResourceView_Release(ps_srv); + ps_srv = NULL; + + ID3D10SamplerState_Release(sampler_state); + sampler_state = NULL; + ID3D10Texture2D_Release(dst_texture); ID3D10Texture2D_Release(src_texture); + + ID3D10Device_PSSetShaderResources(device, 0, 1, &ps_srv); + ID3D10Device_PSSetSamplers(device, 0, 1, &sampler_state); + ID3D10Device_PSSetShader(device, ps); + + buffer_desc.ByteWidth = sizeof(float_colors); + buffer_desc.Usage = D3D10_USAGE_DEFAULT; + buffer_desc.BindFlags = D3D10_BIND_CONSTANT_BUFFER; + buffer_desc.CPUAccessFlags = 0; + buffer_desc.MiscFlags = 0; + + hr = ID3D10Device_CreateBuffer(device, &buffer_desc, NULL, &dst_buffer); + ok(SUCCEEDED(hr), "Failed to create buffer, hr %#x.\n", hr); + + ID3D10Device_PSSetConstantBuffers(device, 0, 1, &dst_buffer); + + buffer_desc.ByteWidth = 256 * sizeof(*float_colors); + buffer_desc.BindFlags = 0; + + hr = ID3D10Device_CreateBuffer(device, &buffer_desc, NULL, &src_buffer); + ok(SUCCEEDED(hr), "Failed to create buffer, hr %#x.\n", hr); + + for (i = 0; i < 4; ++i) + { + for (j = 0; j < 4; ++j) + { + float_colors[j + i * 4].x = ((bitmap_data[j + i * 4] >> 0) & 0xff) / 255.0f; + float_colors[j + i * 4].y = ((bitmap_data[j + i * 4] >> 8) & 0xff) / 255.0f; + float_colors[j + i * 4].z = ((bitmap_data[j + i * 4] >> 16) & 0xff) / 255.0f; + float_colors[j + i * 4].w = ((bitmap_data[j + i * 4] >> 24) & 0xff) / 255.0f; + } + } + set_box(&box, 0, 0, 0, sizeof(float_colors), 1, 1); + ID3D10Device_UpdateSubresource(device, (ID3D10Resource *)src_buffer, 0, &box, float_colors, 0, 0); + + set_box(&box, 0, 0, 0, sizeof(float_colors), 0, 1); + ID3D10Device_CopySubresourceRegion(device, (ID3D10Resource *)dst_buffer, 0, + 0, 0, 0, (ID3D10Resource *)src_buffer, 0, &box); + draw_quad(&test_context); + check_texture_color(test_context.backbuffer, 0x00000000, 0); + + set_box(&box, 0, 0, 0, sizeof(float_colors), 1, 0); + ID3D10Device_CopySubresourceRegion(device, (ID3D10Resource *)dst_buffer, 0, + 0, 0, 0, (ID3D10Resource *)src_buffer, 0, &box); + draw_quad(&test_context); + check_texture_color(test_context.backbuffer, 0x00000000, 0); + + set_box(&box, 0, 0, 0, sizeof(float_colors), 0, 0); + ID3D10Device_CopySubresourceRegion(device, (ID3D10Resource *)dst_buffer, 0, + 0, 0, 0, (ID3D10Resource *)src_buffer, 0, &box); + draw_quad(&test_context); + check_texture_color(test_context.backbuffer, 0x00000000, 0); + + set_box(&box, 0, 0, 0, sizeof(float_colors), 1, 1); + ID3D10Device_CopySubresourceRegion(device, (ID3D10Resource *)dst_buffer, 0, + 0, 0, 0, (ID3D10Resource *)src_buffer, 0, &box); + draw_quad(&test_context); + get_texture_readback(test_context.backbuffer, &rb); + for (i = 0; i < 4; ++i) + { + for (j = 0; j < 4; ++j) + { + color = get_readback_color(&rb, 80 + j * 160, 60 + i * 120); + ok(compare_color(color, bitmap_data[j + i * 4], 1), + "Got unexpected color 0x%08x at (%u, %u), expected 0x%08x.\n", + color, j, i, bitmap_data[j + i * 4]); + } + } + release_texture_readback(&rb); + + ID3D10Buffer_Release(dst_buffer); + ID3D10Buffer_Release(src_buffer); + ID3D10PixelShader_Release(ps); release_test_context(&test_context); }
1
0
0
0
Józef Kucia : wined3d: Add support for buffers in wined3d_device_copy_sub_resource().
by Alexandre Julliard
21 Mar '16
21 Mar '16
Module: wine Branch: master Commit: 33e786565c9939e8efef073f564af7f7ed1d7c65 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33e786565c9939e8efef073f5…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Sun Mar 20 23:15:27 2016 +0100 wined3d: Add support for buffers in wined3d_device_copy_sub_resource(). 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/wined3d/device.c | 58 ++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 48 insertions(+), 10 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index bfbef48..5a523d3 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3922,6 +3922,14 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev device, dst_resource, dst_sub_resource_idx, dst_x, dst_y, dst_z, src_resource, src_sub_resource_idx, debug_box(src_box)); + if (src_box && (src_box->left >= src_box->right + || src_box->top >= src_box->bottom + || src_box->front >= src_box->back)) + { + WARN("Invalid box %s specified.\n", debug_box(src_box)); + return WINED3DERR_INVALIDCALL; + } + if (src_resource == dst_resource && src_sub_resource_idx == dst_sub_resource_idx) { WARN("Source and destination are the same sub-resource.\n"); @@ -3944,6 +3952,46 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev return WINED3DERR_INVALIDCALL; } + if (dst_resource->type == WINED3D_RTYPE_BUFFER) + { + unsigned int src_offset, size; + + if (dst_sub_resource_idx) + { + WARN("Invalid dst_sub_resource_idx %u.\n", dst_sub_resource_idx); + return WINED3DERR_INVALIDCALL; + } + if (src_sub_resource_idx) + { + WARN("Invalid src_sub_resource_idx %u.\n", src_sub_resource_idx); + return WINED3DERR_INVALIDCALL; + } + + if (src_box) + { + src_offset = src_box->left; + size = src_box->right - src_box->left; + } + else + { + src_offset = 0; + size = src_resource->size; + } + + if (src_offset > src_resource->size + || size > src_resource->size - src_offset + || dst_x > dst_resource->size + || size > dst_resource->size - dst_x) + { + WARN("Invalid range specified, dst_offset %u, src_offset %u, size %u.\n", + dst_x, src_offset, size); + return WINED3DERR_INVALIDCALL; + } + + return wined3d_buffer_copy(buffer_from_resource(dst_resource), dst_x, + buffer_from_resource(src_resource), src_offset, size); + } + if (dst_resource->type != WINED3D_RTYPE_TEXTURE_2D) { FIXME("Not implemented for %s resources.\n", debug_d3dresourcetype(dst_resource->type)); @@ -3967,19 +4015,9 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev src_surface = surface_from_resource(tmp); if (src_box) - { - if (src_box->front >= src_box->back) - { - WARN("Invalid box %s specified.\n", debug_box(src_box)); - return WINED3DERR_INVALIDCALL; - } - SetRect(&src_rect, src_box->left, src_box->top, src_box->right, src_box->bottom); - } else - { SetRect(&src_rect, 0, 0, src_surface->resource.width, src_surface->resource.height); - } SetRect(&dst_rect, dst_x, dst_y, dst_x + (src_rect.right - src_rect.left), dst_y + (src_rect.bottom - src_rect.top));
1
0
0
0
Józef Kucia : wined3d: Implement copying of buffer resources.
by Alexandre Julliard
21 Mar '16
21 Mar '16
Module: wine Branch: master Commit: 94039385f93bcebfbe7686446000dcea5c9c7230 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=94039385f93bcebfbe7686446…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Sun Mar 20 23:15:26 2016 +0100 wined3d: Implement copying of buffer resources. 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/wined3d/buffer.c | 86 +++++++++++++++++++++++++++++++++++++++++- dlls/wined3d/device.c | 9 +++++ dlls/wined3d/wined3d_private.h | 2 + 3 files changed, 95 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 1e66cae..70a7a20 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -42,9 +42,9 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); #define VB_MAXFULLCONVERSIONS 5 /* Number of full conversions before we stop converting */ #define VB_RESETFULLCONVS 20 /* Reset full conversion counts after that number of draws */ -static void buffer_invalidate_bo_range(struct wined3d_buffer *buffer, UINT offset, UINT size) +static void buffer_invalidate_bo_range(struct wined3d_buffer *buffer, unsigned int offset, unsigned int size) { - if (!offset && !size) + if (!offset && (!size || size == buffer->resource.size)) goto invalidate_all; if (offset > buffer->resource.size || offset + size > buffer->resource.size) @@ -1113,6 +1113,88 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer) } } +HRESULT wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_offset, + struct wined3d_buffer *src_buffer, unsigned int src_offset, unsigned int size) +{ + BYTE *dst_buffer_mem, *src_buffer_mem, *dst_ptr, *src_ptr; + struct wined3d_bo_address dst_bo_address, src_bo_address; + const struct wined3d_gl_info *gl_info; + struct wined3d_context *context; + struct wined3d_device *device; + HRESULT hr; + + device = dst_buffer->resource.device; + + context = context_acquire(device, NULL); + gl_info = context->gl_info; + + buffer_get_memory(dst_buffer, context, &dst_bo_address); + buffer_get_memory(src_buffer, context, &src_bo_address); + + dst_buffer_mem = dst_buffer->resource.heap_memory; + src_buffer_mem = src_buffer->resource.heap_memory; + + if (!dst_buffer_mem && !src_buffer_mem) + { + if (gl_info->supported[ARB_COPY_BUFFER]) + { + GL_EXTCALL(glBindBuffer(GL_COPY_READ_BUFFER, src_bo_address.buffer_object)); + GL_EXTCALL(glBindBuffer(GL_COPY_WRITE_BUFFER, dst_bo_address.buffer_object)); + GL_EXTCALL(glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, src_offset, dst_offset, size)); + checkGLcall("direct buffer copy"); + } + else + { + if (FAILED(hr = wined3d_buffer_map(dst_buffer, dst_offset, size, &dst_ptr, 0))) + { + WARN("Failed to map dst_buffer, hr %#x.\n", hr); + context_release(context); + return WINED3DERR_INVALIDCALL; + } + if (FAILED(hr = wined3d_buffer_map(src_buffer, src_offset, size, &src_ptr, WINED3D_MAP_READONLY))) + { + WARN("Failed to map src_buffer, hr %#x.\n", hr); + wined3d_buffer_unmap(dst_buffer); + context_release(context); + return WINED3DERR_INVALIDCALL; + } + + memcpy(dst_ptr, src_ptr, size); + + wined3d_buffer_unmap(src_buffer); + wined3d_buffer_unmap(dst_buffer); + } + } + else if (dst_buffer_mem && !src_buffer_mem) + { + if (src_buffer->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) + context_invalidate_state(context, STATE_INDEXBUFFER); + GL_EXTCALL(glBindBuffer(src_buffer->buffer_type_hint, src_bo_address.buffer_object)); + + GL_EXTCALL(glGetBufferSubData(src_buffer->buffer_type_hint, src_offset, size, dst_buffer_mem + dst_offset)); + checkGLcall("buffer download"); + } + else if (!dst_buffer_mem && src_buffer_mem) + { + if (dst_buffer->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB) + context_invalidate_state(context, STATE_INDEXBUFFER); + GL_EXTCALL(glBindBuffer(dst_buffer->buffer_type_hint, dst_bo_address.buffer_object)); + + GL_EXTCALL(glBufferSubData(dst_buffer->buffer_type_hint, dst_offset, size, src_buffer_mem + src_offset)); + checkGLcall("buffer upload"); + } + else + { + memcpy(dst_buffer_mem + dst_offset, src_buffer_mem + src_offset, size); + } + + if (dst_buffer_mem) + buffer_invalidate_bo_range(dst_buffer, dst_offset, size); + + context_release(context); + return WINED3D_OK; +} + HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer, const struct wined3d_box *box, const void *data) { diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index e428a79..bfbef48 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3865,6 +3865,15 @@ void CDECL wined3d_device_copy_resource(struct wined3d_device *device, return; } + if (dst_resource->type == WINED3D_RTYPE_BUFFER) + { + if (FAILED(hr = wined3d_buffer_copy(buffer_from_resource(dst_resource), 0, + buffer_from_resource(src_resource), 0, + dst_resource->size))) + ERR("Failed to copy buffer, hr %#x.\n", hr); + return; + } + if (dst_resource->type != WINED3D_RTYPE_TEXTURE_2D) { FIXME("Not implemented for %s resources.\n", debug_d3dresourcetype(dst_resource->type)); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 99f2e53..3dea1e3 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2903,6 +2903,8 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *This, struct wined3d_context *con void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct wined3d_state *state) DECLSPEC_HIDDEN; void buffer_mark_used(struct wined3d_buffer *buffer) DECLSPEC_HIDDEN; +HRESULT wined3d_buffer_copy(struct wined3d_buffer *dst_buffer, unsigned int dst_offset, + struct wined3d_buffer *src_buffer, unsigned int src_offset, unsigned int size) DECLSPEC_HIDDEN; HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer, const struct wined3d_box *box, const void *data) DECLSPEC_HIDDEN;
1
0
0
0
Józef Kucia : wined3d: Add extension detection for ARB_copy_buffer.
by Alexandre Julliard
21 Mar '16
21 Mar '16
Module: wine Branch: master Commit: 6a5a51be1b57c804b1fb2894594e4798e852c79f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6a5a51be1b57c804b1fb28945…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Sun Mar 20 23:15:25 2016 +0100 wined3d: Add extension detection for ARB_copy_buffer. 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/wined3d/directx.c | 4 ++++ dlls/wined3d/wined3d_gl.h | 1 + 2 files changed, 5 insertions(+) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index dd048fd..be3fdb0 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -109,6 +109,7 @@ static const struct wined3d_extension_map gl_extension_map[] = /* ARB */ {"GL_ARB_blend_func_extended", ARB_BLEND_FUNC_EXTENDED }, {"GL_ARB_color_buffer_float", ARB_COLOR_BUFFER_FLOAT }, + {"GL_ARB_copy_buffer", ARB_COPY_BUFFER }, {"GL_ARB_debug_output", ARB_DEBUG_OUTPUT }, {"GL_ARB_depth_buffer_float", ARB_DEPTH_BUFFER_FLOAT }, {"GL_ARB_depth_texture", ARB_DEPTH_TEXTURE }, @@ -2499,6 +2500,8 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info) USE_GL_FUNC(glGetFragDataIndex) /* GL_ARB_color_buffer_float */ USE_GL_FUNC(glClampColorARB) + /* GL_ARB_copy_buffer */ + USE_GL_FUNC(glCopyBufferSubData) /* GL_ARB_debug_output */ USE_GL_FUNC(glDebugMessageCallbackARB) USE_GL_FUNC(glDebugMessageControlARB) @@ -3452,6 +3455,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, DWORD * EXT_framebuffer_multisample and EXT_packed_depth_stencil * are integrated into ARB_framebuffer_object. */ + {ARB_COPY_BUFFER, MAKEDWORD_VERSION(3, 1)}, {ARB_DRAW_INSTANCED, MAKEDWORD_VERSION(3, 1)}, {ARB_UNIFORM_BUFFER_OBJECT, MAKEDWORD_VERSION(3, 1)}, {EXT_TEXTURE_SNORM, MAKEDWORD_VERSION(3, 1)}, diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index e344ff1..8943cb0 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -45,6 +45,7 @@ enum wined3d_gl_extension /* ARB */ ARB_BLEND_FUNC_EXTENDED, ARB_COLOR_BUFFER_FLOAT, + ARB_COPY_BUFFER, ARB_DEBUG_OUTPUT, ARB_DEPTH_BUFFER_FLOAT, ARB_DEPTH_TEXTURE,
1
0
0
0
Rob Walker : wined3d: Add Nvidia GPU SKUs 950,950M,960,960M.
by Alexandre Julliard
21 Mar '16
21 Mar '16
Module: wine Branch: master Commit: e4c75a88fde88a1f7d1bca38a18eb91c80dbbd77 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4c75a88fde88a1f7d1bca38a…
Author: Rob Walker <bob.mt.wya(a)gmail.com> Date: Sat Mar 19 12:31:25 2016 +0000 wined3d: Add Nvidia GPU SKUs 950,950M,960,960M. Signed-off-by: Rob Walker <bob.mt.wya(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/directx.c | 8 ++++++++ dlls/wined3d/wined3d_private.h | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index da66aac..dd048fd 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1281,6 +1281,10 @@ static const struct gpu_description gpu_description_table[] = {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX770, "NVIDIA GeForce GTX 770", DRIVER_NVIDIA_GEFORCE8, 2048}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX780, "NVIDIA GeForce GTX 780", DRIVER_NVIDIA_GEFORCE8, 3072}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX780TI, "NVIDIA GeForce GTX 780 Ti", DRIVER_NVIDIA_GEFORCE8, 3072}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX950, "NVIDIA GeForce GTX 950", DRIVER_NVIDIA_GEFORCE8, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX950M, "NVIDIA GeForce GTX 950M", DRIVER_NVIDIA_GEFORCE8, 4096}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX960, "NVIDIA GeForce GTX 960", DRIVER_NVIDIA_GEFORCE8, 4096}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX960M, "NVIDIA GeForce GTX 960M", DRIVER_NVIDIA_GEFORCE8, 2048}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX970, "NVIDIA GeForce GTX 970", DRIVER_NVIDIA_GEFORCE8, 4096}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX970M, "NVIDIA GeForce GTX 970M", DRIVER_NVIDIA_GEFORCE8, 3072}, @@ -1729,6 +1733,10 @@ cards_nvidia_binary[] = /* Direct 3D 11 */ {"GTX 970M", CARD_NVIDIA_GEFORCE_GTX970M}, /* GeForce 900 - highend mobile*/ {"GTX 970", CARD_NVIDIA_GEFORCE_GTX970}, /* GeForce 900 - highend */ + {"GTX 960M", CARD_NVIDIA_GEFORCE_GTX960M}, /* GeForce 900 - midend high mobile */ + {"GTX 960", CARD_NVIDIA_GEFORCE_GTX960}, /* GeForce 900 - midend high */ + {"GTX 950M", CARD_NVIDIA_GEFORCE_GTX950M}, /* GeForce 900 - midend mobile */ + {"GTX 950", CARD_NVIDIA_GEFORCE_GTX950}, /* GeForce 900 - midend */ {"GTX 780 Ti", CARD_NVIDIA_GEFORCE_GTX780TI}, /* Geforce 700 - highend */ {"GTX 780", CARD_NVIDIA_GEFORCE_GTX780}, /* Geforce 700 - highend */ {"GTX 770M", CARD_NVIDIA_GEFORCE_GTX770M}, /* Geforce 700 - midend high mobile */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 1a5feeb..99f2e53 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1716,6 +1716,10 @@ enum wined3d_pci_device CARD_NVIDIA_GEFORCE_GTX770 = 0x1184, CARD_NVIDIA_GEFORCE_GTX780 = 0x1004, CARD_NVIDIA_GEFORCE_GTX780TI = 0x100a, + CARD_NVIDIA_GEFORCE_GTX950 = 0x1402, + CARD_NVIDIA_GEFORCE_GTX950M = 0x139a, + CARD_NVIDIA_GEFORCE_GTX960 = 0x1401, + CARD_NVIDIA_GEFORCE_GTX960M = 0x139B, CARD_NVIDIA_GEFORCE_GTX970 = 0x13c2, CARD_NVIDIA_GEFORCE_GTX970M = 0x13d8,
1
0
0
0
Hugh McMaster : kernel32: Add a stub for SetCurrentConsoleFontEx.
by Alexandre Julliard
21 Mar '16
21 Mar '16
Module: wine Branch: master Commit: 408205cb0488a8ae6e8062691ec8eef8207da085 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=408205cb0488a8ae6e8062691…
Author: Hugh McMaster <hugh.mcmaster(a)outlook.com> Date: Mon Mar 21 18:53:57 2016 +1100 kernel32: Add a stub for SetCurrentConsoleFontEx. Signed-off-by: Hugh McMaster <hugh.mcmaster(a)outlook.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/console.c | 7 +++++++ dlls/kernel32/kernel32.spec | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c index b86cd8e..57c0b36 100644 --- a/dlls/kernel32/console.c +++ b/dlls/kernel32/console.c @@ -3346,3 +3346,10 @@ BOOL WINAPI SetConsoleScreenBufferInfoEx(HANDLE hConsole, CONSOLE_SCREEN_BUFFER_ SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } + +BOOL WINAPI SetCurrentConsoleFontEx(HANDLE hConsole, BOOL maxwindow, CONSOLE_FONT_INFOEX *cfix) +{ + FIXME("(%p %d %p): stub!\n", hConsole, maxwindow, cfix); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} diff --git a/dlls/kernel32/kernel32.spec b/dlls/kernel32/kernel32.spec index 9bb3181..d606d9b 100644 --- a/dlls/kernel32/kernel32.spec +++ b/dlls/kernel32/kernel32.spec @@ -1369,7 +1369,7 @@ @ stdcall SetConsoleTitleW(wstr) @ stdcall SetConsoleWindowInfo(long long ptr) @ stdcall SetCriticalSectionSpinCount(ptr long) ntdll.RtlSetCriticalSectionSpinCount -# @ stub SetCurrentConsoleFontEx +@ stdcall SetCurrentConsoleFontEx(long long ptr) @ stdcall SetCurrentDirectoryA(str) @ stdcall SetCurrentDirectoryW(wstr) @ stub SetDaylightFlag
1
0
0
0
Nikolay Sivov : include: Added shimgdata.idl.
by Alexandre Julliard
21 Mar '16
21 Mar '16
Module: wine Branch: master Commit: 233545efcb8ecc41c4bdf160db647eb402f005b1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=233545efcb8ecc41c4bdf160d…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Mon Mar 21 11:56:21 2016 +0300 include: Added shimgdata.idl. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/Makefile.in | 1 + include/shimgdata.idl | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+) diff --git a/include/Makefile.in b/include/Makefile.in index 596c0c9..8283616 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -137,6 +137,7 @@ IDL_SRCS = \ servprov.idl \ sesprp.idl \ shdeprecated.idl \ + shimgdata.idl \ shldisp.idl \ shobjidl.idl \ shtypes.idl \ diff --git a/include/shimgdata.idl b/include/shimgdata.idl new file mode 100644 index 0000000..2e84298 --- /dev/null +++ b/include/shimgdata.idl @@ -0,0 +1,93 @@ +/* + * Copyright 2016 Nikolay Sivov For CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "unknwn.idl"; +import "propidl.idl"; + +cpp_quote("#ifndef _GDIPLUSPIXELFORMATS_H") +typedef DWORD PixelFormat; +cpp_quote("#endif") + +cpp_quote("#ifndef _GDIPLUSENUMS_H") +typedef DWORD InterpolationMode; +cpp_quote("#endif") + +cpp_quote("#ifndef _GDIPLUSHEADERS_H") +typedef BYTE EncoderParameters; +typedef BYTE Image; +cpp_quote("#endif") + +[ + object, + uuid(53fb8e58-50c0-4003-b4aa-0c8df28e7f3a) +] +interface IShellImageDataAbort : IUnknown +{ + HRESULT QueryAbort(); +} + +[ + object, + local, + uuid(bfdeec12-8040-4403-a5ea-9e07dafcf530) +] +interface IShellImageData : IUnknown +{ + HRESULT Decode([in] DWORD flags, [in] ULONG cx_desired, [in] ULONG cy_desired); + HRESULT Draw([in] HDC hdc, [in] RECT *dest, [in] RECT *src); + HRESULT NextFrame(); + HRESULT NextPage(); + HRESULT PrevPage(); + HRESULT IsTransparent(); + HRESULT IsAnimated(); + HRESULT IsVector(); + HRESULT IsMultipage(); + HRESULT IsEditable(); + HRESULT IsPrintable(); + HRESULT IsDecoded(); + HRESULT GetCurrentPage([out] ULONG *page); + HRESULT GetPageCount([out] ULONG *count); + HRESULT SelectPage([in] ULONG page); + HRESULT GetSize([out] SIZE *size); + HRESULT GetRawDataFormat([out] GUID *format); + HRESULT GetPixelFormat([out] PixelFormat *format); + HRESULT GetDelay([out] DWORD *delay); + HRESULT GetProperties([in] DWORD mode, [out] IPropertySetStorage **props); + HRESULT Rotate([in] DWORD angle); + HRESULT Scale([in] ULONG cx, [in] ULONG cy, [in] InterpolationMode mode); + HRESULT DiscardEdit(); + HRESULT SetEncoderParams([in] IPropertyBag *params); + HRESULT DisplayName([size_is(count), in, out] LPWSTR name, UINT count); + HRESULT GetResolution([out] ULONG *res_x, [out] ULONG *res_y); + HRESULT GetEncoderParams([in] GUID *format, [out] EncoderParameters **params); + HRESULT RegisterAbort([in] IShellImageDataAbort *abort, [out] IShellImageDataAbort **prev); + HRESULT CloneFrame([out] Image **frame); + HRESULT ReplaceFrame([in] Image *frame); +} + +[ + object, + uuid(9be8ed5c-edab-4d75-90f3-bd5bdbb21c82) +] +interface IShellImageDataFactory : IUnknown +{ + HRESULT CreateIShellImageData([out] IShellImageData **data); + HRESULT CreateImageFromFile([in] LPCWSTR path, [out] IShellImageData **data); + HRESULT CreateImageFromStream([in] IStream *stream, [out] IShellImageData **data); + HRESULT GetDataFormatFromPath([in] LPCWSTR path, [out] GUID *format); +}
1
0
0
0
← Newer
1
...
27
28
29
30
31
32
33
...
73
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
Results per page:
10
25
50
100
200