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
March 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
785 discussions
Start a n
N
ew thread
Hans Leidekker : kernel32: Return a non-empty username from GetNamedPipeHandleState.
by Alexandre Julliard
07 Mar '18
07 Mar '18
Module: wine Branch: master Commit: 7a07a5e34f36334fac9b63c01c6a80d5f8b5d75c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7a07a5e34f36334fac9b63c0…
Author: Hans Leidekker <hans(a)codeweavers.com> Date: Wed Mar 7 16:59:39 2018 +0100 kernel32: Return a non-empty username from GetNamedPipeHandleState. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/sync.c | 35 ++++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/dlls/kernel32/sync.c b/dlls/kernel32/sync.c index b92c88d..972dbcc 100644 --- a/dlls/kernel32/sync.c +++ b/dlls/kernel32/sync.c @@ -40,6 +40,7 @@ #include "winioctl.h" #include "ddk/wdm.h" +#include "wine/library.h" #include "wine/unicode.h" #include "kernel_private.h" @@ -1784,16 +1785,22 @@ BOOL WINAPI GetNamedPipeHandleStateA( LPDWORD lpMaxCollectionCount, LPDWORD lpCollectDataTimeout, LPSTR lpUsername, DWORD nUsernameMaxSize) { - WARN("%p %p %p %p %p %p %d: semi-stub\n", - hNamedPipe, lpState, lpCurInstances, - lpMaxCollectionCount, lpCollectDataTimeout, - lpUsername, nUsernameMaxSize); + WCHAR *username = NULL; + BOOL ret; - if (lpUsername && nUsernameMaxSize) - *lpUsername = 0; + WARN("%p %p %p %p %p %p %d: semi-stub\n", hNamedPipe, lpState, lpCurInstances, + lpMaxCollectionCount, lpCollectDataTimeout, lpUsername, nUsernameMaxSize); + + if (lpUsername && nUsernameMaxSize && + !(username = HeapAlloc(GetProcessHeap(), 0, nUsernameMaxSize * sizeof(WCHAR)))) return FALSE; + + ret = GetNamedPipeHandleStateW(hNamedPipe, lpState, lpCurInstances, lpMaxCollectionCount, + lpCollectDataTimeout, username, nUsernameMaxSize); + if (ret && username) + WideCharToMultiByte(CP_ACP, 0, username, -1, lpUsername, nUsernameMaxSize, NULL, NULL); - return GetNamedPipeHandleStateW(hNamedPipe, lpState, lpCurInstances, - lpMaxCollectionCount, lpCollectDataTimeout, NULL, 0); + HeapFree(GetProcessHeap(), 0, username); + return ret; } /*********************************************************************** @@ -1807,10 +1814,8 @@ BOOL WINAPI GetNamedPipeHandleStateW( IO_STATUS_BLOCK iosb; NTSTATUS status; - FIXME("%p %p %p %p %p %p %d: semi-stub\n", - hNamedPipe, lpState, lpCurInstances, - lpMaxCollectionCount, lpCollectDataTimeout, - lpUsername, nUsernameMaxSize); + FIXME("%p %p %p %p %p %p %d: semi-stub\n", hNamedPipe, lpState, lpCurInstances, + lpMaxCollectionCount, lpCollectDataTimeout, lpUsername, nUsernameMaxSize); if (lpMaxCollectionCount) *lpMaxCollectionCount = 0; @@ -1819,7 +1824,11 @@ BOOL WINAPI GetNamedPipeHandleStateW( *lpCollectDataTimeout = 0; if (lpUsername && nUsernameMaxSize) - *lpUsername = 0; + { + const char *username = wine_get_user_name(); + int len = MultiByteToWideChar(CP_UNIXCP, 0, username, -1, lpUsername, nUsernameMaxSize); + if (!len) *lpUsername = 0; + } if (lpState) {
1
0
0
0
Julian Rüger : po: Update German translation.
by Alexandre Julliard
07 Mar '18
07 Mar '18
Module: wine Branch: master Commit: e5bed7c210aa65421d06cd579da5627cc592017a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e5bed7c210aa65421d06cd57…
Author: Julian Rüger <jr98(a)gmx.net> Date: Wed Mar 7 15:57:09 2018 +0100 po: Update German translation. Signed-off-by: Julian Rüger <jr98(a)gmx.net> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- po/de.po | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/po/de.po b/po/de.po index b201e62..fe44d5f 100644 --- a/po/de.po +++ b/po/de.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-01-17 16:21+0100\n" +"PO-Revision-Date: 2018-03-07 15:56+0100\n" "Last-Translator: Julian Rüger\n" "Language-Team: German\n" "Language: de\n" @@ -6679,10 +6679,8 @@ msgid "Connection reset by peer.\n" msgstr "Verbindung von Gegenstelle zurückgesetzt.\n" #: winerror.mc:3760 -#, fuzzy -#| msgid "Message 0x%1 not found in file %2.\n" msgid "No Signature found in file.\n" -msgstr "Meldung 0x%1 nicht in Datei %2 gefunden.\n" +msgstr "Keine Signatur in Datei gefunden.\n" #: localspl.rc:31 localui.rc:31 winspool.rc:30 msgid "Local Port"
1
0
0
0
Zhiyi Zhang : msvcr120: Add __free_locale.
by Alexandre Julliard
07 Mar '18
07 Mar '18
Module: wine Branch: master Commit: a8cc3522b2bbc966cec321a0c0f899784f932df5 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a8cc3522b2bbc966cec321a0…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Wed Mar 7 09:28:03 2018 -0600 msvcr120: Add __free_locale. Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcr100/msvcr100.spec | 2 +- dlls/msvcr110/msvcr110.spec | 2 +- dlls/msvcr120/msvcr120.spec | 2 +- dlls/msvcr120_app/msvcr120_app.spec | 2 +- dlls/msvcr80/msvcr80.spec | 2 +- dlls/msvcr90/msvcr90.spec | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 6ccd250..20d8848 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -588,7 +588,7 @@ @ stub ___fls_getvalue@4 @ stub ___fls_setvalue@8 @ cdecl __fpecode() -@ stub __free_locale +@ cdecl __free_locale(ptr) MSVCRT__free_locale @ stub __get_current_locale @ stub __get_flsindex @ stub __get_tlsindex diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index 925b6a5..437ecef 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -936,7 +936,7 @@ @ cdecl __doserrno() MSVCRT___doserrno @ cdecl __dstbias() MSVCRT___p__dstbias @ cdecl __fpecode() -@ stub __free_locale +@ cdecl __free_locale(ptr) MSVCRT__free_locale @ stub __get_current_locale @ stub __get_flsindex @ stub __get_tlsindex diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index b6f0e1f..9aec9e0 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -926,7 +926,7 @@ @ cdecl __doserrno() MSVCRT___doserrno @ cdecl __dstbias() MSVCRT___p__dstbias @ cdecl __fpecode() -@ stub __free_locale +@ cdecl __free_locale(ptr) MSVCRT__free_locale @ stub __get_current_locale @ stub __get_flsindex @ stub __get_tlsindex diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index 7a9b6aa..3075bbc 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -902,7 +902,7 @@ @ cdecl __doserrno() msvcr120.__doserrno @ cdecl __dstbias() msvcr120.__dstbias @ cdecl __fpecode() msvcr120.__fpecode -@ stub __free_locale +@ cdecl __free_locale(ptr) msvcr120.__free_locale @ stub __get_current_locale @ stub __get_flsindex @ stub __get_tlsindex diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index 73832c1..4a86c7f 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -226,7 +226,7 @@ @ stub -arch=i386 ___fls_setvalue@8 @ stub -arch=x86_64 __fls_setvalue @ cdecl __fpecode() -@ stub __free_locale +@ cdecl __free_locale(ptr) MSVCRT__free_locale @ stub __get_app_type @ stub __get_current_locale @ stub __get_flsindex diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index d962479..d3d480d 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -215,7 +215,7 @@ @ stub ___fls_getvalue@4 @ stub ___fls_setvalue@8 @ cdecl __fpecode() -@ stub __free_locale +@ cdecl __free_locale(ptr) MSVCRT__free_locale @ stub __get_app_type @ stub __get_current_locale @ stub __get_flsindex
1
0
0
0
Andrey Gusev : ninput: Add stub dll.
by Alexandre Julliard
07 Mar '18
07 Mar '18
Module: wine Branch: master Commit: 6b984a40c4ff0923793105b64cda96aeb2acdd3c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6b984a40c4ff0923793105b6…
Author: Andrey Gusev <andrey.goosev(a)gmail.com> Date: Tue Mar 6 18:55:06 2018 +0200 ninput: Add stub dll. Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 2 ++ configure.ac | 1 + dlls/ninput/Makefile.in | 4 ++++ dlls/ninput/main.c | 41 +++++++++++++++++++++++++++++++++++++++++ dlls/ninput/ninput.spec | 24 ++++++++++++++++++++++++ 5 files changed, 72 insertions(+) diff --git a/configure b/configure index b4cfc38..c1516af 100755 --- a/configure +++ b/configure @@ -1403,6 +1403,7 @@ enable_netapi32 enable_netcfgx enable_netprofm enable_newdev +enable_ninput enable_normaliz enable_npmshtml enable_npptools @@ -18818,6 +18819,7 @@ wine_fn_config_makefile dlls/netcfgx/tests enable_tests wine_fn_config_makefile dlls/netprofm enable_netprofm wine_fn_config_makefile dlls/netprofm/tests enable_tests wine_fn_config_makefile dlls/newdev enable_newdev +wine_fn_config_makefile dlls/ninput enable_ninput wine_fn_config_makefile dlls/normaliz enable_normaliz wine_fn_config_makefile dlls/npmshtml enable_npmshtml wine_fn_config_makefile dlls/npptools enable_npptools diff --git a/configure.ac b/configure.ac index 702267e..b6b66fa 100644 --- a/configure.ac +++ b/configure.ac @@ -3470,6 +3470,7 @@ WINE_CONFIG_MAKEFILE(dlls/netcfgx/tests) WINE_CONFIG_MAKEFILE(dlls/netprofm) WINE_CONFIG_MAKEFILE(dlls/netprofm/tests) WINE_CONFIG_MAKEFILE(dlls/newdev) +WINE_CONFIG_MAKEFILE(dlls/ninput) WINE_CONFIG_MAKEFILE(dlls/normaliz) WINE_CONFIG_MAKEFILE(dlls/npmshtml) WINE_CONFIG_MAKEFILE(dlls/npptools) diff --git a/dlls/ninput/Makefile.in b/dlls/ninput/Makefile.in new file mode 100644 index 0000000..3d3cc7f --- /dev/null +++ b/dlls/ninput/Makefile.in @@ -0,0 +1,4 @@ +MODULE = ninput.dll + +C_SRCS = \ + main.c diff --git a/dlls/ninput/main.c b/dlls/ninput/main.c new file mode 100644 index 0000000..0f23128 --- /dev/null +++ b/dlls/ninput/main.c @@ -0,0 +1,41 @@ +/* + * Copyright 2018 Andrey Gusev + * + * 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 "config.h" +#include <stdarg.h> + +#include "windef.h" +#include "winbase.h" +#include "wine/debug.h" + +WINE_DEFAULT_DEBUG_CHANNEL(ninput); + +BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD reason, LPVOID lpv) +{ + TRACE("(%p, %d, %p)\n", hInstDLL, reason, lpv); + + switch (reason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hInstDLL); + break; + } + return TRUE; +} diff --git a/dlls/ninput/ninput.spec b/dlls/ninput/ninput.spec new file mode 100644 index 0000000..372beb2 --- /dev/null +++ b/dlls/ninput/ninput.spec @@ -0,0 +1,24 @@ +@ stub DefaultInputHandler +@ stub AddPointerInteractionContext +@ stub BufferPointerPacketsInteractionContext +@ stub CreateInteractionContext +@ stub DestroyInteractionContext +@ stub GetCrossSlideParameterInteractionContext +@ stub GetInertiaParameterInteractionContext +@ stub GetInteractionConfigurationInteractionContext +@ stub GetMouseWheelParameterInteractionContext +@ stub GetPropertyInteractionContext +@ stub GetStateInteractionContext +@ stub ProcessBufferedPacketsInteractionContext +@ stub ProcessInertiaInteractionContext +@ stub ProcessPointerFramesInteractionContext +@ stub RegisterOutputCallbackInteractionContext +@ stub RemovePointerInteractionContext +@ stub ResetInteractionContext +@ stub SetCrossSlideParametersInteractionContext +@ stub SetInertiaParameterInteractionContext +@ stub SetInteractionConfigurationInteractionContext +@ stub SetMouseWheelParameterInteractionContext +@ stub SetPivotInteractionContext +@ stub SetPropertyInteractionContext +@ stub StopInteractionContext
1
0
0
0
Henri Verbeet : wined3d: Pass a texture and sub-resource index to surface_depth_blt_fbo().
by Alexandre Julliard
07 Mar '18
07 Mar '18
Module: wine Branch: master Commit: 243e2ddfde7a9a7d9e3577f42b96ed5244abac41 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=243e2ddfde7a9a7d9e3577f4…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Mar 7 11:14:43 2018 +0330 wined3d: Pass a texture and sub-resource index to surface_depth_blt_fbo(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 23b7fa3..3bf72e4 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -259,24 +259,20 @@ static BOOL texture2d_is_full_rect(const struct wined3d_texture *texture, unsign return TRUE; } -static void surface_depth_blt_fbo(const struct wined3d_device *device, - struct wined3d_surface *src_surface, DWORD src_location, const RECT *src_rect, - struct wined3d_surface *dst_surface, DWORD dst_location, const RECT *dst_rect) +static void texture2d_depth_blt_fbo(const struct wined3d_device *device, + struct wined3d_texture *src_texture, unsigned int src_sub_resource_idx, DWORD src_location, + const RECT *src_rect, struct wined3d_texture *dst_texture, unsigned int dst_sub_resource_idx, + DWORD dst_location, const RECT *dst_rect) { - unsigned int dst_sub_resource_idx = surface_get_sub_resource_idx(dst_surface); - unsigned int src_sub_resource_idx = surface_get_sub_resource_idx(src_surface); - struct wined3d_texture *dst_texture = dst_surface->container; - struct wined3d_texture *src_texture = src_surface->container; const struct wined3d_gl_info *gl_info; struct wined3d_context *context; DWORD src_mask, dst_mask; GLbitfield gl_mask; - TRACE("device %p\n", device); - TRACE("src_surface %p, src_location %s, src_rect %s,\n", - src_surface, wined3d_debug_location(src_location), wine_dbgstr_rect(src_rect)); - TRACE("dst_surface %p, dst_location %s, dst_rect %s.\n", - dst_surface, wined3d_debug_location(dst_location), wine_dbgstr_rect(dst_rect)); + TRACE("device %p, src_texture %p, src_sub_resource_idx %u, src_location %s, src_rect %s, " + "dst_texture %p, dst_sub_resource_idx %u, dst_location %s, dst_rect %s.\n", device, + src_texture, src_sub_resource_idx, wined3d_debug_location(src_location), wine_dbgstr_rect(src_rect), + dst_texture, dst_sub_resource_idx, wined3d_debug_location(dst_location), wine_dbgstr_rect(dst_rect)); src_mask = src_texture->resource.format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL); dst_mask = dst_texture->resource.format_flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL); @@ -320,10 +316,12 @@ static void surface_depth_blt_fbo(const struct wined3d_device *device, gl_info = context->gl_info; - context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, NULL, src_surface, src_location); + context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, NULL, + src_texture->sub_resources[src_sub_resource_idx].u.surface, src_location); context_check_fbo_status(context, GL_READ_FRAMEBUFFER); - context_apply_fbo_state_blit(context, GL_DRAW_FRAMEBUFFER, NULL, dst_surface, dst_location); + context_apply_fbo_state_blit(context, GL_DRAW_FRAMEBUFFER, NULL, + dst_texture->sub_resources[dst_sub_resource_idx].u.surface, dst_location); context_set_draw_buffer(context, GL_NONE); context_check_fbo_status(context, GL_DRAW_FRAMEBUFFER); context_invalidate_state(context, STATE_FRAMEBUFFER); @@ -2418,7 +2416,9 @@ static DWORD fbo_blitter_blit(struct wined3d_blitter *blitter, enum wined3d_blit if (blit_op == WINED3D_BLIT_OP_DEPTH_BLIT) { TRACE("Depth/stencil blit.\n"); - surface_depth_blt_fbo(device, src_surface, src_location, src_rect, dst_surface, dst_location, dst_rect); + texture2d_depth_blt_fbo(device, src_surface->container, surface_get_sub_resource_idx(src_surface), + src_location, src_rect, dst_surface->container, surface_get_sub_resource_idx(dst_surface), + dst_location, dst_rect); return dst_location; }
1
0
0
0
Henri Verbeet : wined3d: Pass boxes instead of rectangles to wined3d_surface_blt().
by Alexandre Julliard
07 Mar '18
07 Mar '18
Module: wine Branch: master Commit: 433ac881ddca0e9b02975efa7d599d369e2866cb URL:
https://source.winehq.org/git/wine.git/?a=commit;h=433ac881ddca0e9b02975efa…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Mar 7 11:14:42 2018 +0330 wined3d: Pass boxes instead of rectangles to wined3d_surface_blt(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/cs.c | 7 ++----- dlls/wined3d/surface.c | 36 +++++++++++++++++++----------------- dlls/wined3d/wined3d_private.h | 4 ++-- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 9f3ff46..6e0ecd1 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -2050,17 +2050,14 @@ static void wined3d_cs_exec_blt_sub_resource(struct wined3d_cs *cs, const void * { struct wined3d_surface *dst_surface, *src_surface; struct wined3d_texture *dst_texture, *src_texture; - RECT dst_rect, src_rect; dst_texture = texture_from_resource(op->dst_resource); src_texture = texture_from_resource(op->src_resource); dst_surface = dst_texture->sub_resources[op->dst_sub_resource_idx].u.surface; src_surface = src_texture->sub_resources[op->src_sub_resource_idx].u.surface; - SetRect(&dst_rect, op->dst_box.left, op->dst_box.top, op->dst_box.right, op->dst_box.bottom); - SetRect(&src_rect, op->src_box.left, op->src_box.top, op->src_box.right, op->src_box.bottom); - if (FAILED(wined3d_surface_blt(dst_surface, &dst_rect, src_surface, - &src_rect, op->flags, &op->fx, op->filter))) + if (FAILED(wined3d_surface_blt(dst_surface, &op->dst_box, src_surface, + &op->src_box, op->flags, &op->fx, op->filter))) FIXME("Blit failed.\n"); } else if (op->dst_resource->type == WINED3D_RTYPE_TEXTURE_3D) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index f2a4a72..23b7fa3 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3696,12 +3696,10 @@ struct wined3d_blitter *wined3d_cpu_blitter_create(void) return blitter; } -HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect, - struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, +HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const struct wined3d_box *dst_box, + struct wined3d_surface *src_surface, const struct wined3d_box *src_box, DWORD flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) { - struct wined3d_box dst_box = {dst_rect->left, dst_rect->top, dst_rect->right, dst_rect->bottom, 0, 1}; - struct wined3d_box src_box = {src_rect->left, src_rect->top, src_rect->right, src_rect->bottom, 0, 1}; unsigned int dst_sub_resource_idx = surface_get_sub_resource_idx(dst_surface); unsigned int src_sub_resource_idx = surface_get_sub_resource_idx(src_surface); struct wined3d_texture_sub_resource *src_sub_resource, *dst_sub_resource; @@ -3715,14 +3713,15 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst struct wined3d_context *context; enum wined3d_blit_op blit_op; BOOL scale, convert, resolve; + RECT src_rect, dst_rect; static const DWORD simple_blit = WINED3D_BLT_SRC_CKEY | WINED3D_BLT_SRC_CKEY_OVERRIDE | WINED3D_BLT_ALPHA_TEST | WINED3D_BLT_RAW; - TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n", - dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), + TRACE("dst_surface %p, dst_box %s, src_surface %p, src_box %s, flags %#x, fx %p, filter %s.\n", + dst_surface, debug_box(dst_box), src_surface, debug_box(src_box), flags, fx, debug_d3dtexturefiltertype(filter)); TRACE("Usage is %s.\n", debug_d3dusage(dst_texture->resource.usage)); @@ -3737,6 +3736,9 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst fx->src_color_key.color_space_high_value); } + SetRect(&src_rect, src_box->left, src_box->top, src_box->right, src_box->bottom); + SetRect(&dst_rect, dst_box->left, dst_box->top, dst_box->right, dst_box->bottom); + if (!fx || !(fx->fx)) flags &= ~WINED3D_BLT_FX; @@ -3777,8 +3779,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst goto fallback; } - scale = src_rect->right - src_rect->left != dst_rect->right - dst_rect->left - || src_rect->bottom - src_rect->top != dst_rect->bottom - dst_rect->top; + scale = src_box->right - src_box->left != dst_box->right - dst_box->left + || src_box->bottom - src_box->top != dst_box->bottom - dst_box->top; convert = src_texture->resource.format->id != dst_texture->resource.format->id; resolve = src_texture->resource.multisample_type != dst_texture->resource.multisample_type; @@ -3799,8 +3801,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst context = context_acquire(device, dst_texture, dst_sub_resource_idx); valid_locations = device->blitter->ops->blitter_blit(device->blitter, WINED3D_BLIT_OP_DEPTH_BLIT, context, - src_surface, src_texture->resource.draw_binding, src_rect, - dst_surface, dst_location, dst_rect, NULL, filter); + src_surface, src_texture->resource.draw_binding, &src_rect, + dst_surface, dst_location, &dst_rect, NULL, filter); context_release(context); wined3d_texture_validate_location(dst_texture, dst_sub_resource_idx, valid_locations); @@ -3854,9 +3856,9 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst TRACE("Not doing upload because the destination format needs conversion.\n"); else { - POINT dst_point = {dst_rect->left, dst_rect->top}; + POINT dst_point = {dst_box->left, dst_box->top}; - if (SUCCEEDED(surface_upload_from_surface(dst_surface, &dst_point, src_surface, src_rect))) + if (SUCCEEDED(surface_upload_from_surface(dst_surface, &dst_point, src_surface, &src_rect))) { if (!wined3d_resource_is_offscreen(&dst_texture->resource)) { @@ -3903,8 +3905,8 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst context = context_acquire(device, dst_texture, dst_sub_resource_idx); valid_locations = device->blitter->ops->blitter_blit(device->blitter, blit_op, context, - src_surface, src_texture->resource.draw_binding, src_rect, - dst_surface, dst_location, dst_rect, colour_key, filter); + src_surface, src_texture->resource.draw_binding, &src_rect, + dst_surface, dst_location, &dst_rect, colour_key, filter); context_release(context); wined3d_texture_validate_location(dst_texture, dst_sub_resource_idx, valid_locations); @@ -3914,10 +3916,10 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst fallback: /* Special cases for render targets. */ - if (SUCCEEDED(surface_blt_special(dst_surface, dst_rect, src_surface, src_rect, flags, fx, filter))) + if (SUCCEEDED(surface_blt_special(dst_surface, &dst_rect, src_surface, &src_rect, flags, fx, filter))) return WINED3D_OK; cpu: - return surface_cpu_blt(dst_texture, dst_sub_resource_idx, &dst_box, - src_texture, src_sub_resource_idx, &src_box, flags, fx, filter); + return surface_cpu_blt(dst_texture, dst_sub_resource_idx, dst_box, + src_texture, src_sub_resource_idx, src_box, flags, fx, filter); } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 2b56543..853f9e2 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3343,8 +3343,8 @@ static inline struct wined3d_texture_sub_resource *surface_get_sub_resource(stru return &surface->container->sub_resources[surface_get_sub_resource_idx(surface)]; } -HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_rect, - struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, +HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const struct wined3d_box *dst_box, + struct wined3d_surface *src_surface, const struct wined3d_box *src_box, DWORD flags, const struct wined3d_blt_fx *blt_fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, struct wined3d_context *context) DECLSPEC_HIDDEN;
1
0
0
0
Henri Verbeet : wined3d: Pass a texture and sub-resource index to surface_load_texture().
by Alexandre Julliard
07 Mar '18
07 Mar '18
Module: wine Branch: master Commit: 92008ec4cfe362e60b1991022af9e198b030e227 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=92008ec4cfe362e60b199102…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Mar 7 11:14:41 2018 +0330 wined3d: Pass a texture and sub-resource index to surface_load_texture(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 28 ++++++++++++++-------------- dlls/wined3d/texture.c | 5 +---- dlls/wined3d/wined3d_private.h | 4 ++-- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 4bcd94a..f2a4a72 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2153,13 +2153,11 @@ BOOL texture2d_load_drawable(struct wined3d_texture *texture, return TRUE; } -BOOL surface_load_texture(struct wined3d_surface *surface, +BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, BOOL srgb) { unsigned int width, height, level, src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch; - unsigned int sub_resource_idx = surface_get_sub_resource_idx(surface); const struct wined3d_gl_info *gl_info = context->gl_info; - struct wined3d_texture *texture = surface->container; struct wined3d_device *device = texture->resource.device; const struct wined3d_color_key_conversion *conversion; struct wined3d_texture_sub_resource *sub_resource; @@ -2171,13 +2169,13 @@ BOOL surface_load_texture(struct wined3d_surface *surface, BOOL depth; depth = texture->resource.usage & WINED3DUSAGE_DEPTHSTENCIL; - sub_resource = surface_get_sub_resource(surface); + sub_resource = &texture->sub_resources[sub_resource_idx]; if (!depth && wined3d_settings.offscreen_rendering_mode != ORM_FBO && wined3d_resource_is_offscreen(&texture->resource) && (sub_resource->locations & WINED3D_LOCATION_DRAWABLE)) { - surface_load_fb_texture(surface, srgb, context); + surface_load_fb_texture(sub_resource->u.surface, srgb, context); return TRUE; } @@ -2194,11 +2192,13 @@ BOOL surface_load_texture(struct wined3d_surface *surface, &texture->resource, WINED3D_LOCATION_TEXTURE_SRGB)) { if (srgb) - surface_blt_fbo(device, context, WINED3D_TEXF_POINT, surface, WINED3D_LOCATION_TEXTURE_RGB, - &src_rect, surface, WINED3D_LOCATION_TEXTURE_SRGB, &src_rect); + surface_blt_fbo(device, context, WINED3D_TEXF_POINT, + sub_resource->u.surface, WINED3D_LOCATION_TEXTURE_RGB, &src_rect, + sub_resource->u.surface, WINED3D_LOCATION_TEXTURE_SRGB, &src_rect); else - surface_blt_fbo(device, context, WINED3D_TEXF_POINT, surface, WINED3D_LOCATION_TEXTURE_SRGB, - &src_rect, surface, WINED3D_LOCATION_TEXTURE_RGB, &src_rect); + surface_blt_fbo(device, context, WINED3D_TEXF_POINT, + sub_resource->u.surface, WINED3D_LOCATION_TEXTURE_SRGB, &src_rect, + sub_resource->u.surface, WINED3D_LOCATION_TEXTURE_RGB, &src_rect); return TRUE; } @@ -2212,8 +2212,8 @@ BOOL surface_load_texture(struct wined3d_surface *surface, if (fbo_blitter_supported(WINED3D_BLIT_OP_COLOR_BLIT, gl_info, &texture->resource, src_location, &texture->resource, dst_location)) - surface_blt_fbo(device, context, WINED3D_TEXF_POINT, surface, src_location, - &src_rect, surface, dst_location, &src_rect); + surface_blt_fbo(device, context, WINED3D_TEXF_POINT, sub_resource->u.surface, + src_location, &src_rect, sub_resource->u.surface, dst_location, &src_rect); return TRUE; } @@ -2225,7 +2225,7 @@ BOOL surface_load_texture(struct wined3d_surface *surface, if ((sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | texture->resource.map_binding)) == WINED3D_LOCATION_TEXTURE_RGB) { - FIXME_(d3d_perf)("Downloading RGB surface %p to reload it as sRGB.\n", surface); + FIXME_(d3d_perf)("Downloading RGB texture %p, %u to reload it as sRGB.\n", texture, sub_resource_idx); wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding); } } @@ -2234,7 +2234,7 @@ BOOL surface_load_texture(struct wined3d_surface *surface, if ((sub_resource->locations & (WINED3D_LOCATION_TEXTURE_SRGB | texture->resource.map_binding)) == WINED3D_LOCATION_TEXTURE_SRGB) { - FIXME_(d3d_perf)("Downloading sRGB surface %p to reload it as RGB.\n", surface); + FIXME_(d3d_perf)("Downloading sRGB texture %p, %u to reload it as RGB.\n", texture, sub_resource_idx); wined3d_texture_load_location(texture, sub_resource_idx, context, texture->resource.map_binding); } } @@ -2259,7 +2259,7 @@ BOOL surface_load_texture(struct wined3d_surface *surface, * getting called. */ if ((format.conv_byte_count || conversion) && texture->sub_resources[sub_resource_idx].buffer_object) { - TRACE("Removing the pbo attached to surface %p.\n", surface); + TRACE("Removing the pbo attached to texture %p, %u.\n", texture, sub_resource_idx); wined3d_texture_load_location(texture, sub_resource_idx, context, WINED3D_LOCATION_SYSMEM); wined3d_texture_set_map_binding(texture, WINED3D_LOCATION_SYSMEM); diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index eb04a46..0abf5ad 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1792,12 +1792,9 @@ static void texture2d_upload_data(struct wined3d_texture *texture, unsigned int static BOOL texture2d_load_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, DWORD location) { - struct wined3d_surface *surface; - TRACE("texture %p, sub_resource_idx %u, context %p, location %s.\n", texture, sub_resource_idx, context, wined3d_debug_location(location)); - surface = texture->sub_resources[sub_resource_idx].u.surface; switch (location) { case WINED3D_LOCATION_USER_MEMORY: @@ -1814,7 +1811,7 @@ static BOOL texture2d_load_location(struct wined3d_texture *texture, unsigned in case WINED3D_LOCATION_TEXTURE_RGB: case WINED3D_LOCATION_TEXTURE_SRGB: - return surface_load_texture(surface, context, + return texture2d_load_texture(texture, sub_resource_idx, context, location == WINED3D_LOCATION_TEXTURE_SRGB); default: diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 5003cc5..2b56543 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3240,6 +3240,8 @@ BOOL texture2d_load_renderbuffer(struct wined3d_texture *texture, unsigned int s struct wined3d_context *context, DWORD dst_location) DECLSPEC_HIDDEN; BOOL texture2d_load_sysmem(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, DWORD dst_location) DECLSPEC_HIDDEN; +BOOL texture2d_load_texture(struct wined3d_texture *texture, unsigned int sub_resource_idx, + struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; void wined3d_texture_apply_sampler_desc(struct wined3d_texture *texture, const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_context *context) DECLSPEC_HIDDEN; @@ -3346,8 +3348,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst const struct wined3d_blt_fx *blt_fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, struct wined3d_context *context) DECLSPEC_HIDDEN; -BOOL surface_load_texture(struct wined3d_surface *surface, - struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; void wined3d_surface_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx, const struct wined3d_gl_info *gl_info, const struct wined3d_format *format, const RECT *src_rect, unsigned int src_pitch, const POINT *dst_point, BOOL srgb,
1
0
0
0
Henri Verbeet : wined3d: Pass a texture and sub-resource index to surface_load_renderbuffer().
by Alexandre Julliard
07 Mar '18
07 Mar '18
Module: wine Branch: master Commit: 42a9563e43453f497846f2952c06dea80f86e1e4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=42a9563e43453f497846f295…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Mar 7 11:14:40 2018 +0330 wined3d: Pass a texture and sub-resource index to surface_load_renderbuffer(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/surface.c | 15 ++++++++------- dlls/wined3d/texture.c | 2 +- dlls/wined3d/wined3d_private.h | 4 ++-- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 1824a98..4bcd94a 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2324,17 +2324,18 @@ BOOL surface_load_texture(struct wined3d_surface *surface, } /* Context activation is done by the caller. */ -BOOL surface_load_renderbuffer(struct wined3d_surface *surface, +BOOL texture2d_load_renderbuffer(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, DWORD dst_location) { - struct wined3d_texture *texture = surface->container; - unsigned int level = surface_get_sub_resource_idx(surface) % texture->level_count; + unsigned int level = sub_resource_idx % texture->level_count; const RECT rect = {0, 0, wined3d_texture_get_level_width(texture, level), wined3d_texture_get_level_height(texture, level)}; - DWORD locations = surface_get_sub_resource(surface)->locations; - DWORD src_location; + struct wined3d_texture_sub_resource *sub_resource; + DWORD src_location, locations; + sub_resource = &texture->sub_resources[sub_resource_idx]; + locations = sub_resource->locations; if (texture->resource.usage & WINED3DUSAGE_DEPTHSTENCIL) { FIXME("Unimplemented copy from %s for depth/stencil buffers.\n", @@ -2351,8 +2352,8 @@ BOOL surface_load_renderbuffer(struct wined3d_surface *surface, else /* surface_blt_fbo will load the source location if necessary. */ src_location = WINED3D_LOCATION_TEXTURE_RGB; - surface_blt_fbo(texture->resource.device, context, WINED3D_TEXF_POINT, - surface, src_location, &rect, surface, dst_location, &rect); + surface_blt_fbo(texture->resource.device, context, WINED3D_TEXF_POINT, sub_resource->u.surface, + src_location, &rect, sub_resource->u.surface, dst_location, &rect); return TRUE; } diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 9add4a3..eb04a46 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1810,7 +1810,7 @@ static BOOL texture2d_load_location(struct wined3d_texture *texture, unsigned in case WINED3D_LOCATION_RB_RESOLVED: case WINED3D_LOCATION_RB_MULTISAMPLE: - return surface_load_renderbuffer(surface, context, location); + return texture2d_load_renderbuffer(texture, sub_resource_idx, context, location); case WINED3D_LOCATION_TEXTURE_RGB: case WINED3D_LOCATION_TEXTURE_SRGB: diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index d2addfb..5003cc5 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3236,6 +3236,8 @@ static inline unsigned int wined3d_texture_get_level_pow2_height(const struct wi BOOL texture2d_load_drawable(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context) DECLSPEC_HIDDEN; +BOOL texture2d_load_renderbuffer(struct wined3d_texture *texture, unsigned int sub_resource_idx, + struct wined3d_context *context, DWORD dst_location) DECLSPEC_HIDDEN; BOOL texture2d_load_sysmem(struct wined3d_texture *texture, unsigned int sub_resource_idx, struct wined3d_context *context, DWORD dst_location) DECLSPEC_HIDDEN; @@ -3344,8 +3346,6 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst const struct wined3d_blt_fx *blt_fx, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb, struct wined3d_context *context) DECLSPEC_HIDDEN; -BOOL surface_load_renderbuffer(struct wined3d_surface *surface, - struct wined3d_context *context, DWORD dst_location) DECLSPEC_HIDDEN; BOOL surface_load_texture(struct wined3d_surface *surface, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; void wined3d_surface_upload_data(struct wined3d_texture *texture, unsigned int sub_resource_idx,
1
0
0
0
James Woodcock : msvcrt: Gets() should handle EOF on stdin gracefully.
by Alexandre Julliard
07 Mar '18
07 Mar '18
Module: wine Branch: master Commit: 91c72ce7def5ccec3ea7f759111b0d6fb96d722b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=91c72ce7def5ccec3ea7f759…
Author: James Woodcock <james_woodcock(a)yahoo.co.uk> Date: Tue Mar 6 22:16:28 2018 -0600 msvcrt: Gets() should handle EOF on stdin gracefully. Signed-off-by: James Woodcock <james_woodcock(a)yahoo.co.uk> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/msvcrt/file.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 7022e48..6b295cf 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -4719,10 +4719,16 @@ char * CDECL MSVCRT_gets(char *buf) if(cc != '\r') *buf++ = (char)cc; } + MSVCRT__unlock_file(MSVCRT_stdin); + + if ((cc == MSVCRT_EOF) && (buf_start == buf)) + { + TRACE(":nothing read\n"); + return NULL; + } *buf = '\0'; TRACE("got '%s'\n", buf_start); - MSVCRT__unlock_file(MSVCRT_stdin); return buf_start; } @@ -4741,10 +4747,16 @@ MSVCRT_wchar_t* CDECL MSVCRT__getws(MSVCRT_wchar_t* buf) if (cc != '\r') *buf++ = (MSVCRT_wchar_t)cc; } + MSVCRT__unlock_file(MSVCRT_stdin); + + if ((cc == MSVCRT_WEOF) && (ws == buf)) + { + TRACE(":nothing read\n"); + return NULL; + } *buf = '\0'; TRACE("got %s\n", debugstr_w(ws)); - MSVCRT__unlock_file(MSVCRT_stdin); return ws; }
1
0
0
0
Zebediah Figura : devenum: Create the key in IPropertyBag::Write() instead of ParseDisplayName().
by Alexandre Julliard
07 Mar '18
07 Mar '18
Module: wine Branch: master Commit: 38482b326a7068e064a47d2ec3ccdeb9fe5d86e9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=38482b326a7068e064a47d2e…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Tue Mar 6 20:57:11 2018 -0600 devenum: Create the key in IPropertyBag::Write() instead of ParseDisplayName(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/devenum/devenum_private.h | 1 - dlls/devenum/mediacatenum.c | 65 ++++++++++++++++++++++++++++++----------- dlls/devenum/parsedisplayname.c | 21 ------------- dlls/devenum/tests/devenum.c | 2 -- 4 files changed, 48 insertions(+), 41 deletions(-) diff --git a/dlls/devenum/devenum_private.h b/dlls/devenum/devenum_private.h index 83d0ce3..a483062 100644 --- a/dlls/devenum/devenum_private.h +++ b/dlls/devenum/devenum_private.h @@ -70,7 +70,6 @@ typedef struct { IMoniker IMoniker_iface; LONG ref; - HKEY hkey; CLSID class; BOOL has_class; enum device_type type; diff --git a/dlls/devenum/mediacatenum.c b/dlls/devenum/mediacatenum.c index 0d4e01e..b0cdc6c 100644 --- a/dlls/devenum/mediacatenum.c +++ b/dlls/devenum/mediacatenum.c @@ -45,7 +45,8 @@ typedef struct { IPropertyBag IPropertyBag_iface; LONG ref; - HKEY hkey; + enum device_type type; + WCHAR path[MAX_PATH]; } RegPropBagImpl; @@ -101,7 +102,6 @@ static ULONG WINAPI DEVENUM_IPropertyBag_Release(LPPROPERTYBAG iface) ref = InterlockedDecrement(&This->ref); if (ref == 0) { - RegCloseKey(This->hkey); CoTaskMemFree(This); DEVENUM_UnlockModule(); } @@ -119,22 +119,32 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Read( DWORD type = 0; RegPropBagImpl *This = impl_from_IPropertyBag(iface); HRESULT res = S_OK; - LONG reswin32; + LONG reswin32 = ERROR_SUCCESS; + HKEY hkey; TRACE("(%p)->(%s, %p, %p)\n", This, debugstr_w(pszPropName), pVar, pErrorLog); if (!pszPropName || !pVar) return E_POINTER; - reswin32 = RegQueryValueExW(This->hkey, pszPropName, NULL, NULL, NULL, &received); + if (This->type == DEVICE_FILTER) + reswin32 = RegOpenKeyW(HKEY_CLASSES_ROOT, This->path, &hkey); + else if (This->type == DEVICE_CODEC) + reswin32 = RegOpenKeyW(HKEY_CURRENT_USER, This->path, &hkey); res = HRESULT_FROM_WIN32(reswin32); if (SUCCEEDED(res)) { + reswin32 = RegQueryValueExW(hkey, pszPropName, NULL, NULL, NULL, &received); + res = HRESULT_FROM_WIN32(reswin32); + } + + if (SUCCEEDED(res)) + { pData = HeapAlloc(GetProcessHeap(), 0, received); /* work around a GCC bug that occurs here unless we use the reswin32 variable as well */ - reswin32 = RegQueryValueExW(This->hkey, pszPropName, NULL, &type, pData, &received); + reswin32 = RegQueryValueExW(hkey, pszPropName, NULL, &type, pData, &received); res = HRESULT_FROM_WIN32(reswin32); } @@ -215,6 +225,8 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Read( HeapFree(GetProcessHeap(), 0, pData); + RegCloseKey(hkey); + TRACE("<- %x\n", res); return res; } @@ -229,6 +241,8 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Write( DWORD cbData = 0; DWORD dwType = 0; HRESULT res = S_OK; + LONG lres = ERROR_SUCCESS; + HKEY hkey; TRACE("(%p)->(%s, %p)\n", This, debugstr_w(pszPropName), pVar); @@ -265,10 +279,18 @@ static HRESULT WINAPI DEVENUM_IPropertyBag_Write( return E_FAIL; } - if (RegSetValueExW(This->hkey, - pszPropName, 0, - dwType, lpData, cbData) != ERROR_SUCCESS) - res = E_FAIL; + if (This->type == DEVICE_FILTER) + lres = RegCreateKeyW(HKEY_CLASSES_ROOT, This->path, &hkey); + else if (This->type == DEVICE_CODEC) + lres = RegCreateKeyW(HKEY_CURRENT_USER, This->path, &hkey); + res = HRESULT_FROM_WIN32(lres); + + if (SUCCEEDED(res)) + { + lres = RegSetValueExW(hkey, pszPropName, 0, dwType, lpData, cbData); + res = HRESULT_FROM_WIN32(lres); + RegCloseKey(hkey); + } if (V_VT(pVar) & VT_ARRAY) res = SafeArrayUnaccessData(V_ARRAY(pVar)); @@ -285,14 +307,28 @@ static const IPropertyBagVtbl IPropertyBag_Vtbl = DEVENUM_IPropertyBag_Write }; -static HRESULT DEVENUM_IPropertyBag_Construct(HANDLE hkey, IPropertyBag **ppBag) +static HRESULT create_PropertyBag(MediaCatMoniker *mon, IPropertyBag **ppBag) { RegPropBagImpl * rpb = CoTaskMemAlloc(sizeof(RegPropBagImpl)); if (!rpb) return E_OUTOFMEMORY; rpb->IPropertyBag_iface.lpVtbl = &IPropertyBag_Vtbl; rpb->ref = 1; - rpb->hkey = hkey; + rpb->type = mon->type; + + if (rpb->type == DEVICE_FILTER) + strcpyW(rpb->path, clsidW); + else if (rpb->type == DEVICE_CODEC) + strcpyW(rpb->path, wszActiveMovieKey); + if (mon->has_class) + { + StringFromGUID2(&mon->class, rpb->path + strlenW(rpb->path), CHARS_IN_GUID); + if (rpb->type == DEVICE_FILTER) + strcatW(rpb->path, instanceW); + strcatW(rpb->path, backslashW); + } + strcatW(rpb->path, mon->name); + *ppBag = &rpb->IPropertyBag_iface; DEVENUM_LockModule(); return S_OK; @@ -345,7 +381,6 @@ static ULONG WINAPI DEVENUM_IMediaCatMoniker_Release(IMoniker *iface) TRACE("(%p) ref=%d\n", This, ref); if (ref == 0) { - RegCloseKey(This->hkey); CoTaskMemFree(This->name); CoTaskMemFree(This); DEVENUM_UnlockModule(); @@ -487,9 +522,7 @@ static HRESULT WINAPI DEVENUM_IMediaCatMoniker_BindToStorage(IMoniker *iface, IB if (IsEqualGUID(riid, &IID_IPropertyBag)) { - HANDLE hkey; - DuplicateHandle(GetCurrentProcess(), This->hkey, GetCurrentProcess(), &hkey, 0, 0, DUPLICATE_SAME_ACCESS); - return DEVENUM_IPropertyBag_Construct(hkey, (IPropertyBag**)ppvObj); + return create_PropertyBag(This, (IPropertyBag**)ppvObj); } return MK_E_NOSTORAGE; @@ -707,7 +740,6 @@ MediaCatMoniker * DEVENUM_IMediaCatMoniker_Construct(void) pMoniker->IMoniker_iface.lpVtbl = &IMoniker_Vtbl; pMoniker->ref = 0; - pMoniker->hkey = NULL; pMoniker->has_class = FALSE; pMoniker->name = NULL; @@ -824,7 +856,6 @@ static HRESULT WINAPI DEVENUM_IEnumMoniker_Next(IEnumMoniker *iface, ULONG celt, strcpyW(pMoniker->name, buffer); pMoniker->has_class = TRUE; pMoniker->class = This->class; - pMoniker->hkey = hkey; rgelt[fetched] = &pMoniker->IMoniker_iface; fetched++; diff --git a/dlls/devenum/parsedisplayname.c b/dlls/devenum/parsedisplayname.c index 2875a8c..0f3ef3b 100644 --- a/dlls/devenum/parsedisplayname.c +++ b/dlls/devenum/parsedisplayname.c @@ -81,9 +81,7 @@ static HRESULT WINAPI DEVENUM_IParseDisplayName_ParseDisplayName(IParseDisplayNa WCHAR buffer[MAX_PATH]; enum device_type type; MediaCatMoniker *mon; - HKEY hbasekey; CLSID class; - LRESULT res; TRACE("(%p, %s, %p, %p)\n", pbc, debugstr_w(name), eaten, ret); @@ -96,15 +94,11 @@ static HRESULT WINAPI DEVENUM_IParseDisplayName_ParseDisplayName(IParseDisplayNa if (name[0] == 's' && name[1] == 'w' && name[2] == ':') { type = DEVICE_FILTER; - if ((res = RegOpenKeyExW(HKEY_CLASSES_ROOT, clsidW, 0, 0, &hbasekey))) - return HRESULT_FROM_WIN32(res); name += 3; } else if (name[0] == 'c' && name[1] == 'm' && name[2] == ':') { type = DEVICE_CODEC; - if ((res = RegOpenKeyExW(HKEY_CURRENT_USER, wszActiveMovieKey, 0, 0, &hbasekey))) - return HRESULT_FROM_WIN32(res); name += 3; } else @@ -133,21 +127,6 @@ static HRESULT WINAPI DEVENUM_IParseDisplayName_ParseDisplayName(IParseDisplayNa } strcpyW(mon->name, name); - buffer[0] = 0; - if (mon->has_class) - { - StringFromGUID2(&mon->class, buffer, CHARS_IN_GUID); - if (mon->type == DEVICE_FILTER) - strcatW(buffer, instanceW); - strcatW(buffer, backslashW); - } - strcatW(buffer, mon->name); - - if (RegCreateKeyW(hbasekey, buffer, &mon->hkey)) - { - IMoniker_Release(&mon->IMoniker_iface); - return MK_E_NOOBJECT; - } *ret = &mon->IMoniker_iface; return S_OK; diff --git a/dlls/devenum/tests/devenum.c b/dlls/devenum/tests/devenum.c index 0437b6b..7e3270f 100644 --- a/dlls/devenum/tests/devenum.c +++ b/dlls/devenum/tests/devenum.c @@ -326,7 +326,6 @@ static void test_directshow_filter(void) mon = check_display_name(parser, buffer); /* Test writing and reading from the property bag */ -todo_wine ok(!find_moniker(&CLSID_AudioRendererCategory, mon), "filter should not be registered\n"); hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag); @@ -425,7 +424,6 @@ static void test_codec(void) mon = check_display_name(parser, buffer); /* Test writing and reading from the property bag */ -todo_wine ok(!find_moniker(&CLSID_AudioRendererCategory, mon), "codec should not be registered\n"); hr = IMoniker_BindToStorage(mon, NULL, NULL, &IID_IPropertyBag, (void **)&prop_bag);
1
0
0
0
← Newer
1
...
58
59
60
61
62
63
64
...
79
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Results per page:
10
25
50
100
200