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
May 2017
----- 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
640 discussions
Start a n
N
ew thread
Jacek Caban : mshtml: Don't expose doScroll in IE11 document mode.
by Alexandre Julliard
09 May '17
09 May '17
Module: wine Branch: master Commit: 97e260060769558493ed99787f27fe96081d5dee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=97e260060769558493ed99787…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue May 9 17:32:33 2017 +0200 mshtml: Don't expose doScroll in IE11 document mode. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/dispex.c | 22 ++++++++++++++++------ dlls/mshtml/htmlelem.c | 6 +++++- dlls/mshtml/htmlwindow.c | 2 +- dlls/mshtml/mshtml_private.h | 3 +-- dlls/mshtml/tests/documentmode.js | 1 + 5 files changed, 24 insertions(+), 10 deletions(-) diff --git a/dlls/mshtml/dispex.c b/dlls/mshtml/dispex.c index 6e7f1be..baf251a 100644 --- a/dlls/mshtml/dispex.c +++ b/dlls/mshtml/dispex.c @@ -325,9 +325,10 @@ static void add_func_info(dispex_data_t *data, tid_t tid, const FUNCDESC *desc, } } -static HRESULT process_interface(dispex_data_t *data, tid_t tid, ITypeInfo *disp_typeinfo) +static HRESULT process_interface(dispex_data_t *data, tid_t tid, ITypeInfo *disp_typeinfo, const DISPID *blacklist_dispids) { unsigned i = 7; /* skip IDispatch functions */ + const DISPID *blacklist_iter; ITypeInfo *typeinfo; FUNCDESC *funcdesc; HRESULT hres; @@ -341,20 +342,29 @@ static HRESULT process_interface(dispex_data_t *data, tid_t tid, ITypeInfo *disp if(FAILED(hres)) break; - TRACE("adding...\n"); + if(blacklist_dispids) { + for(blacklist_iter = blacklist_dispids; *blacklist_iter != DISPID_UNKNOWN; blacklist_iter++) { + if(*blacklist_iter == funcdesc->memid) + break; + } + } + + if(!blacklist_dispids || *blacklist_iter == DISPID_UNKNOWN) { + TRACE("adding...\n"); + add_func_info(data, tid, funcdesc, disp_typeinfo ? disp_typeinfo : typeinfo); + } - add_func_info(data, tid, funcdesc, disp_typeinfo ? disp_typeinfo : typeinfo); ITypeInfo_ReleaseFuncDesc(typeinfo, funcdesc); } return S_OK; } -void dispex_info_add_interface(dispex_data_t *info, tid_t tid) +void dispex_info_add_interface(dispex_data_t *info, tid_t tid, const DISPID *blacklist_dispids) { HRESULT hres; - hres = process_interface(info, tid, NULL); + hres = process_interface(info, tid, NULL, blacklist_dispids); if(FAILED(hres)) ERR("process_interface failed: %08x\n", hres); } @@ -406,7 +416,7 @@ static dispex_data_t *preprocess_dispex_data(const dispex_static_data_t *desc, c desc->init_info(data, compat_mode); for(tid = desc->iface_tids; *tid; tid++) { - hres = process_interface(data, *tid, dti); + hres = process_interface(data, *tid, dti, NULL); if(FAILED(hres)) break; } diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index ccad114..4f7a383 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -5174,8 +5174,12 @@ static void HTMLElement_bind_event(DispatchEx *dispex, int eid) void HTMLElement_init_dispex_info(dispex_data_t *info, compat_mode_t mode) { + static const DISPID elem2_ie11_blacklist[] = {DISPID_IHTMLELEMENT2_DOSCROLL, DISPID_UNKNOWN}; + + dispex_info_add_interface(info, IHTMLElement2_tid, mode >= COMPAT_MODE_IE11 ? elem2_ie11_blacklist : NULL); + if(mode >= COMPAT_MODE_IE8) - dispex_info_add_interface(info, IElementSelector_tid); + dispex_info_add_interface(info, IElementSelector_tid, NULL); } static const tid_t HTMLElement_iface_tids[] = { diff --git a/dlls/mshtml/htmlwindow.c b/dlls/mshtml/htmlwindow.c index b68579b..2914073 100644 --- a/dlls/mshtml/htmlwindow.c +++ b/dlls/mshtml/htmlwindow.c @@ -3029,7 +3029,7 @@ static void HTMLWindow_bind_event(DispatchEx *dispex, int eid) static void HTMLWindow_init_dispex_info(dispex_data_t *info, compat_mode_t compat_mode) { - dispex_info_add_interface(info, IHTMLWindow5_tid); + dispex_info_add_interface(info, IHTMLWindow5_tid, NULL); } static const dispex_static_data_vtbl_t HTMLWindow_dispex_vtbl = { diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h index a927d69..d68816d 100644 --- a/dlls/mshtml/mshtml_private.h +++ b/dlls/mshtml/mshtml_private.h @@ -318,7 +318,7 @@ void dispex_unlink(DispatchEx*) DECLSPEC_HIDDEN; void release_typelib(void) DECLSPEC_HIDDEN; HRESULT get_class_typeinfo(const CLSID*,ITypeInfo**) DECLSPEC_HIDDEN; const dispex_static_data_vtbl_t *dispex_get_vtbl(DispatchEx*) DECLSPEC_HIDDEN; -void dispex_info_add_interface(dispex_data_t*,tid_t) DECLSPEC_HIDDEN; +void dispex_info_add_interface(dispex_data_t*,tid_t,const DISPID*) DECLSPEC_HIDDEN; static inline void init_dispex(DispatchEx *dispex, IUnknown *outer, dispex_static_data_t *desc) { @@ -760,7 +760,6 @@ typedef struct { IHTMLDOMNode_tid, \ IHTMLDOMNode2_tid, \ IHTMLElement_tid, \ - IHTMLElement2_tid, \ IHTMLElement3_tid, \ IHTMLElement4_tid, \ IHTMLUniqueName_tid diff --git a/dlls/mshtml/tests/documentmode.js b/dlls/mshtml/tests/documentmode.js index 96688ba..292955a 100644 --- a/dlls/mshtml/tests/documentmode.js +++ b/dlls/mshtml/tests/documentmode.js @@ -28,6 +28,7 @@ function test_elem_props() { var v = document.documentMode; + test_exposed("doScroll", v < 11); test_exposed("querySelectorAll", v >= 8); next_test();
1
0
0
0
Alex Henrie : ntdll: Implement ProcessVmCounters for Linux for other processes.
by Alexandre Julliard
09 May '17
09 May '17
Module: wine Branch: master Commit: 19a79f422818859dd5a052ddc8e270ffbfef6e71 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=19a79f422818859dd5a052ddc…
Author: Alex Henrie <alexhenrie24(a)gmail.com> Date: Sun May 7 22:32:43 2017 -0600 ntdll: Implement ProcessVmCounters for Linux for other processes. Signed-off-by: Alex Henrie <alexhenrie24(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/process.c | 20 +++++++++++++++++--- dlls/ntdll/tests/info.c | 22 ++++++++++++++++++++++ include/wine/server_protocol.h | 23 ++++++++++++++++++++++- server/process.c | 38 ++++++++++++++++++++++++++++++++++++++ server/protocol.def | 13 +++++++++++++ server/request.h | 11 +++++++++++ server/trace.c | 18 ++++++++++++++++++ 7 files changed, 141 insertions(+), 4 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=19a79f422818859dd5a05…
1
0
0
0
Michael Müller : mfplat/tests: Add tests.
by Alexandre Julliard
09 May '17
09 May '17
Module: wine Branch: master Commit: 47fca41f428a1100e687293dda7175605f91bc89 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=47fca41f428a1100e687293dd…
Author: Michael Müller <michael(a)fds-team.de> Date: Mon May 8 22:51:01 2017 +0000 mfplat/tests: Add tests. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 3 +- configure.ac | 3 +- dlls/mfplat/Makefile.in | 1 + dlls/mfplat/tests/Makefile.in | 5 ++ dlls/mfplat/tests/mfplat.c | 165 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 175 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 36ec652..42dabfa 100755 --- a/configure +++ b/configure @@ -18120,7 +18120,8 @@ wine_fn_config_dll mciseq enable_mciseq wine_fn_config_dll mciwave enable_mciwave wine_fn_config_dll mf enable_mf wine_fn_config_dll mf3216 enable_mf3216 -wine_fn_config_dll mfplat enable_mfplat +wine_fn_config_dll mfplat enable_mfplat implib +wine_fn_config_test dlls/mfplat/tests mfplat_test wine_fn_config_dll mfreadwrite enable_mfreadwrite wine_fn_config_dll mgmtapi enable_mgmtapi wine_fn_config_dll midimap enable_midimap diff --git a/configure.ac b/configure.ac index 0f0e013..74be5f0 100644 --- a/configure.ac +++ b/configure.ac @@ -3148,7 +3148,8 @@ WINE_CONFIG_DLL(mciseq) WINE_CONFIG_DLL(mciwave) WINE_CONFIG_DLL(mf) WINE_CONFIG_DLL(mf3216) -WINE_CONFIG_DLL(mfplat) +WINE_CONFIG_DLL(mfplat,,[implib]) +WINE_CONFIG_TEST(dlls/mfplat/tests) WINE_CONFIG_DLL(mfreadwrite) WINE_CONFIG_DLL(mgmtapi) WINE_CONFIG_DLL(midimap) diff --git a/dlls/mfplat/Makefile.in b/dlls/mfplat/Makefile.in index 1a3ac3a..76843f5 100644 --- a/dlls/mfplat/Makefile.in +++ b/dlls/mfplat/Makefile.in @@ -1,4 +1,5 @@ MODULE = mfplat.dll +IMPORTLIB = mfplat IMPORTS = advapi32 ole32 C_SRCS = \ diff --git a/dlls/mfplat/tests/Makefile.in b/dlls/mfplat/tests/Makefile.in new file mode 100644 index 0000000..a5553a5 --- /dev/null +++ b/dlls/mfplat/tests/Makefile.in @@ -0,0 +1,5 @@ +TESTDLL = mfplat.dll +IMPORTS = ole32 mfplat + +C_SRCS = \ + mfplat.c diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c new file mode 100644 index 0000000..4a95137 --- /dev/null +++ b/dlls/mfplat/tests/mfplat.c @@ -0,0 +1,165 @@ +/* + * Unit test suite for mfplat. + * + * Copyright 2015 Michael Müller + * + * 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 + */ + +#include <stdarg.h> +#include <string.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" +#include "winreg.h" + +#include "initguid.h" +#include "mfapi.h" +#include "mferror.h" + +#include "wine/test.h" + +DEFINE_GUID(MFT_CATEGORY_OTHER, 0x90175d57,0xb7ea,0x4901,0xae,0xb3,0x93,0x3a,0x87,0x47,0x75,0x6f); + +DEFINE_GUID(DUMMY_CLSID, 0x12345678,0x1234,0x1234,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19); +DEFINE_GUID(DUMMY_GUID1, 0x12345678,0x1234,0x1234,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21); +DEFINE_GUID(DUMMY_GUID2, 0x12345678,0x1234,0x1234,0x22,0x22,0x22,0x22,0x22,0x22,0x22,0x22); + +static BOOL check_clsid(CLSID *clsids, UINT32 count) +{ + int i; + for (i = 0; i < count; i++) + { + if (IsEqualGUID(&clsids[i], &DUMMY_CLSID)) + return TRUE; + } + return FALSE; +} + +static void test_register(void) +{ + static WCHAR name[] = {'W','i','n','e',' ','t','e','s','t',0}; + MFT_REGISTER_TYPE_INFO input[] = + { + { DUMMY_CLSID, DUMMY_GUID1 } + }; + MFT_REGISTER_TYPE_INFO output[] = + { + { DUMMY_CLSID, DUMMY_GUID2 } + }; + CLSID *clsids; + UINT32 count; + HRESULT ret; + + ret = MFTRegister(DUMMY_CLSID, MFT_CATEGORY_OTHER, name, 0, 1, input, 1, output, NULL); + ok(ret == S_OK, "Failed to register dummy filter: %x\n", ret); + if (FAILED(ret)) + return; + +if(0) +{ + /* NULL name crashes on windows */ + ret = MFTRegister(DUMMY_CLSID, MFT_CATEGORY_OTHER, NULL, 0, 1, input, 1, output, NULL); + ok(ret == E_INVALIDARG, "got %x\n", ret); +} + + ret = MFTRegister(DUMMY_CLSID, MFT_CATEGORY_OTHER, name, 0, 0, NULL, 0, NULL, NULL); + ok(ret == S_OK, "Failed to register dummy filter: %x\n", ret); + + ret = MFTRegister(DUMMY_CLSID, MFT_CATEGORY_OTHER, name, 0, 1, NULL, 0, NULL, NULL); + ok(ret == S_OK, "Failed to register dummy filter: %x\n", ret); + + ret = MFTRegister(DUMMY_CLSID, MFT_CATEGORY_OTHER, name, 0, 0, NULL, 1, NULL, NULL); + ok(ret == S_OK, "Failed to register dummy filter: %x\n", ret); + +if(0) +{ + /* NULL clsids/count crashes on windows (vista) */ + count = 0; + ret = MFTEnum(MFT_CATEGORY_OTHER, 0, NULL, NULL, NULL, NULL, &count); + ok(ret == E_POINTER, "Failed to enumerate filters: %x\n", ret); + ok(count == 0, "Expected count > 0\n"); + + clsids = NULL; + ret = MFTEnum(MFT_CATEGORY_OTHER, 0, NULL, NULL, NULL, &clsids, NULL); + ok(ret == E_POINTER, "Failed to enumerate filters: %x\n", ret); + ok(count == 0, "Expected count > 0\n"); +} + + count = 0; + clsids = NULL; + ret = MFTEnum(MFT_CATEGORY_OTHER, 0, NULL, NULL, NULL, &clsids, &count); + ok(ret == S_OK, "Failed to enumerate filters: %x\n", ret); + ok(count > 0, "Expected count > 0\n"); + ok(clsids != NULL, "Expected clsids != NULL\n"); + ok(check_clsid(clsids, count), "Filter was not part of enumeration\n"); + CoTaskMemFree(clsids); + + count = 0; + clsids = NULL; + ret = MFTEnum(MFT_CATEGORY_OTHER, 0, input, NULL, NULL, &clsids, &count); + ok(ret == S_OK, "Failed to enumerate filters: %x\n", ret); + ok(count > 0, "Expected count > 0\n"); + ok(clsids != NULL, "Expected clsids != NULL\n"); + ok(check_clsid(clsids, count), "Filter was not part of enumeration\n"); + CoTaskMemFree(clsids); + + count = 0; + clsids = NULL; + ret = MFTEnum(MFT_CATEGORY_OTHER, 0, NULL, output, NULL, &clsids, &count); + ok(ret == S_OK, "Failed to enumerate filters: %x\n", ret); + ok(count > 0, "Expected count > 0\n"); + ok(clsids != NULL, "Expected clsids != NULL\n"); + ok(check_clsid(clsids, count), "Filter was not part of enumeration\n"); + CoTaskMemFree(clsids); + + count = 0; + clsids = NULL; + ret = MFTEnum(MFT_CATEGORY_OTHER, 0, input, output, NULL, &clsids, &count); + ok(ret == S_OK, "Failed to enumerate filters: %x\n", ret); + ok(count > 0, "Expected count > 0\n"); + ok(clsids != NULL, "Expected clsids != NULL\n"); + ok(check_clsid(clsids, count), "Filter was not part of enumeration\n"); + CoTaskMemFree(clsids); + + /* exchange input and output */ + count = 0; + clsids = NULL; + ret = MFTEnum(MFT_CATEGORY_OTHER, 0, output, input, NULL, &clsids, &count); + ok(ret == S_OK, "Failed to enumerate filters: %x\n", ret); + ok(!count, "got %d\n", count); + ok(clsids == NULL, "Expected clsids == NULL\n"); + + ret = MFTUnregister(DUMMY_CLSID); + ok(ret == S_OK || + /* w7pro64 */ + broken(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)), "got %x\n", ret); + + ret = MFTUnregister(DUMMY_CLSID); + ok(ret == S_OK || broken(ret == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND)), "got %x\n", ret); +} + + +START_TEST(mfplat) +{ + CoInitialize(NULL); + + test_register(); + + CoUninitialize(); +}
1
0
0
0
Michael Müller : mfplat: Implement MFTEnum.
by Alexandre Julliard
09 May '17
09 May '17
Module: wine Branch: master Commit: 0e93b08f6e81799f943159e529c3fa1e767d0d02 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0e93b08f6e81799f943159e52…
Author: Michael Müller <michael(a)fds-team.de> Date: Mon May 8 22:50:50 2017 +0000 mfplat: Implement MFTEnum. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/Makefile.in | 2 +- dlls/mfplat/main.c | 183 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/mfplat/mfplat.spec | 2 +- include/mfapi.h | 3 + 4 files changed, 188 insertions(+), 2 deletions(-) diff --git a/dlls/mfplat/Makefile.in b/dlls/mfplat/Makefile.in index 8af0525..1a3ac3a 100644 --- a/dlls/mfplat/Makefile.in +++ b/dlls/mfplat/Makefile.in @@ -1,5 +1,5 @@ MODULE = mfplat.dll -IMPORTS = advapi32 +IMPORTS = advapi32 ole32 C_SRCS = \ main.c diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index b54dc9d..c1c7003 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -18,6 +18,7 @@ */ #include <stdarg.h> +#include <string.h> #define COBJMACROS @@ -49,6 +50,17 @@ static const WCHAR szGUIDFmt[] = 'x','%','0','2','x','%','0','2','x','%','0','2','x',0 }; +static const BYTE guid_conv_table[256] = +{ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 */ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 0, 0, 0, 0, 0, /* 0x30 */ + 0, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40 */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x50 */ + 0, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf /* 0x60 */ +}; + static WCHAR* GUIDToString(WCHAR *str, REFGUID guid) { sprintfW(str, szGUIDFmt, guid->Data1, guid->Data2, @@ -59,6 +71,60 @@ static WCHAR* GUIDToString(WCHAR *str, REFGUID guid) return str; } +static inline BOOL is_valid_hex(WCHAR c) +{ + if (!(((c >= '0') && (c <= '9')) || + ((c >= 'a') && (c <= 'f')) || + ((c >= 'A') && (c <= 'F')))) + return FALSE; + return TRUE; +} + +static BOOL GUIDFromString(LPCWSTR s, GUID *id) +{ + int i; + + /* in form XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX */ + + id->Data1 = 0; + for (i = 0; i < 8; i++) + { + if (!is_valid_hex(s[i])) return FALSE; + id->Data1 = (id->Data1 << 4) | guid_conv_table[s[i]]; + } + if (s[8]!='-') return FALSE; + + id->Data2 = 0; + for (i = 9; i < 13; i++) + { + if (!is_valid_hex(s[i])) return FALSE; + id->Data2 = (id->Data2 << 4) | guid_conv_table[s[i]]; + } + if (s[13]!='-') return FALSE; + + id->Data3 = 0; + for (i = 14; i < 18; i++) + { + if (!is_valid_hex(s[i])) return FALSE; + id->Data3 = (id->Data3 << 4) | guid_conv_table[s[i]]; + } + if (s[18]!='-') return FALSE; + + for (i = 19; i < 36; i+=2) + { + if (i == 23) + { + if (s[i]!='-') return FALSE; + i++; + } + if (!is_valid_hex(s[i]) || !is_valid_hex(s[i+1])) return FALSE; + id->Data4[(i-19)/2] = guid_conv_table[s[i]] << 4 | guid_conv_table[s[i+1]]; + } + + if (!s[37]) return TRUE; + return FALSE; +} + BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) { switch (reason) @@ -163,6 +229,123 @@ HRESULT WINAPI MFTRegister(CLSID clsid, GUID category, LPWSTR name, UINT32 flags return hr; } +static BOOL match_type(const WCHAR *clsid_str, const WCHAR *type_str, MFT_REGISTER_TYPE_INFO *type) +{ + HKEY htransform, hfilter; + DWORD reg_type, size; + LONG ret = FALSE; + MFT_REGISTER_TYPE_INFO *info = NULL; + int i; + + if (RegOpenKeyW(HKEY_CLASSES_ROOT, transform_keyW, &htransform)) + return FALSE; + + if (RegOpenKeyW(htransform, clsid_str, &hfilter)) + { + RegCloseKey(htransform); + return FALSE; + } + + if (RegQueryValueExW(hfilter, type_str, NULL, ®_type, NULL, &size) != ERROR_SUCCESS) + goto out; + + if (reg_type != REG_BINARY) + goto out; + + if (!size || size % (sizeof(MFT_REGISTER_TYPE_INFO)) != 0) + goto out; + + info = HeapAlloc(GetProcessHeap(), 0, size); + if (!info) + goto out; + + if (RegQueryValueExW(hfilter, type_str, NULL, ®_type, (LPBYTE)info, &size) != ERROR_SUCCESS) + goto out; + + for (i = 0; i < size / sizeof(MFT_REGISTER_TYPE_INFO) + 1; i++) + { + if (IsEqualGUID(&info[i].guidMajorType, &type->guidMajorType) && + IsEqualGUID(&info[i].guidSubtype, &type->guidSubtype)) + { + ret = TRUE; + break; + } + } + +out: + HeapFree(GetProcessHeap(), 0, info); + RegCloseKey(hfilter); + RegCloseKey(htransform); + return ret; +} + +/*********************************************************************** + * MFTEnum (mfplat.@) + */ +HRESULT WINAPI MFTEnum(GUID category, UINT32 flags, MFT_REGISTER_TYPE_INFO *input_type, + MFT_REGISTER_TYPE_INFO *output_type, IMFAttributes *attributes, + CLSID **pclsids, UINT32 *pcount) +{ + WCHAR buffer[64], clsid_str[MAX_PATH] = {0}; + HKEY hcategory, hlist; + DWORD index = 0; + DWORD size = MAX_PATH; + CLSID *clsids = NULL; + UINT32 count = 0; + LONG ret; + + TRACE("(%s, %x, %p, %p, %p, %p, %p)\n", debugstr_guid(&category), flags, input_type, + output_type, attributes, pclsids, pcount); + + if (!pclsids || !pcount) + return E_INVALIDARG; + + if (RegOpenKeyW(HKEY_CLASSES_ROOT, categories_keyW, &hcategory)) + return E_FAIL; + + GUIDToString(buffer, &category); + + ret = RegOpenKeyW(hcategory, buffer, &hlist); + RegCloseKey(hcategory); + if (ret) return E_FAIL; + + while (RegEnumKeyExW(hlist, index, clsid_str, &size, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) + { + GUID clsid; + void *tmp; + + if (!GUIDFromString(clsid_str, &clsid)) + goto next; + + if (output_type && !match_type(clsid_str, outputtypesW, output_type)) + goto next; + + if (input_type && !match_type(clsid_str, inputtypesW, input_type)) + goto next; + + tmp = CoTaskMemRealloc(clsids, (count + 1) * sizeof(GUID)); + if (!tmp) + { + CoTaskMemFree(clsids); + RegCloseKey(hlist); + return E_OUTOFMEMORY; + } + + clsids = tmp; + clsids[count++] = clsid; + + next: + size = MAX_PATH; + index++; + } + + *pclsids = clsids; + *pcount = count; + + RegCloseKey(hlist); + return S_OK; +} + /*********************************************************************** * MFTUnregister (mfplat.@) */ diff --git a/dlls/mfplat/mfplat.spec b/dlls/mfplat/mfplat.spec index dc6f402..d96eb51 100644 --- a/dlls/mfplat/mfplat.spec +++ b/dlls/mfplat/mfplat.spec @@ -134,7 +134,7 @@ @ stdcall MFShutdown() @ stdcall MFStartup(long long) @ stub MFStreamDescriptorProtectMediaType -@ stub MFTEnum +@ stdcall MFTEnum(int128 long ptr ptr ptr ptr ptr) @ stub MFTEnumEx @ stub MFTGetInfo @ stdcall MFTRegister(int128 int128 wstr long long ptr long ptr ptr) diff --git a/include/mfapi.h b/include/mfapi.h index a37d655..35641dd 100644 --- a/include/mfapi.h +++ b/include/mfapi.h @@ -32,6 +32,9 @@ typedef unsigned __int64 MFWORKITEM_KEY; HRESULT WINAPI MFCancelWorkItem(MFWORKITEM_KEY key); HRESULT WINAPI MFCreateAttributes(IMFAttributes **attributes, UINT32 size); HRESULT WINAPI MFGetTimerPeriodicity(DWORD *periodicity); +HRESULT WINAPI MFTEnum(GUID category, UINT32 flags, MFT_REGISTER_TYPE_INFO *input_type, + MFT_REGISTER_TYPE_INFO *output_type, IMFAttributes *attributes, + CLSID **pclsids, UINT32 *pcount); HRESULT WINAPI MFLockPlatform(void); HRESULT WINAPI MFTRegister(CLSID clsid, GUID category, LPWSTR name, UINT32 flags, UINT32 cinput, MFT_REGISTER_TYPE_INFO *input_types, UINT32 coutput,
1
0
0
0
Michael Müller : mfplat: Implement MFTUnregister.
by Alexandre Julliard
09 May '17
09 May '17
Module: wine Branch: master Commit: 4615f4db3ad665957995c574236072a7abb4eb67 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4615f4db3ad665957995c5742…
Author: Michael Müller <michael(a)fds-team.de> Date: Mon May 8 22:50:38 2017 +0000 mfplat: Implement MFTUnregister. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/main.c | 38 ++++++++++++++++++++++++++++++++++++++ dlls/mfplat/mfplat.spec | 2 +- include/mfapi.h | 1 + 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index 19e3cab..b54dc9d 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -164,6 +164,44 @@ HRESULT WINAPI MFTRegister(CLSID clsid, GUID category, LPWSTR name, UINT32 flags } /*********************************************************************** + * MFTUnregister (mfplat.@) + */ +HRESULT WINAPI MFTUnregister(CLSID clsid) +{ + WCHAR buffer[64], category[MAX_PATH]; + HKEY htransform, hcategory, htmp; + DWORD size = MAX_PATH; + DWORD index = 0; + + TRACE("(%s)\n", debugstr_guid(&clsid)); + + GUIDToString(buffer, &clsid); + + if (!RegOpenKeyW(HKEY_CLASSES_ROOT, transform_keyW, &htransform)) + { + RegDeleteKeyW(htransform, buffer); + RegCloseKey(htransform); + } + + if (!RegOpenKeyW(HKEY_CLASSES_ROOT, categories_keyW, &hcategory)) + { + while (RegEnumKeyExW(hcategory, index, category, &size, NULL, NULL, NULL, NULL) == ERROR_SUCCESS) + { + if (!RegOpenKeyW(hcategory, category, &htmp)) + { + RegDeleteKeyW(htmp, buffer); + RegCloseKey(htmp); + } + size = MAX_PATH; + index++; + } + RegCloseKey(hcategory); + } + + return S_OK; +} + +/*********************************************************************** * MFStartup (mfplat.@) */ HRESULT WINAPI MFStartup(ULONG version, DWORD flags) diff --git a/dlls/mfplat/mfplat.spec b/dlls/mfplat/mfplat.spec index 042a919..dc6f402 100644 --- a/dlls/mfplat/mfplat.spec +++ b/dlls/mfplat/mfplat.spec @@ -140,7 +140,7 @@ @ stdcall MFTRegister(int128 int128 wstr long long ptr long ptr ptr) @ stub MFTRegisterLocal @ stub MFTRegisterLocalByCLSID -@ stub MFTUnregister +@ stdcall MFTUnregister(int128) @ stub MFTUnregisterLocal @ stub MFTUnregisterLocalByCLSID @ stub MFTraceError diff --git a/include/mfapi.h b/include/mfapi.h index 2eca9c3..a37d655 100644 --- a/include/mfapi.h +++ b/include/mfapi.h @@ -39,6 +39,7 @@ HRESULT WINAPI MFTRegister(CLSID clsid, GUID category, LPWSTR name, UINT32 flags HRESULT WINAPI MFShutdown(void); HRESULT WINAPI MFStartup(ULONG version, DWORD flags); HRESULT WINAPI MFUnlockPlatform(void); +HRESULT WINAPI MFTUnregister(CLSID clsid); HRESULT WINAPI MFGetPluginControl(IMFPluginControl**); #endif /* __WINE_MFAPI_H */
1
0
0
0
Michael Müller : mfplat: Implement MFTRegister.
by Alexandre Julliard
09 May '17
09 May '17
Module: wine Branch: master Commit: 993f59361a4937118f93bf41a62ec7daf8b7a336 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=993f59361a4937118f93bf41a…
Author: Michael Müller <michael(a)fds-team.de> Date: Mon May 8 22:50:26 2017 +0000 mfplat: Implement MFTRegister. Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mfplat/Makefile.in | 1 + dlls/mfplat/main.c | 117 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/mfplat/mfplat.spec | 2 +- include/mfapi.h | 3 ++ 4 files changed, 122 insertions(+), 1 deletion(-) diff --git a/dlls/mfplat/Makefile.in b/dlls/mfplat/Makefile.in index 2b5bd24..8af0525 100644 --- a/dlls/mfplat/Makefile.in +++ b/dlls/mfplat/Makefile.in @@ -1,4 +1,5 @@ MODULE = mfplat.dll +IMPORTS = advapi32 C_SRCS = \ main.c diff --git a/dlls/mfplat/main.c b/dlls/mfplat/main.c index aae81f8..19e3cab 100644 --- a/dlls/mfplat/main.c +++ b/dlls/mfplat/main.c @@ -23,15 +23,42 @@ #include "windef.h" #include "winbase.h" +#include "winuser.h" +#include "winreg.h" #include "initguid.h" #include "mfapi.h" #include "mferror.h" #include "wine/debug.h" +#include "wine/unicode.h" WINE_DEFAULT_DEBUG_CHANNEL(mfplat); +static const WCHAR transform_keyW[] = {'M','e','d','i','a','F','o','u','n','d','a','t','i','o','n','\\', + 'T','r','a','n','s','f','o','r','m','s',0}; +static const WCHAR categories_keyW[] = {'M','e','d','i','a','F','o','u','n','d','a','t','i','o','n','\\', + 'T','r','a','n','s','f','o','r','m','s','\\', + 'C','a','t','e','g','o','r','i','e','s',0}; +static const WCHAR inputtypesW[] = {'I','n','p','u','t','T','y','p','e','s',0}; +static const WCHAR outputtypesW[] = {'O','u','t','p','u','t','T','y','p','e','s',0}; +static const WCHAR szGUIDFmt[] = +{ + '%','0','8','x','-','%','0','4','x','-','%','0','4','x','-','%','0', + '2','x','%','0','2','x','-','%','0','2','x','%','0','2','x','%','0','2', + 'x','%','0','2','x','%','0','2','x','%','0','2','x',0 +}; + +static WCHAR* GUIDToString(WCHAR *str, REFGUID guid) +{ + sprintfW(str, szGUIDFmt, guid->Data1, guid->Data2, + guid->Data3, guid->Data4[0], guid->Data4[1], + guid->Data4[2], guid->Data4[3], guid->Data4[4], + guid->Data4[5], guid->Data4[6], guid->Data4[7]); + + return str; +} + BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) { switch (reason) @@ -46,6 +73,96 @@ BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved) return TRUE; } +static HRESULT register_transform(CLSID *clsid, WCHAR *name, + UINT32 cinput, MFT_REGISTER_TYPE_INFO *input_types, + UINT32 coutput, MFT_REGISTER_TYPE_INFO *output_types) +{ + static const WCHAR reg_format[] = {'%','s','\\','%','s',0}; + HKEY hclsid = 0; + WCHAR buffer[64]; + DWORD size; + WCHAR str[250]; + + GUIDToString(buffer, clsid); + sprintfW(str, reg_format, transform_keyW, buffer); + + if (RegCreateKeyW(HKEY_CLASSES_ROOT, str, &hclsid)) + return E_FAIL; + + size = (strlenW(name) + 1) * sizeof(WCHAR); + if (RegSetValueExW(hclsid, NULL, 0, REG_SZ, (BYTE *)name, size)) + goto err; + + if (cinput && input_types) + { + size = cinput * sizeof(MFT_REGISTER_TYPE_INFO); + if (RegSetValueExW(hclsid, inputtypesW, 0, REG_BINARY, (BYTE *)input_types, size)) + goto err; + } + + if (coutput && output_types) + { + size = coutput * sizeof(MFT_REGISTER_TYPE_INFO); + if (RegSetValueExW(hclsid, outputtypesW, 0, REG_BINARY, (BYTE *)output_types, size)) + goto err; + } + + RegCloseKey(hclsid); + return S_OK; + +err: + RegCloseKey(hclsid); + return E_FAIL; +} + +static HRESULT register_category(CLSID *clsid, GUID *category) +{ + static const WCHAR reg_format[] = {'%','s','\\','%','s','\\','%','s',0}; + HKEY htmp1; + WCHAR guid1[64], guid2[64]; + WCHAR str[350]; + + GUIDToString(guid1, category); + GUIDToString(guid2, clsid); + + sprintfW(str, reg_format, categories_keyW, guid1, guid2); + + if (RegCreateKeyW(HKEY_CLASSES_ROOT, str, &htmp1)) + return E_FAIL; + + RegCloseKey(htmp1); + return S_OK; +} + +/*********************************************************************** + * MFTRegister (mfplat.@) + */ +HRESULT WINAPI MFTRegister(CLSID clsid, GUID category, LPWSTR name, UINT32 flags, UINT32 cinput, + MFT_REGISTER_TYPE_INFO *input_types, UINT32 coutput, + MFT_REGISTER_TYPE_INFO *output_types, IMFAttributes *attributes) +{ + HRESULT hr; + + TRACE("(%s, %s, %s, %x, %u, %p, %u, %p, %p)\n", debugstr_guid(&clsid), debugstr_guid(&category), + debugstr_w(name), flags, cinput, input_types, + coutput, output_types, attributes); + + if (attributes) + FIXME("attributes not yet supported.\n"); + + if (flags) + FIXME("flags not yet supported.\n"); + + hr = register_transform(&clsid, name, cinput, input_types, coutput, output_types); + if(FAILED(hr)) + ERR("Failed to write register transform\n"); + + if (SUCCEEDED(hr)) + hr = register_category(&clsid, &category); + + return hr; +} + /*********************************************************************** * MFStartup (mfplat.@) */ diff --git a/dlls/mfplat/mfplat.spec b/dlls/mfplat/mfplat.spec index 9c96f436..042a919 100644 --- a/dlls/mfplat/mfplat.spec +++ b/dlls/mfplat/mfplat.spec @@ -137,7 +137,7 @@ @ stub MFTEnum @ stub MFTEnumEx @ stub MFTGetInfo -@ stub MFTRegister +@ stdcall MFTRegister(int128 int128 wstr long long ptr long ptr ptr) @ stub MFTRegisterLocal @ stub MFTRegisterLocalByCLSID @ stub MFTUnregister diff --git a/include/mfapi.h b/include/mfapi.h index 5219ce1..2eca9c3 100644 --- a/include/mfapi.h +++ b/include/mfapi.h @@ -33,6 +33,9 @@ HRESULT WINAPI MFCancelWorkItem(MFWORKITEM_KEY key); HRESULT WINAPI MFCreateAttributes(IMFAttributes **attributes, UINT32 size); HRESULT WINAPI MFGetTimerPeriodicity(DWORD *periodicity); HRESULT WINAPI MFLockPlatform(void); +HRESULT WINAPI MFTRegister(CLSID clsid, GUID category, LPWSTR name, UINT32 flags, UINT32 cinput, + MFT_REGISTER_TYPE_INFO *input_types, UINT32 coutput, + MFT_REGISTER_TYPE_INFO *output_types, IMFAttributes *attributes); HRESULT WINAPI MFShutdown(void); HRESULT WINAPI MFStartup(ULONG version, DWORD flags); HRESULT WINAPI MFUnlockPlatform(void);
1
0
0
0
Piotr Caban : msvcr100: Add reader_writer_lock:: scoped_lock implementation.
by Alexandre Julliard
09 May '17
09 May '17
Module: wine Branch: master Commit: 05a6e5261305259a8d2921b3bab81488b9b2210b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=05a6e5261305259a8d2921b3b…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Tue May 9 16:34:49 2017 +0200 msvcr100: Add reader_writer_lock::scoped_lock implementation. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/concrt140/concrt140.spec | 16 ++++++------- dlls/msvcr100/msvcr100.spec | 16 ++++++------- dlls/msvcr110/msvcr110.spec | 24 +++++++++---------- dlls/msvcr120/msvcr120.spec | 24 +++++++++---------- dlls/msvcr120_app/msvcr120_app.spec | 24 +++++++++---------- dlls/msvcrt/lock.c | 48 +++++++++++++++++++++++++++++++++++++ 6 files changed, 100 insertions(+), 52 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=05a6e5261305259a8d292…
1
0
0
0
Józef Kucia : d3d11: Implement d3d11_class_linkage_GetDevice().
by Alexandre Julliard
09 May '17
09 May '17
Module: wine Branch: master Commit: feb5aa437096c5aca1343556317dfa0eb1a327e8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=feb5aa437096c5aca13435563…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue May 9 12:51:43 2017 +0200 d3d11: Implement d3d11_class_linkage_GetDevice(). 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/d3d11_private.h | 1 + dlls/d3d11/shader.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dlls/d3d11/d3d11_private.h b/dlls/d3d11/d3d11_private.h index cbc8d7c..b86486e 100644 --- a/dlls/d3d11/d3d11_private.h +++ b/dlls/d3d11/d3d11_private.h @@ -373,6 +373,7 @@ struct d3d11_class_linkage LONG refcount; struct wined3d_private_store private_store; + ID3D11Device *device; }; HRESULT d3d11_class_linkage_create(struct d3d_device *device, diff --git a/dlls/d3d11/shader.c b/dlls/d3d11/shader.c index b8c50d9..3699851 100644 --- a/dlls/d3d11/shader.c +++ b/dlls/d3d11/shader.c @@ -2127,8 +2127,12 @@ static ULONG STDMETHODCALLTYPE d3d11_class_linkage_Release(ID3D11ClassLinkage *i if (!refcount) { + ID3D11Device *device = class_linkage->device; + wined3d_private_store_cleanup(&class_linkage->private_store); HeapFree(GetProcessHeap(), 0, class_linkage); + + ID3D11Device_Release(device); } return refcount; @@ -2137,7 +2141,11 @@ static ULONG STDMETHODCALLTYPE d3d11_class_linkage_Release(ID3D11ClassLinkage *i static void STDMETHODCALLTYPE d3d11_class_linkage_GetDevice(ID3D11ClassLinkage *iface, ID3D11Device **device) { - FIXME("iface %p, device %p stub!\n", iface, device); + struct d3d11_class_linkage *class_linkage = impl_from_ID3D11ClassLinkage(iface); + + TRACE("iface %p, device %p.\n", iface, device); + + ID3D11Device_AddRef(*device = class_linkage->device); } static HRESULT STDMETHODCALLTYPE d3d11_class_linkage_GetPrivateData(ID3D11ClassLinkage *iface, @@ -2218,6 +2226,8 @@ HRESULT d3d11_class_linkage_create(struct d3d_device *device, struct d3d11_class object->refcount = 1; wined3d_private_store_init(&object->private_store); + ID3D11Device_AddRef(object->device = &device->ID3D11Device_iface); + TRACE("Created class linkage %p.\n", object); *class_linkage = object;
1
0
0
0
Józef Kucia : wined3d: Ignore unhandled shader data types.
by Alexandre Julliard
09 May '17
09 May '17
Module: wine Branch: master Commit: 613a7e78cb2b4331e45e2b4891089e68f740c59c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=613a7e78cb2b4331e45e2b489…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue May 9 12:51:42 2017 +0200 wined3d: Ignore unhandled shader data types. This opcode may contain various types of additional data, e.g. shader messages produced by the HLSL printf() function. It can generally be safely ignored. 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/shader_sm4.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c index 4e0fb83..601a639 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -498,8 +498,8 @@ static void shader_sm4_read_shader_data(struct wined3d_shader_instruction *ins, type = (opcode_token & WINED3D_SM4_SHADER_DATA_TYPE_MASK) >> WINED3D_SM4_SHADER_DATA_TYPE_SHIFT; if (type != WINED3D_SM4_SHADER_DATA_IMMEDIATE_CONSTANT_BUFFER) { - FIXME("Unhandled shader data type %#x.\n", type); - ins->handler_idx = WINED3DSIH_TABLE_SIZE; + FIXME("Ignoring shader data type %#x.\n", type); + ins->handler_idx = WINED3DSIH_NOP; return; }
1
0
0
0
Józef Kucia : wined3d: Set geometry shader irrespective of vertex shader.
by Alexandre Julliard
09 May '17
09 May '17
Module: wine Branch: master Commit: 864bcfe6e6ca6feeb4e2261588f4d88e964c92f9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=864bcfe6e6ca6feeb4e226158…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue May 9 12:51:41 2017 +0200 wined3d: Set geometry shader irrespective of vertex shader. 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/glsl_shader.c | 43 +++++++++++++------------------------------ 1 file changed, 13 insertions(+), 30 deletions(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 5305182..e482926 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -9124,47 +9124,17 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const vs_list = &ctx_data->glsl_program->vs.shader_entry; if (use_vs(state)) - { vshader = state->shader[WINED3D_SHADER_TYPE_VERTEX]; - gshader = state->shader[WINED3D_SHADER_TYPE_GEOMETRY]; - - if (!(context->shader_update_mask & (1u << WINED3D_SHADER_TYPE_GEOMETRY)) - && ctx_data->glsl_program->gs.id) - { - gs_id = ctx_data->glsl_program->gs.id; - } - else if (gshader) - { - struct gs_compile_args args; - - find_gs_compile_args(state, gshader, &args); - gs_id = find_glsl_geometry_shader(context, priv, gshader, &args); - } - } } else if (use_vs(state)) { struct vs_compile_args vs_compile_args; vshader = state->shader[WINED3D_SHADER_TYPE_VERTEX]; - gshader = state->shader[WINED3D_SHADER_TYPE_GEOMETRY]; find_vs_compile_args(state, vshader, context->stream_info.swizzle_map, &vs_compile_args, d3d_info); vs_id = find_glsl_vshader(context, priv, vshader, &vs_compile_args); vs_list = &vshader->linked_programs; - - if (!(context->shader_update_mask & (1u << WINED3D_SHADER_TYPE_GEOMETRY)) - && ctx_data->glsl_program->gs.id) - { - gs_id = ctx_data->glsl_program->gs.id; - } - else if (gshader) - { - struct gs_compile_args gs_compile_args; - - find_gs_compile_args(state, gshader, &gs_compile_args); - gs_id = find_glsl_geometry_shader(context, priv, gshader, &gs_compile_args); - } } else if (priv->vertex_pipe == &glsl_vertex_pipe) { @@ -9177,6 +9147,19 @@ static void set_glsl_shader_program(const struct wined3d_context *context, const vs_list = &ffp_shader->linked_programs; } + gshader = state->shader[WINED3D_SHADER_TYPE_GEOMETRY]; + if (!(context->shader_update_mask & (1u << WINED3D_SHADER_TYPE_GEOMETRY)) && ctx_data->glsl_program) + { + gs_id = ctx_data->glsl_program->gs.id; + } + else if (gshader) + { + struct gs_compile_args args; + + find_gs_compile_args(state, gshader, &args); + gs_id = find_glsl_geometry_shader(context, priv, gshader, &args); + } + if (!(context->shader_update_mask & (1u << WINED3D_SHADER_TYPE_PIXEL)) && ctx_data->glsl_program) { ps_id = ctx_data->glsl_program->ps.id;
1
0
0
0
← Newer
1
...
45
46
47
48
49
50
51
...
64
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
Results per page:
10
25
50
100
200