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 2010
----- 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
3 participants
919 discussions
Start a n
N
ew thread
Kusanagi Kouichi : wined3d: Fix a failure of card vendor detection.
by Alexandre Julliard
05 Mar '10
05 Mar '10
Module: wine Branch: master Commit: f4bce098ea1cf2de382e8d53dec4addbf941a73b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f4bce098ea1cf2de382e8d53d…
Author: Kusanagi Kouichi <slash(a)ac.auone-net.jp> Date: Fri Mar 5 02:51:31 2010 +0900 wined3d: Fix a failure of card vendor detection. --- dlls/wined3d/directx.c | 47 ++++++++++++++++------------------------------- 1 files changed, 16 insertions(+), 31 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 1cab94a..b3f0c20 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1982,7 +1982,7 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter) struct wined3d_gl_info *gl_info = &adapter->gl_info; const char *GL_Extensions = NULL; const char *WGL_Extensions = NULL; - const char *gl_string = NULL; + const char *gl_vendor_str, *gl_renderer_str, *gl_version_str; struct fragment_caps fragment_caps; enum wined3d_gl_vendor gl_vendor; enum wined3d_pci_vendor card_vendor; @@ -1992,7 +1992,6 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter) unsigned i; HDC hdc; unsigned int vidmem=0; - char *gl_renderer; DWORD gl_version; size_t len; @@ -2000,46 +1999,34 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter) ENTER_GL(); - gl_string = (const char *)glGetString(GL_RENDERER); - TRACE_(d3d_caps)("GL_RENDERER: %s.\n", debugstr_a(gl_string)); - if (!gl_string) + gl_renderer_str = (const char *)glGetString(GL_RENDERER); + TRACE_(d3d_caps)("GL_RENDERER: %s.\n", debugstr_a(gl_renderer_str)); + if (!gl_renderer_str) { LEAVE_GL(); ERR_(d3d_caps)("Received a NULL GL_RENDERER.\n"); return FALSE; } - len = strlen(gl_string) + 1; - gl_renderer = HeapAlloc(GetProcessHeap(), 0, len); - if (!gl_renderer) - { - LEAVE_GL(); - ERR_(d3d_caps)("Failed to allocate gl_renderer memory.\n"); - return FALSE; - } - memcpy(gl_renderer, gl_string, len); - - gl_string = (const char *)glGetString(GL_VENDOR); - TRACE_(d3d_caps)("GL_VENDOR: %s.\n", debugstr_a(gl_string)); - if (!gl_string) + gl_vendor_str = (const char *)glGetString(GL_VENDOR); + TRACE_(d3d_caps)("GL_VENDOR: %s.\n", debugstr_a(gl_vendor_str)); + if (!gl_vendor_str) { LEAVE_GL(); ERR_(d3d_caps)("Received a NULL GL_VENDOR.\n"); - HeapFree(GetProcessHeap(), 0, gl_renderer); return FALSE; } /* Parse the GL_VERSION field into major and minor information */ - gl_string = (const char *)glGetString(GL_VERSION); - TRACE_(d3d_caps)("GL_VERSION: %s.\n", debugstr_a(gl_string)); - if (!gl_string) + gl_version_str = (const char *)glGetString(GL_VERSION); + TRACE_(d3d_caps)("GL_VERSION: %s.\n", debugstr_a(gl_version_str)); + if (!gl_version_str) { LEAVE_GL(); ERR_(d3d_caps)("Received a NULL GL_VERSION.\n"); - HeapFree(GetProcessHeap(), 0, gl_renderer); return FALSE; } - gl_version = wined3d_parse_gl_version(gl_string); + gl_version = wined3d_parse_gl_version(gl_version_str); /* * Initialize openGL extension related variables @@ -2087,7 +2074,6 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter) { LEAVE_GL(); ERR_(d3d_caps)("Received a NULL GL_EXTENSIONS.\n"); - HeapFree(GetProcessHeap(), 0, gl_renderer); return FALSE; } @@ -2484,11 +2470,11 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter) gl_info->limits.buffers = 1; } - gl_vendor = wined3d_guess_gl_vendor(gl_info, gl_string, gl_renderer); - card_vendor = wined3d_guess_card_vendor(gl_string, gl_renderer); - TRACE_(d3d_caps)("found GL_VENDOR (%s)->(0x%04x/0x%04x)\n", debugstr_a(gl_string), gl_vendor, card_vendor); + gl_vendor = wined3d_guess_gl_vendor(gl_info, gl_vendor_str, gl_renderer_str); + card_vendor = wined3d_guess_card_vendor(gl_vendor_str, gl_renderer_str); + TRACE_(d3d_caps)("found GL_VENDOR (%s)->(0x%04x/0x%04x)\n", debugstr_a(gl_vendor_str), gl_vendor, card_vendor); - device = wined3d_guess_card(gl_info, gl_renderer, &gl_vendor, &card_vendor, &vidmem); + device = wined3d_guess_card(gl_info, gl_renderer_str, &gl_vendor, &card_vendor, &vidmem); TRACE_(d3d_caps)("FOUND (fake) card: 0x%x (vendor id), 0x%x (device id)\n", card_vendor, device); /* If we have an estimate use it, else default to 64MB; */ @@ -2551,11 +2537,10 @@ static BOOL IWineD3DImpl_FillGLCaps(struct wined3d_adapter *adapter) } } - fixup_extensions(gl_info, gl_renderer, gl_vendor, card_vendor, device); + fixup_extensions(gl_info, gl_renderer_str, gl_vendor, card_vendor, device); init_driver_info(driver_info, card_vendor, device); add_gl_compat_wrappers(gl_info); - HeapFree(GetProcessHeap(), 0, gl_renderer); return TRUE; }
1
0
0
0
Stefan Dösinger : wined3d: Add wined3d_event_query_create and destroy.
by Alexandre Julliard
05 Mar '10
05 Mar '10
Module: wine Branch: master Commit: bd0641d37fec8cc50d6f6774da30995757f5eaec URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bd0641d37fec8cc50d6f6774d…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Mar 3 23:48:50 2010 +0100 wined3d: Add wined3d_event_query_create and destroy. This also moves the event query faking code back to the external interface and removes the temporary WINED3D_EVENT_QUERY_UNSUPPORTED return value since wined3d_event_query_create properly fails if no event query GL extension is supported. --- dlls/wined3d/query.c | 61 ++++++++++++++++++++++++++++----------- dlls/wined3d/wined3d_private.h | 3 +- 2 files changed, 45 insertions(+), 19 deletions(-) diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c index 09a60bd..3860e2c 100644 --- a/dlls/wined3d/query.c +++ b/dlls/wined3d/query.c @@ -27,6 +27,30 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d); #define GLINFO_LOCATION (*gl_info) +static HRESULT wined3d_event_query_init(const struct wined3d_gl_info *gl_info, struct wined3d_event_query **query) +{ + struct wined3d_event_query *ret; + *query = NULL; + if (!gl_info->supported[ARB_SYNC] && !gl_info->supported[NV_FENCE] + && !gl_info->supported[APPLE_FENCE]) return E_NOTIMPL; + + ret = HeapAlloc(GetProcessHeap(), 0, sizeof(*ret)); + if (!ret) + { + ERR("Failed to allocate a wined3d event query structure.\n"); + return E_OUTOFMEMORY; + } + ret->context = NULL; + *query = ret; + return WINED3D_OK; +} + +static void wined3d_event_query_destroy(struct wined3d_event_query *query) +{ + if (query->context) context_free_event_query(query); + HeapFree(GetProcessHeap(), 0, query); +} + static enum wined3d_event_query_result wined3d_event_query_test(struct wined3d_event_query *query, IWineD3DDeviceImpl *device) { struct wined3d_context *context; @@ -91,7 +115,8 @@ static enum wined3d_event_query_result wined3d_event_query_test(struct wined3d_e } else { - ret = WINED3D_EVENT_QUERY_UNSUPPORTED; + ERR("Event query created despite lack of GL support\n"); + ret = WINED3D_EVENT_QUERY_ERROR; } LEAVE_GL(); @@ -194,17 +219,16 @@ static ULONG WINAPI IWineD3DQueryImpl_Release(IWineD3DQuery *iface) { if (This->type == WINED3DQUERYTYPE_EVENT) { struct wined3d_event_query *query = This->extendedData; - - if (query->context) context_free_event_query(query); + if (query) wined3d_event_query_destroy(query); } else if (This->type == WINED3DQUERYTYPE_OCCLUSION) { struct wined3d_occlusion_query *query = This->extendedData; if (query->context) context_free_occlusion_query(query); + HeapFree(GetProcessHeap(), 0, This->extendedData); } - HeapFree(GetProcessHeap(), 0, This->extendedData); HeapFree(GetProcessHeap(), 0, This); } return ref; @@ -309,6 +333,12 @@ static HRESULT WINAPI IWineD3DEventQueryImpl_GetData(IWineD3DQuery* iface, void TRACE("(%p) : type D3DQUERY_EVENT, pData %p, dwSize %#x, dwGetDataFlags %#x\n", This, pData, dwSize, dwGetDataFlags); if (!pData || !dwSize) return S_OK; + if (!query) + { + WARN("(%p): Event query not supported by GL, reporting GPU idle\n", This); + *data = TRUE; + return S_OK; + } ret = wined3d_event_query_test(query, This->device); switch(ret) @@ -327,11 +357,6 @@ static HRESULT WINAPI IWineD3DEventQueryImpl_GetData(IWineD3DQuery* iface, void *data = TRUE; break; - case WINED3D_EVENT_QUERY_UNSUPPORTED: - WARN("(%p): Event query not supported by GL, reporting GPU idle\n", This); - *data = TRUE; - break; - case WINED3D_EVENT_QUERY_ERROR: ERR("The GL event query failed, returning D3DERR_INVALIDCALL\n"); return WINED3DERR_INVALIDCALL; @@ -364,6 +389,10 @@ static HRESULT WINAPI IWineD3DEventQueryImpl_Issue(IWineD3DQuery* iface, DWORD if (dwIssueFlags & WINED3DISSUE_END) { struct wined3d_event_query *query = This->extendedData; + + /* Faked event query support */ + if (!query) return WINED3D_OK; + wined3d_event_query_issue(query, This->device); } else if(dwIssueFlags & WINED3DISSUE_BEGIN) @@ -496,6 +525,7 @@ HRESULT query_init(IWineD3DQueryImpl *query, IWineD3DDeviceImpl *device, WINED3DQUERYTYPE type, IUnknown *parent) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; + HRESULT hr; switch (type) { @@ -518,8 +548,9 @@ HRESULT query_init(IWineD3DQueryImpl *query, IWineD3DDeviceImpl *device, case WINED3DQUERYTYPE_EVENT: TRACE("Event query.\n"); - if (!gl_info->supported[ARB_SYNC] && !gl_info->supported[NV_FENCE] - && !gl_info->supported[APPLE_FENCE]) + query->lpVtbl = &IWineD3DEventQuery_Vtbl; + hr = wined3d_event_query_init(gl_info, (struct wined3d_event_query **) &query->extendedData); + if (hr == E_NOTIMPL) { /* Half-Life 2 needs this query. It does not render the main * menu correctly otherwise. Pretend to support it, faking @@ -527,14 +558,10 @@ HRESULT query_init(IWineD3DQueryImpl *query, IWineD3DDeviceImpl *device, * lowering performance. */ FIXME("Event query: Unimplemented, but pretending to be supported.\n"); } - query->lpVtbl = &IWineD3DEventQuery_Vtbl; - query->extendedData = HeapAlloc(GetProcessHeap(), 0, sizeof(struct wined3d_event_query)); - if (!query->extendedData) + else if(FAILED(hr)) { - ERR("Failed to allocate event query extended data.\n"); - return E_OUTOFMEMORY; + return hr; } - ((struct wined3d_event_query *)query->extendedData)->context = NULL; break; case WINED3DQUERYTYPE_VCACHE: diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 616a391..1d5cd97 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1036,8 +1036,7 @@ enum wined3d_event_query_result WINED3D_EVENT_QUERY_WAITING, WINED3D_EVENT_QUERY_NOT_STARTED, WINED3D_EVENT_QUERY_WRONG_THREAD, - WINED3D_EVENT_QUERY_ERROR, - WINED3D_EVENT_QUERY_UNSUPPORTED + WINED3D_EVENT_QUERY_ERROR }; struct wined3d_context
1
0
0
0
Stefan Dösinger : wined3d: Introduce wined3d_event_query_issue.
by Alexandre Julliard
05 Mar '10
05 Mar '10
Module: wine Branch: master Commit: 6863af3ebbbf748ca288898bf0468e483ab54b2a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6863af3ebbbf748ca288898bf…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Mar 3 23:18:37 2010 +0100 wined3d: Introduce wined3d_event_query_issue. --- dlls/wined3d/query.c | 100 ++++++++++++++++++++++++++------------------------ 1 files changed, 52 insertions(+), 48 deletions(-) diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c index 97ad5bd..09a60bd 100644 --- a/dlls/wined3d/query.c +++ b/dlls/wined3d/query.c @@ -100,6 +100,57 @@ static enum wined3d_event_query_result wined3d_event_query_test(struct wined3d_e return ret; } +static void wined3d_event_query_issue(struct wined3d_event_query *query, IWineD3DDeviceImpl *device) +{ + const struct wined3d_gl_info *gl_info; + struct wined3d_context *context; + + if (query->context) + { + if (!query->context->gl_info->supported[ARB_SYNC] && query->context->tid != GetCurrentThreadId()) + { + context_free_event_query(query); + context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD); + context_alloc_event_query(context, query); + } + else + { + context = context_acquire(device, query->context->current_rt, CTXUSAGE_RESOURCELOAD); + } + } + else + { + context = context_acquire(device, NULL, CTXUSAGE_RESOURCELOAD); + context_alloc_event_query(context, query); + } + + gl_info = context->gl_info; + + ENTER_GL(); + + if (gl_info->supported[ARB_SYNC]) + { + if (query->object.sync) GL_EXTCALL(glDeleteSync(query->object.sync)); + checkGLcall("glDeleteSync"); + query->object.sync = GL_EXTCALL(glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0)); + checkGLcall("glFenceSync"); + } + else if (gl_info->supported[APPLE_FENCE]) + { + GL_EXTCALL(glSetFenceAPPLE(query->object.id)); + checkGLcall("glSetFenceAPPLE"); + } + else if (gl_info->supported[NV_FENCE]) + { + GL_EXTCALL(glSetFenceNV(query->object.id, GL_ALL_COMPLETED_NV)); + checkGLcall("glSetFenceNV"); + } + + LEAVE_GL(); + + context_release(context); +} + /* * Occlusion Queries: *
http://www.gris.uni-tuebingen.de/~bartz/Publications/paper/hww98.pdf
@@ -306,7 +357,6 @@ static WINED3DQUERYTYPE WINAPI IWineD3DQueryImpl_GetType(IWineD3DQuery* iface){ return This->type; } - static HRESULT WINAPI IWineD3DEventQueryImpl_Issue(IWineD3DQuery* iface, DWORD dwIssueFlags) { IWineD3DQueryImpl *This = (IWineD3DQueryImpl *)iface; @@ -314,53 +364,7 @@ static HRESULT WINAPI IWineD3DEventQueryImpl_Issue(IWineD3DQuery* iface, DWORD if (dwIssueFlags & WINED3DISSUE_END) { struct wined3d_event_query *query = This->extendedData; - const struct wined3d_gl_info *gl_info; - struct wined3d_context *context; - - if (query->context) - { - if (!query->context->gl_info->supported[ARB_SYNC] && query->context->tid != GetCurrentThreadId()) - { - context_free_event_query(query); - context = context_acquire(This->device, NULL, CTXUSAGE_RESOURCELOAD); - context_alloc_event_query(context, query); - } - else - { - context = context_acquire(This->device, query->context->current_rt, CTXUSAGE_RESOURCELOAD); - } - } - else - { - context = context_acquire(This->device, NULL, CTXUSAGE_RESOURCELOAD); - context_alloc_event_query(context, query); - } - - gl_info = context->gl_info; - - ENTER_GL(); - - if (gl_info->supported[ARB_SYNC]) - { - if (query->object.sync) GL_EXTCALL(glDeleteSync(query->object.sync)); - checkGLcall("glDeleteSync"); - query->object.sync = GL_EXTCALL(glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0)); - checkGLcall("glFenceSync"); - } - else if (gl_info->supported[APPLE_FENCE]) - { - GL_EXTCALL(glSetFenceAPPLE(query->object.id)); - checkGLcall("glSetFenceAPPLE"); - } - else if (gl_info->supported[NV_FENCE]) - { - GL_EXTCALL(glSetFenceNV(query->object.id, GL_ALL_COMPLETED_NV)); - checkGLcall("glSetFenceNV"); - } - - LEAVE_GL(); - - context_release(context); + wined3d_event_query_issue(query, This->device); } else if(dwIssueFlags & WINED3DISSUE_BEGIN) {
1
0
0
0
Stefan Dösinger : wined3d: Create a wined3d internal event query interface.
by Alexandre Julliard
05 Mar '10
05 Mar '10
Module: wine Branch: master Commit: a0d1a55650a6070a239a5df4cac6be01e809fcf2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a0d1a55650a6070a239a5df4c…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Wed Mar 3 22:45:34 2010 +0100 wined3d: Create a wined3d internal event query interface. The newly created wined3d_event_query_test will be available for wined3d-internal use, primarily for synchronizing buffer updates when using GL_APPLE_flush_buffer_range. The wined3d_event_query interface will contain most of the functionality: * Selecting the proper GL extension * Context handling * Thread handling The IWineD3DEventQuery COM interface will use the internal interface and implement event query faking on top of it (to enable games that require event queries able to run on drivers that don't implement the GL extension). --- dlls/wined3d/query.c | 168 ++++++++++++++++++++++++---------------- dlls/wined3d/wined3d_private.h | 10 +++ 2 files changed, 111 insertions(+), 67 deletions(-) diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c index 85d5311..97ad5bd 100644 --- a/dlls/wined3d/query.c +++ b/dlls/wined3d/query.c @@ -24,15 +24,88 @@ #include "config.h" #include "wined3d_private.h" +WINE_DEFAULT_DEBUG_CHANNEL(d3d); +#define GLINFO_LOCATION (*gl_info) + +static enum wined3d_event_query_result wined3d_event_query_test(struct wined3d_event_query *query, IWineD3DDeviceImpl *device) +{ + struct wined3d_context *context; + const struct wined3d_gl_info *gl_info; + enum wined3d_event_query_result ret; + BOOL fence_result; + + TRACE("(%p) : device %p\n", query, device); + + if (query->context == NULL) + { + TRACE("Query not started\n"); + return WINED3D_EVENT_QUERY_NOT_STARTED; + } + + if (!query->context->gl_info->supported[ARB_SYNC] && query->context->tid != GetCurrentThreadId()) + { + WARN("Event query tested from wrong thread\n"); + return WINED3D_EVENT_QUERY_WRONG_THREAD; + } + + context = context_acquire(device, query->context->current_rt, CTXUSAGE_RESOURCELOAD); + gl_info = context->gl_info; + + ENTER_GL(); + + if (gl_info->supported[ARB_SYNC]) + { + GLenum gl_ret = GL_EXTCALL(glClientWaitSync(query->object.sync, 0, 0)); + checkGLcall("glClientWaitSync"); + + switch (gl_ret) + { + case GL_ALREADY_SIGNALED: + case GL_CONDITION_SATISFIED: + ret = WINED3D_EVENT_QUERY_OK; + break; + + case GL_TIMEOUT_EXPIRED: + ret = WINED3D_EVENT_QUERY_WAITING; + break; + + case GL_WAIT_FAILED: + default: + ERR("glClientWaitSync returned %#x.\n", gl_ret); + ret = WINED3D_EVENT_QUERY_ERROR; + } + } + else if (gl_info->supported[APPLE_FENCE]) + { + fence_result = GL_EXTCALL(glTestFenceAPPLE(query->object.id)); + checkGLcall("glTestFenceAPPLE"); + if (fence_result) ret = WINED3D_EVENT_QUERY_OK; + else ret = WINED3D_EVENT_QUERY_WAITING; + } + else if (gl_info->supported[NV_FENCE]) + { + fence_result = GL_EXTCALL(glTestFenceNV(query->object.id)); + checkGLcall("glTestFenceNV"); + if (fence_result) ret = WINED3D_EVENT_QUERY_OK; + else ret = WINED3D_EVENT_QUERY_WAITING; + } + else + { + ret = WINED3D_EVENT_QUERY_UNSUPPORTED; + } + + LEAVE_GL(); + + context_release(context); + return ret; +} + /* * Occlusion Queries: *
http://www.gris.uni-tuebingen.de/~bartz/Publications/paper/hww98.pdf
*
http://oss.sgi.com/projects/ogl-sample/registry/ARB/occlusion_query.txt
*/ -WINE_DEFAULT_DEBUG_CHANNEL(d3d); -#define GLINFO_LOCATION (*gl_info) - /* ******************************************* IWineD3DQuery IUnknown parts follow ******************************************* */ @@ -179,78 +252,39 @@ static HRESULT WINAPI IWineD3DOcclusionQueryImpl_GetData(IWineD3DQuery* iface, static HRESULT WINAPI IWineD3DEventQueryImpl_GetData(IWineD3DQuery* iface, void* pData, DWORD dwSize, DWORD dwGetDataFlags) { IWineD3DQueryImpl *This = (IWineD3DQueryImpl *) iface; struct wined3d_event_query *query = This->extendedData; - const struct wined3d_gl_info *gl_info; - struct wined3d_context *context; BOOL *data = pData; + enum wined3d_event_query_result ret; TRACE("(%p) : type D3DQUERY_EVENT, pData %p, dwSize %#x, dwGetDataFlags %#x\n", This, pData, dwSize, dwGetDataFlags); if (!pData || !dwSize) return S_OK; - if (!query->context) + ret = wined3d_event_query_test(query, This->device); + switch(ret) { - TRACE("Query not started, returning TRUE.\n"); - *data = TRUE; - - return S_OK; - } - - if (!query->context->gl_info->supported[ARB_SYNC] && query->context->tid != GetCurrentThreadId()) - { - /* See comment in IWineD3DQuery::Issue, event query codeblock */ - FIXME("Wrong thread, reporting GPU idle.\n"); - *data = TRUE; - - return S_OK; - } - - context = context_acquire(This->device, query->context->current_rt, CTXUSAGE_RESOURCELOAD); - gl_info = context->gl_info; - - ENTER_GL(); + case WINED3D_EVENT_QUERY_OK: + case WINED3D_EVENT_QUERY_NOT_STARTED: + *data = TRUE; + break; - if (gl_info->supported[ARB_SYNC]) - { - GLenum ret = GL_EXTCALL(glClientWaitSync(query->object.sync, 0, 0)); - checkGLcall("glClientWaitSync"); + case WINED3D_EVENT_QUERY_WAITING: + *data = FALSE; + break; - switch (ret) - { - case GL_ALREADY_SIGNALED: - case GL_CONDITION_SATISFIED: - *data = TRUE; - break; + case WINED3D_EVENT_QUERY_WRONG_THREAD: + FIXME("(%p) Wrong thread, reporting GPU idle.\n", This); + *data = TRUE; + break; - case GL_TIMEOUT_EXPIRED: - *data = FALSE; - break; + case WINED3D_EVENT_QUERY_UNSUPPORTED: + WARN("(%p): Event query not supported by GL, reporting GPU idle\n", This); + *data = TRUE; + break; - case GL_WAIT_FAILED: - default: - ERR("glClientWaitSync returned %#x.\n", ret); - *data = FALSE; - break; - } + case WINED3D_EVENT_QUERY_ERROR: + ERR("The GL event query failed, returning D3DERR_INVALIDCALL\n"); + return WINED3DERR_INVALIDCALL; } - else if (gl_info->supported[APPLE_FENCE]) - { - *data = GL_EXTCALL(glTestFenceAPPLE(query->object.id)); - checkGLcall("glTestFenceAPPLE"); - } - else if (gl_info->supported[NV_FENCE]) - { - *data = GL_EXTCALL(glTestFenceNV(query->object.id)); - checkGLcall("glTestFenceNV"); - } - else - { - WARN("(%p): reporting GPU idle\n", This); - *data = TRUE; - } - - LEAVE_GL(); - - context_release(context); return S_OK; } diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index ebfa7a4..616a391 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1030,6 +1030,16 @@ struct wined3d_event_query struct wined3d_context *context; }; +enum wined3d_event_query_result +{ + WINED3D_EVENT_QUERY_OK, + WINED3D_EVENT_QUERY_WAITING, + WINED3D_EVENT_QUERY_NOT_STARTED, + WINED3D_EVENT_QUERY_WRONG_THREAD, + WINED3D_EVENT_QUERY_ERROR, + WINED3D_EVENT_QUERY_UNSUPPORTED +}; + struct wined3d_context { const struct wined3d_gl_info *gl_info;
1
0
0
0
Alexandre Julliard : ntdll: Always restore the context after an exception even if setting the debug registers fails .
by Alexandre Julliard
05 Mar '10
05 Mar '10
Module: wine Branch: master Commit: c09df80620fe33f7f0de6eb7f19d20792f2c4774 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c09df80620fe33f7f0de6eb7f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 5 12:25:34 2010 +0100 ntdll: Always restore the context after an exception even if setting the debug registers fails. --- dlls/ntdll/signal_i386.c | 45 +++++++++++++++++++++++++++++++++++++++------ 1 files changed, 39 insertions(+), 6 deletions(-) diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c index 4eccb61..4998820 100644 --- a/dlls/ntdll/signal_i386.c +++ b/dlls/ntdll/signal_i386.c @@ -1188,6 +1188,35 @@ void set_cpu_context( const CONTEXT *context ) /*********************************************************************** + * set_debug_registers + */ +static void set_debug_registers( const CONTEXT *context ) +{ + DWORD flags = context->ContextFlags & ~CONTEXT_i386; + context_t server_context; + + if (!(flags & CONTEXT_DEBUG_REGISTERS)) return; + if (ntdll_get_thread_data()->dr0 == context->Dr0 && + ntdll_get_thread_data()->dr1 == context->Dr1 && + ntdll_get_thread_data()->dr2 == context->Dr2 && + ntdll_get_thread_data()->dr3 == context->Dr3 && + ntdll_get_thread_data()->dr6 == context->Dr6 && + ntdll_get_thread_data()->dr7 == context->Dr7) return; + + context_to_server( &server_context, context ); + + SERVER_START_REQ( set_thread_context ) + { + req->handle = wine_server_obj_handle( GetCurrentThread() ); + req->suspend = 0; + wine_server_add_data( req, &server_context, sizeof(server_context) ); + wine_server_call( req ); + } + SERVER_END_REQ; +} + + +/*********************************************************************** * copy_context * * Copy a register context according to the flags. @@ -1678,9 +1707,9 @@ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context break; } status = NtRaiseException( rec, context, TRUE ); - if (status) raise_status( status, rec ); + raise_status( status, rec ); done: - NtSetContextThread( GetCurrentThread(), context ); + set_cpu_context( context ); } @@ -1709,7 +1738,7 @@ static void WINAPI raise_trap_exception( EXCEPTION_RECORD *rec, CONTEXT *context } status = NtRaiseException( rec, context, TRUE ); - if (status) raise_status( status, rec ); + raise_status( status, rec ); } @@ -1723,7 +1752,7 @@ static void WINAPI raise_generic_exception( EXCEPTION_RECORD *rec, CONTEXT *cont NTSTATUS status; status = NtRaiseException( rec, context, TRUE ); - if (status) raise_status( status, rec ); + raise_status( status, rec ); } @@ -1755,7 +1784,7 @@ static void WINAPI raise_vm86_sti_exception( EXCEPTION_RECORD *rec, CONTEXT *con NtRaiseException( rec, context, TRUE ); } done: - NtSetContextThread( GetCurrentThread(), context ); + set_cpu_context( context ); } @@ -2345,7 +2374,11 @@ DEFINE_REGS_ENTRYPOINT( RtlUnwind, 4 ) NTSTATUS WINAPI NtRaiseException( EXCEPTION_RECORD *rec, CONTEXT *context, BOOL first_chance ) { NTSTATUS status = raise_exception( rec, context, first_chance ); - if (status == STATUS_SUCCESS) NtSetContextThread( GetCurrentThread(), context ); + if (status == STATUS_SUCCESS) + { + set_debug_registers( context ); + set_cpu_context( context ); + } return status; }
1
0
0
0
Alexandre Julliard : server: Fix a typo in the context tracing.
by Alexandre Julliard
05 Mar '10
05 Mar '10
Module: wine Branch: master Commit: b1c0441facb3421a81b11264026e50beb4b50398 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b1c0441facb3421a81b112640…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Mar 5 12:25:12 2010 +0100 server: Fix a typo in the context tracing. --- server/trace.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/server/trace.c b/server/trace.c index 529316d..a250a2e 100644 --- a/server/trace.c +++ b/server/trace.c @@ -438,7 +438,7 @@ static void dump_varargs_context( const char *prefix, data_size_t size ) ctx.debug.i386_regs.dr3, ctx.debug.i386_regs.dr6, ctx.debug.i386_regs.dr7 ); if (ctx.flags & SERVER_CTX_FLOATING_POINT) { - fprintf( stderr, "fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x", + fprintf( stderr, ",fp.ctrl=%08x,fp.status=%08x,fp.tag=%08x,fp.err_off=%08x,fp.err_sel=%08x", ctx.fp.i386_regs.ctrl, ctx.fp.i386_regs.status, ctx.fp.i386_regs.tag, ctx.fp.i386_regs.err_off, ctx.fp.i386_regs.err_sel ); fprintf( stderr, ",fp.data_off=%08x,fp.data_sel=%08x,fp.cr0npx=%08x",
1
0
0
0
Alexandre Julliard : wine.inf: Create symlinks for shared Wow64 keys under HKLM\Software.
by Alexandre Julliard
05 Mar '10
05 Mar '10
Module: wine Branch: master Commit: b3d3903b33cf88b51ceaf8573a09b8b64eb33516 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b3d3903b33cf88b51ceaf8573…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 4 20:49:34 2010 +0100 wine.inf: Create symlinks for shared Wow64 keys under HKLM\Software. --- tools/wine.inf.in | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 55 insertions(+), 0 deletions(-) diff --git a/tools/wine.inf.in b/tools/wine.inf.in index bc695e6..1dc6632 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -2940,7 +2940,62 @@ HKLM,%Control%\Windows,"CSDVersion",0x10003,0x300 HKLM,%Control%\Session Manager\Environment,"OS",2,"Windows_NT" [Wow64] +; Wow6432Node symlinks HKLM,Software\Classes\Wow6432Node\AppId,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Classes\AppId" HKLM,Software\Classes\Wow6432Node\Protocols,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Classes\Protocols" HKLM,Software\Classes\Wow6432Node\TypeLib,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Classes\TypeLib" HKLM,Software\Wow6432Node\Classes,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Classes\Wow6432Node" +; 32-bit redirected keys under HKLM\Software\Classes +HKLM,Software\Classes\Wow6432Node\CLSID,,16 +HKLM,Software\Classes\Wow6432Node\DirectShow,,16 +HKLM,Software\Classes\Wow6432Node\Interface,,16 +HKLM,Software\Classes\Wow6432Node\Media Type,,16 +HKLM,Software\Classes\Wow6432Node\MediaFoundation,,16 +; symlinks for shared keys under HKLM\Software +HKLM,Software\Wow6432Node\Microsoft\Clients,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Clients" +HKLM,Software\Wow6432Node\Microsoft\Cryptography\Calais\Current,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Cryptography\Calais\Current" +HKLM,Software\Wow6432Node\Microsoft\Cryptography\Calais\Readers,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Cryptography\Calais\Readers" +HKLM,Software\Wow6432Node\Microsoft\Cryptography\Services,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Cryptography\Services" +HKLM,Software\Wow6432Node\Microsoft\CTF\SystemShared,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\CTF\SystemShared" +HKLM,Software\Wow6432Node\Microsoft\CTF\TIP,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\CTF\TIP" +HKLM,Software\Wow6432Node\Microsoft\DFS,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\DFS" +HKLM,Software\Wow6432Node\Microsoft\Driver Signing,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Driver Signing" +HKLM,Software\Wow6432Node\Microsoft\EnterpriseCertificates,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\EnterpriseCertificates" +HKLM,Software\Wow6432Node\Microsoft\EventSystem,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\EventSystem" +HKLM,Software\Wow6432Node\Microsoft\MSMQ,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\MSMQ" +HKLM,Software\Wow6432Node\Microsoft\Non-Driver Signing,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Non-Driver Signing" +HKLM,Software\Wow6432Node\Microsoft\Notepad\DefaultFonts,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Notepad\DefaultFonts" +HKLM,Software\Wow6432Node\Microsoft\OLE,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\OLE" +HKLM,Software\Wow6432Node\Microsoft\RAS,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\RAS" +HKLM,Software\Wow6432Node\Microsoft\RPC,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\RPC" +HKLM,Software\Wow6432Node\Microsoft\Software\Microsoft\Shared Tools\MSInfo,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Software\Microsoft\Shared Tools\MSInfo" +HKLM,Software\Wow6432Node\Microsoft\SystemCertificates,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\SystemCertificates" +HKLM,Software\Wow6432Node\Microsoft\TermServLicensing,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\TermServLicensing" +HKLM,Software\Wow6432Node\Microsoft\Transaction Server,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Transaction Server" +HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows\CurrentVersion\App Paths" +HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Control Panel\Cursors\Schemes,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows\CurrentVersion\Control Panel\Cursors\Schemes" +HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers" +HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows\CurrentVersion\Explorer\DriveIcons" +HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\KindMap,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows\CurrentVersion\Explorer\KindMap" +HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Group Policy,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows\CurrentVersion\Group Policy" +HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows\CurrentVersion\Policies" +HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\PreviewHandlers,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows\CurrentVersion\PreviewHandlers" +HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Setup,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows\CurrentVersion\Setup" +HKLM,Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Telephony\Locations,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows\CurrentVersion\Telephony\Locations" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Console,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\Console" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\FontDpi,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\FontDpi" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\FontLink,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\FontLink" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\FontMapper,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\FontMapper" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Fonts,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\Fonts" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\FontSubstitutes,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\FontSubstitutes" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Gre_Initialize,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\Gre_Initialize" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Image File Execution Options,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Language Pack,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\Language Pack" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\NetworkCards,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\NetworkCards" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Perflib,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\Perflib" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Ports,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\Ports" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Print,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\Print" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\ProfileList,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\ProfileList" +HKLM,Software\Wow6432Node\Microsoft\Windows NT\CurrentVersion\Time Zones,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Microsoft\Windows NT\CurrentVersion\Time Zones" +HKLM,Software\Wow6432Node\Policies,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Policies" +HKLM,Software\Wow6432Node\Registered Applications,"SymbolicLinkValue",0x60000,"\Registry\Machine\Software\Registered Applications"
1
0
0
0
Alexandre Julliard : wine.inf: Create empty keys for all entries that are shared in Wow64.
by Alexandre Julliard
05 Mar '10
05 Mar '10
Module: wine Branch: master Commit: 835895f285d757c69777e8bc859fdf1d7dd72fd4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=835895f285d757c69777e8bc8…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 4 20:48:57 2010 +0100 wine.inf: Create empty keys for all entries that are shared in Wow64. --- tools/wine.inf.in | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 44 insertions(+), 0 deletions(-) diff --git a/tools/wine.inf.in b/tools/wine.inf.in index 4702761..bc695e6 100644 --- a/tools/wine.inf.in +++ b/tools/wine.inf.in @@ -136,6 +136,7 @@ HKCR,chm.file\shell\open\command,,2,"%10%\hh.exe %1" HKCR,cplfile,,2,"Control Panel Item" HKCR,cplfile\shell\cplopen,,2,"Open with Control Panel" HKCR,cplfile\shell\cplopen\command,,2,"rundll32.exe shell32.dll,Control_RunDLL ""%1"",%*" +HKCR,DirectShow,,16 HKCR,exefile,,2,"Application" HKCR,exefile\DefaultIcon,,2,"%1" HKCR,exefile\shell\open\command,,2,"""%1"" %*" @@ -160,6 +161,7 @@ HKCR,lnkfile,"IsShortcut",2,"yes" HKCR,lnkfile\CLSID,,2,"{00021401-0000-0000-C000-000000000046}" HKCR,lnkfile\shellex\IconHandler,,2,"{00021401-0000-0000-C000-000000000046}" HKCR,lnkfile\shellex\ContextMenuHandlers\{00021401-0000-0000-C000-000000000046},,0x10, +HKCR,MediaFoundation,,16 HKCR,Msi.Package,,2,"Windows Installer Package" HKCR,Msi.Package\DefaultIcon,,2,"msiexec.exe" HKCR,Msi.Package\shell\Open\command,,2,"msiexec /i ""%1""" @@ -407,9 +409,17 @@ HKLM,%CurrentVersion%,"ProgramFilesDir",,"%16422%" HKLM,%CurrentVersion%,"ProgramFilesPath",0x20000,"%%ProgramFiles%%" HKLM,%CurrentVersion%,"RegisteredOrganization",2,"" HKLM,%CurrentVersion%,"RegisteredOwner",2,"" +HKLM,%CurrentVersion%\App Paths,,16 +HKLM,%CurrentVersion%\Control Panel\Cursors\Schemes,,16 HKLM,%CurrentVersion%\Controls Folder\PowerCfg,"DiskSpinDownMax",,"3600" HKLM,%CurrentVersion%\Controls Folder\PowerCfg,"DiskSpinDownMin",,"3" HKLM,%CurrentVersion%\Controls Folder\PowerCfg,"LastID",,"5" +HKLM,%CurrentVersion%\Explorer\AutoplayHandlers,,16 +HKLM,%CurrentVersion%\Explorer\DriveIcons,,16 +HKLM,%CurrentVersion%\Explorer\KindMap,,16 +HKLM,%CurrentVersion%\Group Policy,,16 +HKLM,%CurrentVersion%\Policies,,16 +HKLM,%CurrentVersion%\PreviewHandlers,,16 HKLM,%CurrentVersion%\RunServices,"winemenubuilder",2,"%11%\winemenubuilder.exe -a -r" HKLM,%CurrentVersion%\Setup,"BootDir",,"%30%" HKLM,%CurrentVersion%\Setup,"SharedDir",,"%25%" @@ -417,8 +427,21 @@ HKLM,%CurrentVersion%\Uninstall,,16 HKLM,%CurrentVersionNT%,"RegisteredOrganization",2,"" HKLM,%CurrentVersionNT%,"RegisteredOwner",2,"" HKLM,%CurrentVersionNT%,"SystemRoot",,"%10%" +HKLM,%CurrentVersionNT%\Console,,16 +HKLM,%CurrentVersionNT%\FontDpi,,16 +HKLM,%CurrentVersionNT%\FontLink,,16 +HKLM,%CurrentVersionNT%\FontMapper,,16 HKLM,%CurrentVersionNT%\Fonts,,16 +HKLM,%CurrentVersionNT%\FontSubstitutes,,16 +HKLM,%CurrentVersionNT%\Gre_Initialize,,16 HKLM,%CurrentVersionNT%\Hotfix\Q246009,"Installed",,"1" +HKLM,%CurrentVersionNT%\Image File Execution Options,,16 +HKLM,%CurrentVersionNT%\Language Pack,,16 +HKLM,%CurrentVersionNT%\NetworkCards,,16 +HKLM,%CurrentVersionNT%\Perflib,,16 +HKLM,%CurrentVersionNT%\Ports,,16 +HKLM,%CurrentVersionNT%\Print,,16 +HKLM,%CurrentVersionNT%\ProfileList,,16 [Debugger] HKLM,%CurrentVersionNT%\AeDebug,"Debugger",2,"winedbg --auto %ld %ld" @@ -565,6 +588,20 @@ HKLM,Software\Clients\Mail,,2,"Native Mail Client" HKLM,Software\Clients\Mail\Native Mail Client,,2,"Native Mail Client" HKLM,Software\Clients\Mail\Native Mail Client,"DLLPath",2,"%11%\winemapi.dll" HKLM,Software\Microsoft\Advanced INF Setup,,16 +HKLM,Software\Microsoft\Clients,,16 +HKLM,Software\Microsoft\Cryptography\Calais\Current,,16 +HKLM,Software\Microsoft\Cryptography\Calais\Readers,,16 +HKLM,Software\Microsoft\Cryptography\Services,,16 +HKLM,Software\Microsoft\CTF\SystemShared,,16 +HKLM,Software\Microsoft\CTF\TIP,,16 +HKLM,Software\Microsoft\DFS,,16 +HKLM,Software\Microsoft\Driver Signing,,16 +HKLM,Software\Microsoft\EnterpriseCertificates,,16 +HKLM,Software\Microsoft\EventSystem,,16 +HKLM,Software\Microsoft\MSMQ,,16 +HKLM,Software\Microsoft\Non-Driver Signing,,16 +HKLM,Software\Microsoft\Notepad\DefaultFonts,,16 +HKLM,Software\Microsoft\RAS,,16 HKLM,Software\Microsoft\Rpc\SecurityService,1,2,"secur32.dll" HKLM,Software\Microsoft\Rpc\SecurityService,10,2,"secur32.dll" HKLM,Software\Microsoft\Rpc\SecurityService,14,2,"schannel.dll" @@ -572,6 +609,12 @@ HKLM,Software\Microsoft\Rpc\SecurityService,16,2,"secur32.dll" HKLM,Software\Microsoft\Rpc\SecurityService,18,2,"secur32.dll" HKLM,Software\Microsoft\Rpc\SecurityService,68,2,"netlogon.dll" HKLM,Software\Microsoft\Rpc\SecurityService,9,2,"secur32.dll" +HKLM,Software\Microsoft\Shared Tools\MSInfo,,16 +HKLM,Software\Microsoft\SystemCertificates,,16 +HKLM,Software\Microsoft\TermServLicensing,,16 +HKLM,Software\Microsoft\Transaction Server,,16 +HKLM,Software\Policies,,16 +HKLM,Software\Registered Applications,,16 HKLM,System\CurrentControlSet\Control\VMM32Files,,16 HKCU,AppEvents\Schemes\Apps\Explorer\Navigating\.Current,,,"" HKCU,Software\Microsoft\Protected Storage System Provider,,16 @@ -935,6 +978,7 @@ HKLM,%CurrentVersionNT%\Ports,"COM4:",2,"9600,n,8,1" [Tapi] HKLM,%CurrentVersion%\Telephony,"Perf1",0x10001,0x5045524a HKLM,%CurrentVersion%\Telephony,"Perf2",0x10001,0x50455246 +HKLM,%CurrentVersion%\Telephony\Locations,,16 HKLM,%CurrentVersion%\Telephony\Country List,"CountryListVersion",0x10001,0x00000019
1
0
0
0
Alexandre Julliard : ntdll/tests: Add tests for HKLM\Software\Classes Wow64 sharing.
by Alexandre Julliard
05 Mar '10
05 Mar '10
Module: wine Branch: master Commit: 5e12f65a1a2390b4db146ebaeb513a02dea443c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5e12f65a1a2390b4db146ebae…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 4 20:48:09 2010 +0100 ntdll/tests: Add tests for HKLM\Software\Classes Wow64 sharing. --- dlls/ntdll/tests/reg.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 54 insertions(+), 0 deletions(-) diff --git a/dlls/ntdll/tests/reg.c b/dlls/ntdll/tests/reg.c index 4480bbf..1cad29e 100644 --- a/dlls/ntdll/tests/reg.c +++ b/dlls/ntdll/tests/reg.c @@ -956,6 +956,17 @@ static void test_redirection(void) 'S','o','f','t','w','a','r','e','\\', 'W','o','w','6','4','3','2','N','o','d','e','\\', 'W','i','n','e','\\', 'W','i','n','e','t','e','s','t',0}; + static const WCHAR classes64W[] = {'\\','R','e','g','i','s','t','r','y','\\', + 'M','a','c','h','i','n','e','\\', + 'S','o','f','t','w','a','r','e','\\', + 'C','l','a','s','s','e','s','\\', + 'W','i','n','e',0}; + static const WCHAR classes32W[] = {'\\','R','e','g','i','s','t','r','y','\\', + 'M','a','c','h','i','n','e','\\', + 'S','o','f','t','w','a','r','e','\\', + 'C','l','a','s','s','e','s','\\', + 'W','o','w','6','4','3','2','N','o','d','e','\\', + 'W','i','n','e',0}; NTSTATUS status; OBJECT_ATTRIBUTES attr; UNICODE_STRING str; @@ -1181,6 +1192,49 @@ static void test_redirection(void) pNtClose( root32 ); pNtDeleteKey( root64 ); pNtClose( root64 ); + + /* Software\Classes is shared/reflected so behavior is different */ + + pRtlInitUnicodeString( &str, classes64W ); + status = pNtCreateKey( &key64, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); + ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); + + pRtlInitUnicodeString( &str, classes32W ); + status = pNtCreateKey( &key32, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); + ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); + + dw = 64; + status = pNtSetValueKey( key64, &value_str, 0, REG_DWORD, &dw, sizeof(dw) ); + ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); + pNtClose( key64 ); + + dw = 32; + status = pNtSetValueKey( key32, &value_str, 0, REG_DWORD, &dw, sizeof(dw) ); + ok( status == STATUS_SUCCESS, "NtSetValueKey failed: 0x%08x\n", status ); + pNtClose( key32 ); + + pRtlInitUnicodeString( &str, classes64W ); + status = pNtCreateKey( &key64, KEY_WOW64_64KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); + ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); + len = sizeof(buffer); + status = pNtQueryValueKey( key64, &value_str, KeyValuePartialInformation, info, len, &len ); + ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); + dw = *(DWORD *)info->Data; + ok( dw == ptr_size, "wrong value %u\n", dw ); + + pRtlInitUnicodeString( &str, classes32W ); + status = pNtCreateKey( &key32, KEY_WOW64_32KEY | KEY_ALL_ACCESS, &attr, 0, 0, 0, 0 ); + ok( status == STATUS_SUCCESS, "NtCreateKey failed: 0x%08x\n", status ); + len = sizeof(buffer); + status = pNtQueryValueKey( key32, &value_str, KeyValuePartialInformation, info, len, &len ); + ok( status == STATUS_SUCCESS, "NtQueryValueKey failed: 0x%08x\n", status ); + dw = *(DWORD *)info->Data; + ok( dw == 32, "wrong value %u\n", dw ); + + pNtDeleteKey( key32 ); + pNtClose( key32 ); + pNtDeleteKey( key64 ); + pNtClose( key64 ); } START_TEST(reg)
1
0
0
0
Alexandre Julliard : server: Add support for Wow64 sharing of the HKLM\Software\Classes key.
by Alexandre Julliard
05 Mar '10
05 Mar '10
Module: wine Branch: master Commit: 178cd20e281d89358dde524f06882e0c8e0909bc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=178cd20e281d89358dde524f0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Mar 4 20:47:35 2010 +0100 server: Add support for Wow64 sharing of the HKLM\Software\Classes key. --- server/registry.c | 42 ++++++++++++++++++++++++++++++++++-------- 1 files changed, 34 insertions(+), 8 deletions(-) diff --git a/server/registry.c b/server/registry.c index c342603..ff378f5 100644 --- a/server/registry.c +++ b/server/registry.c @@ -85,6 +85,7 @@ struct key #define KEY_DIRTY 0x0004 /* key has been modified */ #define KEY_SYMLINK 0x0008 /* key is a symbolic link */ #define KEY_WOW64 0x0010 /* key contains a Wow6432Node subkey */ +#define KEY_WOWSHARE 0x0020 /* key is a Wow64 shared key (used for Software\Classes) */ /* a key value */ struct key_value @@ -654,7 +655,16 @@ static struct key *open_key_prefix( struct key *key, const struct unicode_str *n while (token->len) { struct key *subkey; - if (!(subkey = find_subkey( key, token, index ))) break; + if (!(subkey = find_subkey( key, token, index ))) + { + if ((key->flags & KEY_WOWSHARE) && !(access & KEY_WOW64_64KEY)) + { + /* try in the 64-bit parent */ + key = key->parent; + subkey = find_subkey( key, token, index ); + } + } + if (!subkey) break; key = subkey; get_path_token( name, token ); if (!token->len) break; @@ -1604,13 +1614,17 @@ void init_registry(void) { static const WCHAR HKLM[] = { 'M','a','c','h','i','n','e' }; static const WCHAR HKU_default[] = { 'U','s','e','r','\\','.','D','e','f','a','u','l','t' }; + static const WCHAR classes[] = {'S','o','f','t','w','a','r','e','\\', + 'C','l','a','s','s','e','s','\\', + 'W','o','w','6','4','3','2','N','o','d','e'}; static const struct unicode_str root_name = { NULL, 0 }; static const struct unicode_str HKLM_name = { HKLM, sizeof(HKLM) }; static const struct unicode_str HKU_name = { HKU_default, sizeof(HKU_default) }; + static const struct unicode_str classes_name = { classes, sizeof(classes) }; WCHAR *current_user_path; struct unicode_str current_user_str; - struct key *key; + struct key *key, *hklm, *hkcu; /* switch to the config dir */ @@ -1623,11 +1637,10 @@ void init_registry(void) /* load system.reg into Registry\Machine */ - if (!(key = create_key_recursive( root_key, &HKLM_name, current_time ))) + if (!(hklm = create_key_recursive( root_key, &HKLM_name, current_time ))) fatal_error( "could not create Machine registry key\n" ); - load_init_registry_from_file( "system.reg", key ); - release_object( key ); + load_init_registry_from_file( "system.reg", hklm ); /* load userdef.reg into Registry\User\.Default */ @@ -1642,11 +1655,24 @@ void init_registry(void) /* FIXME: match default user in token.c. should get from process token instead */ current_user_path = format_user_registry_path( security_interactive_sid, ¤t_user_str ); if (!current_user_path || - !(key = create_key_recursive( root_key, ¤t_user_str, current_time ))) + !(hkcu = create_key_recursive( root_key, ¤t_user_str, current_time ))) fatal_error( "could not create HKEY_CURRENT_USER registry key\n" ); free( current_user_path ); - load_init_registry_from_file( "user.reg", key ); - release_object( key ); + load_init_registry_from_file( "user.reg", hkcu ); + + /* set the shared flag on Software\Classes\Wow6432Node */ + if (sizeof(void *) > sizeof(int)) + { + if ((key = create_key_recursive( hklm, &classes_name, current_time ))) + { + key->flags |= KEY_WOWSHARE; + release_object( key ); + } + /* FIXME: handle HKCU too */ + } + + release_object( hklm ); + release_object( hkcu ); /* start the periodic save timer */ set_periodic_save_timer();
1
0
0
0
← Newer
1
...
74
75
76
77
78
79
80
...
92
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
80
81
82
83
84
85
86
87
88
89
90
91
92
Results per page:
10
25
50
100
200