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 2024
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
1 participants
775 discussions
Start a n
N
ew thread
Eric Pouech : dbghelp/tests: Add tests about generated memory chunks.
by Alexandre Julliard
13 Mar '24
13 Mar '24
Module: wine Branch: master Commit: 3316f59041de51cd1397c691726c620e2f5853fc URL:
https://gitlab.winehq.org/wine/wine/-/commit/3316f59041de51cd1397c691726c62…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Mon Mar 4 10:46:22 2024 +0100 dbghelp/tests: Add tests about generated memory chunks. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/dbghelp/tests/minidump.c | 351 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 351 insertions(+)
1
0
0
0
Eric Pouech : dbghelp/tests: Add tests for minidumps.
by Alexandre Julliard
13 Mar '24
13 Mar '24
Module: wine Branch: master Commit: 9620340b6bdd98e6a78d44db98f6e83d95a98d38 URL:
https://gitlab.winehq.org/wine/wine/-/commit/9620340b6bdd98e6a78d44db98f6e8…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Fri Mar 1 17:36:30 2024 +0100 dbghelp/tests: Add tests for minidumps. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- dlls/dbghelp/tests/Makefile.in | 1 + dlls/dbghelp/tests/minidump.c | 164 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 165 insertions(+) diff --git a/dlls/dbghelp/tests/Makefile.in b/dlls/dbghelp/tests/Makefile.in index d4264e85c5b..7b54cfa8827 100644 --- a/dlls/dbghelp/tests/Makefile.in +++ b/dlls/dbghelp/tests/Makefile.in @@ -3,4 +3,5 @@ IMPORTS = dbghelp user32 SOURCES = \ dbghelp.c \ + minidump.c \ path.c diff --git a/dlls/dbghelp/tests/minidump.c b/dlls/dbghelp/tests/minidump.c new file mode 100644 index 00000000000..33bf6216014 --- /dev/null +++ b/dlls/dbghelp/tests/minidump.c @@ -0,0 +1,164 @@ +/* + * Copyright 2024 Eric Pouech for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <assert.h> +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windows.h" +#include "dbghelp.h" +#include "wine/test.h" +#include "winternl.h" +#include "winnt.h" +#include "wine/test.h" + +static unsigned popcount32(ULONG val) +{ + val -= val >> 1 & 0x55555555; + val = (val & 0x33333333) + (val >> 2 & 0x33333333); + return ((val + (val >> 4)) & 0x0f0f0f0f) * 0x01010101 >> 24; +} + +static inline unsigned popcount64(ULONG64 val) +{ + return popcount32(val >> 32) + popcount32(val); +} + +#define minidump_open_for_read(a) _minidump_open_for_read(__LINE__, (a)) +static MINIDUMP_HEADER *_minidump_open_for_read(unsigned line, const char *filename) +{ + MINIDUMP_HEADER *hdr; + HANDLE file, map; + BOOL ret; + + file = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + ok_(__FILE__, line)(file != INVALID_HANDLE_VALUE, "Couldn't reopen file\n"); + map = CreateFileMappingA(file, NULL, PAGE_READONLY, 0, 0, NULL); + ok_(__FILE__, line)(map != 0, "Couldn't map file\n"); + hdr = MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0); + ok(hdr != NULL, "Couldn't map file\n"); + + ok(hdr && hdr->Signature == MINIDUMP_SIGNATURE, "Unexpected signature\n"); + + ret = CloseHandle(map); + ok_(__FILE__, line)(ret, "Couldn't unmap file\n"); + ret = CloseHandle(file); + ok_(__FILE__, line)(ret, "Couldn't close file\n"); + + return hdr; +} + +#define minidump_close_for_read(a) _minidump_close_for_read(__LINE__, (a)) +static void _minidump_close_for_read(unsigned line, MINIDUMP_HEADER *data) +{ + BOOL ret; + + ret = UnmapViewOfFile(data); + ok_(__FILE__, line)(ret, "Couldn't unmap file\n"); +} + +static BOOL minidump_write(HANDLE proc, const WCHAR *filename, MINIDUMP_TYPE type, BOOL windows_can_fail) +{ + HANDLE file; + BOOL ret, ret2; + + file = CreateFileW(filename, GENERIC_READ|GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, + FILE_ATTRIBUTE_NORMAL, NULL); + + ok(file != INVALID_HANDLE_VALUE, "Failed to create minidump %ls\n", filename); + + ret = MiniDumpWriteDump(proc, GetProcessId(proc), file, type, NULL, NULL, NULL); + /* using new features that are not supported on old dbghelp versions */ + ok(ret || broken(windows_can_fail), "Couldn't write minidump content\n"); + + ret2 = CloseHandle(file); + ok(ret2, "Couldn't close file\n"); + + return ret; +} + +typedef DWORD64 stream_mask_t; +#define STREAM2MASK(st) (((stream_mask_t)1) << (st)) + +#define BASIC_STREAM_MASK \ + (STREAM2MASK(ThreadListStream) | STREAM2MASK(ModuleListStream) | STREAM2MASK(MemoryListStream) | \ + STREAM2MASK(SystemInfoStream) | STREAM2MASK(MiscInfoStream) | STREAM2MASK(SystemMemoryInfoStream) | \ + STREAM2MASK(ProcessVmCountersStream)) +/* streams added in Win8 & Win10... */ +#define BASIC_STREAM_BROKEN_MASK (STREAM2MASK(SystemMemoryInfoStream) | STREAM2MASK(ProcessVmCountersStream)) +#define BASIC_STREAM_TODO_MASK (STREAM2MASK(SystemMemoryInfoStream) | STREAM2MASK(ProcessVmCountersStream)) +static void test_minidump_contents(void) +{ + static const struct minidump_streams + { + MINIDUMP_TYPE type; + stream_mask_t streams_mask; + stream_mask_t todo_wine_mask; + } + streams_table[] = + { +/* 0 */ {MiniDumpNormal, BASIC_STREAM_MASK, BASIC_STREAM_TODO_MASK}, + {MiniDumpWithDataSegs, BASIC_STREAM_MASK, BASIC_STREAM_TODO_MASK}, + {MiniDumpWithProcessThreadData, BASIC_STREAM_MASK, BASIC_STREAM_TODO_MASK}, + {MiniDumpWithThreadInfo, BASIC_STREAM_MASK | STREAM2MASK(ThreadInfoListStream), BASIC_STREAM_TODO_MASK | STREAM2MASK(ThreadInfoListStream)}, + {MiniDumpWithCodeSegs, BASIC_STREAM_MASK, BASIC_STREAM_TODO_MASK}, +/* 5 */ {MiniDumpWithTokenInformation, BASIC_STREAM_MASK | STREAM2MASK(TokenStream), BASIC_STREAM_TODO_MASK | STREAM2MASK(TokenStream)}, + {MiniDumpWithModuleHeaders, BASIC_STREAM_MASK, BASIC_STREAM_TODO_MASK}, /* requires win8 at least */ + {MiniDumpWithAvxXStateContext, BASIC_STREAM_MASK, BASIC_STREAM_TODO_MASK}, /* requires win10 at least */ + {MiniDumpWithIptTrace, BASIC_STREAM_MASK, BASIC_STREAM_TODO_MASK}, + }; + MINIDUMP_HEADER *hdr; + void *where; + ULONG size; + BOOL ret; + int i, j; + + for (i = 0; i < ARRAY_SIZE(streams_table); i++) + { + winetest_push_context("streams_table[%d]", i); + if (minidump_write(GetCurrentProcess(), L"foo.mdmp", streams_table[i].type, i >= 6)) + { + hdr = minidump_open_for_read("foo.mdmp"); + /* native keeps (likely padding) some unused streams at the end of directory, but lists them here */ + ok(hdr->NumberOfStreams >= popcount64(streams_table[i].streams_mask), "Unexpected number of streams %u <> %u\n", + hdr->NumberOfStreams, popcount64(streams_table[i].streams_mask)); + ok(hdr->Flags == streams_table[i].type, "Unexpected flags\n"); + /* start at 3, 0=unused (cf above), 1,2=reserved shall be skipped */ + for (j = 3; j < 25 /* last documented stream */; j++) + { + ret = MiniDumpReadDumpStream(hdr, j, NULL, &where, &size); + todo_wine_if(streams_table[i].todo_wine_mask & STREAM2MASK(j)) + if (streams_table[i].streams_mask & STREAM2MASK(j)) + ok((ret && where) || broken(BASIC_STREAM_BROKEN_MASK & STREAM2MASK(j)), "Expecting stream %d to be present\n", j); + else + ok(!ret, "Not expecting stream %d to be present\n", j); + } + + minidump_close_for_read(hdr); + + ret = DeleteFileA("foo.mdmp"); + ok(ret, "Couldn't delete file\n"); + } + winetest_pop_context(); + } +} + +START_TEST(minidump) +{ + test_minidump_contents(); +}
1
0
0
0
Eric Pouech : include: Update minidumpapiset.h.
by Alexandre Julliard
13 Mar '24
13 Mar '24
Module: wine Branch: master Commit: abac4b879ee2c14274cbc4f8c760c95e67f9bd10 URL:
https://gitlab.winehq.org/wine/wine/-/commit/abac4b879ee2c14274cbc4f8c760c9…
Author: Eric Pouech <epouech(a)codeweavers.com> Date: Sat Mar 2 11:46:59 2024 +0100 include: Update minidumpapiset.h. Signed-off-by: Eric Pouech <epouech(a)codeweavers.com> --- include/minidumpapiset.h | 698 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 575 insertions(+), 123 deletions(-)
1
0
0
0
Alexandros Frantzis : winewayland.drv: Implement wgl(Get)SwapIntervalEXT.
by Alexandre Julliard
13 Mar '24
13 Mar '24
Module: wine Branch: master Commit: 5f76872e17ebd4ad46c2cb3d2e7bd74165898c3c URL:
https://gitlab.winehq.org/wine/wine/-/commit/5f76872e17ebd4ad46c2cb3d2e7bd7…
Author: Alexandros Frantzis <alexandros.frantzis(a)collabora.com> Date: Tue Feb 27 10:01:53 2024 +0200 winewayland.drv: Implement wgl(Get)SwapIntervalEXT. --- dlls/winewayland.drv/opengl.c | 66 +++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 64 insertions(+), 2 deletions(-) diff --git a/dlls/winewayland.drv/opengl.c b/dlls/winewayland.drv/opengl.c index 361c5fc3302..f072b8063a1 100644 --- a/dlls/winewayland.drv/opengl.c +++ b/dlls/winewayland.drv/opengl.c @@ -69,6 +69,7 @@ DECL_FUNCPTR(eglInitialize); DECL_FUNCPTR(eglMakeCurrent); DECL_FUNCPTR(eglQueryString); DECL_FUNCPTR(eglSwapBuffers); +DECL_FUNCPTR(eglSwapInterval); DECL_FUNCPTR(glClear); #undef DECL_FUNCPTR @@ -85,6 +86,7 @@ struct wayland_gl_drawable struct wl_egl_window *wl_egl_window; EGLSurface surface; LONG resized; + int swap_interval; }; struct wgl_context @@ -157,6 +159,7 @@ static struct wayland_gl_drawable *wayland_gl_drawable_create(HWND hwnd, int for gl->ref = 1; gl->hwnd = hwnd; + gl->swap_interval = 1; /* Get the client surface for the HWND. If don't have a wayland surface * (e.g., HWND_MESSAGE windows) just create a dummy surface to act as the @@ -227,7 +230,11 @@ static void wayland_update_gl_drawable(HWND hwnd, struct wayland_gl_drawable *ne if ((old = find_drawable_for_hwnd(hwnd))) list_remove(&old->entry); if (new) list_add_head(&gl_drawables, &new->entry); - if (old && new) update_context_drawables(new, old); + if (old && new) + { + update_context_drawables(new, old); + new->swap_interval = old->swap_interval; + } pthread_mutex_unlock(&gl_object_mutex); @@ -408,7 +415,11 @@ static void wgl_context_refresh(struct wgl_context *ctx) ctx->new_read = NULL; refresh = TRUE; } - if (refresh) p_eglMakeCurrent(egl_display, ctx->draw, ctx->read, ctx->context); + if (refresh) + { + p_eglMakeCurrent(egl_display, ctx->draw, ctx->read, ctx->context); + if (ctx->draw) p_eglSwapInterval(egl_display, ctx->draw->swap_interval); + } pthread_mutex_unlock(&gl_object_mutex); @@ -608,6 +619,21 @@ static PROC wayland_wglGetProcAddress(LPCSTR name) return (PROC)p_eglGetProcAddress(name); } +static int wayland_wglGetSwapIntervalEXT(void) +{ + struct wgl_context *ctx = NtCurrentTeb()->glContext; + + if (!ctx || !ctx->draw) + { + WARN("No GL drawable found, returning swap interval 0\n"); + return 0; + } + + /* It's safe to read the value without a lock, since only + * the current thread can write to it. */ + return ctx->draw->swap_interval; +} + static BOOL wayland_wglMakeContextCurrentARB(HDC draw_hdc, HDC read_hdc, struct wgl_context *ctx) { @@ -705,6 +731,37 @@ static BOOL wayland_wglSwapBuffers(HDC hdc) return TRUE; } +static BOOL wayland_wglSwapIntervalEXT(int interval) +{ + struct wgl_context *ctx = NtCurrentTeb()->glContext; + BOOL ret; + + TRACE("(%d)\n", interval); + + if (interval < 0) + { + RtlSetLastWin32Error(ERROR_INVALID_DATA); + return FALSE; + } + + if (!ctx || !ctx->draw) + { + RtlSetLastWin32Error(ERROR_DC_NOT_FOUND); + return FALSE; + } + + /* Lock to protect against concurrent access to drawable swap_interval + * from wayland_update_gl_drawable */ + pthread_mutex_lock(&gl_object_mutex); + if ((ret = p_eglSwapInterval(egl_display, interval))) + ctx->draw->swap_interval = interval; + else + RtlSetLastWin32Error(ERROR_DC_NOT_FOUND); + pthread_mutex_unlock(&gl_object_mutex); + + return ret; +} + static BOOL has_extension(const char *list, const char *ext) { size_t len = strlen(ext); @@ -761,6 +818,10 @@ static BOOL init_opengl_funcs(void) register_extension("WGL_ARB_create_context_profile"); opengl_funcs.ext.p_wglCreateContextAttribsARB = wayland_wglCreateContextAttribsARB; + register_extension("WGL_EXT_swap_control"); + opengl_funcs.ext.p_wglGetSwapIntervalEXT = wayland_wglGetSwapIntervalEXT; + opengl_funcs.ext.p_wglSwapIntervalEXT = wayland_wglSwapIntervalEXT; + return TRUE; } @@ -866,6 +927,7 @@ static void init_opengl(void) LOAD_FUNCPTR_EGL(eglInitialize); LOAD_FUNCPTR_EGL(eglMakeCurrent); LOAD_FUNCPTR_EGL(eglSwapBuffers); + LOAD_FUNCPTR_EGL(eglSwapInterval); #undef LOAD_FUNCPTR_EGL egl_display = p_eglGetPlatformDisplay(EGL_PLATFORM_WAYLAND_KHR,
1
0
0
0
Alexandros Frantzis : winewayland.drv: Implement wglShareLists.
by Alexandre Julliard
13 Mar '24
13 Mar '24
Module: wine Branch: master Commit: 065cbb460be214a3bae9e62d764884f414305fa7 URL:
https://gitlab.winehq.org/wine/wine/-/commit/065cbb460be214a3bae9e62d764884…
Author: Alexandros Frantzis <alexandros.frantzis(a)collabora.com> Date: Tue Feb 27 09:29:00 2024 +0200 winewayland.drv: Implement wglShareLists. EGL works similarly to GLX, in that it only allows sharing on context creation, so we adapt the approach used by winex11. --- dlls/winewayland.drv/opengl.c | 47 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/dlls/winewayland.drv/opengl.c b/dlls/winewayland.drv/opengl.c index 61c3eae8e40..361c5fc3302 100644 --- a/dlls/winewayland.drv/opengl.c +++ b/dlls/winewayland.drv/opengl.c @@ -94,6 +94,8 @@ struct wgl_context EGLContext context; struct wayland_gl_drawable *draw, *read, *new_draw, *new_read; EGLint attribs[16]; + BOOL has_been_current; + BOOL sharing; }; /* lookup the existing drawable for a window, gl_object_mutex must be held */ @@ -306,6 +308,7 @@ static BOOL wgl_context_make_current(struct wgl_context *ctx, HWND draw_hwnd, ctx->draw = draw; ctx->read = read; ctx->new_draw = ctx->new_read = NULL; + ctx->has_been_current = TRUE; NtCurrentTeb()->glContext = ctx; } else @@ -641,6 +644,49 @@ static BOOL wayland_wglSetPixelFormatWINE(HDC hdc, int format) return set_pixel_format(hdc, format, TRUE); } +static BOOL wayland_wglShareLists(struct wgl_context *orig, struct wgl_context *dest) +{ + struct wgl_context *keep, *clobber; + + TRACE("(%p, %p)\n", orig, dest); + + /* Sharing of display lists works differently in EGL and WGL. In case of EGL + * it is done at context creation time but in case of WGL it is done using + * wglShareLists. We create an EGL context in wglCreateContext / + * wglCreateContextAttribsARB and when a program requests sharing we + * recreate the destination or source context if it hasn't been made current + * and it hasn't shared display lists before. */ + + if (!dest->has_been_current && !dest->sharing) + { + keep = orig; + clobber = dest; + } + else if (!orig->has_been_current && !orig->sharing) + { + keep = dest; + clobber = orig; + } + else + { + ERR("Could not share display lists because both of the contexts have " + "already been current or shared\n"); + return FALSE; + } + + p_eglDestroyContext(egl_display, clobber->context); + clobber->context = p_eglCreateContext(egl_display, EGL_NO_CONFIG_KHR, + keep->context, clobber->attribs); + TRACE("re-created context (%p) for Wine context %p (%p) " + "sharing lists with ctx %p (%p)\n", + clobber->context, clobber, clobber->config, + keep->context, keep->config); + + orig->sharing = TRUE; + dest->sharing = TRUE; + return TRUE; +} + static BOOL wayland_wglSwapBuffers(HDC hdc) { struct wgl_context *ctx = NtCurrentTeb()->glContext; @@ -876,6 +922,7 @@ static struct opengl_funcs opengl_funcs = .p_wglGetProcAddress = wayland_wglGetProcAddress, .p_wglMakeCurrent = wayland_wglMakeCurrent, .p_wglSetPixelFormat = wayland_wglSetPixelFormat, + .p_wglShareLists = wayland_wglShareLists, .p_wglSwapBuffers = wayland_wglSwapBuffers, } };
1
0
0
0
Alexandros Frantzis : winewayland.drv: Implement wglCreateContextAttribsARB.
by Alexandre Julliard
13 Mar '24
13 Mar '24
Module: wine Branch: master Commit: ac32f0a81dc2b4747256c28000dd4bd8be6b1fac URL:
https://gitlab.winehq.org/wine/wine/-/commit/ac32f0a81dc2b4747256c28000dd4b…
Author: Alexandros Frantzis <alexandros.frantzis(a)collabora.com> Date: Tue Feb 27 09:42:01 2024 +0200 winewayland.drv: Implement wglCreateContextAttribsARB. --- dlls/winewayland.drv/opengl.c | 102 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 98 insertions(+), 4 deletions(-) diff --git a/dlls/winewayland.drv/opengl.c b/dlls/winewayland.drv/opengl.c index 4692d2f1e15..61c3eae8e40 100644 --- a/dlls/winewayland.drv/opengl.c +++ b/dlls/winewayland.drv/opengl.c @@ -24,6 +24,7 @@ #include "config.h" +#include <assert.h> #include <dlfcn.h> #include <stdlib.h> #include <string.h> @@ -92,6 +93,7 @@ struct wgl_context EGLConfig config; EGLContext context; struct wayland_gl_drawable *draw, *read, *new_draw, *new_read; + EGLint attribs[16]; }; /* lookup the existing drawable for a window, gl_object_mutex must be held */ @@ -320,6 +322,68 @@ static BOOL wgl_context_make_current(struct wgl_context *ctx, HWND draw_hwnd, return ret; } +static BOOL wgl_context_populate_attribs(struct wgl_context *ctx, const int *wgl_attribs) +{ + EGLint *attribs_end = ctx->attribs; + + if (!wgl_attribs) goto out; + + for (; wgl_attribs[0] != 0; wgl_attribs += 2) + { + EGLint name; + + TRACE("%#x %#x\n", wgl_attribs[0], wgl_attribs[1]); + + /* Find the EGL attribute names corresponding to the WGL names. + * For all of the attributes below, the values match between the two + * systems, so we can use them directly. */ + switch (wgl_attribs[0]) + { + case WGL_CONTEXT_MAJOR_VERSION_ARB: + name = EGL_CONTEXT_MAJOR_VERSION_KHR; + break; + case WGL_CONTEXT_MINOR_VERSION_ARB: + name = EGL_CONTEXT_MINOR_VERSION_KHR; + break; + case WGL_CONTEXT_FLAGS_ARB: + name = EGL_CONTEXT_FLAGS_KHR; + break; + case WGL_CONTEXT_OPENGL_NO_ERROR_ARB: + name = EGL_CONTEXT_OPENGL_NO_ERROR_KHR; + break; + case WGL_CONTEXT_PROFILE_MASK_ARB: + if (wgl_attribs[1] & WGL_CONTEXT_ES2_PROFILE_BIT_EXT) + { + ERR("OpenGL ES contexts are not supported\n"); + return FALSE; + } + name = EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR; + break; + default: + name = EGL_NONE; + FIXME("Unhandled attributes: %#x %#x\n", wgl_attribs[0], wgl_attribs[1]); + } + + if (name != EGL_NONE) + { + EGLint *dst = ctx->attribs; + /* Check if we have already set the same attribute and replace it. */ + for (; dst != attribs_end && *dst != name; dst += 2) continue; + /* Our context attribute array should have enough space for all the + * attributes we support (we merge repetitions), plus EGL_NONE. */ + assert(dst - ctx->attribs <= ARRAY_SIZE(ctx->attribs) - 3); + dst[0] = name; + dst[1] = wgl_attribs[1]; + if (dst == attribs_end) attribs_end += 2; + } + } + +out: + *attribs_end = EGL_NONE; + return TRUE; +} + + static void wgl_context_refresh(struct wgl_context *ctx) { BOOL refresh = FALSE; @@ -381,7 +445,8 @@ static BOOL set_pixel_format(HDC hdc, int format, BOOL internal) return TRUE; } -static struct wgl_context *create_context(HDC hdc) +static struct wgl_context *create_context(HDC hdc, struct wgl_context *share, + const int *attribs) { struct wayland_gl_drawable *gl; struct wgl_context *ctx; @@ -394,8 +459,23 @@ static struct wgl_context *create_context(HDC hdc) goto out; } + if (!wgl_context_populate_attribs(ctx, attribs)) + { + ctx->attribs[0] = EGL_NONE; + goto out; + } + + /* For now only OpenGL is supported. It's enough to set the API only for + * context creation, since: + * 1. the default API is EGL_OPENGL_ES_API + * 2. the EGL specification says in section 3.7: + * > EGL_OPENGL_API and EGL_OPENGL_ES_API are interchangeable for all + * > purposes except eglCreateContext. + */ + p_eglBindAPI(EGL_OPENGL_API); ctx->context = p_eglCreateContext(egl_display, EGL_NO_CONFIG_KHR, - EGL_NO_CONTEXT, NULL); + share ? share->context : EGL_NO_CONTEXT, + ctx->attribs); pthread_mutex_lock(&gl_object_mutex); list_add_head(&gl_contexts, &ctx->entry); @@ -427,8 +507,15 @@ static BOOL wayland_wglCopyContext(struct wgl_context *src, static struct wgl_context *wayland_wglCreateContext(HDC hdc) { TRACE("hdc=%p\n", hdc); - p_eglBindAPI(EGL_OPENGL_API); - return create_context(hdc); + return create_context(hdc, NULL, NULL); +} + +static struct wgl_context *wayland_wglCreateContextAttribsARB(HDC hdc, + struct wgl_context *share, + const int *attribs) +{ + TRACE("hdc=%p share=%p attribs=%p\n", hdc, share, attribs); + return create_context(hdc, share, attribs); } static BOOL wayland_wglDeleteContext(struct wgl_context *ctx) @@ -623,6 +710,11 @@ static BOOL init_opengl_funcs(void) opengl_funcs.ext.p_wglGetCurrentReadDCARB = (void *)1; /* never called */ opengl_funcs.ext.p_wglMakeContextCurrentARB = wayland_wglMakeContextCurrentARB; + register_extension("WGL_ARB_create_context"); + register_extension("WGL_ARB_create_context_no_error"); + register_extension("WGL_ARB_create_context_profile"); + opengl_funcs.ext.p_wglCreateContextAttribsARB = wayland_wglCreateContextAttribsARB; + return TRUE; } @@ -751,6 +843,8 @@ static void init_opengl(void) if (!has_extension(egl_exts, #ext)) \ { ERR("Failed to find required extension %s\n", #ext); goto err; } \ } while(0) + REQUIRE_EXT(EGL_KHR_create_context); + REQUIRE_EXT(EGL_KHR_create_context_no_error); REQUIRE_EXT(EGL_KHR_no_config_context); #undef REQUIRE_EXT
1
0
0
0
Zebediah Figura : ntdll: Assign a primary token in elevate_token().
by Alexandre Julliard
13 Mar '24
13 Mar '24
Module: wine Branch: master Commit: 3042c7100c6b68a4849209757ac5676ec32d743f URL:
https://gitlab.winehq.org/wine/wine/-/commit/3042c7100c6b68a4849209757ac567…
Author: Zebediah Figura <zfigura(a)codeweavers.com> Date: Wed Mar 13 14:09:34 2024 -0500 ntdll: Assign a primary token in elevate_token(). This fixes Quicken 2020 installation. --- dlls/ntdll/loader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index b389a16d2a7..c5d82e8c68c 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -4147,10 +4147,11 @@ static void elevate_token(void) NtQueryInformationToken( GetCurrentThreadEffectiveToken(), TokenLinkedToken, &linked, sizeof(linked), NULL ); + NtDuplicateToken( linked.LinkedToken, 0, NULL, FALSE, TokenPrimary, &token.Token ); token.Thread = NULL; - token.Token = linked.LinkedToken; NtSetInformationProcess( GetCurrentProcess(), ProcessAccessToken, &token, sizeof(token) ); + NtClose( token.Token ); NtClose( linked.LinkedToken ); }
1
0
0
0
Vijay Kiran Kamuju : include: Add Windows.UI.ViewManagement.UIViewSettings definitions.
by Alexandre Julliard
13 Mar '24
13 Mar '24
Module: wine Branch: master Commit: 929732034c383e94e814d7eb91bb2ba2f184b439 URL:
https://gitlab.winehq.org/wine/wine/-/commit/929732034c383e94e814d7eb91bb2b…
Author: Vijay Kiran Kamuju <infyquest(a)gmail.com> Date: Mon Mar 11 15:53:02 2024 +0100 include: Add Windows.UI.ViewManagement.UIViewSettings definitions. --- include/windows.ui.viewmanagement.idl | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/include/windows.ui.viewmanagement.idl b/include/windows.ui.viewmanagement.idl index 1076d287183..d4a382d2f68 100644 --- a/include/windows.ui.viewmanagement.idl +++ b/include/windows.ui.viewmanagement.idl @@ -37,6 +37,7 @@ namespace Windows.UI.ViewManagement typedef enum HandPreference HandPreference; typedef enum UIColorType UIColorType; typedef enum UIElementType UIElementType; + typedef enum UserInteractionMode UserInteractionMode; interface IUISettings; interface IUISettings2; @@ -45,6 +46,9 @@ namespace Windows.UI.ViewManagement interface IUISettings5; interface IUISettings6; + interface IUIViewSettings; + interface IUIViewSettingsStatics; + interface IInputPane; interface IInputPane2; interface IInputPaneControl; @@ -53,6 +57,7 @@ namespace Windows.UI.ViewManagement interface IInputPaneStatics2; runtimeclass UISettings; + runtimeclass UIViewSettings; runtimeclass InputPane; runtimeclass InputPaneVisibilityEventArgs; @@ -133,6 +138,15 @@ namespace Windows.UI.ViewManagement OverlayOutsidePopup = 1012, }; + [ + contract(Windows.Foundation.UniversalApiContract, 1.0) + ] + enum UserInteractionMode + { + Mouse = 0, + Touch = 1, + }; + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.UI.ViewManagement.UISettings), @@ -181,6 +195,26 @@ namespace Windows.UI.ViewManagement [eventremove] HRESULT ColorValuesChanged([in] EventRegistrationToken cookie); } + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.ViewManagement.UIViewSettings), + uuid(c63657f6-8850-470d-88f8-455e16ea2c26) + ] + interface IUIViewSettings : IInspectable + { + [propget] HRESULT UserInteractionMode([out, retval] Windows.UI.ViewManagement.UserInteractionMode *value); + } + + [ + contract(Windows.Foundation.UniversalApiContract, 1.0), + exclusiveto(Windows.UI.ViewManagement.UIViewSettings), + uuid(595c97a5-f8f6-41cf-b0fb-aacdb81fd5f6) + ] + interface IUIViewSettingsStatics : IInspectable + { + HRESULT GetForCurrentView([out, retval] Windows.UI.ViewManagement.UIViewSettings **current); + } + [ contract(Windows.Foundation.UniversalApiContract, 1.0), exclusiveto(Windows.UI.ViewManagement.InputPane), @@ -261,6 +295,16 @@ namespace Windows.UI.ViewManagement [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.UI.ViewManagement.IUISettings3; } + [ + static(Windows.UI.ViewManagement.IUIViewSettingsStatics, Windows.Foundation.UniversalApiContract, 1.0), + contract(Windows.Foundation.UniversalApiContract, 1.0), + marshaling_behavior(agile) + ] + runtimeclass UIViewSettings + { + [default] interface Windows.UI.ViewManagement.IUIViewSettings; + } + [ static(Windows.UI.ViewManagement.IInputPaneStatics, Windows.Foundation.UniversalApiContract, 1.0), static(Windows.UI.ViewManagement.IInputPaneStatics2, Windows.Foundation.UniversalApiContract, 8.0),
1
0
0
0
Rémi Bernon : win32u: Move D3DKMT VidPn* functions out of winex11.
by Alexandre Julliard
13 Mar '24
13 Mar '24
Module: wine Branch: master Commit: 00a541d6a0d5342f72a0855d54ebd052c21ed9c5 URL:
https://gitlab.winehq.org/wine/wine/-/commit/00a541d6a0d5342f72a0855d54ebd0…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Feb 28 09:46:22 2024 +0100 win32u: Move D3DKMT VidPn* functions out of winex11. --- dlls/win32u/d3dkmt.c | 157 +++++++++++++++++++++++++++++++++++------ dlls/win32u/dibdrv/dc.c | 4 -- dlls/win32u/driver.c | 12 ---- dlls/win32u/emfdrv.c | 2 - dlls/win32u/font.c | 2 - dlls/win32u/path.c | 2 - dlls/winex11.drv/init.c | 2 - dlls/winex11.drv/x11drv.h | 2 - dlls/winex11.drv/x11drv_main.c | 149 -------------------------------------- dlls/winex11.drv/xrender.c | 2 - include/wine/gdi_driver.h | 4 +- 11 files changed, 138 insertions(+), 200 deletions(-)
1
0
0
0
Rémi Bernon : win32u: Move D3DKMT functions to a new d3dkmt.c source.
by Alexandre Julliard
13 Mar '24
13 Mar '24
Module: wine Branch: master Commit: 7299d3728a0faaef582ab26fc2d5fed38934c9c2 URL:
https://gitlab.winehq.org/wine/wine/-/commit/7299d3728a0faaef582ab26fc2d5fe…
Author: Rémi Bernon <rbernon(a)codeweavers.com> Date: Wed Feb 28 09:43:20 2024 +0100 win32u: Move D3DKMT functions to a new d3dkmt.c source. --- dlls/win32u/Makefile.in | 1 + dlls/win32u/d3dkmt.c | 305 ++++++++++++++++++++++++++++++++++++++++++++++++ dlls/win32u/driver.c | 284 -------------------------------------------- 3 files changed, 306 insertions(+), 284 deletions(-)
1
0
0
0
← Newer
1
...
38
39
40
41
42
43
44
...
78
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
Results per page:
10
25
50
100
200