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
January 2022
----- 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
726 discussions
Start a n
N
ew thread
Jacek Caban : urlmon: Don't allow direct sink callbacks when reporting data.
by Alexandre Julliard
07 Jan '22
07 Jan '22
Module: wine Branch: master Commit: 7c037c82c8c56539dd03e00628e27e4525b66483 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7c037c82c8c56539dd03e006…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jan 6 19:30:37 2022 +0100 urlmon: Don't allow direct sink callbacks when reporting data. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46213
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52286
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/urlmon/bindprot.c | 49 ++++++++++++++++++++++++++---------------- dlls/urlmon/tests/protocol.c | 51 +++++++++++++++++++++++++++++++++----------- 2 files changed, 70 insertions(+), 30 deletions(-) diff --git a/dlls/urlmon/bindprot.c b/dlls/urlmon/bindprot.c index 2e58884b199..1cf1adcb8f6 100644 --- a/dlls/urlmon/bindprot.c +++ b/dlls/urlmon/bindprot.c @@ -915,34 +915,20 @@ static HRESULT WINAPI ProtocolSinkHandler_ReportProgress(IInternetProtocolSink * return S_OK; } -static HRESULT WINAPI ProtocolSinkHandler_ReportData(IInternetProtocolSink *iface, - DWORD bscf, ULONG progress, ULONG progress_max) +static HRESULT report_data(BindProtocol *This) { - BindProtocol *This = impl_from_IInternetProtocolSinkHandler(iface); - - TRACE("(%p)->(%x %u %u)\n", This, bscf, progress, progress_max); - - This->bscf = bscf; - This->progress = progress; - This->progress_max = progress_max; - - if(!This->protocol_sink) - return S_OK; + DWORD bscf = This->bscf; + HRESULT hres; if((This->pi & PI_MIMEVERIFICATION) && !This->reported_mime) { BYTE buf[BUFFER_SIZE]; DWORD read = 0; LPWSTR mime; - HRESULT hres; do { read = 0; - if(is_apartment_thread(This)) - This->continue_call++; hres = IInternetProtocol_Read(This->protocol, buf, sizeof(buf)-This->buf_size, &read); - if(is_apartment_thread(This)) - This->continue_call--; if(FAILED(hres) && hres != E_PENDING) return hres; @@ -995,7 +981,34 @@ static HRESULT WINAPI ProtocolSinkHandler_ReportData(IInternetProtocolSink *ifac if(!This->protocol_sink) return S_OK; - return IInternetProtocolSink_ReportData(This->protocol_sink, bscf, progress, progress_max); + return IInternetProtocolSink_ReportData(This->protocol_sink, bscf, This->progress, This->progress_max); +} + +static HRESULT WINAPI ProtocolSinkHandler_ReportData(IInternetProtocolSink *iface, + DWORD bscf, ULONG progress, ULONG progress_max) +{ + BindProtocol *This = impl_from_IInternetProtocolSinkHandler(iface); + HRESULT hres; + + TRACE("(%p)->(%x %u %u)\n", This, bscf, progress, progress_max); + + This->bscf = bscf; + This->progress = progress; + This->progress_max = progress_max; + + if(!This->protocol_sink) + return S_OK; + + if(is_apartment_thread(This)) + This->continue_call++; + + hres = report_data(This); + + if(is_apartment_thread(This)) { + This->continue_call--; + process_tasks(This); + } + return hres; } static HRESULT handle_redirect(BindProtocol *This, const WCHAR *url) diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c index a5406121585..b997be7fa01 100644 --- a/dlls/urlmon/tests/protocol.c +++ b/dlls/urlmon/tests/protocol.c @@ -161,7 +161,7 @@ static DWORD prot_read, filter_state, http_post_test, thread_id; static BOOL security_problem, test_async_req, impl_protex; static BOOL async_read_pending, mimefilter_test, direct_read, wait_for_switch, emulate_prot, short_read, test_abort; static BOOL empty_file, no_mime, bind_from_cache, file_with_hash, reuse_protocol_thread; -static BOOL no_aggregation; +static BOOL no_aggregation, result_from_lock; enum { STATE_CONNECTING, @@ -1168,6 +1168,16 @@ static HRESULT WINAPI ProtocolSink_ReportData(IInternetProtocolSink *iface, DWOR } } + if(result_from_lock) { + SET_EXPECT(LockRequest); + hres = IInternetProtocol_LockRequest(binding_protocol, 0); + ok(hres == S_OK, "LockRequest failed: %08x\n", hres); + CHECK_CALLED(LockRequest); + + /* ReportResult is called before ReportData returns */ + SET_EXPECT(ReportResult); + } + rec_depth--; return S_OK; } @@ -1911,6 +1921,12 @@ static void protocol_start(IInternetProtocolSink *pOIProtSink, IInternetBindInfo else CHECK_CALLED(ReportData); + if(result_from_lock) { + /* set in ProtocolSink_ReportData */ + CHECK_CALLED(ReportResult); + return; + } + if(tested_protocol == ITS_TEST) { SET_EXPECT(ReportData); hres = IInternetProtocolSink_ReportProgress(pOIProtSink, BINDSTATUS_BEGINDOWNLOADDATA, NULL); @@ -2202,6 +2218,11 @@ static HRESULT WINAPI ProtocolEmul_LockRequest(IInternetProtocolEx *iface, DWORD { CHECK_EXPECT(LockRequest); ok(dwOptions == 0, "dwOptions=%x\n", dwOptions); + if(result_from_lock) { + HRESULT hres; + hres = IInternetProtocolSink_ReportResult(binding_sink, S_OK, ERROR_SUCCESS, NULL); + ok(hres == S_OK, "ReportResult failed: %08x, expected E_FAIL\n", hres); + } return S_OK; } @@ -2688,6 +2709,7 @@ static IClassFactory mimefilter_cf = { &MimeFilterCFVtbl }; #define TEST_NOMIME 0x2000 #define TEST_FROMCACHE 0x4000 #define TEST_DISABLEAUTOREDIRECT 0x8000 +#define TEST_RESULTFROMLOCK 0x10000 static void register_filter(BOOL do_register) { @@ -2744,6 +2766,7 @@ static void init_test(int prot, DWORD flags) impl_protex = (flags & TEST_IMPLPROTEX) != 0; empty_file = (flags & TEST_EMPTY) != 0; bind_from_cache = (flags & TEST_FROMCACHE) != 0; + result_from_lock = (flags & TEST_RESULTFROMLOCK) != 0; file_with_hash = FALSE; security_problem = FALSE; reuse_protocol_thread = FALSE; @@ -4131,16 +4154,18 @@ static void test_binding(int prot, DWORD grf_pi, DWORD test_flags) CHECK_CALLED(ReportData); /* Set in ReportResult */ ok( WaitForSingleObject(event_complete, 90000) == WAIT_OBJECT_0, "wait timed out\n" ); }else { - if(mimefilter_test) - SET_EXPECT(MimeFilter_LockRequest); - else - SET_EXPECT(LockRequest); - hres = IInternetProtocol_LockRequest(protocol, 0); - ok(hres == S_OK, "LockRequest failed: %08x\n", hres); - if(mimefilter_test) - CHECK_CALLED(MimeFilter_LockRequest); - else - CHECK_CALLED(LockRequest); + if(!result_from_lock) { + if(mimefilter_test) + SET_EXPECT(MimeFilter_LockRequest); + else + SET_EXPECT(LockRequest); + hres = IInternetProtocol_LockRequest(protocol, 0); + ok(hres == S_OK, "LockRequest failed: %08x\n", hres); + if(mimefilter_test) + CHECK_CALLED(MimeFilter_LockRequest); + else + CHECK_CALLED(LockRequest); + } if(mimefilter_test) SET_EXPECT(MimeFilter_UnlockRequest); @@ -4284,7 +4309,7 @@ START_TEST(protocol) test_CreateBinding(); no_aggregation = FALSE; - bindf &= ~BINDF_FROMURLMON; + bindf = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_NOWRITECACHE | BINDF_PULLDATA; trace("Testing file binding (mime verification, emulate prot)...\n"); test_binding(FILE_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT); trace("Testing http binding (mime verification, emulate prot)...\n"); @@ -4307,6 +4332,8 @@ START_TEST(protocol) test_binding(HTTP_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT|TEST_DIRECT_READ); trace("Testing http binding (mime verification, emulate prot, abort)...\n"); test_binding(HTTP_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT|TEST_ABORT); + trace("Testing its binding (mime verification, emulate prot, apartment thread)...\n"); + test_binding(ITS_TEST, PI_MIMEVERIFICATION | PI_APARTMENTTHREADED, TEST_EMULATEPROT | TEST_RESULTFROMLOCK); if(pCreateUri) { trace("Testing file binding (use IUri, mime verification, emulate prot)...\n"); test_binding(FILE_TEST, PI_MIMEVERIFICATION, TEST_EMULATEPROT|TEST_USEIURI);
1
0
0
0
Gabriel Ivăncescu : mshtml: Fix nsnode leak when cloning.
by Alexandre Julliard
07 Jan '22
07 Jan '22
Module: wine Branch: master Commit: 059848c5cd7e29ebf181a347c141d8697a9a9a08 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=059848c5cd7e29ebf181a347…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Date: Thu Jan 6 19:10:46 2022 +0200 mshtml: Fix nsnode leak when cloning. Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com> Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/mshtml/htmlnode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/mshtml/htmlnode.c b/dlls/mshtml/htmlnode.c index 996c28c1038..23ab7195aca 100644 --- a/dlls/mshtml/htmlnode.c +++ b/dlls/mshtml/htmlnode.c @@ -800,6 +800,7 @@ static HRESULT WINAPI HTMLDOMNode_cloneNode(IHTMLDOMNode *iface, VARIANT_BOOL fD } hres = This->vtbl->clone(This, nsnode, &new_node); + nsIDOMNode_Release(nsnode); if(FAILED(hres)) return hres;
1
0
0
0
Huw Davies : user32: Set WM_CONTEXTMENU's wparam to the child window's handle.
by Alexandre Julliard
07 Jan '22
07 Jan '22
Module: wine Branch: master Commit: 3af8415ca9dc50e6c394c1001aad97db5f514069 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3af8415ca9dc50e6c394c100…
Author: Huw Davies <huw(a)codeweavers.com> Date: Fri Jan 7 08:46:36 2022 +0000 user32: Set WM_CONTEXTMENU's wparam to the child window's handle. DefWindowProc() does not propagate the wparam; it updates it instead. Spotted by YAL. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52327
Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/defwnd.c | 2 +- dlls/user32/tests/msg.c | 29 +++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/dlls/user32/defwnd.c b/dlls/user32/defwnd.c index 8cd9047f02b..44675c7b8e7 100644 --- a/dlls/user32/defwnd.c +++ b/dlls/user32/defwnd.c @@ -322,7 +322,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa case WM_CONTEXTMENU: if (GetWindowLongW( hwnd, GWL_STYLE ) & WS_CHILD) - SendMessageW( GetParent(hwnd), msg, wParam, lParam ); + SendMessageW( GetParent(hwnd), msg, (WPARAM)hwnd, lParam ); else { LONG hitcode; diff --git a/dlls/user32/tests/msg.c b/dlls/user32/tests/msg.c index c054a145112..870c38b106c 100644 --- a/dlls/user32/tests/msg.c +++ b/dlls/user32/tests/msg.c @@ -106,6 +106,7 @@ typedef struct } MEASURE_ITEM_STRUCT; static BOOL test_DestroyWindow_flag; +static BOOL test_context_menu; static HWINEVENTHOOK hEvent_hook; static HHOOK hKBD_hook; static HHOOK hCBT_hook; @@ -9984,7 +9985,7 @@ static LRESULT MsgCheckProc (BOOL unicode, HWND hwnd, UINT message, return 0; } - if (message == WM_CONTEXTMENU) + if (!test_context_menu && message == WM_CONTEXTMENU) { /* don't create context menu */ return 0; @@ -16148,6 +16149,13 @@ static const struct message WmRestoreActiveMinimizedOverlappedSeq[] = { 0 } }; +static struct message WmContextMenuSeq[] = { + { WM_CONTEXTMENU, sent|wparam, 0 }, /* wparams set in the code */ + { WM_CONTEXTMENU, sent|wparam|defwinproc, 0 }, + { WM_CONTEXTMENU, sent|wparam|defwinproc, 0 }, + { 0 } +}; + struct rbuttonup_thread_data { HWND hwnd; @@ -16169,7 +16177,7 @@ static DWORD CALLBACK post_rbuttonup_msg( void *arg ) static void test_defwinproc(void) { - HWND hwnd; + HWND hwnd, child[3]; MSG msg; BOOL gotwmquit = FALSE; POINT pos; @@ -16219,6 +16227,23 @@ static void test_defwinproc(void) flush_events(); ok_sequence(WmRestoreActiveMinimizedOverlappedSeq, "DefWindowProcA(SC_RESTORE):active minimized overlapped", TRUE); + child[0] = CreateWindowExA(0, "TestWindowClass", "1st child", + WS_VISIBLE | WS_CHILD, 0,0,500,100, hwnd, 0, 0, NULL); + child[1] = CreateWindowExA(0, "TestWindowClass", "2nd child", + WS_VISIBLE | WS_CHILD, 0,0,500,100, child[0], 0, 0, NULL); + child[2] = CreateWindowExA(0, "TestWindowClass", "3rd child", + WS_VISIBLE | WS_CHILD, 0,0,500,100, child[1], 0, 0, NULL); + flush_events(); + flush_sequence(); + test_context_menu = TRUE; + DefWindowProcA(child[2], WM_CONTEXTMENU, 0xcafe, 0); + test_context_menu = FALSE; + WmContextMenuSeq[0].wParam = (WPARAM)child[2]; + WmContextMenuSeq[1].wParam = (WPARAM)child[1]; + WmContextMenuSeq[2].wParam = (WPARAM)child[0]; + ok_sequence(WmContextMenuSeq, "DefWindowProcA(WM_CONTEXTMENU)", FALSE); + DestroyWindow(child[0]); + GetCursorPos(&pos); GetWindowRect(hwnd, &rect); x = (rect.left+rect.right) / 2;
1
0
0
0
Giovanni Mascellani : vkd3d-compiler: Properly forward argument validation failures.
by Alexandre Julliard
07 Jan '22
07 Jan '22
Module: vkd3d Branch: master Commit: 9375950450966d7f097f14c8ba9480d2d7e2fa3a URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=9375950450966d7f097f14c…
Author: Giovanni Mascellani <gmascellani(a)codeweavers.com> Date: Fri Jan 7 11:50:55 2022 +0100 vkd3d-compiler: Properly forward argument validation failures. Signed-off-by: Giovanni Mascellani <gmascellani(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/vkd3d-compiler/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/vkd3d-compiler/main.c b/programs/vkd3d-compiler/main.c index 8ea3c13..c974c9a 100644 --- a/programs/vkd3d-compiler/main.c +++ b/programs/vkd3d-compiler/main.c @@ -686,13 +686,13 @@ int main(int argc, char **argv) fprintf(stderr, "Target type '%s' is invalid for source type '%s'.\n", get_target_type_info(options.target_type)->name, get_source_type_info(options.source_type)->name); - return 0; + return 1; } if (!options.preprocess_only && options.source_type == VKD3D_SHADER_SOURCE_HLSL && !options.profile) { fprintf(stderr, "You need to specify a profile when compiling from HLSL source.\n"); - return 0; + return 1; } if (!options.filename && get_source_type_info(options.source_type)->is_binary && isatty(fileno(input)))
1
0
0
0
Conor McCarthy : vkd3d-shader/spirv: Support UAV counter descriptor arrays.
by Alexandre Julliard
07 Jan '22
07 Jan '22
Module: vkd3d Branch: master Commit: 758b984c41fd34b79a2883349b282a85564a7d97 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=758b984c41fd34b79a28833…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Tue Jan 4 13:32:17 2022 +1000 vkd3d-shader/spirv: Support UAV counter descriptor arrays. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/vkd3d_shader.h | 4 +-- libs/vkd3d-shader/spirv.c | 90 +++++++++++++++++++++++------------------------ 2 files changed, 45 insertions(+), 49 deletions(-) Diff:
https://source.winehq.org/git/vkd3d.git/?a=commitdiff;h=758b984c41fd34b79a2…
1
0
0
0
Conor McCarthy : vkd3d: Do not flag a descriptor table as dirty if it is unchanged.
by Alexandre Julliard
07 Jan '22
07 Jan '22
Module: vkd3d Branch: master Commit: c04b6b1765952d3158e8e9b89ddfc2c1fcef7733 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=c04b6b1765952d3158e8e9b…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Wed Jan 5 14:54:52 2022 +1000 vkd3d: Do not flag a descriptor table as dirty if it is unchanged. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/command.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index b2565e1..3e252ae 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -4185,6 +4185,9 @@ static void d3d12_command_list_set_descriptor_table(struct d3d12_command_list *l assert(index < ARRAY_SIZE(bindings->descriptor_tables)); desc = d3d12_desc_from_gpu_handle(base_descriptor); + if (bindings->descriptor_tables[index] == desc) + return; + if (desc && !vkd3d_gpu_descriptor_allocator_heap_from_descriptor(&list->device->gpu_descriptor_allocator, desc)) {
1
0
0
0
Conor McCarthy : vkd3d: Validate the base descriptor handle in d3d12_command_list_set_descriptor_table().
by Alexandre Julliard
07 Jan '22
07 Jan '22
Module: vkd3d Branch: master Commit: 711378ea31dd624526466c0b534d00346d024557 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=711378ea31dd624526466c0…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Wed Jan 5 14:54:51 2022 +1000 vkd3d: Validate the base descriptor handle in d3d12_command_list_set_descriptor_table(). The availability of allocation info makes it possible to check that the descriptor belongs to a heap of the correct type. This will be more important when Vulkan-backed descriptor heaps are added. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/command.c | 15 ++++++++++++++- libs/vkd3d/device.c | 23 +++++++++++++++++++++++ libs/vkd3d/vkd3d_private.h | 2 ++ 3 files changed, 39 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index 9fbde80..b2565e1 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -4178,11 +4178,24 @@ static void d3d12_command_list_set_descriptor_table(struct d3d12_command_list *l { struct vkd3d_pipeline_bindings *bindings = &list->pipeline_bindings[bind_point]; const struct d3d12_root_signature *root_signature = bindings->root_signature; + struct d3d12_desc *desc; assert(root_signature_get_descriptor_table(root_signature, index)); assert(index < ARRAY_SIZE(bindings->descriptor_tables)); - bindings->descriptor_tables[index] = d3d12_desc_from_gpu_handle(base_descriptor); + desc = d3d12_desc_from_gpu_handle(base_descriptor); + + if (desc && !vkd3d_gpu_descriptor_allocator_heap_from_descriptor(&list->device->gpu_descriptor_allocator, + desc)) + { + /* Failure to find a heap means the descriptor handle is from + * the wrong heap type or not a handle at all. */ + ERR("Invalid heap for base descriptor %"PRIx64".\n", base_descriptor.ptr); + /* TODO: Mark list as invalid? */ + return; + } + + bindings->descriptor_tables[index] = desc; bindings->descriptor_table_dirty_mask |= (uint64_t)1 << index; bindings->descriptor_table_active_mask |= (uint64_t)1 << index; } diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 7d0922e..4a9a0c7 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -2305,6 +2305,29 @@ size_t vkd3d_gpu_descriptor_allocator_range_size_from_descriptor( return remaining; } +struct d3d12_descriptor_heap *vkd3d_gpu_descriptor_allocator_heap_from_descriptor( + struct vkd3d_gpu_descriptor_allocator *allocator, const struct d3d12_desc *desc) +{ + const struct vkd3d_gpu_descriptor_allocation *allocation; + int rc; + + if (!allocator->allocation_count) + return NULL; + + if ((rc = pthread_mutex_lock(&allocator->mutex))) + { + ERR("Failed to lock mutex, error %d.\n", rc); + return NULL; + } + + allocation = vkd3d_gpu_descriptor_allocator_allocation_from_descriptor(allocator, desc); + + pthread_mutex_unlock(&allocator->mutex); + + return allocation ? CONTAINING_RECORD(allocation->base, struct d3d12_descriptor_heap, descriptors) + : NULL; +} + static bool vkd3d_gpu_descriptor_allocator_init(struct vkd3d_gpu_descriptor_allocator *allocator) { int rc; diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 1bccb35..454b066 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -260,6 +260,8 @@ bool vkd3d_gpu_descriptor_allocator_register_range(struct vkd3d_gpu_descriptor_a const struct d3d12_desc *base, size_t count); bool vkd3d_gpu_descriptor_allocator_unregister_range( struct vkd3d_gpu_descriptor_allocator *allocator, const struct d3d12_desc *base); +struct d3d12_descriptor_heap *vkd3d_gpu_descriptor_allocator_heap_from_descriptor( + struct vkd3d_gpu_descriptor_allocator *allocator, const struct d3d12_desc *desc); struct vkd3d_render_pass_key {
1
0
0
0
Conor McCarthy : vkd3d: Use a binary search for matching a descriptor to an allocation.
by Alexandre Julliard
07 Jan '22
07 Jan '22
Module: vkd3d Branch: master Commit: 67ee837f2bf82dc17c0753d2aaa7c29b5bc9b105 URL:
https://source.winehq.org/git/vkd3d.git/?a=commit;h=67ee837f2bf82dc17c0753d…
Author: Conor McCarthy <cmccarthy(a)codeweavers.com> Date: Wed Jan 5 14:54:50 2022 +1000 vkd3d: Use a binary search for matching a descriptor to an allocation. The performance improvement will be useful for Vulkan-backed heaps, where descriptor heaps must be found more often. Signed-off-by: Conor McCarthy <cmccarthy(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- libs/vkd3d/device.c | 72 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 53 insertions(+), 19 deletions(-) diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index 96ff7ae..7d0922e 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -2179,6 +2179,33 @@ static void vkd3d_gpu_va_allocator_cleanup(struct vkd3d_gpu_va_allocator *alloca pthread_mutex_destroy(&allocator->mutex); } +/* We could use bsearch() or recursion here, but it probably helps to omit + * all the extra function calls. */ +static struct vkd3d_gpu_descriptor_allocation *vkd3d_gpu_descriptor_allocator_binary_search( + const struct vkd3d_gpu_descriptor_allocator *allocator, const struct d3d12_desc *desc) +{ + struct vkd3d_gpu_descriptor_allocation *allocations = allocator->allocations; + const struct d3d12_desc *base; + size_t centre, count; + + for (count = allocator->allocation_count; count > 1; ) + { + centre = count >> 1; + base = allocations[centre].base; + if (base <= desc) + { + allocations += centre; + count -= centre; + } + else + { + count = centre; + } + } + + return allocations; +} + bool vkd3d_gpu_descriptor_allocator_register_range(struct vkd3d_gpu_descriptor_allocator *allocator, const struct d3d12_desc *base, size_t count) { @@ -2198,7 +2225,14 @@ bool vkd3d_gpu_descriptor_allocator_register_range(struct vkd3d_gpu_descriptor_a return false; } - allocation = &allocator->allocations[allocator->allocation_count++]; + if (allocator->allocation_count > 1) + allocation = vkd3d_gpu_descriptor_allocator_binary_search(allocator, base); + else + allocation = allocator->allocations; + allocation += allocator->allocation_count && base > allocation->base; + memmove(&allocation[1], allocation, (allocator->allocation_count++ - (allocation - allocator->allocations)) + * sizeof(*allocation)); + allocation->base = base; allocation->count = count; @@ -2225,8 +2259,8 @@ bool vkd3d_gpu_descriptor_allocator_unregister_range( if (allocator->allocations[i].base != base) continue; - if (i != --allocator->allocation_count) - allocator->allocations[i] = allocator->allocations[allocator->allocation_count]; + memmove(&allocator->allocations[i], &allocator->allocations[i + 1], + (--allocator->allocation_count - i) * sizeof(allocator->allocations[0])); found = true; break; @@ -2237,34 +2271,34 @@ bool vkd3d_gpu_descriptor_allocator_unregister_range( return found; } +static inline const struct vkd3d_gpu_descriptor_allocation *vkd3d_gpu_descriptor_allocator_allocation_from_descriptor( + const struct vkd3d_gpu_descriptor_allocator *allocator, const struct d3d12_desc *desc) +{ + const struct vkd3d_gpu_descriptor_allocation *allocation; + + allocation = vkd3d_gpu_descriptor_allocator_binary_search(allocator, desc); + return (desc >= allocation->base && desc - allocation->base < allocation->count) ? allocation : NULL; +} + /* Return the available size from the specified descriptor to the heap end. */ size_t vkd3d_gpu_descriptor_allocator_range_size_from_descriptor( struct vkd3d_gpu_descriptor_allocator *allocator, const struct d3d12_desc *desc) { - struct vkd3d_gpu_descriptor_allocation *allocation; - size_t remaining, offset, i; + const struct vkd3d_gpu_descriptor_allocation *allocation; + size_t remaining; int rc; + assert(allocator->allocation_count); + if ((rc = pthread_mutex_lock(&allocator->mutex))) { ERR("Failed to lock mutex, error %d.\n", rc); return 0; } - for (i = 0, remaining = 0; i < allocator->allocation_count; ++i) - { - allocation = &allocator->allocations[i]; - - if (desc < allocation->base) - continue; - - offset = desc - allocation->base; - if (offset >= allocation->count) - continue; - - remaining = allocation->count - offset; - break; - } + remaining = 0; + if ((allocation = vkd3d_gpu_descriptor_allocator_allocation_from_descriptor(allocator, desc))) + remaining = allocation->count - (desc - allocation->base); pthread_mutex_unlock(&allocator->mutex);
1
0
0
0
Keno Fischer : winemac: Unconditionally link to QuartzCore.
by Alexandre Julliard
07 Jan '22
07 Jan '22
Module: wine Branch: master Commit: 1f17015cea89cef3083ade0497e5eae5efdcb570 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=1f17015cea89cef3083ade04…
Author: Keno Fischer <keno(a)juliacomputing.com> Date: Thu Jan 6 14:26:20 2022 +0000 winemac: Unconditionally link to QuartzCore. This fixes non-Metal builds. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=52216
Signed-off-by: Keno Fischer <keno(a)juliacomputing.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- configure | 2 +- configure.ac | 2 +- dlls/winemac.drv/Makefile.in | 2 +- dlls/winemac.drv/cocoa_window.m | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 5c3536900d1..c9d4d0c04f6 100755 --- a/configure +++ b/configure @@ -10322,7 +10322,7 @@ fi fi if test "$ac_cv_header_Metal_Metal_h" = "yes" then - METAL_LIBS="-framework Metal -framework QuartzCore" + METAL_LIBS="-framework Metal" fi diff --git a/configure.ac b/configure.ac index ddd45b8c241..b42cb8a5346 100644 --- a/configure.ac +++ b/configure.ac @@ -757,7 +757,7 @@ case $host_os in fi if test "$ac_cv_header_Metal_Metal_h" = "yes" then - AC_SUBST(METAL_LIBS,"-framework Metal -framework QuartzCore") + AC_SUBST(METAL_LIBS,"-framework Metal") fi dnl Check for MTLDevice registryID property diff --git a/dlls/winemac.drv/Makefile.in b/dlls/winemac.drv/Makefile.in index 6329e8e76c8..fc3dddbdae7 100644 --- a/dlls/winemac.drv/Makefile.in +++ b/dlls/winemac.drv/Makefile.in @@ -1,7 +1,7 @@ MODULE = winemac.drv IMPORTS = uuid rpcrt4 user32 gdi32 advapi32 win32u DELAYIMPORTS = ole32 shell32 imm32 -EXTRALIBS = -framework AppKit -framework Carbon -framework Security -framework OpenGL -framework IOKit -framework CoreVideo $(METAL_LIBS) +EXTRALIBS = -framework AppKit -framework Carbon -framework Security -framework OpenGL -framework IOKit -framework CoreVideo -framework QuartzCore $(METAL_LIBS) EXTRADLLFLAGS = -mcygwin diff --git a/dlls/winemac.drv/cocoa_window.m b/dlls/winemac.drv/cocoa_window.m index 10524e4b3a2..7708157a992 100644 --- a/dlls/winemac.drv/cocoa_window.m +++ b/dlls/winemac.drv/cocoa_window.m @@ -25,8 +25,8 @@ #import <CoreVideo/CoreVideo.h> #ifdef HAVE_METAL_METAL_H #import <Metal/Metal.h> -#import <QuartzCore/QuartzCore.h> #endif +#import <QuartzCore/QuartzCore.h> #import "cocoa_window.h"
1
0
0
0
Zhiyi Zhang : win32u: Allow selecting 32-bit DDBs into display compatible DCs.
by Alexandre Julliard
07 Jan '22
07 Jan '22
Module: wine Branch: master Commit: 60faf44ed10afde29f0ccd085b89c52621e5256c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=60faf44ed10afde29f0ccd08…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Wed Dec 29 15:32:52 2021 +0800 win32u: Allow selecting 32-bit DDBs into display compatible DCs. Device context bit depths other than 32-bit are emulated and the real bit depth for display DCs is still 32-bit. Thus, a 32-bit DDB should be allowed to be selected into a display compatible DC even if the DC reports a different bit depth. Fix a regression from d171d11. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=51805
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Huw Davies <huw(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/user32/tests/monitor.c | 2 -- dlls/win32u/bitmap.c | 4 +++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c index e745fb9c7b3..a857b295849 100644 --- a/dlls/user32/tests/monitor.c +++ b/dlls/user32/tests/monitor.c @@ -2301,7 +2301,6 @@ static void test_display_dc(void) bpp = GetDeviceCaps(mem_dc, BITSPIXEL); ok(bpp == dm2.dmBitsPerPel, "Expected bpp %d, got %d.\n", dm2.dmBitsPerPel, bpp); old_hbitmap = SelectObject(mem_dc, hbitmap); - todo_wine ok(!!old_hbitmap, "Failed to select bitmap.\n"); bpp = GetDeviceCaps(mem_dc, BITSPIXEL); ok(bpp == dm2.dmBitsPerPel, "Expected bpp %d, got %d.\n", dm2.dmBitsPerPel, bpp); @@ -2329,7 +2328,6 @@ static void test_display_dc(void) ok(!old_hbitmap || broken(!!old_hbitmap) /* Win7 dual-QXL test bot and XP */, "Selecting bitmap succeeded.\n"); else - todo_wine_if(bpps[i] == 32) ok(!!old_hbitmap || broken(!old_hbitmap) /* Win7 dual-QXL test bot and XP */, "Failed to select bitmap.\n"); diff --git a/dlls/win32u/bitmap.c b/dlls/win32u/bitmap.c index 00c8b347af5..2be88715948 100644 --- a/dlls/win32u/bitmap.c +++ b/dlls/win32u/bitmap.c @@ -401,7 +401,9 @@ HGDIOBJ WINAPI NtGdiSelectBitmap( HDC hdc, HGDIOBJ handle ) if (!is_bitmapobj_dib( bitmap ) && bitmap->dib.dsBm.bmBitsPixel != 1 && - bitmap->dib.dsBm.bmBitsPixel != NtGdiGetDeviceCaps( hdc, BITSPIXEL )) + bitmap->dib.dsBm.bmBitsPixel != NtGdiGetDeviceCaps( hdc, BITSPIXEL ) && + /* Display compatible DCs should accept 32-bit DDBs because other color depths are emulated */ + !(NtGdiGetDeviceCaps( hdc, TECHNOLOGY ) == DT_RASDISPLAY && bitmap->dib.dsBm.bmBitsPixel == 32)) { WARN( "Wrong format bitmap %u bpp\n", bitmap->dib.dsBm.bmBitsPixel ); GDI_ReleaseObj( handle );
1
0
0
0
← Newer
1
...
63
64
65
66
67
68
69
...
73
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
Results per page:
10
25
50
100
200