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
December 2018
----- 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
1 participants
352 discussions
Start a n
N
ew thread
Zhiyi Zhang : vulkan-1/tests: Add tests for vkGetPhysicalDeviceProperties2.
by Alexandre Julliard
20 Dec '18
20 Dec '18
Module: wine Branch: master Commit: ee61493d9c3b253a9aebd5bae33ef8f32c7e77fa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ee61493d9c3b253a9aebd5ba…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Wed Dec 19 23:15:12 2018 +0100 vulkan-1/tests: Add tests for vkGetPhysicalDeviceProperties2. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vulkan-1/tests/vulkan.c | 64 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/dlls/vulkan-1/tests/vulkan.c b/dlls/vulkan-1/tests/vulkan.c index 4143af7..9a93e2a 100644 --- a/dlls/vulkan-1/tests/vulkan.c +++ b/dlls/vulkan-1/tests/vulkan.c @@ -158,6 +158,69 @@ static void enumerate_physical_device(VkPhysicalDevice vk_physical_device) VK_VERSION_PATCH(properties.apiVersion)); } +static void test_enumerate_physical_device2(void) +{ + static const char *procs[] = {"vkGetPhysicalDeviceProperties2", "vkGetPhysicalDeviceProperties2KHR"}; + static const char *extensions[] = {VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME}; + PFN_vkGetPhysicalDeviceProperties2 pfn_vkGetPhysicalDeviceProperties2; + VkPhysicalDeviceProperties2 properties2; + VkPhysicalDevice *vk_physical_devices; + VkPhysicalDeviceIDProperties id; + VkInstance vk_instance; + unsigned int i, j; + const LUID *luid; + uint32_t count; + VkResult vr; + + if ((vr = create_instance_skip(ARRAY_SIZE(extensions), extensions, &vk_instance)) < 0) + return; + ok(vr == VK_SUCCESS, "Got unexpected VkResult %d.\n", vr); + + vr = vkEnumeratePhysicalDevices(vk_instance, &count, NULL); + ok(vr == VK_SUCCESS, "Got unexpected VkResult %d.\n", vr); + if (!count) + { + skip("No physical devices.\n"); + vkDestroyInstance(vk_instance, NULL); + return; + } + + vk_physical_devices = heap_calloc(count, sizeof(*vk_physical_devices)); + ok(!!vk_physical_devices, "Failed to allocate memory.\n"); + vr = vkEnumeratePhysicalDevices(vk_instance, &count, vk_physical_devices); + ok(vr == VK_SUCCESS, "Got unexpected VkResult %d.\n", vr); + + for (i = 0; i < ARRAY_SIZE(procs); ++i) + { + pfn_vkGetPhysicalDeviceProperties2 + = (PFN_vkGetPhysicalDeviceProperties2)vkGetInstanceProcAddr(vk_instance, procs[i]); + if (!pfn_vkGetPhysicalDeviceProperties2) + { + skip("%s is not available.\n", procs[i]); + continue; + } + + for (j = 0; j < count; ++j) + { + properties2.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2; + properties2.pNext = &id; + + memset(&id, 0, sizeof(id)); + id.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_ID_PROPERTIES; + + pfn_vkGetPhysicalDeviceProperties2(vk_physical_devices[j], &properties2); + luid = (const LUID *)id.deviceLUID; + trace("Device '%s', device UUID: %s, driver UUID: %s, device LUID: %08x:%08x.\n", + properties2.properties.deviceName, wine_dbgstr_guid((const GUID *)id.deviceUUID), + wine_dbgstr_guid((const GUID *)id.driverUUID), luid->HighPart, luid->LowPart); + todo_wine ok(id.deviceLUIDValid == VK_TRUE, "Expected valid device LUID.\n"); + } + } + + heap_free(vk_physical_devices); + vkDestroyInstance(vk_instance, NULL); +} + static void enumerate_device_queues(VkPhysicalDevice vk_physical_device) { VkPhysicalDeviceProperties device_properties; @@ -359,6 +422,7 @@ START_TEST(vulkan) { test_instance_version(); for_each_device(enumerate_physical_device); + test_enumerate_physical_device2(); for_each_device(enumerate_device_queues); test_physical_device_groups(); for_each_device(test_destroy_command_pool);
1
0
0
0
Serge Gautherie : d3dcompiler: Fix dxbc_init() function prototype.
by Alexandre Julliard
20 Dec '18
20 Dec '18
Module: wine Branch: master Commit: ffe9346120ca74f193d8a31d0b6a48eb55604d2b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ffe9346120ca74f193d8a31d…
Author: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Date: Wed Dec 19 23:06:46 2018 +0100 d3dcompiler: Fix dxbc_init() function prototype. Signed-off-by: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dcompiler_43/d3dcompiler_private.h | 2 +- dlls/d3dcompiler_43/utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h index 1eea0d2..68ff962 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_private.h +++ b/dlls/d3dcompiler_43/d3dcompiler_private.h @@ -1214,7 +1214,7 @@ HRESULT dxbc_write_blob(struct dxbc *dxbc, ID3DBlob **blob) DECLSPEC_HIDDEN; void dxbc_destroy(struct dxbc *dxbc) DECLSPEC_HIDDEN; HRESULT dxbc_parse(const char *data, SIZE_T data_size, struct dxbc *dxbc) DECLSPEC_HIDDEN; HRESULT dxbc_add_section(struct dxbc *dxbc, DWORD tag, const char *data, DWORD data_size) DECLSPEC_HIDDEN; -HRESULT dxbc_init(struct dxbc *dxbc, DWORD count) DECLSPEC_HIDDEN; +HRESULT dxbc_init(struct dxbc *dxbc, unsigned int size) DECLSPEC_HIDDEN; static inline void read_dword(const char **ptr, DWORD *d) { diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c index b872e34..95a1dbd 100644 --- a/dlls/d3dcompiler_43/utils.c +++ b/dlls/d3dcompiler_43/utils.c @@ -557,7 +557,7 @@ HRESULT dxbc_add_section(struct dxbc *dxbc, DWORD tag, const char *data, DWORD d return S_OK; } -HRESULT dxbc_init(struct dxbc *dxbc, UINT size) +HRESULT dxbc_init(struct dxbc *dxbc, unsigned int size) { TRACE("dxbc %p, size %u.\n", dxbc, size);
1
0
0
0
Zebediah Figura : dinput: Use the global module instance handle to load resources.
by Alexandre Julliard
20 Dec '18
20 Dec '18
Module: wine Branch: master Commit: d507549038f7e0555e077ab9374eb16b8f7b06db URL:
https://source.winehq.org/git/wine.git/?a=commit;h=d507549038f7e0555e077ab9…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Dec 19 15:41:13 2018 -0600 dinput: Use the global module instance handle to load resources. This fixes a regression introduced by 56345c8757887431ada9f2347b43fc372d72872a. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46323
Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/config.c | 8 ++++---- dlls/dinput/dinput_main.c | 2 +- dlls/dinput/dinput_private.h | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dlls/dinput/config.c b/dlls/dinput/config.c index bb36db0..885f1f4 100644 --- a/dlls/dinput/config.c +++ b/dlls/dinput/config.c @@ -86,7 +86,6 @@ static BOOL CALLBACK collect_devices(LPCDIDEVICEINSTANCEW lpddi, IDirectInputDev */ static void init_listview_columns(HWND dialog) { - HINSTANCE hinstance = (HINSTANCE) GetWindowLongPtrW(dialog, GWLP_HINSTANCE); LVCOLUMNW listColumn; RECT viewRect; int width; @@ -95,7 +94,7 @@ static void init_listview_columns(HWND dialog) GetClientRect(GetDlgItem(dialog, IDC_DEVICEOBJECTSLIST), &viewRect); width = (viewRect.right - viewRect.left)/2; - LoadStringW(hinstance, IDS_OBJECTCOLUMN, column, ARRAY_SIZE(column)); + LoadStringW(DINPUT_instance, IDS_OBJECTCOLUMN, column, ARRAY_SIZE(column)); listColumn.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM; listColumn.pszText = column; listColumn.cchTextMax = lstrlenW(listColumn.pszText); @@ -103,7 +102,7 @@ static void init_listview_columns(HWND dialog) SendDlgItemMessageW (dialog, IDC_DEVICEOBJECTSLIST, LVM_INSERTCOLUMNW, 0, (LPARAM) &listColumn); - LoadStringW(hinstance, IDS_ACTIONCOLUMN, column, ARRAY_SIZE(column)); + LoadStringW(DINPUT_instance, IDS_ACTIONCOLUMN, column, ARRAY_SIZE(column)); listColumn.cx = width; listColumn.pszText = column; listColumn.cchTextMax = lstrlenW(listColumn.pszText); @@ -453,7 +452,8 @@ HRESULT _configure_devices(IDirectInput8W *iface, InitCommonControls(); - DialogBoxParamW(GetModuleHandleA("dinput.dll"), (LPCWSTR) MAKEINTRESOURCE(IDD_CONFIGUREDEVICES), lpdiCDParams->hwnd, ConfigureDevicesDlgProc, (LPARAM) &data); + DialogBoxParamW(DINPUT_instance, (const WCHAR *)MAKEINTRESOURCE(IDD_CONFIGUREDEVICES), + lpdiCDParams->hwnd, ConfigureDevicesDlgProc, (LPARAM)&data); return DI_OK; } diff --git a/dlls/dinput/dinput_main.c b/dlls/dinput/dinput_main.c index 6ed764e..7074704 100644 --- a/dlls/dinput/dinput_main.c +++ b/dlls/dinput/dinput_main.c @@ -93,7 +93,7 @@ static const struct dinput_device *dinput_devices[] = &joystick_osx_device }; -static HINSTANCE DINPUT_instance = NULL; +HINSTANCE DINPUT_instance; static BOOL check_hook_thread(void); static CRITICAL_SECTION dinput_hook_crit; diff --git a/dlls/dinput/dinput_private.h b/dlls/dinput/dinput_private.h index 6c93e16..abdfbeb 100644 --- a/dlls/dinput/dinput_private.h +++ b/dlls/dinput/dinput_private.h @@ -27,6 +27,8 @@ #include "dinputd.h" #include "wine/list.h" +extern HINSTANCE DINPUT_instance; + /* Implementation specification */ typedef struct IDirectInputImpl IDirectInputImpl; struct IDirectInputImpl
1
0
0
0
Zebediah Figura : dinput8: Include common resources from dinput.
by Alexandre Julliard
20 Dec '18
20 Dec '18
Module: wine Branch: master Commit: feb23d367f7b3d457053b8f48237e6abe9ef9231 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=feb23d367f7b3d457053b8f4…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Dec 19 15:41:12 2018 -0600 dinput8: Include common resources from dinput. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput8/Makefile.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/dinput8/Makefile.in b/dlls/dinput8/Makefile.in index 6b62969..53cd0c3 100644 --- a/dlls/dinput8/Makefile.in +++ b/dlls/dinput8/Makefile.in @@ -20,4 +20,5 @@ C_SRCS = \ IDL_SRCS = dinput8.idl -RC_SRCS = version.rc +RC_SRCS = \ + version.rc
1
0
0
0
Zebediah Figura : dinput: Move the version resource to a separate file.
by Alexandre Julliard
20 Dec '18
20 Dec '18
Module: wine Branch: master Commit: a8ce68333cc905c3f1c93eef6f4a2e24dd59c101 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a8ce68333cc905c3f1c93eef…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Wed Dec 19 15:41:11 2018 -0600 dinput: Move the version resource to a separate file. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dinput/Makefile.in | 4 +++- dlls/dinput/dinput.rc | 9 --------- dlls/dinput/version.rc | 26 ++++++++++++++++++++++++++ po/ar.po | 22 +++++++++++----------- po/bg.po | 22 +++++++++++----------- po/ca.po | 22 +++++++++++----------- po/cs.po | 22 +++++++++++----------- po/da.po | 22 +++++++++++----------- po/de.po | 22 +++++++++++----------- po/el.po | 22 +++++++++++----------- po/en.po | 22 +++++++++++----------- po/en_US.po | 22 +++++++++++----------- po/eo.po | 22 +++++++++++----------- po/es.po | 22 +++++++++++----------- po/fa.po | 22 +++++++++++----------- po/fi.po | 22 +++++++++++----------- po/fr.po | 22 +++++++++++----------- po/he.po | 22 +++++++++++----------- po/hi.po | 22 +++++++++++----------- po/hr.po | 22 +++++++++++----------- po/hu.po | 22 +++++++++++----------- po/it.po | 22 +++++++++++----------- po/ja.po | 22 +++++++++++----------- po/ko.po | 22 +++++++++++----------- po/lt.po | 22 +++++++++++----------- po/ml.po | 22 +++++++++++----------- po/nb_NO.po | 22 +++++++++++----------- po/nl.po | 22 +++++++++++----------- po/or.po | 22 +++++++++++----------- po/pa.po | 22 +++++++++++----------- po/pl.po | 22 +++++++++++----------- po/pt_BR.po | 22 +++++++++++----------- po/pt_PT.po | 22 +++++++++++----------- po/rm.po | 22 +++++++++++----------- po/ro.po | 22 +++++++++++----------- po/ru.po | 22 +++++++++++----------- po/sk.po | 22 +++++++++++----------- po/sl.po | 22 +++++++++++----------- po/sr_RS(a)cyrillic.po | 22 +++++++++++----------- po/sr_RS(a)latin.po | 22 +++++++++++----------- po/sv.po | 22 +++++++++++----------- po/te.po | 22 +++++++++++----------- po/th.po | 22 +++++++++++----------- po/tr.po | 22 +++++++++++----------- po/uk.po | 22 +++++++++++----------- po/wa.po | 22 +++++++++++----------- po/wine.pot | 22 +++++++++++----------- po/zh_CN.po | 22 +++++++++++----------- po/zh_TW.po | 22 +++++++++++----------- 49 files changed, 535 insertions(+), 516 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=a8ce68333cc905c3f1c9…
1
0
0
0
Józef Kucia : vkd3d-shader: Implement DXBC checksum for root signatures.
by Alexandre Julliard
20 Dec '18
20 Dec '18
Module: vkd3d Branch: master Commit: 49e55dd6391aa5c08dcffd95f380e94a98b99140 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=49e55dd6391aa5c08dcffd9…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Dec 17 21:25:54 2018 +0100 vkd3d-shader: Implement DXBC checksum for root signatures. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d-shader/checksum.c | 73 +++++++++++++++++++++----------- libs/vkd3d-shader/dxbc.c | 6 ++- libs/vkd3d-shader/vkd3d_shader_private.h | 6 +-- tests/d3d12.c | 9 +--- 4 files changed, 56 insertions(+), 38 deletions(-) diff --git a/libs/vkd3d-shader/checksum.c b/libs/vkd3d-shader/checksum.c index d2929da..b9a7140 100644 --- a/libs/vkd3d-shader/checksum.c +++ b/libs/vkd3d-shader/checksum.c @@ -35,11 +35,15 @@ #include "vkd3d_shader_private.h" +#define DXBC_CHECKSUM_BLOCK_SIZE 64 + +STATIC_ASSERT(sizeof(unsigned int) == 4); + struct md5_ctx { unsigned int i[2]; unsigned int buf[4]; - unsigned char in[64]; + unsigned char in[DXBC_CHECKSUM_BLOCK_SIZE]; unsigned char digest[16]; }; @@ -163,7 +167,7 @@ static void byte_reverse(unsigned char *buf, unsigned longs) * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious * initialization constants. */ -void md5_init(struct md5_ctx *ctx) +static void md5_init(struct md5_ctx *ctx) { ctx->buf[0] = 0x67452301; ctx->buf[1] = 0xefcdab89; @@ -177,7 +181,7 @@ void md5_init(struct md5_ctx *ctx) * Update context to reflect the concatenation of another buffer full * of bytes. */ -void md5_update(struct md5_ctx *ctx, const unsigned char *buf, unsigned int len) +static void md5_update(struct md5_ctx *ctx, const unsigned char *buf, unsigned int len) { unsigned int t; @@ -194,7 +198,7 @@ void md5_update(struct md5_ctx *ctx, const unsigned char *buf, unsigned int len) if (t) { unsigned char *p = (unsigned char *)ctx->in + t; - t = 64 - t; + t = DXBC_CHECKSUM_BLOCK_SIZE - t; if (len < t) { @@ -212,27 +216,25 @@ void md5_update(struct md5_ctx *ctx, const unsigned char *buf, unsigned int len) } /* Process data in 64-byte chunks */ - while (len >= 64) + while (len >= DXBC_CHECKSUM_BLOCK_SIZE) { - memcpy(ctx->in, buf, 64); + memcpy(ctx->in, buf, DXBC_CHECKSUM_BLOCK_SIZE); byte_reverse(ctx->in, 16); md5_transform(ctx->buf, (unsigned int *)ctx->in); - buf += 64; - len -= 64; + buf += DXBC_CHECKSUM_BLOCK_SIZE; + len -= DXBC_CHECKSUM_BLOCK_SIZE; } /* Handle any remaining bytes of data. */ memcpy(ctx->in, buf, len); } -/* - * Final wrapup - pad to 64-byte boundary with the bit pattern - * 1 0* (64-bit count of bits processed, MSB-first) - */ -void md5_final(struct md5_ctx *ctx) +static void dxbc_checksum_final(struct md5_ctx *ctx) { + unsigned int padding; + unsigned int length; unsigned int count; unsigned char *p; @@ -243,34 +245,57 @@ void md5_final(struct md5_ctx *ctx) always at least one byte free */ p = ctx->in + count; *p++ = 0x80; + ++count; /* Bytes of padding needed to make 64 bytes */ - count = 64 - 1 - count; + padding = DXBC_CHECKSUM_BLOCK_SIZE - count; /* Pad out to 56 mod 64 */ - if (count < 8) + if (padding < 8) { /* Two lots of padding: Pad the first block to 64 bytes */ - memset(p, 0, count); + memset(p, 0, padding); byte_reverse(ctx->in, 16); md5_transform(ctx->buf, (unsigned int *)ctx->in); - /* Now fill the next block with 56 bytes */ - memset(ctx->in, 0, 56); + /* Now fill the next block */ + memset(ctx->in, 0, DXBC_CHECKSUM_BLOCK_SIZE); } else { - /* Pad block to 56 bytes */ - memset(p, 0, count - 8); - } + /* Make place for bitcount at the beginning of the block */ + memmove(&ctx->in[4], ctx->in, count); - byte_reverse(ctx->in, 14); + /* Pad block to 60 bytes */ + memset(p + 4, 0, padding - 4); + } /* Append length in bits and transform */ - ((unsigned int *)ctx->in)[14] = ctx->i[0]; - ((unsigned int *)ctx->in)[15] = ctx->i[1]; + length = ctx->i[0]; + memcpy(&ctx->in[0], &length, sizeof(length)); + byte_reverse(&ctx->in[4], 14); + length = ctx->i[0] >> 2 | 0x1; + memcpy(&ctx->in[DXBC_CHECKSUM_BLOCK_SIZE - 4], &length, sizeof(length)); md5_transform(ctx->buf, (unsigned int *)ctx->in); byte_reverse((unsigned char *)ctx->buf, 4); memcpy(ctx->digest, ctx->buf, 16); } + +#define DXBC_CHECKSUM_SKIP_BYTE_COUNT 20 + +void vkd3d_compute_dxbc_checksum(const void *dxbc, size_t size, uint32_t checksum[4]) +{ + const uint8_t *ptr = dxbc; + struct md5_ctx ctx; + + assert(size > DXBC_CHECKSUM_SKIP_BYTE_COUNT); + ptr += DXBC_CHECKSUM_SKIP_BYTE_COUNT; + size -= DXBC_CHECKSUM_SKIP_BYTE_COUNT; + + md5_init(&ctx); + md5_update(&ctx, ptr, size); + dxbc_checksum_final(&ctx); + + memcpy(checksum, ctx.digest, sizeof(ctx.digest)); +} diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c index b199749..4b36ea6 100644 --- a/libs/vkd3d-shader/dxbc.c +++ b/libs/vkd3d-shader/dxbc.c @@ -2389,7 +2389,7 @@ static int shader_write_root_signature_header(struct root_signature_writer_conte if (!write_dword(context, TAG_DXBC)) return VKD3D_ERROR_OUT_OF_MEMORY; - WARN("DXBC checksum is not implemented.\n"); + /* The checksum is computed when all data is generated. */ if (!write_dwords(context, 4, 0x00000000)) return VKD3D_ERROR_OUT_OF_MEMORY; @@ -2596,6 +2596,7 @@ int vkd3d_shader_serialize_root_signature(const struct vkd3d_root_signature_desc { struct root_signature_writer_context context; size_t total_size, chunk_size; + uint32_t checksum[4]; int ret; TRACE("root_signature %p, version %#x, dxbc %p.\n", root_signature, version, dxbc); @@ -2628,5 +2629,8 @@ int vkd3d_shader_serialize_root_signature(const struct vkd3d_root_signature_desc dxbc->code = context.data; dxbc->size = total_size; + vkd3d_compute_dxbc_checksum(dxbc->code, dxbc->size, checksum); + memcpy((uint32_t *)dxbc->code + 1, checksum, sizeof(checksum)); + return VKD3D_OK; } diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index e0fad68..bf2f455 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -815,11 +815,7 @@ int vkd3d_dxbc_compiler_generate_spirv(struct vkd3d_dxbc_compiler *compiler, struct vkd3d_shader_code *spirv) DECLSPEC_HIDDEN; void vkd3d_dxbc_compiler_destroy(struct vkd3d_dxbc_compiler *compiler) DECLSPEC_HIDDEN; -struct md5_ctx; - -void md5_init(struct md5_ctx *ctx) DECLSPEC_HIDDEN; -void md5_update(struct md5_ctx *ctx, const unsigned char *buf, unsigned int len) DECLSPEC_HIDDEN; -void md5_final(struct md5_ctx *ctx) DECLSPEC_HIDDEN; +void vkd3d_compute_dxbc_checksum(const void *dxbc, size_t size, uint32_t checksum[4]) DECLSPEC_HIDDEN; static inline enum vkd3d_component_type vkd3d_component_type_from_data_type( enum vkd3d_data_type data_type) diff --git a/tests/d3d12.c b/tests/d3d12.c index 7d67de2..314f08a 100644 --- a/tests/d3d12.c +++ b/tests/d3d12.c @@ -9107,14 +9107,7 @@ static void test_root_signature_serialization_(unsigned int line, const DWORD *c ok_(line)(blob_size == code_size, "Got size %u, expected %u.\n", (unsigned int)blob_size, (unsigned int)code_size); - ok_(line)(blob_buffer[0] == code[0], "Got magic %#x, expected %#x.\n", - (unsigned int)blob_buffer[0], (unsigned int)code[0]); - for (i = 1; i < 5; ++i) - { - todo ok_(line)(blob_buffer[i] == code[i], "Got checksum %#x, expected %#x at %u.\n", - (unsigned int)blob_buffer[i], (unsigned int)code[i], i - 1); - } - for (; i < code_size / sizeof(DWORD); ++i) + for (i = 0; i < code_size / sizeof(DWORD); ++i) { ok_(line)(blob_buffer[i] == code[i], "Got dword %#x, expected %#x at %u.\n", (unsigned int)blob_buffer[i], (unsigned int)code[i], i);
1
0
0
0
Józef Kucia : vkd3d-shader: Import MD5 implementation from Wine.
by Alexandre Julliard
20 Dec '18
20 Dec '18
Module: vkd3d Branch: master Commit: 3795add8787075d130cf575cc6db8e4d1afcc6ce URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=3795add8787075d130cf575…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Mon Dec 17 21:21:15 2018 +0100 vkd3d-shader: Import MD5 implementation from Wine. With style changes. 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> --- Makefile.am | 1 + libs/vkd3d-shader/checksum.c | 276 +++++++++++++++++++++++++++++++ libs/vkd3d-shader/vkd3d_shader_private.h | 6 + 3 files changed, 283 insertions(+) Diff:
https://source.winehq.org/git/vkd3d.git/?a=commitdiff;h=3795add8787075d130c…
1
0
0
0
Sven Baars : gdiplus: Fix a memory leak (Valgrind).
by Alexandre Julliard
19 Dec '18
19 Dec '18
Module: wine Branch: master Commit: 3d5036e31769b0400d6cea08460e7fdb1cbf3556 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3d5036e31769b0400d6cea08…
Author: Sven Baars <sven.wine(a)gmail.com> Date: Wed Dec 19 21:10:15 2018 +0100 gdiplus: Fix a memory leak (Valgrind). Signed-off-by: Sven Baars <sven.wine(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/gdiplus/font.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c index 729592b..5e6aa54 100644 --- a/dlls/gdiplus/font.c +++ b/dlls/gdiplus/font.c @@ -1125,6 +1125,7 @@ GpStatus WINGDIPAPI GdipDeletePrivateFontCollection(GpFontCollection **fontColle return InvalidParameter; for (i = 0; i < (*fontCollection)->count; i++) heap_free((*fontCollection)->FontFamilies[i]); + heap_free((*fontCollection)->FontFamilies); heap_free(*fontCollection); return Ok;
1
0
0
0
Sven Baars : windowscodecs/tests: Fix a memory leak (Valgrind).
by Alexandre Julliard
19 Dec '18
19 Dec '18
Module: wine Branch: master Commit: a77c7626dd0ebea1f7fa0bbbf2edbcd7a209bb10 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a77c7626dd0ebea1f7fa0bbb…
Author: Sven Baars <sven.wine(a)gmail.com> Date: Tue Dec 18 20:44:16 2018 +0100 windowscodecs/tests: Fix a memory leak (Valgrind). Signed-off-by: Sven Baars <sven.wine(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/tests/pngformat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/windowscodecs/tests/pngformat.c b/dlls/windowscodecs/tests/pngformat.c index d08a5fb..8c33d3b 100644 --- a/dlls/windowscodecs/tests/pngformat.c +++ b/dlls/windowscodecs/tests/pngformat.c @@ -306,6 +306,8 @@ static HRESULT create_decoder(const void *image_data, UINT image_size, IWICBitma refcount = IStream_Release(stream); ok(refcount > 0, "expected stream refcount > 0\n"); } + else + IStream_Release(stream); return hr; }
1
0
0
0
Sven Baars : windowscodecs: Fix a memory leak (Valgrind).
by Alexandre Julliard
19 Dec '18
19 Dec '18
Module: wine Branch: master Commit: 7a32035fc5701bf7a292848d27d7b6039d36243f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7a32035fc5701bf7a292848d…
Author: Sven Baars <sven.wine(a)gmail.com> Date: Tue Dec 18 20:44:17 2018 +0100 windowscodecs: Fix a memory leak (Valgrind). Signed-off-by: Sven Baars <sven.wine(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/imgfactory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/windowscodecs/imgfactory.c b/dlls/windowscodecs/imgfactory.c index fb235fb..40f3ed5 100644 --- a/dlls/windowscodecs/imgfactory.c +++ b/dlls/windowscodecs/imgfactory.c @@ -185,6 +185,7 @@ static HRESULT find_decoder(IStream *pIStream, const GUID *pguidVendor, IWICBitmapDecoder_Release(*decoder); IWICBitmapDecoderInfo_Release(decoderinfo); IUnknown_Release(unkdecoderinfo); + IEnumUnknown_Release(enumdecoders); *decoder = NULL; return res; }
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
36
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
Results per page:
10
25
50
100
200