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
July 2018
----- 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
405 discussions
Start a n
N
ew thread
Jacek Caban : wine/vulkan.h: Properly declare enum values that use value attribute in spec.
by Alexandre Julliard
20 Jul '18
20 Jul '18
Module: wine Branch: master Commit: 427f3599103cf07de45e6dc008dbbd5dcc5f183b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=427f3599103cf07de45e6dc0…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Fri Jul 20 12:49:06 2018 +0200 wine/vulkan.h: Properly declare enum values that use value attribute in spec. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/make_vulkan | 12 +++++++----- include/wine/vulkan.h | 5 ++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index a7dc040..fe742b7 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -2490,11 +2490,12 @@ class VkRegistry(object): self.enums = OrderedDict(sorted(enums.items())) def _process_require_enum(self, enum_elem, ext=None): + if "extends" in enum_elem.keys(): + enum = self.types[enum_elem.attrib["extends"]]["data"] + if "bitpos" in enum_elem.keys(): # We need to add an extra value to an existing enum type. # E.g. VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_IMG to VkFormatFeatureFlagBits. - type_name = enum_elem.attrib["extends"] - enum = self.types[type_name]["data"] enum.add(VkEnumValue(enum_elem.attrib["name"], 1 << int(enum_elem.attrib["bitpos"]), hex=True)) elif "offset" in enum_elem.keys(): @@ -2512,12 +2513,13 @@ class VkRegistry(object): if direction is not None: value = -value - type_name = enum_elem.attrib["extends"] - enum = self.types[type_name]["data"] enum.add(VkEnumValue(enum_elem.attrib["name"], value)) elif "value" in enum_elem.keys(): - self.consts.append(VkConstant(enum_elem.attrib.get("name"), enum_elem.attrib.get("value"))) + enum.add(VkEnumValue(enum_elem.attrib["name"], int(enum_elem.attrib["value"]))) + + elif "value" in enum_elem.keys(): + self.consts.append(VkConstant(enum_elem.attrib["name"], enum_elem.attrib["value"])) def _parse_extensions(self, root): """ Parse extensions section and pull in any types and commands for this extensioin. """ diff --git a/include/wine/vulkan.h b/include/wine/vulkan.h index 965e26f..31e8e5c 100644 --- a/include/wine/vulkan.h +++ b/include/wine/vulkan.h @@ -94,7 +94,6 @@ #define VK_EXT_DEPTH_RANGE_UNRESTRICTED_EXTENSION_NAME "VK_EXT_depth_range_unrestricted" #define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1 #define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME "VK_KHR_sampler_mirror_clamp_to_edge" -#define VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE 4 #define VK_IMG_FILTER_CUBIC_SPEC_VERSION 1 #define VK_IMG_FILTER_CUBIC_EXTENSION_NAME "VK_IMG_filter_cubic" #define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1 @@ -143,14 +142,12 @@ #define VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME "VK_KHR_device_group_creation" #define VK_KHR_PUSH_DESCRIPTOR_SPEC_VERSION 2 #define VK_KHR_PUSH_DESCRIPTOR_EXTENSION_NAME "VK_KHR_push_descriptor" -#define VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR 1 #define VK_KHR_16BIT_STORAGE_SPEC_VERSION 1 #define VK_KHR_16BIT_STORAGE_EXTENSION_NAME "VK_KHR_16bit_storage" #define VK_KHR_INCREMENTAL_PRESENT_SPEC_VERSION 1 #define VK_KHR_INCREMENTAL_PRESENT_EXTENSION_NAME "VK_KHR_incremental_present" #define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_SPEC_VERSION 1 #define VK_KHR_DESCRIPTOR_UPDATE_TEMPLATE_EXTENSION_NAME "VK_KHR_descriptor_update_template" -#define VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR 1 #define VK_NV_CLIP_SPACE_W_SCALING_SPEC_VERSION 1 #define VK_NV_CLIP_SPACE_W_SCALING_EXTENSION_NAME "VK_NV_clip_space_w_scaling" #define VK_NV_SAMPLE_MASK_OVERRIDE_COVERAGE_SPEC_VERSION 1 @@ -706,6 +703,7 @@ typedef enum VkDescriptorType typedef enum VkDescriptorUpdateTemplateType { VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_DESCRIPTOR_SET = 0, + VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_PUSH_DESCRIPTORS_KHR = 1, VK_DESCRIPTOR_UPDATE_TEMPLATE_TYPE_MAX_ENUM = 0x7fffffff, } VkDescriptorUpdateTemplateType; @@ -1481,6 +1479,7 @@ typedef enum VkSamplerAddressMode VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT = 1, VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_EDGE = 2, VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3, + VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4, VK_SAMPLER_ADDRESS_MODE_MAX_ENUM = 0x7fffffff, } VkSamplerAddressMode;
1
0
0
0
Michael Stefaniuc : vbscript: Use the ARRAY_SIZE() macro.
by Alexandre Julliard
20 Jul '18
20 Jul '18
Module: wine Branch: master Commit: b4a24c65755629807a1572dbe9bf714c4be601db URL:
https://source.winehq.org/git/wine.git/?a=commit;h=b4a24c65755629807a1572db…
Author: Michael Stefaniuc <mstefani(a)winehq.org> Date: Wed Jul 18 23:01:34 2018 +0200 vbscript: Use the ARRAY_SIZE() macro. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/vbscript/global.c | 6 +++--- dlls/vbscript/lex.c | 2 +- dlls/vbscript/vbdisp.c | 4 ++-- dlls/vbscript/vbscript_main.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/vbscript/global.c b/dlls/vbscript/global.c index a5df54a..87adeca 100644 --- a/dlls/vbscript/global.c +++ b/dlls/vbscript/global.c @@ -334,7 +334,7 @@ static HRESULT show_msgbox(script_ctx_t *ctx, BSTR prompt, unsigned type, BSTR o return E_OUTOFMEMORY; memcpy(title_buf, vbscriptW, sizeof(vbscriptW)); - ptr = title_buf + sizeof(vbscriptW)/sizeof(WCHAR)-1; + ptr = title_buf + ARRAY_SIZE(vbscriptW)-1; *ptr++ = ':'; *ptr++ = ' '; @@ -2446,7 +2446,7 @@ HRESULT init_global(script_ctx_t *ctx) HRESULT hres; ctx->global_desc.ctx = ctx; - ctx->global_desc.builtin_prop_cnt = sizeof(global_props)/sizeof(*global_props); + ctx->global_desc.builtin_prop_cnt = ARRAY_SIZE(global_props); ctx->global_desc.builtin_props = global_props; hres = get_typeinfo(GlobalObj_tid, &ctx->global_desc.typeinfo); @@ -2462,7 +2462,7 @@ HRESULT init_global(script_ctx_t *ctx) return hres; ctx->err_desc.ctx = ctx; - ctx->err_desc.builtin_prop_cnt = sizeof(err_props)/sizeof(*err_props); + ctx->err_desc.builtin_prop_cnt = ARRAY_SIZE(err_props); ctx->err_desc.builtin_props = err_props; hres = get_typeinfo(ErrObj_tid, &ctx->err_desc.typeinfo); diff --git a/dlls/vbscript/lex.c b/dlls/vbscript/lex.c index b0fac48..571854d 100644 --- a/dlls/vbscript/lex.c +++ b/dlls/vbscript/lex.c @@ -179,7 +179,7 @@ static int check_keyword(parser_ctx_t *ctx, const WCHAR *word) static int check_keywords(parser_ctx_t *ctx) { - int min = 0, max = sizeof(keywords)/sizeof(keywords[0])-1, r, i; + int min = 0, max = ARRAY_SIZE(keywords)-1, r, i; while(min <= max) { i = (min+max)/2; diff --git a/dlls/vbscript/vbdisp.c b/dlls/vbscript/vbdisp.c index 9c0c4c1..e72eadf 100644 --- a/dlls/vbscript/vbdisp.c +++ b/dlls/vbscript/vbdisp.c @@ -236,7 +236,7 @@ static HRESULT invoke_builtin(vbdisp_t *This, const builtin_prop_t *prop, WORD f return E_FAIL; } - assert(argn < sizeof(args)/sizeof(*args)); + assert(argn < ARRAY_SIZE(args)); for(i=0; i < argn; i++) { if(V_VT(dp->rgvarg+dp->cArgs-i-1) == (VT_BYREF|VT_VARIANT)) @@ -647,7 +647,7 @@ HRESULT create_procedure_disp(script_ctx_t *ctx, vbscode_t *code, IDispatch **re return E_OUTOFMEMORY; desc->ctx = ctx; - desc->builtin_prop_cnt = sizeof(procedure_props)/sizeof(*procedure_props); + desc->builtin_prop_cnt = ARRAY_SIZE(procedure_props); desc->builtin_props = procedure_props; desc->value_func = &code->main_code; diff --git a/dlls/vbscript/vbscript_main.c b/dlls/vbscript/vbscript_main.c index 7b7161c..786b7fb 100644 --- a/dlls/vbscript/vbscript_main.c +++ b/dlls/vbscript/vbscript_main.c @@ -87,7 +87,7 @@ static void release_typelib(void) if(!typelib) return; - for(i=0; i < sizeof(typeinfos)/sizeof(*typeinfos); i++) { + for(i = 0; i < ARRAY_SIZE(typeinfos); i++) { if(typeinfos[i]) ITypeInfo_Release(typeinfos[i]); }
1
0
0
0
Alexandre Julliard : winedump: Print the imports thunk address also for 64-bit.
by Alexandre Julliard
20 Jul '18
20 Jul '18
Module: wine Branch: master Commit: 5f34d56dcb4b4890827c86eaa5fb24d717553466 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5f34d56dcb4b4890827c86ea…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jul 20 11:55:04 2018 +0200 winedump: Print the imports thunk address also for 64-bit. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- tools/winedump/pe.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c index 1d5b825..7bbb576 100644 --- a/tools/winedump/pe.c +++ b/tools/winedump/pe.c @@ -1186,11 +1186,11 @@ static void dump_dir_exceptions(void) } -static void dump_image_thunk_data64(const IMAGE_THUNK_DATA64 *il) +static void dump_image_thunk_data64(const IMAGE_THUNK_DATA64 *il, DWORD thunk_rva) { /* FIXME: This does not properly handle large images */ const IMAGE_IMPORT_BY_NAME* iibn; - for (; il->u1.Ordinal; il++) + for (; il->u1.Ordinal; il++, thunk_rva += sizeof(LONGLONG)) { if (IMAGE_SNAP_BY_ORDINAL64(il->u1.Ordinal)) printf(" %4u <by ordinal>\n", (DWORD)IMAGE_ORDINAL64(il->u1.Ordinal)); @@ -1200,7 +1200,7 @@ static void dump_image_thunk_data64(const IMAGE_THUNK_DATA64 *il) if (!iibn) printf("Can't grab import by name info, skipping to next ordinal\n"); else - printf(" %4u %s %x\n", iibn->Hint, iibn->Name, (DWORD)il->u1.AddressOfData); + printf(" %4u %s %x\n", iibn->Hint, iibn->Name, thunk_rva); } } } @@ -1256,7 +1256,7 @@ static void dump_dir_imported_functions(void) else { if(PE_nt_headers->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC) - dump_image_thunk_data64((const IMAGE_THUNK_DATA64*)il); + dump_image_thunk_data64((const IMAGE_THUNK_DATA64*)il, importDesc->FirstThunk); else dump_image_thunk_data32(il, 0, importDesc->FirstThunk); printf("\n"); @@ -1344,7 +1344,7 @@ static void dump_dir_delay_imported_functions(void) else { if (PE_nt_headers->OptionalHeader.Magic == IMAGE_NT_OPTIONAL_HDR64_MAGIC) - dump_image_thunk_data64((const IMAGE_THUNK_DATA64 *)il); + dump_image_thunk_data64((const IMAGE_THUNK_DATA64 *)il, importDesc->ImportAddressTableRVA); else dump_image_thunk_data32(il, offset, importDesc->ImportAddressTableRVA); printf("\n");
1
0
0
0
Mingcong Bai : po: Update Simplified Chinese translation.
by Alexandre Julliard
20 Jul '18
20 Jul '18
Module: wine Branch: master Commit: 8a9d8c9a421028b52f685048524cb1dadc4b50b5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8a9d8c9a421028b52f685048…
Author: Mingcong Bai <jeffbai(a)aosc.xyz> Date: Fri Jul 20 22:28:41 2018 +0800 po: Update Simplified Chinese translation. Signed-off-by: Mingcong Bai <jeffbai(a)aosc.xyz> Signed-off-by: Jactry Zeng <jzeng(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/zh_CN.po | 80 ++++++++++++------------------------------------------------- 1 file changed, 15 insertions(+), 65 deletions(-) diff --git a/po/zh_CN.po b/po/zh_CN.po index 284491d..0717114 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -5,14 +5,14 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
https://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2018-05-20 10:58+0800\n" +"PO-Revision-Date: 2018-07-20 08:10-0500\n" "Last-Translator: Mingcong Bai <jeffbai(a)aosc.xyz>\n" "Language-Team: Chinese (PRC)\n" "Language: zh_CN\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.5\n" +"X-Generator: Poedit 2.0.9\n" "Plural-Forms: nplurals=1; plural=0;\n" #: appwiz.rc:58 @@ -391,16 +391,12 @@ msgid "&Retry" msgstr "重试(&R)" #: comctl32.rc:62 -#, fuzzy -#| msgid "Hide &Tabs" msgid "Hide details" -msgstr "隐藏标签页(&T)" +msgstr "隐藏详情" #: comctl32.rc:63 -#, fuzzy -#| msgid "Details" msgid "See details" -msgstr "详细资料" +msgstr "显示详情" #: comctl32.rc:31 cryptui.rc:230 regedit.rc:286 taskmgr.rc:434 winedbg.rc:61 #: winedbg.rc:76 wordpad.rc:180 @@ -3391,46 +3387,36 @@ msgid "Publishers..." msgstr "发布者..." #: inetcpl.rc:123 -#, fuzzy -#| msgid "LAN Connection" msgid "Connections" -msgstr "局域网连接" +msgstr "连接" #: inetcpl.rc:125 -#, fuzzy -#| msgid "Wine configuration" msgid "Automatic configuration" -msgstr "Wine 设置" +msgstr "自动配置" #: inetcpl.rc:126 msgid "Use Web Proxy Auto-Discovery (WPAD)" -msgstr "" +msgstr "使用网络代理自动发现协议 (WPAD)" #: inetcpl.rc:127 msgid "Use Proxy Auto-Config (PAC) script" -msgstr "" +msgstr "使用自动代理服务器配置 (PAC) 脚本" #: inetcpl.rc:128 inetcpl.rc:132 -#, fuzzy -#| msgid "Address" msgid "Address:" -msgstr "地址" +msgstr "地址:" #: inetcpl.rc:130 -#, fuzzy -#| msgid "&Local server" msgid "Proxy server" -msgstr "本地服务器(&L)" +msgstr "代理服务器" #: inetcpl.rc:131 msgid "Use a proxy server" -msgstr "" +msgstr "使用代理服务器" #: inetcpl.rc:134 -#, fuzzy -#| msgid "No Ports" msgid "Port:" -msgstr "没有端口" +msgstr "端口:" #: inetcpl.rc:31 msgid "Internet Settings" @@ -12634,10 +12620,8 @@ msgid "Confirm Value Delete" msgstr "确认删除值" #: regedit.rc:210 -#, fuzzy -#| msgid "Are you sure you want to delete the registry value '%1'?" msgid "Are you sure you want to delete the selected registry value?" -msgstr "您真的要删除注册表键值 '%1' 吗?" +msgstr "您真的要删除选中的注册表键值吗?" #: regedit.rc:216 msgid "Search complete. The string '%1' was not found." @@ -14579,7 +14563,7 @@ msgstr "" msgid "" "A program on your system has crashed, but WineDbg was unable to attach to " "the process to obtain a backtrace." -msgstr "" +msgstr "您系统中的一个程序崩溃了,但是 WineDbg 无法挂载到进程以获取堆栈回溯。" #: winedbg.rc:41 msgid "(unidentified)" @@ -15439,41 +15423,6 @@ msgid "D" msgstr "D" #: xcopy.rc:81 -#, fuzzy -#| msgid "" -#| "XCOPY - Copies source files or directory trees to a destination.\n" -#| "\n" -#| "Syntax:\n" -#| "XCOPY source [destination] [/I] [/S] [/Q] [/F] [/L] [/W] [/T] [/N] [/U]\n" -#| "\t [/R] [/H] [/C] [/P] [/A] [/M] [/E] [/D] [/Y] [/-Y]\n" -#| "\n" -#| "Where:\n" -#| "\n" -#| "[/I] Assume directory if destination does not exist and copying two or\n" -#| "\tmore files.\n" -#| "[/S] Copy directories and subdirectories.\n" -#| "[/E] Copy directories and subdirectories, including any empty ones.\n" -#| "[/Q] Do not list names during copy, that is be quiet.\n" -#| "[/F] Show full source and destination names during copy.\n" -#| "[/L] Simulate operation, showing names which would be copied.\n" -#| "[/W] Prompts before beginning the copy operation.\n" -#| "[/T] Creates empty directory structure but does not copy files.\n" -#| "[/Y] Suppress prompting when overwriting files.\n" -#| "[/-Y] Enable prompting when overwriting files.\n" -#| "[/P] Prompts on each source file before copying.\n" -#| "[/N] Copy using short names.\n" -#| "[/U] Copy only files which already exist in destination.\n" -#| "[/R] Overwrite any read only files.\n" -#| "[/H] Include hidden and system files in the copy.\n" -#| "[/C] Continue even if an error occurs during the copy.\n" -#| "[/A] Only copy files with archive attribute set.\n" -#| "[/M] Only copy files with archive attribute set, removes the\n" -#| "\tarchive attribute.\n" -#| "[/D | /D:m-d-y] Copy new files or those modified after the supplied " -#| "date.\n" -#| "\t\tIf no date is supplied, only copy if destination is older\n" -#| "\t\tthan source.\n" -#| "\n" msgid "" "XCOPY - Copies source files or directory trees to a destination.\n" "\n" @@ -15535,6 +15484,7 @@ msgstr "" "[/C] 即使拷贝时出现错误,仍然继续。\n" "[/A] 只拷贝有归档属性的文件。\n" "[/M] 只拷贝有归档属性的文件,拷贝后移除归档属性。\n" +"[/K] 同时拷贝文件属性,不指定此参数则不会保存文件属性。\n" "[/D | /D:m-d-y] 拷贝在指定时间后创建或修改的文件。\n" "\t\t如果没有提供日期,将会只拷贝目标位置中比源位置旧的文件。\n" "\n"
1
0
0
0
Nikolay Sivov : po: Update Russian translation.
by Alexandre Julliard
20 Jul '18
20 Jul '18
Module: wine Branch: master Commit: 286cb2fb249cd0ff3e5a41e2a65de41abfe89606 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=286cb2fb249cd0ff3e5a41e2…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Fri Jul 20 09:30:07 2018 +0300 po: Update Russian translation. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/ru.po | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/po/ru.po b/po/ru.po index 5f9e85c..ad07594 100644 --- a/po/ru.po +++ b/po/ru.po @@ -5,14 +5,14 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
https://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2018-07-12 16:25+0300\n" +"PO-Revision-Date: 2018-07-20 09:26+0300\n" "Last-Translator: Nikolay Sivov <nsivov(a)codeweavers.com>\n" "Language-Team: Russian\n" "Language: ru\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Generator: Poedit 2.0.8\n" +"X-Generator: Poedit 2.0.9\n" #: appwiz.rc:58 msgid "Install/Uninstall" @@ -406,16 +406,12 @@ msgid "&Retry" msgstr "По&втор" #: comctl32.rc:62 -#, fuzzy -#| msgid "Hide &Tabs" msgid "Hide details" -msgstr "Скрыть &вкладки" +msgstr "Скрыть подробности" #: comctl32.rc:63 -#, fuzzy -#| msgid "Details" msgid "See details" -msgstr "Подробности" +msgstr "Показать подробности" #: comctl32.rc:31 cryptui.rc:230 regedit.rc:286 taskmgr.rc:434 winedbg.rc:61 #: winedbg.rc:76 wordpad.rc:180
1
0
0
0
Aurimas Fišeras : po: Update Lithuanian translation.
by Alexandre Julliard
20 Jul '18
20 Jul '18
Module: wine Branch: master Commit: edf6b181c0efd75ffa34d30e63f4124015585285 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=edf6b181c0efd75ffa34d30e…
Author: Aurimas Fišeras <aurimas(a)members.fsf.org> Date: Fri Jul 20 08:46:47 2018 +0300 po: Update Lithuanian translation. Signed-off-by: Aurimas Fišeras <aurimas(a)members.fsf.org> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/lt.po | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/po/lt.po b/po/lt.po index 161d57b..9dc5065 100644 --- a/po/lt.po +++ b/po/lt.po @@ -5,7 +5,7 @@ msgstr "" "Project-Id-Version: Wine\n" "Report-Msgid-Bugs-To:
https://bugs.winehq.org\n
" "POT-Creation-Date: N/A\n" -"PO-Revision-Date: 2018-07-12 20:53+0300\n" +"PO-Revision-Date: 2018-07-20 08:43+0300\n" "Last-Translator: Aurimas Fišeras <aurimas(a)members.fsf.org>\n" "Language-Team: Lithuanian <komp_lt(a)konf.lt>\n" "Language: lt\n" @@ -404,16 +404,12 @@ msgid "&Retry" msgstr "&Pakartoti" #: comctl32.rc:62 -#, fuzzy -#| msgid "Hide &Tabs" msgid "Hide details" -msgstr "Slėpti &korteles" +msgstr "Slėpti išsamiau" #: comctl32.rc:63 -#, fuzzy -#| msgid "Details" msgid "See details" -msgstr "Išsamiai" +msgstr "Rodyti išsamiau" #: comctl32.rc:31 cryptui.rc:230 regedit.rc:286 taskmgr.rc:434 winedbg.rc:61 #: winedbg.rc:76 wordpad.rc:180
1
0
0
0
Dmitry Timoshkov : kerberos: SpInstanceInit() doesn' t need a special implementation.
by Alexandre Julliard
20 Jul '18
20 Jul '18
Module: wine Branch: master Commit: 2db0e421ff92031e0e44337bf2d681855d446b0d URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2db0e421ff92031e0e44337b…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Fri Jul 20 13:10:04 2018 +0800 kerberos: SpInstanceInit() doesn't need a special implementation. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kerberos/krb5_ap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/kerberos/krb5_ap.c b/dlls/kerberos/krb5_ap.c index 7d532e5..70895c9 100644 --- a/dlls/kerberos/krb5_ap.c +++ b/dlls/kerberos/krb5_ap.c @@ -1331,7 +1331,7 @@ NTSTATUS NTAPI SpLsaModeInitialize(ULONG lsa_version, PULONG package_version, static NTSTATUS NTAPI kerberos_SpInstanceInit(ULONG version, SECPKG_DLL_FUNCTIONS *dll_function_table, void **user_functions) { - FIXME("%u,%p,%p: stub\n", version, dll_function_table, user_functions); + TRACE("%#x,%p,%p\n", version, dll_function_table, user_functions); return STATUS_SUCCESS; }
1
0
0
0
Serge Gautherie : shell32: Fix 2 MSVC warnings about flags.
by Alexandre Julliard
20 Jul '18
20 Jul '18
Module: wine Branch: master Commit: 535f2f9e663b7b3db3147960942d3b4934e1ce07 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=535f2f9e663b7b3db3147960…
Author: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Date: Thu Jul 19 22:52:03 2018 +0200 shell32: Fix 2 MSVC warnings about flags. Signed-off-by: Serge Gautherie <winehq-git_serge_180711(a)gautherie.fr> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/tests/ebrowser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/shell32/tests/ebrowser.c b/dlls/shell32/tests/ebrowser.c index 3e89b90..28219e8 100644 --- a/dlls/shell32/tests/ebrowser.c +++ b/dlls/shell32/tests/ebrowser.c @@ -1102,7 +1102,7 @@ static void test_basics(void) IShellBrowser *psb; FOLDERSETTINGS fs; ULONG lres; - DWORD flags; + EXPLORER_BROWSER_OPTIONS flags; HDWP hdwp; RECT rc; HRESULT hr;
1
0
0
0
Chip Davis : shell32: Don't use Carbon on Mac OS to find the Trash.
by Alexandre Julliard
20 Jul '18
20 Jul '18
Module: wine Branch: master Commit: efac5d0672728f1b6d85d28aafced14223aecf16 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=efac5d0672728f1b6d85d28a…
Author: Chip Davis <cdavis(a)codeweavers.com> Date: Thu Jul 19 15:50:48 2018 -0500 shell32: Don't use Carbon on Mac OS to find the Trash. Due to a weird interaction between Wine and (what I believe to be) os_log/os_signpost, we can't use FSPathMakeRef() (nor any other function that calls that) from a Wine process. We also can't use the NSSearchPathForDirectoriesInDomains() function. Setting aside the fact that it's Objective-C (something we can work around, given that NS and CF types are toll-free bridged), a) support for getting the Trash folder was only added in 10.8 (when FSFindFolder() was deprecated), and b) it doesn't even support volume-specific Trash folders. For now, just hardcode the paths to the Trash folder. Signed-off-by: Chip Davis <cdavis(a)codeweavers.com> Signed-off-by: Ken Thomases <ken(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/shell32/trash.c | 148 ++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 104 insertions(+), 44 deletions(-) diff --git a/dlls/shell32/trash.c b/dlls/shell32/trash.c index 7bc035f..fc75c17 100644 --- a/dlls/shell32/trash.c +++ b/dlls/shell32/trash.c @@ -22,24 +22,18 @@ #include "config.h" -#ifdef HAVE_CORESERVICES_CORESERVICES_H -#define GetCurrentThread MacGetCurrentThread -#define LoadResource MacLoadResource -#include <CoreServices/CoreServices.h> -#undef GetCurrentThread -#undef LoadResource -#undef DPRINTF -#endif - #include <stdarg.h> #include <stdio.h> #include <fcntl.h> #include <errno.h> #include <time.h> +#include <sys/types.h> #ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif -#include <sys/types.h> +#ifdef HAVE_SYS_MOUNT_H +# include <sys/mount.h> +#endif #include <stdlib.h> #ifdef HAVE_UNISTD_H # include <unistd.h> @@ -47,6 +41,9 @@ #ifdef HAVE_DIRENT_H # include <dirent.h> #endif +#ifdef HAVE_PWD_H +# include <pwd.h> +#endif #include "windef.h" #include "winbase.h" @@ -109,44 +106,116 @@ HRESULT TRASH_UnpackItemID(LPCSHITEMID id, WIN32_FIND_DATAW *data) return S_OK; } -#ifdef HAVE_CORESERVICES_CORESERVICES_H +#ifdef __APPLE__ + +static char *TRASH_GetTrashPath(const char *unix_path, const char **base_name) +{ + struct statfs stfs, home_stfs; + struct passwd *user = getpwuid(geteuid()); + char *trash_path; + size_t name_size; + + if (statfs(unix_path, &stfs) == -1) + return NULL; + if (statfs(user->pw_dir, &home_stfs) == -1) + return NULL; + + *base_name = strrchr(unix_path, '/'); + if (!*base_name) + *base_name = unix_path; + else + ++*base_name; + name_size = lstrlenA(*base_name); + + /* If the file exists on the same volume as the user's home directory, + * we can use the User domain Trash folder. Otherwise, we have to use + * <volume>/.Trashes/<uid>. + */ + if (memcmp(&stfs.f_fsid, &home_stfs.f_fsid, sizeof(fsid_t)) == 0) + { + size_t home_size = lstrlenA(user->pw_dir); + trash_path = heap_alloc(home_size + sizeof("/.Trash/") + name_size); + if (!trash_path) + return NULL; + memcpy(trash_path, user->pw_dir, home_size); + memcpy(trash_path+home_size, "/.Trash", sizeof("/.Trash")); + } + else + { + size_t vol_size = lstrlenA(stfs.f_mntonname); + /* 10 for the maximum length of a 32-bit integer + 1 for the \0 */ + size_t trash_size = vol_size + sizeof("/.Trashes/") + 10 + 1 + name_size + 1; + trash_path = heap_alloc(trash_size); + if (!trash_path) + return NULL; + snprintf(trash_path, trash_size, "%s/.Trashes/%u", stfs.f_mntonname, geteuid()); + } + return trash_path; +} BOOL TRASH_CanTrashFile(LPCWSTR wszPath) { - char *unix_path; - OSStatus status; - FSRef ref; - FSCatalogInfo catalogInfo; + char *unix_path, *trash_path; + const char *base_name; + BOOL can_trash; + struct stat st; TRACE("(%s)\n", debugstr_w(wszPath)); + if (!(unix_path = wine_get_unix_file_name(wszPath))) return FALSE; - - status = FSPathMakeRef((UInt8*)unix_path, &ref, NULL); + if (!(trash_path = TRASH_GetTrashPath(unix_path, &base_name))) + { + heap_free(unix_path); + return FALSE; + } + can_trash = stat(trash_path, &st) == 0; + if (!can_trash && errno == ENOENT) + { + /* Recursively create the Trash folder. */ + char *p = trash_path; + if (*p == '/') ++p; + while ((p = strchr(p, '/')) != NULL) + { + *p = '\0'; + if (mkdir(trash_path, 0755) == -1 && errno != EEXIST) + { + heap_free(unix_path); + heap_free(trash_path); + return FALSE; + } + *p++ = '/'; + } + can_trash = TRUE; + } heap_free(unix_path); - if (status == noErr) - status = FSGetCatalogInfo(&ref, kFSCatInfoVolume, &catalogInfo, NULL, - NULL, NULL); - if (status == noErr) - status = FSFindFolder(catalogInfo.volume, kTrashFolderType, - kCreateFolder, &ref); - - return (status == noErr); + heap_free(trash_path); + return can_trash; } BOOL TRASH_TrashFile(LPCWSTR wszPath) { - char *unix_path; - OSStatus status; + char *unix_path, *trash_path; + const char *base_name; + int res; TRACE("(%s)\n", debugstr_w(wszPath)); if (!(unix_path = wine_get_unix_file_name(wszPath))) return FALSE; + if (!(trash_path = TRASH_GetTrashPath(unix_path, &base_name))) + { + heap_free(unix_path); + return FALSE; + } - status = FSPathMoveObjectToTrashSync(unix_path, NULL, kFSFileOperationSkipPreflight); + lstrcatA(trash_path, "/"); + lstrcatA(trash_path, base_name); + + res = rename(unix_path, trash_path); heap_free(unix_path); - return (status == noErr); + heap_free(trash_path); + return (res != -1); } /* TODO: @@ -186,10 +255,8 @@ HRESULT TRASH_GetDetails(const char *trash_path, const char *name, WIN32_FIND_DA HRESULT TRASH_EnumItems(const WCHAR *path, LPITEMIDLIST **pidls, int *count) { WCHAR volume_path[MAX_PATH]; - char *unix_path, trash_path[MAX_PATH]; - FSCatalogInfo catalog_info; - OSStatus status; - FSRef ref; + char *unix_path, *trash_path; + const char *base_name; struct dirent *entry; DIR *dir; LPITEMIDLIST *ret; @@ -211,15 +278,8 @@ HRESULT TRASH_EnumItems(const WCHAR *path, LPITEMIDLIST **pidls, int *count) if(!(unix_path = wine_get_unix_file_name(volume_path))) return E_OUTOFMEMORY; - status = FSPathMakeRef((UInt8*)unix_path, &ref, NULL); - heap_free(unix_path); - if(status != noErr) return E_FAIL; - status = FSGetCatalogInfo(&ref, kFSCatInfoVolume, &catalog_info, NULL, NULL, NULL); - if(status != noErr) return E_FAIL; - status = FSFindFolder(catalog_info.volume, kTrashFolderType, kCreateFolder, &ref); - if(status != noErr) return E_FAIL; - status = FSRefMakePath(&ref, (UInt8*)trash_path, MAX_PATH); - if(status != noErr) return E_FAIL; + if(!(trash_path = TRASH_GetTrashPath(unix_path, &base_name))) + return E_OUTOFMEMORY; if(!(dir = opendir(trash_path))) return E_FAIL; ret = heap_alloc(ret_size * sizeof(*ret)); @@ -282,7 +342,7 @@ HRESULT TRASH_EraseItem(LPCITEMIDLIST pidl) return E_NOTIMPL; } -#else /* HAVE_CORESERVICES_CORESERVICES_H */ +#else /* __APPLE__ */ static CRITICAL_SECTION TRASH_Creating; static CRITICAL_SECTION_DEBUG TRASH_Creating_Debug = @@ -790,4 +850,4 @@ HRESULT TRASH_EraseItem(LPCITEMIDLIST pidl) return S_OK; } -#endif /* HAVE_CORESERVICES_CORESERVICES_H */ +#endif /* __APPLE__ */
1
0
0
0
Józef Kucia : libs/vkd3d: Implement d3d12_device_CreateHeap().
by Alexandre Julliard
20 Jul '18
20 Jul '18
Module: vkd3d Branch: master Commit: d9d37d15632e1e4f63e54e1ec48e88ef356b8aab URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=d9d37d15632e1e4f63e54e1…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Fri Jul 20 14:30:18 2018 +0200 libs/vkd3d: Implement d3d12_device_CreateHeap(). 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/device.c | 15 +++- libs/vkd3d/resource.c | 204 +++++++++++++++++++++++++++++++++++++++++++++ libs/vkd3d/vkd3d_private.h | 16 +++- 3 files changed, 230 insertions(+), 5 deletions(-) diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 176b0d4..6fa0017 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -1853,12 +1853,19 @@ static HRESULT STDMETHODCALLTYPE d3d12_device_CreateCommittedResource(ID3D12Devi } static HRESULT STDMETHODCALLTYPE d3d12_device_CreateHeap(ID3D12Device *iface, - const D3D12_HEAP_DESC *desc, REFIID riid, void **heap) + const D3D12_HEAP_DESC *desc, REFIID iid, void **heap) { - FIXME("iface %p, desc %p, riid %s, heap %p stub!\n", - iface, desc, debugstr_guid(riid), heap); + struct d3d12_device *device = impl_from_ID3D12Device(iface); + struct d3d12_heap *object; + HRESULT hr; - return E_NOTIMPL; + TRACE("iface %p, desc %p, iid %s, heap %p.\n", + iface, desc, debugstr_guid(iid), heap); + + if (FAILED(hr = d3d12_heap_create(device, desc, &object))) + return hr; + + return return_interface(&object->ID3D12Heap_iface, &IID_ID3D12Heap, iid, heap); } static HRESULT STDMETHODCALLTYPE d3d12_device_CreatePlacedResource(ID3D12Device *iface, diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 9fa98b0..1456c4b 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -18,6 +18,210 @@ #include "vkd3d_private.h" +/* ID3D12Heap */ +static inline struct d3d12_heap *impl_from_ID3D12Heap(ID3D12Heap *iface) +{ + return CONTAINING_RECORD(iface, struct d3d12_heap, ID3D12Heap_iface); +} + +static HRESULT STDMETHODCALLTYPE d3d12_heap_QueryInterface(ID3D12Heap *iface, + REFIID iid, void **object) +{ + TRACE("iface %p, iid %s, object %p.\n", iface, debugstr_guid(iid), object); + + if (IsEqualGUID(iid, &IID_ID3D12Heap) + || IsEqualGUID(iid, &IID_ID3D12Pageable) + || IsEqualGUID(iid, &IID_ID3D12DeviceChild) + || IsEqualGUID(iid, &IID_ID3D12Object) + || IsEqualGUID(iid, &IID_IUnknown)) + { + ID3D12Heap_AddRef(iface); + *object = iface; + return S_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); + + *object = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE d3d12_heap_AddRef(ID3D12Heap *iface) +{ + struct d3d12_heap *heap = impl_from_ID3D12Heap(iface); + ULONG refcount = InterlockedIncrement(&heap->refcount); + + TRACE("%p increasing refcount to %u.\n", heap, refcount); + + return refcount; +} + +static ULONG STDMETHODCALLTYPE d3d12_heap_Release(ID3D12Heap *iface) +{ + struct d3d12_heap *heap = impl_from_ID3D12Heap(iface); + ULONG refcount = InterlockedDecrement(&heap->refcount); + + TRACE("%p decreasing refcount to %u.\n", heap, refcount); + + if (!refcount) + { + struct d3d12_device *device = heap->device; + + vkd3d_free(heap); + + ID3D12Device_Release(&device->ID3D12Device_iface); + } + + return refcount; +} + +static HRESULT STDMETHODCALLTYPE d3d12_heap_GetPrivateData(ID3D12Heap *iface, + REFGUID guid, UINT *data_size, void *data) +{ + FIXME("iface %p, guid %s, data_size %p, data %p stub!", iface, debugstr_guid(guid), data_size, data); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d3d12_heap_SetPrivateData(ID3D12Heap *iface, + REFGUID guid, UINT data_size, const void *data) +{ + FIXME("iface %p, guid %s, data_size %u, data %p stub!\n", iface, debugstr_guid(guid), data_size, data); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d3d12_heap_SetPrivateDataInterface(ID3D12Heap *iface, + REFGUID guid, const IUnknown *data) +{ + FIXME("iface %p, guid %s, data %p stub!\n", iface, debugstr_guid(guid), data); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d3d12_heap_SetName(ID3D12Heap *iface, const WCHAR *name) +{ + struct d3d12_heap *heap = impl_from_ID3D12Heap(iface); + + FIXME("iface %p, name %s stub!\n", iface, debugstr_w(name, heap->device->wchar_size)); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE d3d12_heap_GetDevice(ID3D12Heap *iface, + REFIID riid, void **device) +{ + struct d3d12_heap *heap = impl_from_ID3D12Heap(iface); + + TRACE("iface %p, riid %s, device %p.\n", iface, debugstr_guid(riid), device); + + return ID3D12Device_QueryInterface(&heap->device->ID3D12Device_iface, riid, device); +} + +static D3D12_HEAP_DESC * STDMETHODCALLTYPE d3d12_heap_GetDesc(ID3D12Heap *iface, + D3D12_HEAP_DESC *desc) +{ + struct d3d12_heap *heap = impl_from_ID3D12Heap(iface); + + TRACE("iface %p, desc %p.\n", iface, desc); + + *desc = heap->desc; + return desc; +} + +static const struct ID3D12HeapVtbl d3d12_heap_vtbl = +{ + /* IUnknown methods */ + d3d12_heap_QueryInterface, + d3d12_heap_AddRef, + d3d12_heap_Release, + /* ID3D12Object methods */ + d3d12_heap_GetPrivateData, + d3d12_heap_SetPrivateData, + d3d12_heap_SetPrivateDataInterface, + d3d12_heap_SetName, + /* ID3D12DeviceChild methods */ + d3d12_heap_GetDevice, + /* ID3D12Heap methods */ + d3d12_heap_GetDesc, +}; + +static HRESULT validate_heap_desc(const D3D12_HEAP_DESC *desc) +{ + if (!desc->SizeInBytes) + { + WARN("Invalid size %"PRIu64".\n", desc->SizeInBytes); + return E_INVALIDARG; + } + + if (desc->Alignment != D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT + && desc->Alignment != D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT) + { + WARN("Invalid alignment %"PRIu64".\n", desc->Alignment); + return E_INVALIDARG; + } + + if (desc->Flags & D3D12_HEAP_FLAG_ALLOW_DISPLAY) + { + WARN("D3D12_HEAP_FLAG_ALLOW_DISPLAY is only for committed resources.\n"); + return E_INVALIDARG; + } + + return S_OK; +} + +static HRESULT d3d12_heap_init(struct d3d12_heap *heap, + struct d3d12_device *device, const D3D12_HEAP_DESC *desc) +{ + HRESULT hr; + + heap->ID3D12Heap_iface.lpVtbl = &d3d12_heap_vtbl; + heap->refcount = 1; + + heap->desc = *desc; + + if (!heap->desc.Properties.CreationNodeMask) + heap->desc.Properties.CreationNodeMask = 1; + if (!heap->desc.Properties.VisibleNodeMask) + heap->desc.Properties.VisibleNodeMask = 1; + + debug_ignored_node_mask(heap->desc.Properties.CreationNodeMask); + debug_ignored_node_mask(heap->desc.Properties.VisibleNodeMask); + + if (!heap->desc.Alignment) + heap->desc.Alignment = D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT; + + if (FAILED(hr = validate_heap_desc(&heap->desc))) + return hr; + + heap->device = device; + ID3D12Device_AddRef(&device->ID3D12Device_iface); + + return S_OK; +} + +HRESULT d3d12_heap_create(struct d3d12_device *device, + const D3D12_HEAP_DESC *desc, struct d3d12_heap **heap) +{ + struct d3d12_heap *object; + HRESULT hr; + + if (!(object = vkd3d_malloc(sizeof(*object)))) + return E_OUTOFMEMORY; + + if (FAILED(hr = d3d12_heap_init(object, device, desc))) + { + vkd3d_free(object); + return hr; + } + + TRACE("Created heap %p.\n", object); + + *heap = object; + + return S_OK; +} + static VkImageType vk_image_type_from_d3d12_resource_dimension(D3D12_RESOURCE_DIMENSION dimension) { switch (dimension) diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 0adc2e4..8efb930 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -180,6 +180,20 @@ struct d3d12_fence HRESULT d3d12_fence_create(struct d3d12_device *device, UINT64 initial_value, D3D12_FENCE_FLAGS flags, struct d3d12_fence **fence) DECLSPEC_HIDDEN; +/* ID3D12Heap */ +struct d3d12_heap +{ + ID3D12Heap ID3D12Heap_iface; + LONG refcount; + + D3D12_HEAP_DESC desc; + + struct d3d12_device *device; +}; + +HRESULT d3d12_heap_create(struct d3d12_device *device, + const D3D12_HEAP_DESC *desc, struct d3d12_heap **heap) DECLSPEC_HIDDEN; + #define VKD3D_RESOURCE_PUBLIC_FLAGS \ (VKD3D_RESOURCE_INITIAL_STATE_TRANSITION | VKD3D_RESOURCE_PRESENT_STATE_TRANSITION) #define VKD3D_RESOURCE_EXTERNAL 0x00000004 @@ -766,7 +780,7 @@ bool check_feature_level_support(D3D_FEATURE_LEVEL feature_level) DECLSPEC_HIDDE bool is_valid_resource_state(D3D12_RESOURCE_STATES state) DECLSPEC_HIDDEN; bool is_write_resource_state(D3D12_RESOURCE_STATES state) DECLSPEC_HIDDEN; -static inline bool is_cpu_accessible_heap(const struct D3D12_HEAP_PROPERTIES *properties) +static inline bool is_cpu_accessible_heap(const D3D12_HEAP_PROPERTIES *properties) { if (properties->Type == D3D12_HEAP_TYPE_DEFAULT) return false;
1
0
0
0
← Newer
1
2
3
4
5
...
41
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
Results per page:
10
25
50
100
200