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 2009
----- 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
834 discussions
Start a n
N
ew thread
Henri Verbeet : shdocvw: Add a stub ITaskbarList implementation.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: 8e12ad4faeb9274a6a038638eed261f3cfae63f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8e12ad4faeb9274a6a038638e…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 24 10:09:25 2009 +0100 shdocvw: Add a stub ITaskbarList implementation. Based on a patch by Louis Lenders. Although MSDN claims this should be in shell32, it really is in shdocvw. --- dlls/shdocvw/Makefile.in | 1 + dlls/shdocvw/factory.c | 9 ++- dlls/shdocvw/shdocvw.h | 2 + dlls/shdocvw/shdocvw.inf | 3 + dlls/shdocvw/taskbarlist.c | 157 ++++++++++++++++++++++++++++++++++++++++++++ dlls/uuid/uuid.c | 1 + include/shobjidl.idl | 2 + 7 files changed, 173 insertions(+), 2 deletions(-) diff --git a/dlls/shdocvw/Makefile.in b/dlls/shdocvw/Makefile.in index 0fd59c5..d8035ff 100644 --- a/dlls/shdocvw/Makefile.in +++ b/dlls/shdocvw/Makefile.in @@ -23,6 +23,7 @@ C_SRCS = \ persist.c \ shdocvw_main.c \ shlinstobj.c \ + taskbarlist.c \ urlhist.c \ view.c \ webbrowser.c diff --git a/dlls/shdocvw/factory.c b/dlls/shdocvw/factory.c index 9111300..751b5a4 100644 --- a/dlls/shdocvw/factory.c +++ b/dlls/shdocvw/factory.c @@ -135,6 +135,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) static IClassFactoryImpl WB2ClassFactory = {&WBCF_Vtbl, WebBrowserV2_Create}; static IClassFactoryImpl CUHClassFactory = {&WBCF_Vtbl, CUrlHistory_Create}; static IClassFactoryImpl ISCClassFactory = {&WBCF_Vtbl, InternetShortcut_Create}; + static IClassFactoryImpl TBLClassFactory = {&WBCF_Vtbl, TaskbarList_Create}; TRACE("\n"); @@ -150,6 +151,9 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, void **ppv) if(IsEqualGUID(&CLSID_InternetShortcut, rclsid)) return IClassFactory_QueryInterface(FACTORY(&ISCClassFactory), riid, ppv); + if(IsEqualGUID(&CLSID_TaskbarList, rclsid)) + return IClassFactory_QueryInterface(FACTORY(&TBLClassFactory), riid, ppv); + /* As a last resort, figure if the CLSID belongs to a 'Shell Instance Object' */ return SHDOCVW_GetShellInstanceObjectClassObject(rclsid, riid, ppv); } @@ -213,8 +217,8 @@ static const GUID CLSID_MruLongList = static HRESULT register_server(BOOL doregister) { STRTABLEA strtable; - STRENTRYA pse[14]; - static CLSID const *clsids[14]; + STRENTRYA pse[15]; + static CLSID const *clsids[15]; unsigned int i = 0; HRESULT hres; @@ -230,6 +234,7 @@ static HRESULT register_server(BOOL doregister) INF_SET_CLSID(ShellShellNameSpace); INF_SET_CLSID(ShellUIHelper); INF_SET_CLSID(ShellWindows); + INF_SET_CLSID(TaskbarList); INF_SET_CLSID(WebBrowser); INF_SET_CLSID(WebBrowser_V1); diff --git a/dlls/shdocvw/shdocvw.h b/dlls/shdocvw/shdocvw.h index fc8c3b5..b148611 100644 --- a/dlls/shdocvw/shdocvw.h +++ b/dlls/shdocvw/shdocvw.h @@ -227,6 +227,8 @@ HRESULT CUrlHistory_Create(IUnknown*,REFIID,void**); HRESULT InternetShortcut_Create(IUnknown*,REFIID,void**); +HRESULT TaskbarList_Create(IUnknown*,REFIID,void**); + #define DEFINE_THIS(cls,ifc,iface) ((cls*)((BYTE*)(iface)-offsetof(cls,lp ## ifc ## Vtbl))) /********************************************************************** diff --git a/dlls/shdocvw/shdocvw.inf b/dlls/shdocvw/shdocvw.inf index 025c4b1..d67443d 100644 --- a/dlls/shdocvw/shdocvw.inf +++ b/dlls/shdocvw/shdocvw.inf @@ -126,6 +126,9 @@ HKCR,"InternetShortcut\shell\open\command",,,"rundll32.exe shdocvw.dll,OpenURL % HKCR,"InternetShortcut\shell\print\command",,,"rundll32.exe mshtml.dll,PrintHTML ""%1""" HKCR,"InternetShortcut\shell\printto\command",,,"rundll32.exe mshtml.dll,PrintHTML ""%1"" ""%2"" ""%3"" ""%4""" +HKCR,"CLSID\%CLSID_TaskbarList%",,,"Task Bar Communication" +HKCR,"CLSID\%CLSID_TaskbarList%\InProcServer32",,,"%MODULE%" +HKCR,"CLSID\%CLSID_TaskbarList%\InProcServer32","ThreadingModel",,"Apartment" [URL.Reg] HKLM,"Software\Microsoft\Windows\CurrentVersion\URL\DefaultPrefix",,,"http://" diff --git a/dlls/shdocvw/taskbarlist.c b/dlls/shdocvw/taskbarlist.c new file mode 100644 index 0000000..e0e063c --- /dev/null +++ b/dlls/shdocvw/taskbarlist.c @@ -0,0 +1,157 @@ +/* + * Copyright 2009 Henri Verbeet 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 "config.h" +#include "wine/port.h" +#include "wine/debug.h" + +#include "shdocvw.h" + +WINE_DEFAULT_DEBUG_CHANNEL(shdocvw); + +struct taskbar_list +{ + const struct ITaskbarListVtbl *lpVtbl; + LONG refcount; +}; + +/* IUnknown methods */ + +static HRESULT STDMETHODCALLTYPE taskbar_list_QueryInterface(ITaskbarList *iface, REFIID riid, void **object) +{ + TRACE("iface %p, riid %s, object %p\n", iface, debugstr_guid(riid), object); + + if (IsEqualGUID(riid, &IID_ITaskbarList) + || IsEqualGUID(riid, &IID_IUnknown)) + { + IUnknown_AddRef(iface); + *object = iface; + return S_OK; + } + + WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid)); + + *object = NULL; + return E_NOINTERFACE; +} + +static ULONG STDMETHODCALLTYPE taskbar_list_AddRef(ITaskbarList *iface) +{ + struct taskbar_list *This = (struct taskbar_list *)iface; + ULONG refcount = InterlockedIncrement(&This->refcount); + + TRACE("%p increasing refcount to %u\n", This, refcount); + + return refcount; +} + +static ULONG STDMETHODCALLTYPE taskbar_list_Release(ITaskbarList *iface) +{ + struct taskbar_list *This = (struct taskbar_list *)iface; + ULONG refcount = InterlockedDecrement(&This->refcount); + + TRACE("%p decreasing refcount to %u\n", This, refcount); + + if (!refcount) + { + HeapFree(GetProcessHeap(), 0, This); + } + + return refcount; +} + +/* ITaskbarList methods */ + +static HRESULT STDMETHODCALLTYPE taskbar_list_HrInit(ITaskbarList *iface) +{ + FIXME("iface %p stub!\n", iface); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE taskbar_list_AddTab(ITaskbarList *iface, HWND hwnd) +{ + FIXME("iface %p, hwnd %p stub!\n", iface, hwnd); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE taskbar_list_DeleteTab(ITaskbarList *iface, HWND hwnd) +{ + FIXME("iface %p, hwnd %p stub!\n", iface, hwnd); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE taskbar_list_ActivateTab(ITaskbarList *iface, HWND hwnd) +{ + FIXME("iface %p, hwnd %p stub!\n", iface, hwnd); + + return E_NOTIMPL; +} + +static HRESULT STDMETHODCALLTYPE taskbar_list_SetActiveAlt(ITaskbarList *iface, HWND hwnd) +{ + FIXME("iface %p, hwnd %p stub!\n", iface, hwnd); + + return E_NOTIMPL; +} + +static const struct ITaskbarListVtbl taskbar_list_vtbl = +{ + /* IUnknown methods */ + taskbar_list_QueryInterface, + taskbar_list_AddRef, + taskbar_list_Release, + /* ITaskbarList methods */ + taskbar_list_HrInit, + taskbar_list_AddTab, + taskbar_list_DeleteTab, + taskbar_list_ActivateTab, + taskbar_list_SetActiveAlt, +}; + +HRESULT TaskbarList_Create(IUnknown *outer, REFIID riid, void **taskbar_list) +{ + struct taskbar_list *object; + + TRACE("outer %p, riid %s, taskbar_list %p\n", outer, debugstr_guid(riid), taskbar_list); + + if (outer) + { + WARN("Aggregation not supported\n"); + return CLASS_E_NOAGGREGATION; + } + + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate taskbar list object memory\n"); + return E_OUTOFMEMORY; + } + + object->lpVtbl = &taskbar_list_vtbl; + object->refcount = 1; + + *taskbar_list = object; + + TRACE("Created ITaskbarList %p\n", object); + + return S_OK; +} diff --git a/dlls/uuid/uuid.c b/dlls/uuid/uuid.c index 36dd205..35d4ae8 100644 --- a/dlls/uuid/uuid.c +++ b/dlls/uuid/uuid.c @@ -113,6 +113,7 @@ DEFINE_GUID(CLSID_InProcFreeMarshaler, 0x0000033a,0x0000,0x0000,0xc0,0x00,0x0 DEFINE_GUID(CLSID_TF_ThreadMgr, 0x529a9e6b,0x6587,0x4f23,0xab,0x9e,0x9c,0x7d,0x68,0x3e,0x3c,0x50); DEFINE_GUID(CLSID_TF_InputProcessorProfiles, 0x33c53a50,0xf456,0x4884,0xb0,0x49,0x85,0xfd,0x64,0x3e,0xcf,0xed); DEFINE_GUID(CLSID_TF_CategoryMgr, 0xA4B544A1,0x438D,0x4B41,0x93,0x25,0x86,0x95,0x23,0xE2,0xD6,0xC7); +DEFINE_GUID(CLSID_TaskbarList, 0x56fdf344,0xfd6d,0x11d0,0x95,0x8a,0x00,0x60,0x97,0xc9,0xa0,0x90); DEFINE_GUID(GUID_TFCAT_TIP_KEYBOARD, 0x34745c63,0xb2f0,0x4784,0x8b,0x67,0x5e,0x12,0xc8,0x70,0x1a,0x31); DEFINE_GUID(GUID_TFCAT_TIP_SPEECH, 0xB5A73CD1,0x8355,0x426B,0xA1,0x61,0x25,0x98,0x08,0xF2,0x6B,0x14); DEFINE_GUID(GUID_TFCAT_TIP_HANDWRITING, 0x246ecb87,0xc2f2,0x4abe,0x90,0x5b,0xc8,0xb3,0x8a,0xdd,0x2c,0x43); diff --git a/include/shobjidl.idl b/include/shobjidl.idl index 324f5e5..5acd302 100644 --- a/include/shobjidl.idl +++ b/include/shobjidl.idl @@ -1479,6 +1479,8 @@ interface ITaskbarList : IUnknown [in] HWND hwnd); } +cpp_quote("EXTERN_C const CLSID CLSID_TaskbarList;") + /***************************************************************************** * IAutoCompleteDropDown interface */
1
0
0
0
Henri Verbeet : wined3d: Pass format_desc to set_shader().
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: afc5744e70a6a16e0285770b5e722d6c9d8095be URL:
http://source.winehq.org/git/wine.git/?a=commit;h=afc5744e70a6a16e0285770b5…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 24 10:09:24 2009 +0100 wined3d: Pass format_desc to set_shader(). This should be the last unnecessary getFormatDescEntry() call. --- dlls/wined3d/arb_program_shader.c | 13 ++++++------- dlls/wined3d/surface.c | 8 +++++--- dlls/wined3d/wined3d_private.h | 3 ++- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 7b622d4..cf5716a 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -3666,20 +3666,19 @@ static GLuint gen_yuv_shader(IWineD3DDeviceImpl *device, enum yuv_fixup yuv_fixu return shader; } -static HRESULT arbfp_blit_set(IWineD3DDevice *iface, WINED3DFORMAT fmt, GLenum textype, UINT width, UINT height) { +static HRESULT arbfp_blit_set(IWineD3DDevice *iface, const struct GlPixelFormatDesc *format_desc, + GLenum textype, UINT width, UINT height) +{ GLenum shader; IWineD3DDeviceImpl *device = (IWineD3DDeviceImpl *) iface; float size[4] = {width, height, 1, 1}; struct arbfp_blit_priv *priv = device->blit_priv; - const struct GlPixelFormatDesc *glDesc; enum yuv_fixup yuv_fixup; - glDesc = getFormatDescEntry(fmt, &GLINFO_LOCATION); - - if (!is_yuv_fixup(glDesc->color_fixup)) + if (!is_yuv_fixup(format_desc->color_fixup)) { TRACE("Fixup:\n"); - dump_color_fixup_desc(glDesc->color_fixup); + dump_color_fixup_desc(format_desc->color_fixup); /* Don't bother setting up a shader for unconverted formats */ ENTER_GL(); glEnable(textype); @@ -3688,7 +3687,7 @@ static HRESULT arbfp_blit_set(IWineD3DDevice *iface, WINED3DFORMAT fmt, GLenum t return WINED3D_OK; } - yuv_fixup = get_yuv_fixup(glDesc->color_fixup); + yuv_fixup = get_yuv_fixup(format_desc->color_fixup); switch(yuv_fixup) { diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index fc71ecf..ecca666 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -3474,8 +3474,8 @@ static HRESULT IWineD3DSurfaceImpl_BltOverride(IWineD3DSurfaceImpl *This, const rect.y1 += This->currentDesc.Height - h; rect.y2 += This->currentDesc.Height - h; } - myDevice->blitter->set_shader((IWineD3DDevice *) myDevice, Src->resource.format_desc->format, - Src->glDescription.target, Src->pow2Width, Src->pow2Height); + myDevice->blitter->set_shader((IWineD3DDevice *) myDevice, Src->resource.format_desc, + Src->glDescription.target, Src->pow2Width, Src->pow2Height); ENTER_GL(); @@ -4812,7 +4812,9 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl = static HRESULT ffp_blit_alloc(IWineD3DDevice *iface) { return WINED3D_OK; } static void ffp_blit_free(IWineD3DDevice *iface) { } -static HRESULT ffp_blit_set(IWineD3DDevice *iface, WINED3DFORMAT fmt, GLenum textype, UINT width, UINT height) { +static HRESULT ffp_blit_set(IWineD3DDevice *iface, const struct GlPixelFormatDesc *format_desc, + GLenum textype, UINT width, UINT height) +{ glEnable(textype); checkGLcall("glEnable(textype)"); return WINED3D_OK; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index eab085d..2125366 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -782,7 +782,8 @@ HRESULT compile_state_table(struct StateEntry *StateTable, APPLYSTATEFUNC **dev_ struct blit_shader { HRESULT (*alloc_private)(IWineD3DDevice *iface); void (*free_private)(IWineD3DDevice *iface); - HRESULT (*set_shader)(IWineD3DDevice *iface, WINED3DFORMAT fmt, GLenum textype, UINT width, UINT height); + HRESULT (*set_shader)(IWineD3DDevice *iface, const struct GlPixelFormatDesc *format_desc, + GLenum textype, UINT width, UINT height); void (*unset_shader)(IWineD3DDevice *iface); BOOL (*color_fixup_supported)(struct color_fixup_desc fixup); };
1
0
0
0
Henri Verbeet : wined3d: Pass format_desc to getColorBits() and getDepthStencilBits().
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: dd1f0d9c48203fac7b29da4bb5dfb2c941b9bcc7 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dd1f0d9c48203fac7b29da4bb…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 24 10:09:24 2009 +0100 wined3d: Pass format_desc to getColorBits() and getDepthStencilBits(). --- dlls/wined3d/context.c | 64 ++++++++++++++++++++++----------------- dlls/wined3d/directx.c | 12 +++---- dlls/wined3d/utils.c | 38 +++++++---------------- dlls/wined3d/wined3d_private.h | 4 +- 4 files changed, 55 insertions(+), 63 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=dd1f0d9c48203fac7b29d…
1
0
0
0
Henri Verbeet : wined3d: Pass format_desc to the Check*Capability() function.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: a02d80188823631e2aa413ecf65a337a29f47c00 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a02d80188823631e2aa413ecf…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 24 10:09:23 2009 +0100 wined3d: Pass format_desc to the Check*Capability() function. Rather than looking it up all the time. --- dlls/wined3d/directx.c | 220 +++++++++++++++++++++++------------------------- 1 files changed, 104 insertions(+), 116 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=a02d80188823631e2aa41…
1
0
0
0
Henri Verbeet : wined3d: Remove the bytesPerPixel field from IWineD3DSurfaceImpl and IWineD3DVolumeImpl .
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: b7744f815898a27e53a6c3dafb834be9d517d6c3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b7744f815898a27e53a6c3daf…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 24 10:09:23 2009 +0100 wined3d: Remove the bytesPerPixel field from IWineD3DSurfaceImpl and IWineD3DVolumeImpl. We can use the information from format_desc instead. --- dlls/wined3d/device.c | 19 +++++-------------- dlls/wined3d/surface.c | 10 +++++----- dlls/wined3d/surface_base.c | 27 ++++++++++----------------- dlls/wined3d/surface_gdi.c | 2 +- dlls/wined3d/volume.c | 13 +++++++------ dlls/wined3d/wined3d_private.h | 6 ------ 6 files changed, 28 insertions(+), 49 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=b7744f815898a27e53a6c…
1
0
0
0
Henri Verbeet : wined3d: Set the byte count for WINED3DFMT_UNKNOWN to 0.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: a56a14346109cdb12eebbb96c500b76414a4aa2a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a56a14346109cdb12eebbb96c…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 24 10:09:22 2009 +0100 wined3d: Set the byte count for WINED3DFMT_UNKNOWN to 0. As far as I can tell nothing depends on this being 1, and there's some code that checks for WINED3DFMT_UNKNOWN and uses 0 for the byte count in that case. --- dlls/wined3d/utils.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 7a66432..a2a438e 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -50,7 +50,7 @@ struct StaticPixelFormatDesc static const struct StaticPixelFormatDesc formats[] = { /* WINED3DFORMAT alphamask redmask greenmask bluemask bpp depth stencil isFourcc */ - {WINED3DFMT_UNKNOWN, 0x0, 0x0, 0x0, 0x0, 1, 0, 0, FALSE}, + {WINED3DFMT_UNKNOWN, 0x0, 0x0, 0x0, 0x0, 0, 0, 0, FALSE}, /* FourCC formats, kept here to have WINED3DFMT_R8G8B8(=20) at position 20 */ {WINED3DFMT_UYVY, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, TRUE }, {WINED3DFMT_YUY2, 0x0, 0x0, 0x0, 0x0, 2, 0, 0, TRUE },
1
0
0
0
Henri Verbeet : d3d8: Cleanup the vertexshader handling code a bit.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: c0cefb35016fbfdeab629aaca139d1e5523c6381 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c0cefb35016fbfdeab629aaca…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 24 10:09:22 2009 +0100 d3d8: Cleanup the vertexshader handling code a bit. --- dlls/d3d8/device.c | 120 +++++++++++++++++++++++++++------------------------- 1 files changed, 62 insertions(+), 58 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index c1031b4..0e8c480 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -1879,75 +1879,78 @@ static IDirect3DVertexDeclaration8Impl *IDirect3DDevice8Impl_FindDecl(IDirect3DD static HRESULT WINAPI IDirect3DDevice8Impl_SetVertexShader(LPDIRECT3DDEVICE8 iface, DWORD pShader) { IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; - HRESULT hrc = D3D_OK; + IDirect3DVertexShader8Impl *shader; + HRESULT hr; TRACE("(%p) : Relay\n", This); - EnterCriticalSection(&d3d8_cs); + if (VS_HIGHESTFIXEDFXF >= pShader) { TRACE("Setting FVF, %#x\n", pShader); + + EnterCriticalSection(&d3d8_cs); IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice, IDirect3DDevice8Impl_FindDecl(This, pShader)->wined3d_vertex_declaration); IWineD3DDevice_SetVertexShader(This->WineD3DDevice, NULL); - } else { - IDirect3DVertexShader8Impl *shader; + LeaveCriticalSection(&d3d8_cs); + return D3D_OK; + } - TRACE("Setting shader\n"); + TRACE("Setting shader\n"); - shader = d3d8_get_object(&This->handle_table, pShader - (VS_HIGHESTFIXEDFXF + 1)); - if (!shader) - { - WARN("Invalid handle (%#x) passed.\n", pShader); - hrc = D3DERR_INVALIDCALL; - } - else - { - hrc = IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice, - ((IDirect3DVertexDeclaration8Impl *)shader->vertex_declaration)->wined3d_vertex_declaration); - if (SUCCEEDED(hrc)) - hrc = IWineD3DDevice_SetVertexShader(This->WineD3DDevice, shader->wineD3DVertexShader); - } + EnterCriticalSection(&d3d8_cs); + shader = d3d8_get_object(&This->handle_table, pShader - (VS_HIGHESTFIXEDFXF + 1)); + if (!shader) + { + WARN("Invalid handle (%#x) passed.\n", pShader); + LeaveCriticalSection(&d3d8_cs); + return D3DERR_INVALIDCALL; } - TRACE("(%p) : returning hr(%u)\n", This, hrc); + + hr = IWineD3DDevice_SetVertexDeclaration(This->WineD3DDevice, + ((IDirect3DVertexDeclaration8Impl *)shader->vertex_declaration)->wined3d_vertex_declaration); + if (SUCCEEDED(hr)) hr = IWineD3DDevice_SetVertexShader(This->WineD3DDevice, shader->wineD3DVertexShader); LeaveCriticalSection(&d3d8_cs); - return hrc; + TRACE("Returning hr %#x\n", hr); + + return hr; } static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShader(LPDIRECT3DDEVICE8 iface, DWORD* ppShader) { IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; IWineD3DVertexDeclaration *wined3d_declaration; + IDirect3DVertexDeclaration8 *d3d8_declaration; HRESULT hrc; TRACE("(%p) : Relay device@%p\n", This, This->WineD3DDevice); EnterCriticalSection(&d3d8_cs); hrc = IWineD3DDevice_GetVertexDeclaration(This->WineD3DDevice, &wined3d_declaration); - if (SUCCEEDED(hrc)) - { - if (wined3d_declaration) - { - IDirect3DVertexDeclaration8 *d3d8_declaration; - hrc = IWineD3DVertexDeclaration_GetParent(wined3d_declaration, (IUnknown **)&d3d8_declaration); - IWineD3DVertexDeclaration_Release(wined3d_declaration); - if (SUCCEEDED(hrc)) - { - *ppShader = ((IDirect3DVertexDeclaration8Impl *)d3d8_declaration)->shader_handle; - IDirect3DVertexDeclaration8_Release(d3d8_declaration); - } - } - else - { - *ppShader = 0; - hrc = D3D_OK; - } - } - else + if (FAILED(hrc)) { + LeaveCriticalSection(&d3d8_cs); WARN("(%p) : Call to IWineD3DDevice_GetVertexDeclaration failed %#x (device %p)\n", This, hrc, This->WineD3DDevice); + return hrc; } - TRACE("(%p) : returning %#x\n", This, *ppShader); + + if (!wined3d_declaration) + { + LeaveCriticalSection(&d3d8_cs); + *ppShader = 0; + return D3D_OK; + } + + hrc = IWineD3DVertexDeclaration_GetParent(wined3d_declaration, (IUnknown **)&d3d8_declaration); + IWineD3DVertexDeclaration_Release(wined3d_declaration); LeaveCriticalSection(&d3d8_cs); + if (SUCCEEDED(hrc)) + { + *ppShader = ((IDirect3DVertexDeclaration8Impl *)d3d8_declaration)->shader_handle; + IDirect3DVertexDeclaration8_Release(d3d8_declaration); + } + + TRACE("(%p) : returning %#x\n", This, *ppShader); return hrc; } @@ -1955,6 +1958,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShader(LPDIRECT3DDEVICE8 ifa static HRESULT WINAPI IDirect3DDevice8Impl_DeleteVertexShader(LPDIRECT3DDEVICE8 iface, DWORD pShader) { IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; IDirect3DVertexShader8Impl *shader; + IWineD3DVertexShader *cur = NULL; TRACE("(%p) : pShader %#x\n", This, pShader); @@ -1966,22 +1970,23 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeleteVertexShader(LPDIRECT3DDEVICE WARN("Invalid handle (%#x) passed.\n", pShader); LeaveCriticalSection(&d3d8_cs); return D3DERR_INVALIDCALL; - } else { - IWineD3DVertexShader *cur = NULL; + } - IWineD3DDevice_GetVertexShader(This->WineD3DDevice, &cur); - if(cur) { - if(cur == shader->wineD3DVertexShader) IDirect3DDevice8_SetVertexShader(iface, 0); - IWineD3DVertexShader_Release(cur); - } + IWineD3DDevice_GetVertexShader(This->WineD3DDevice, &cur); - if (IUnknown_Release((IUnknown *)shader)) - { - ERR("Shader %p has references left, this shouldn't happen.\n", shader); - } + if (cur) + { + if (cur == shader->wineD3DVertexShader) IDirect3DDevice8_SetVertexShader(iface, 0); + IWineD3DVertexShader_Release(cur); } + LeaveCriticalSection(&d3d8_cs); + if (IUnknown_Release((IUnknown *)shader)) + { + ERR("Shader %p has references left, this shouldn't happen.\n", shader); + } + return D3D_OK; } @@ -2060,16 +2065,15 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetVertexShaderFunction(LPDIRECT3DDEV return D3DERR_INVALIDCALL; } - if (shader->wineD3DVertexShader) - { - hr = IWineD3DVertexShader_GetFunction(shader->wineD3DVertexShader, pData, pSizeOfData); - } - else + if (!shader->wineD3DVertexShader) { + LeaveCriticalSection(&d3d8_cs); *pSizeOfData = 0; - hr = D3D_OK; + return D3D_OK; } + hr = IWineD3DVertexShader_GetFunction(shader->wineD3DVertexShader, pData, pSizeOfData); + LeaveCriticalSection(&d3d8_cs); return hr; }
1
0
0
0
Henri Verbeet : d3d8: Cleanup the pixelshader handling code a bit.
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: 4131135a9fa4d80c47c5a112ebf5d04f8aa90380 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4131135a9fa4d80c47c5a112e…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 24 10:09:22 2009 +0100 d3d8: Cleanup the pixelshader handling code a bit. This mostly just reduces the nesting to something more sane. --- dlls/d3d8/device.c | 81 +++++++++++++++++++++++++++++----------------------- 1 files changed, 45 insertions(+), 36 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index be6bce7..c1031b4 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -2122,7 +2122,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetIndices(LPDIRECT3DDEVICE8 iface, I static HRESULT WINAPI IDirect3DDevice8Impl_CreatePixelShader(LPDIRECT3DDEVICE8 iface, CONST DWORD* pFunction, DWORD* ppShader) { IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; IDirect3DPixelShader8Impl *object; - HRESULT hrc = D3D_OK; + DWORD handle; + HRESULT hr; TRACE("(%p) : pFunction(%p), ppShader(%p)\n", This, pFunction, ppShader); @@ -2130,36 +2131,42 @@ static HRESULT WINAPI IDirect3DDevice8Impl_CreatePixelShader(LPDIRECT3DDEVICE8 i TRACE("(%p) Invalid call\n", This); return D3DERR_INVALIDCALL; } - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (NULL == object) { + object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); + if (!object) + { + ERR("Failed to allocate memmory.\n"); return E_OUTOFMEMORY; - } else { - EnterCriticalSection(&d3d8_cs); + } - object->ref = 1; - object->lpVtbl = &Direct3DPixelShader8_Vtbl; - hrc = IWineD3DDevice_CreatePixelShader(This->WineD3DDevice, pFunction, &object->wineD3DPixelShader , (IUnknown *)object); - if (D3D_OK != hrc) { - FIXME("(%p) call to IWineD3DDevice_CreatePixelShader failed\n", This); - HeapFree(GetProcessHeap(), 0 , object); - *ppShader = 0; - } else { - DWORD handle = d3d8_allocate_handle(&This->handle_table, object); - if (handle == D3D8_INVALID_HANDLE) - { - ERR("Failed to allocate shader handle\n"); - IDirect3DVertexShader8_Release((IUnknown *)object); - hrc = E_OUTOFMEMORY; - } else { - *ppShader = object->handle = handle + VS_HIGHESTFIXEDFXF + 1; - TRACE("(%p) : returning %p (handle %#x)\n", This, object, *ppShader); - } - } + object->ref = 1; + object->lpVtbl = &Direct3DPixelShader8_Vtbl; + + EnterCriticalSection(&d3d8_cs); + hr = IWineD3DDevice_CreatePixelShader(This->WineD3DDevice, pFunction, + &object->wineD3DPixelShader, (IUnknown *)object); + if (FAILED(hr)) + { LeaveCriticalSection(&d3d8_cs); + FIXME("(%p) call to IWineD3DDevice_CreatePixelShader failed\n", This); + HeapFree(GetProcessHeap(), 0 , object); + *ppShader = 0; + return hr; } - return hrc; + handle = d3d8_allocate_handle(&This->handle_table, object); + LeaveCriticalSection(&d3d8_cs); + if (handle == D3D8_INVALID_HANDLE) + { + ERR("Failed to allocate shader handle\n"); + IDirect3DVertexShader8_Release((IUnknown *)object); + return E_OUTOFMEMORY; + } + + *ppShader = object->handle = handle + VS_HIGHESTFIXEDFXF + 1; + TRACE("(%p) : returning %p (handle %#x)\n", This, object, *ppShader); + + return hr; } static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(LPDIRECT3DDEVICE8 iface, DWORD pShader) { @@ -2223,6 +2230,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShader(LPDIRECT3DDEVICE8 ifac static HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(LPDIRECT3DDEVICE8 iface, DWORD pShader) { IDirect3DDevice8Impl *This = (IDirect3DDevice8Impl *)iface; IDirect3DPixelShader8Impl *shader; + IWineD3DPixelShader *cur = NULL; TRACE("(%p) : pShader %#x\n", This, pShader); @@ -2234,22 +2242,23 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(LPDIRECT3DDEVICE8 i WARN("Invalid handle (%#x) passed.\n", pShader); LeaveCriticalSection(&d3d8_cs); return D3DERR_INVALIDCALL; - } else { - IWineD3DPixelShader *cur = NULL; + } - IWineD3DDevice_GetPixelShader(This->WineD3DDevice, &cur); - if(cur) { - if(cur == shader->wineD3DPixelShader) IDirect3DDevice8_SetPixelShader(iface, 0); - IWineD3DPixelShader_Release(cur); - } + IWineD3DDevice_GetPixelShader(This->WineD3DDevice, &cur); - if (IUnknown_Release((IUnknown *)shader)) - { - ERR("Shader %p has references left, this shouldn't happen.\n", shader); - } + if (cur) + { + if (cur == shader->wineD3DPixelShader) IDirect3DDevice8_SetPixelShader(iface, 0); + IWineD3DPixelShader_Release(cur); } + LeaveCriticalSection(&d3d8_cs); + if (IUnknown_Release((IUnknown *)shader)) + { + ERR("Shader %p has references left, this shouldn't happen.\n", shader); + } + return D3D_OK; }
1
0
0
0
Henri Verbeet : d3d8: Properly handle unsetting the pixelshader in SetPixelShader().
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: 3f559f26d64f251ed1fb4df92afd04c11aa7dd3e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3f559f26d64f251ed1fb4df92…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 24 10:09:21 2009 +0100 d3d8: Properly handle unsetting the pixelshader in SetPixelShader(). --- dlls/d3d8/device.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 119d33d..be6bce7 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -2171,14 +2171,23 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(LPDIRECT3DDEVICE8 ifac EnterCriticalSection(&d3d8_cs); + if (!pShader) + { + hr = IWineD3DDevice_SetPixelShader(This->WineD3DDevice, NULL); + LeaveCriticalSection(&d3d8_cs); + return hr; + } + shader = d3d8_get_object(&This->handle_table, pShader - (VS_HIGHESTFIXEDFXF + 1)); if (!shader) { WARN("Invalid handle (%#x) passed.\n", pShader); + LeaveCriticalSection(&d3d8_cs); + return D3DERR_INVALIDCALL; } TRACE("(%p) : Setting shader %p\n", This, shader); - hr = IWineD3DDevice_SetPixelShader(This->WineD3DDevice, shader == NULL ? NULL :shader->wineD3DPixelShader); + hr = IWineD3DDevice_SetPixelShader(This->WineD3DDevice, shader->wineD3DPixelShader); LeaveCriticalSection(&d3d8_cs); return hr; }
1
0
0
0
Henri Verbeet : wined3d: Try to make Coverity shut up (CID 863, 905).
by Alexandre Julliard
24 Mar '09
24 Mar '09
Module: wine Branch: master Commit: 8ce2506aa84e4c7a5185226d023d7bd7a903dd91 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8ce2506aa84e4c7a5185226d0…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Mar 24 10:09:21 2009 +0100 wined3d: Try to make Coverity shut up (CID 863, 905). Comparing gl_shaders against NULL after potentially dereferencing it a few lines earlier probably confuses Coverity. Checking num_gl_shaders instead should avoid this. --- dlls/wined3d/pixelshader.c | 3 ++- dlls/wined3d/vertexshader.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c index 68dd801..6b4a30b 100644 --- a/dlls/wined3d/pixelshader.c +++ b/dlls/wined3d/pixelshader.c @@ -530,7 +530,8 @@ GLuint find_gl_pshader(IWineD3DPixelShaderImpl *shader, const struct ps_compile_ TRACE("No matching GL shader found, compiling a new shader\n"); if(shader->shader_array_size == shader->num_gl_shaders) { - if(shader->gl_shaders) { + if (shader->num_gl_shaders) + { new_size = shader->shader_array_size + max(1, shader->shader_array_size / 2); new_array = HeapReAlloc(GetProcessHeap(), 0, shader->gl_shaders, new_size * sizeof(*shader->gl_shaders)); diff --git a/dlls/wined3d/vertexshader.c b/dlls/wined3d/vertexshader.c index e8d4b84..4888c2a 100644 --- a/dlls/wined3d/vertexshader.c +++ b/dlls/wined3d/vertexshader.c @@ -465,7 +465,8 @@ GLuint find_gl_vshader(IWineD3DVertexShaderImpl *shader, const struct vs_compile TRACE("No matching GL shader found, compiling a new shader\n"); if(shader->shader_array_size == shader->num_gl_shaders) { - if(shader->gl_shaders) { + if (shader->num_gl_shaders) + { new_size = shader->shader_array_size + max(1, shader->shader_array_size / 2); new_array = HeapReAlloc(GetProcessHeap(), 0, shader->gl_shaders, new_size * sizeof(*shader->gl_shaders));
1
0
0
0
← Newer
1
...
21
22
23
24
25
26
27
...
84
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
Results per page:
10
25
50
100
200