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
June 2011
----- 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
809 discussions
Start a n
N
ew thread
Sean Sube : d3d9/tests: Added unbound sampler test for pixel shaders.
by Alexandre Julliard
03 Jun '11
03 Jun '11
Module: wine Branch: master Commit: 301c6ef4e5d1ba3a2a04aee1b12a466a3f5ae684 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=301c6ef4e5d1ba3a2a04aee1b…
Author: Sean Sube <ssube(a)codeweavers.com> Date: Thu Jun 2 11:58:02 2011 -0500 d3d9/tests: Added unbound sampler test for pixel shaders. --- dlls/d3d9/tests/visual.c | 80 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 80 insertions(+), 0 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 79207dd..e6cab39 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -12049,6 +12049,85 @@ static void ds_size_test(IDirect3DDevice9 *device) IDirect3DSurface9_Release(old_ds); } +static void unbound_sampler_test(IDirect3DDevice9 *device) +{ + HRESULT hr; + IDirect3DPixelShader9 *ps; + IDirect3DSurface9 *rt, *old_rt; + DWORD color; + + static const DWORD ps_code[] = + { + 0xffff0200, /* ps_2_0 */ + 0x0200001f, 0x90000000, 0xa00f0800, /* dcl_2d s0 */ + 0x0200001f, 0x80000000, 0xb00f0000, /* dcl t0 */ + 0x03000042, 0x800f0000, 0xb0e40000, 0xa0e40800, /* texld r0, t0, s0 */ + 0x02000001, 0x800f0800, 0x80e40000, /* mov oC0, r0 */ + 0x0000ffff, /* end */ + }; + + static const struct + { + float x, y, z; + float u, v; + } + quad[] = + { + {-1.0f, -1.0f, 0.1f, 0.0f, 0.0f}, + {-1.0f, 1.0f, 0.1f, 1.0f, 0.0f}, + { 1.0f, -1.0f, 0.1f, 0.0f, 1.0f}, + { 1.0f, 1.0f, 0.1f, 1.0f, 1.0f} + }; + + hr = IDirect3DDevice9_SetTexture(device, 0, NULL); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetTextureStage failed, %#x.\n", hr); + + hr = IDirect3DDevice9_CreatePixelShader(device, ps_code, &ps); + ok(SUCCEEDED(hr), "IDirect3DDevice9_CreatePixelShader failed, hr %#x.\n", hr); + + hr = IDirect3DDevice9_CreateRenderTarget(device, 64, 64, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, TRUE, &rt, NULL); + ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateRenderTarget failed, hr %#x.\n", hr); + + hr = IDirect3DDevice9_GetRenderTarget(device, 0, &old_rt); + ok(SUCCEEDED(hr), "IDirect3DDevice9_GetRenderTarget failed, hr %#x.\n", hr); + + hr = IDirect3DDevice9_SetRenderTarget(device, 0, rt); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetRenderTarget failed, hr %#x.\n", hr); + + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1 ); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetFVF failed, hr %#x.\n", hr); + + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x56ffffff, 0, 0); + ok(SUCCEEDED(hr), "IDirect3DDevice9_Clear failed, hr %#x.\n", hr); + + hr = IDirect3DDevice9_SetPixelShader(device, ps); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetPixelShader failed, hr %#x.\n", hr); + + hr = IDirect3DDevice9_BeginScene(device); + ok(SUCCEEDED(hr), "IDirect3DDevice9_BeginScene failed, hr %#x.\n", hr); + if(SUCCEEDED(hr)) + { + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad)); + ok(SUCCEEDED(hr), "IDirect3DDevice9_DrawPrimitiveUP failed, hr %#x.\n", hr); + + hr = IDirect3DDevice9_EndScene(device); + ok(SUCCEEDED(hr), "IDirect3DDevice9_EndScene failed, hr %#x.\n", hr); + } + + color = getPixelColorFromSurface(rt, 32, 32); + todo_wine ok(color == 0x56000000, "Unbound sampler color is %#x.\n", color); + + hr = IDirect3DDevice9_SetRenderTarget(device, 0, old_rt); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetRenderTarget failed, hr %#x.\n", hr); + + hr = IDirect3DDevice9_SetPixelShader(device, NULL); + ok(SUCCEEDED(hr), "IDirect3DDevice9_SetPixelShader failed, hr %#x.\n", hr); + + IDirect3DSurface9_Release(rt); + IDirect3DSurface9_Release(old_rt); + IDirect3DPixelShader9_Release(ps); +} + START_TEST(visual) { IDirect3DDevice9 *device_ptr; @@ -12192,6 +12271,7 @@ START_TEST(visual) cnd_test(device_ptr); if (caps.PixelShaderVersion >= D3DPS_VERSION(2, 0)) { dp2add_ps_test(device_ptr); + unbound_sampler_test(device_ptr); if (caps.PixelShaderVersion >= D3DPS_VERSION(3, 0) && caps.VertexShaderVersion >= D3DVS_VERSION(3, 0)) { nested_loop_test(device_ptr); pretransformed_varying_test(device_ptr);
1
0
0
0
Daniel Scharrer : include: Include math.h in d3dvec.inl as it uses sqrt().
by Alexandre Julliard
03 Jun '11
03 Jun '11
Module: wine Branch: master Commit: cbe42036231a07d11f0ef6ba374d01aefa9b6a2c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cbe42036231a07d11f0ef6ba3…
Author: Daniel Scharrer <dscharrer(a)gmail.com> Date: Thu Jun 2 19:46:23 2011 +0200 include: Include math.h in d3dvec.inl as it uses sqrt(). --- include/d3dvec.inl | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/d3dvec.inl b/include/d3dvec.inl index 9418dd2..96f669b 100644 --- a/include/d3dvec.inl +++ b/include/d3dvec.inl @@ -19,6 +19,8 @@ #ifndef __WINE_D3DVEC_INL #define __WINE_D3DVEC_INL +#include <math.h> + /*** constructors ***/ inline _D3DVECTOR::_D3DVECTOR(D3DVALUE f)
1
0
0
0
Daniel Scharrer : include: Fix compile error in d3dtypes. h for c++ programs that define D3D_OVERLOADS.
by Alexandre Julliard
03 Jun '11
03 Jun '11
Module: wine Branch: master Commit: 5deab783e2a18fa2819d99e7ba3b197a189bb3b4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5deab783e2a18fa2819d99e7b…
Author: Daniel Scharrer <dscharrer(a)gmail.com> Date: Thu Jun 2 19:27:44 2011 +0200 include: Fix compile error in d3dtypes.h for c++ programs that define D3D_OVERLOADS. --- include/d3dtypes.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/d3dtypes.h b/include/d3dtypes.h index 21b9e74..ab06b5e 100644 --- a/include/d3dtypes.h +++ b/include/d3dtypes.h @@ -336,9 +336,9 @@ typedef struct _D3DMATRIX { /* This is different from MS, but avoids anonymous structs. */ D3DVALUE &operator () (int r, int c) - { return ((D3DVALUE [4][4])&_11)[r][c]; } + { return (&_11)[r*4 + c]; } const D3DVALUE &operator() (int r, int c) const - { return ((const D3DVALUE [4][4])&_11)[r][c]; } + { return (&_11)[r*4 + c]; } #endif } D3DMATRIX, *LPD3DMATRIX;
1
0
0
0
Matteo Bruni : wined3d: Mark some texture formats as filterable.
by Alexandre Julliard
03 Jun '11
03 Jun '11
Module: wine Branch: master Commit: 6647c8f72dad6b7dd5e6e6a837b16cf67b77857d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6647c8f72dad6b7dd5e6e6a83…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jun 2 00:13:08 2011 +0200 wined3d: Mark some texture formats as filterable. --- dlls/wined3d/utils.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 25c0512..8f48e46 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -693,11 +693,11 @@ static const struct wined3d_format_texture_info format_texture_info[] = WINED3D_GL_EXT_NONE, NULL}, {WINED3DFMT_B2G3R3_UNORM, GL_R3_G3_B2, GL_R3_G3_B2, 0, GL_RGB, GL_UNSIGNED_BYTE_3_3_2, 0, - WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING, + WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING, WINED3D_GL_EXT_NONE, NULL}, {WINED3DFMT_A8_UNORM, GL_ALPHA8, GL_ALPHA8, 0, GL_ALPHA, GL_UNSIGNED_BYTE, 0, - WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING, + WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING | WINED3DFMT_FLAG_FILTERING, WINED3D_GL_EXT_NONE, NULL}, {WINED3DFMT_B4G4R4X4_UNORM, GL_RGB4, GL_RGB4, 0, GL_BGRA, GL_UNSIGNED_SHORT_4_4_4_4_REV, 0, @@ -738,7 +738,7 @@ static const struct wined3d_format_texture_info format_texture_info[] = WINED3D_GL_EXT_NONE, NULL}, {WINED3DFMT_L4A4_UNORM, GL_LUMINANCE4_ALPHA4, GL_LUMINANCE4_ALPHA4, 0, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, 2, - 0, + WINED3DFMT_FLAG_FILTERING, WINED3D_GL_EXT_NONE, &convert_l4a4_unorm}, /* Bump mapping stuff */ {WINED3DFMT_R8G8_SNORM, GL_RGB8, GL_RGB8, 0,
1
0
0
0
Jacek Caban : iextag.idl: Added ClientCaps coclass declaration.
by Alexandre Julliard
03 Jun '11
03 Jun '11
Module: wine Branch: master Commit: 17a6dbf3b5495c21d5106dfa6ed9628df7180851 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=17a6dbf3b5495c21d5106dfa6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jun 2 17:59:11 2011 +0200 iextag.idl: Added ClientCaps coclass declaration. --- include/iextag.idl | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/include/iextag.idl b/include/iextag.idl index 7ec0518..6b25af5 100644 --- a/include/iextag.idl +++ b/include/iextag.idl @@ -103,3 +103,18 @@ interface IClientCaps : IDispatch [id(23)] HRESULT clearComponentRequest(); } + +[ + uuid(7e8bc440-aeff-11d1-89c2-00c04fb6bfc4), + version(1.0) +] +library IEXTagLib +{ + [ + uuid(7e8bc44e-aeff-11d1-89c2-00C04fb6bfc4) + ] + coclass ClientCaps + { + [default] interface IClientCaps; + } +}
1
0
0
0
Jacek Caban : mshtml: Added IHTMLElement::get_offsetParent implementation.
by Alexandre Julliard
03 Jun '11
03 Jun '11
Module: wine Branch: master Commit: 3bf7482d52bfcebd43c0b632e1696f957d969101 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3bf7482d52bfcebd43c0b632e…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Thu Jun 2 17:58:55 2011 +0200 mshtml: Added IHTMLElement::get_offsetParent implementation. --- dlls/mshtml/htmlelem.c | 37 +++++++++++++++++++++++++++++++++++-- dlls/mshtml/tests/dom.c | 13 ++++++++++--- 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/dlls/mshtml/htmlelem.c b/dlls/mshtml/htmlelem.c index 0cf0227..a47f288 100644 --- a/dlls/mshtml/htmlelem.c +++ b/dlls/mshtml/htmlelem.c @@ -923,8 +923,41 @@ static HRESULT WINAPI HTMLElement_get_offsetHeight(IHTMLElement *iface, LONG *p) static HRESULT WINAPI HTMLElement_get_offsetParent(IHTMLElement *iface, IHTMLElement **p) { HTMLElement *This = impl_from_IHTMLElement(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsIDOMNSHTMLElement *nselem; + nsIDOMElement *nsparent; + nsresult nsres; + HRESULT hres; + + TRACE("(%p)->(%p)\n", This, p); + + nsres = nsIDOMHTMLElement_QueryInterface(This->nselem, &IID_nsIDOMNSHTMLElement, (void**)&nselem); + if(NS_FAILED(nsres)) { + ERR("Could not get nsIDOMNSHTMLElement: %08x\n", nsres); + return E_FAIL; + } + + nsres = nsIDOMNSHTMLElement_GetOffsetParent(nselem, &nsparent); + nsIDOMNSHTMLElement_Release(nselem); + if(NS_FAILED(nsres)) { + ERR("GetOffsetParent failed: %08x\n", nsres); + return E_FAIL; + } + + if(nsparent) { + HTMLDOMNode *node; + + hres = get_node(This->node.doc, (nsIDOMNode*)nsparent, TRUE, &node); + nsIDOMElement_Release(nsparent); + if(FAILED(hres)) + return hres; + + hres = IHTMLDOMNode_QueryInterface(&node->IHTMLDOMNode_iface, &IID_IHTMLElement, (void**)p); + }else { + *p = NULL; + hres = S_OK; + } + + return hres; } static HRESULT WINAPI HTMLElement_put_innerHTML(IHTMLElement *iface, BSTR v) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 4329be3..414da44 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -931,10 +931,11 @@ static void _test_elem_attr(unsigned line, IHTMLElement *elem, const char *name, VariantClear(&value); } -#define test_elem_offset(u) _test_elem_offset(__LINE__,u) -static void _test_elem_offset(unsigned line, IUnknown *unk) +#define test_elem_offset(a,b) _test_elem_offset(__LINE__,a,b) +static void _test_elem_offset(unsigned line, IUnknown *unk, const char *parent_tag) { IHTMLElement *elem = _get_elem_iface(line, unk); + IHTMLElement *off_parent; LONG l; HRESULT hres; @@ -950,6 +951,12 @@ static void _test_elem_offset(unsigned line, IUnknown *unk) hres = IHTMLElement_get_offsetLeft(elem, &l); ok_(__FILE__,line) (hres == S_OK, "get_offsetLeft failed: %08x\n", hres); + hres = IHTMLElement_get_offsetParent(elem, &off_parent); + ok_(__FILE__,line) (hres == S_OK, "get_offsetParent failed: %08x\n", hres); + + _test_elem_tag(line, (IUnknown*)off_parent, parent_tag); + IHTMLElement_Release(off_parent); + IHTMLElement_Release(elem); } @@ -6513,7 +6520,7 @@ static void test_elems(IHTMLDocument2 *doc) test_elem_title((IUnknown*)select, NULL); test_elem_set_title((IUnknown*)select, "Title"); test_elem_title((IUnknown*)select, "Title"); - test_elem_offset((IUnknown*)select); + test_elem_offset((IUnknown*)select, "BODY"); test_elem_bounding_client_rect((IUnknown*)select); node = get_first_child((IUnknown*)select);
1
0
0
0
Alexandre Julliard : widl: Add support for generating old-style interpreted stubs for servers.
by Alexandre Julliard
03 Jun '11
03 Jun '11
Module: wine Branch: master Commit: e644c2cd034a719922f5cafcfd43c8875bcfaa5e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e644c2cd034a719922f5cafcf…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 3 12:27:26 2011 +0200 widl: Add support for generating old-style interpreted stubs for servers. --- tools/widl/server.c | 357 ++++++++++++++++++++++++++------------------------ 1 files changed, 186 insertions(+), 171 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=e644c2cd034a719922f5c…
1
0
0
0
Alexandre Julliard : widl: Add support for generating old-style interpreted stubs for clients.
by Alexandre Julliard
03 Jun '11
03 Jun '11
Module: wine Branch: master Commit: 9c4d01f3299e0287a332e55673222e91b2c5f8c6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9c4d01f3299e0287a332e5567…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 3 12:27:14 2011 +0200 widl: Add support for generating old-style interpreted stubs for clients. --- tools/widl/client.c | 427 +++++++++++++++++++++++++++----------------------- 1 files changed, 231 insertions(+), 196 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9c4d01f3299e0287a332e…
1
0
0
0
Alexandre Julliard : widl: Add support for generating old-style interpreted stubs for proxies.
by Alexandre Julliard
03 Jun '11
03 Jun '11
Module: wine Branch: master Commit: 33ba9731a3a3864d63c4227664224ec92e058a24 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=33ba9731a3a3864d63c422766…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 3 12:27:00 2011 +0200 widl: Add support for generating old-style interpreted stubs for proxies. --- tools/widl/header.h | 2 + tools/widl/proxy.c | 116 ++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 85 insertions(+), 33 deletions(-) diff --git a/tools/widl/header.h b/tools/widl/header.h index 5ad16d2..6d056db 100644 --- a/tools/widl/header.h +++ b/tools/widl/header.h @@ -44,8 +44,10 @@ extern int is_local(const attr_list_t *list); extern int count_methods(const type_t *iface); extern int need_stub(const type_t *iface); extern int need_proxy(const type_t *iface); +extern int need_inline_stubs(const type_t *iface); extern int need_stub_files(const statement_list_t *stmts); extern int need_proxy_file(const statement_list_t *stmts); +extern int need_inline_stubs_file(const statement_list_t *stmts); extern const var_t *is_callas(const attr_list_t *list); extern void write_args(FILE *h, const var_list_t *arg, const char *name, int obj, int do_indent); extern void write_array(FILE *h, array_dims_t *v, int field); diff --git a/tools/widl/proxy.c b/tools/widl/proxy.c index 35a10de..616b326 100644 --- a/tools/widl/proxy.c +++ b/tools/widl/proxy.c @@ -48,8 +48,6 @@ static FILE* proxy; static int indent = 0; -/* FIXME: support generation of stubless proxies */ - static void print_proxy( const char *format, ... ) __attribute__((format (printf, 1, 2))); static void print_proxy( const char *format, ... ) { @@ -263,12 +261,36 @@ static void proxy_free_variables( var_list_t *args, const char *local_var_prefix static void gen_proxy(type_t *iface, const var_t *func, int idx, unsigned int proc_offset) { - int has_ret = !is_void(type_function_get_rettype(func->type)); + type_t *rettype = type_function_get_rettype(func->type); + int has_ret = !is_void(rettype); int has_full_pointer = is_full_pointer_function(func); const char *callconv = get_attrp(func->type->attrs, ATTR_CALLCONV); + const var_list_t *args = type_get_function_args(func->type); if (!callconv) callconv = "STDMETHODCALLTYPE"; indent = 0; + if (is_interpreted_func( iface, func )) + { + write_type_decl_left(proxy, type_function_get_rettype(func->type)); + print_proxy( " %s %s_%s_Proxy(\n", callconv, iface->name, get_name(func)); + write_args(proxy, args, iface->name, 1, TRUE); + print_proxy( ")\n"); + print_proxy( "{\n"); + indent++; + if (has_ret) print_proxy( "%s", "CLIENT_CALL_RETURN _RetVal;\n\n" ); + print_proxy( "%sNdrClientCall( &Object_StubDesc, &__MIDL_ProcFormatString.Format[%u], ", + has_ret ? "_RetVal = " : "", proc_offset ); + fprintf( proxy, "(unsigned char *)&This );\n" ); + if (has_ret) + { + print_proxy( "return (" ); + write_type_decl_left(proxy, rettype); + fprintf( proxy, ")*(LONG_PTR *)&_RetVal;\n" ); + } + indent--; + print_proxy( "}\n\n"); + return; + } print_proxy( "static void __finally_%s_%s_Proxy( struct __proxy_frame *__frame )\n", iface->name, get_name(func) ); print_proxy( "{\n"); @@ -279,9 +301,9 @@ static void gen_proxy(type_t *iface, const var_t *func, int idx, print_proxy( "}\n"); print_proxy( "\n"); - write_type_decl_left(proxy, type_function_get_rettype(func->type)); + write_type_decl_left(proxy, rettype); print_proxy( " %s %s_%s_Proxy(\n", callconv, iface->name, get_name(func)); - write_args(proxy, type_get_function_args(func->type), iface->name, 1, TRUE); + write_args(proxy, args, iface->name, 1, TRUE); print_proxy( ")\n"); print_proxy( "{\n"); indent ++; @@ -289,12 +311,12 @@ static void gen_proxy(type_t *iface, const var_t *func, int idx, /* local variables */ if (has_ret) { print_proxy( "%s", "" ); - write_type_decl_left(proxy, type_function_get_rettype(func->type)); + write_type_decl_left(proxy, rettype); print_proxy( " _RetVal;\n"); } print_proxy( "RPC_MESSAGE _RpcMessage;\n" ); if (has_ret) { - if (decl_indirect(type_function_get_rettype(func->type))) + if (decl_indirect(rettype)) print_proxy("void *_p_%s = &%s;\n", "_RetVal", "_RetVal"); } @@ -340,10 +362,9 @@ static void gen_proxy(type_t *iface, const var_t *func, int idx, if (has_ret) { - if (decl_indirect(type_function_get_rettype(func->type))) + if (decl_indirect(rettype)) print_proxy("MIDL_memset(&%s, 0, sizeof(%s));\n", "_RetVal", "_RetVal"); - else if (is_ptr(type_function_get_rettype(func->type)) || - is_array(type_function_get_rettype(func->type))) + else if (is_ptr(rettype) || is_array(rettype)) print_proxy("%s = 0;\n", "_RetVal"); write_remoting_arguments(proxy, indent, func, "", PASS_RETURN, PHASE_UNMARSHAL); } @@ -385,6 +406,8 @@ static void gen_stub(type_t *iface, const var_t *func, const char *cas, int has_ret = !is_void(type_function_get_rettype(func->type)); int has_full_pointer = is_full_pointer_function(func); + if (is_interpreted_func( iface, func )) return; + indent = 0; print_proxy( "struct __frame_%s_%s_Stub\n{\n", iface->name, get_name(func)); indent++; @@ -563,6 +586,7 @@ static int write_stub_methods(type_t *iface, int skip) } if (i) fprintf(proxy,",\n"); if (skip || missing) print_proxy("STUB_FORWARDING_FUNCTION"); + else if (is_interpreted_func( iface, func )) print_proxy( "(PRPC_STUB_FUNCTION)NdrStubCall" ); else print_proxy( "%s_%s_Stub", iface->name, fname); i++; } @@ -575,6 +599,7 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset) int count; const statement_t *stmt; int first_func = 1; + int needs_inline_stubs = need_inline_stubs( iface ); STATEMENTS_FOR_EACH_FUNC(stmt, type_iface_get_stmts(iface)) { var_t *func = stmt->u.var; @@ -645,14 +670,16 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset) print_proxy( "};\n\n" ); /* stub vtable */ - print_proxy( "static const PRPC_STUB_FUNCTION %s_table[] =\n", iface->name); - print_proxy( "{\n"); - indent++; - write_stub_methods(iface, FALSE); - fprintf(proxy, "\n"); - indent--; - fprintf(proxy, "};\n"); - print_proxy( "\n"); + if (needs_inline_stubs) + { + print_proxy( "static const PRPC_STUB_FUNCTION %s_table[] =\n", iface->name); + print_proxy( "{\n"); + indent++; + write_stub_methods(iface, FALSE); + fprintf(proxy, "\n"); + indent--; + fprintf(proxy, "};\n\n"); + } print_proxy( "static %sCInterfaceStubVtbl _%sStubVtbl =\n", need_delegation_indirect(iface) ? "" : "const ", iface->name); print_proxy( "{\n"); @@ -662,7 +689,8 @@ static void write_proxy(type_t *iface, unsigned int *proc_offset) print_proxy( "&IID_%s,\n", iface->name); print_proxy( "&%s_ServerInfo,\n", iface->name ); print_proxy( "%d,\n", count); - print_proxy( "&%s_table[-3],\n", iface->name); + if (needs_inline_stubs) print_proxy( "&%s_table[-3]\n", iface->name ); + else print_proxy( "0\n" ); indent--; print_proxy( "},\n"); print_proxy( "{\n"); @@ -716,11 +744,30 @@ int need_proxy_file(const statement_list_t *stmts) return does_any_iface(stmts, need_proxy); } +int need_inline_stubs(const type_t *iface) +{ + const statement_t *stmt; + + if (stub_mode == MODE_Os) return 1; + + STATEMENTS_FOR_EACH_FUNC( stmt, type_iface_get_stmts(iface) ) + { + const var_t *func = stmt->u.var; + if (!is_interpreted_func( iface, func )) return 1; + } + return 0; +} + int need_stub_files(const statement_list_t *stmts) { return does_any_iface(stmts, need_stub); } +int need_inline_stubs_file(const statement_list_t *stmts) +{ + return does_any_iface(stmts, need_inline_stubs); +} + static void write_proxy_stmts(const statement_list_t *stmts, unsigned int *proc_offset) { const statement_t *stmt; @@ -785,20 +832,23 @@ static void write_proxy_routines(const statement_list_t *stmts) type_t **interfaces; const type_t * delegate_to; - write_exceptions( proxy ); - print_proxy( "\n"); - print_proxy( "struct __proxy_frame\n"); - print_proxy( "{\n"); - print_proxy( " __DECL_EXCEPTION_FRAME\n"); - print_proxy( " MIDL_STUB_MESSAGE _StubMsg;\n"); - print_proxy( " void *This;\n"); - print_proxy( "};\n"); - print_proxy( "\n"); - print_proxy("static int __proxy_filter( struct __proxy_frame *__frame )\n"); - print_proxy( "{\n"); - print_proxy( " return (__frame->_StubMsg.dwStubPhase != PROXY_SENDRECEIVE);\n"); - print_proxy( "}\n"); - print_proxy( "\n"); + if (need_inline_stubs_file( stmts )) + { + write_exceptions( proxy ); + print_proxy( "\n"); + print_proxy( "struct __proxy_frame\n"); + print_proxy( "{\n"); + print_proxy( " __DECL_EXCEPTION_FRAME\n"); + print_proxy( " MIDL_STUB_MESSAGE _StubMsg;\n"); + print_proxy( " void *This;\n"); + print_proxy( "};\n"); + print_proxy( "\n"); + print_proxy("static int __proxy_filter( struct __proxy_frame *__frame )\n"); + print_proxy( "{\n"); + print_proxy( " return (__frame->_StubMsg.dwStubPhase != PROXY_SENDRECEIVE);\n"); + print_proxy( "}\n"); + print_proxy( "\n"); + } write_formatstringsdecl(proxy, indent, stmts, need_proxy); write_stubdescproto();
1
0
0
0
Alexandre Julliard : widl: Always use signed types in parameter formats.
by Alexandre Julliard
03 Jun '11
03 Jun '11
Module: wine Branch: master Commit: 4fe88648cb22932f9714dd7a9d4c4cea2f5636bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4fe88648cb22932f9714dd7a9…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Fri Jun 3 12:26:31 2011 +0200 widl: Always use signed types in parameter formats. Native marshaller doesn't support the unsigned ones. --- tools/widl/typegen.c | 58 ++++++++++++++++++++++++++++--------------------- 1 files changed, 33 insertions(+), 25 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 3349e25..5bd1dbe 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -206,6 +206,28 @@ unsigned char get_basic_fc(const type_t *type) return 0; } +static unsigned char get_basic_fc_signed(const type_t *type) +{ + switch (type_basic_get_type(type)) + { + case TYPE_BASIC_INT8: return RPC_FC_SMALL; + case TYPE_BASIC_INT16: return RPC_FC_SHORT; + case TYPE_BASIC_INT32: return RPC_FC_LONG; + case TYPE_BASIC_INT64: return RPC_FC_HYPER; + case TYPE_BASIC_INT: return RPC_FC_LONG; + case TYPE_BASIC_INT3264: return RPC_FC_INT3264; + case TYPE_BASIC_BYTE: return RPC_FC_BYTE; + case TYPE_BASIC_CHAR: return RPC_FC_CHAR; + case TYPE_BASIC_WCHAR: return RPC_FC_WCHAR; + case TYPE_BASIC_HYPER: return RPC_FC_HYPER; + case TYPE_BASIC_FLOAT: return RPC_FC_FLOAT; + case TYPE_BASIC_DOUBLE: return RPC_FC_DOUBLE; + case TYPE_BASIC_ERROR_STATUS_T: return RPC_FC_ERROR_STATUS_T; + case TYPE_BASIC_HANDLE: return RPC_FC_BIND_PRIMITIVE; + } + return 0; +} + static inline unsigned int clamp_align(unsigned int align) { unsigned int packing = (pointer_size == 4) ? win32_packing : win64_packing; @@ -912,7 +934,7 @@ static unsigned int write_procformatstring_type(FILE *file, int indent, } else { - fc = get_basic_fc(type); + fc = get_basic_fc_signed(type); if (fc == RPC_FC_BIND_PRIMITIVE) fc = RPC_FC_IGNORE; @@ -926,7 +948,9 @@ static unsigned int write_procformatstring_type(FILE *file, int indent, { unsigned short offset = type->typestring_offset; - if (is_interpreted && is_array(type) && type_array_is_decl_as_ptr(type)) + if (is_interpreted && is_array(type) && + type_array_is_decl_as_ptr(type) && + type->details.array.ptr_tfsoff) offset = type->details.array.ptr_tfsoff; if (is_return) @@ -1163,33 +1187,17 @@ void write_procformatstring_offsets( FILE *file, const type_t *iface ) print_file( file, indent, "};\n\n" ); } -static int write_base_type(FILE *file, const type_t *type, int convert_to_signed_type, unsigned int *typestring_offset) +static int write_base_type(FILE *file, const type_t *type, unsigned int *typestring_offset) { unsigned char fc; if (type_get_type(type) == TYPE_BASIC) - fc = get_basic_fc(type); + fc = get_basic_fc_signed(type); else if (type_get_type(type) == TYPE_ENUM) fc = get_enum_fc(type); else return 0; - if (convert_to_signed_type) - { - switch(fc) - { - case RPC_FC_USMALL: - fc = RPC_FC_SMALL; - break; - case RPC_FC_USHORT: - fc = RPC_FC_SHORT; - break; - case RPC_FC_ULONG: - fc = RPC_FC_LONG; - break; - } - } - print_file(file, 2, "0x%02x,\t/* %s */\n", fc, string_of_type(fc)); *typestring_offset += 1; return 1; @@ -1967,7 +1975,7 @@ static void write_member_type(FILE *file, const type_t *cont, print_file(file, 2, "0x%x,\t/* %s */\n", fc, string_of_type(fc)); *tfsoff += 1; } - else if (!write_base_type(file, type, TRUE, tfsoff)) + else if (!write_base_type(file, type, tfsoff)) error("Unsupported member type %d\n", type_get_type(type)); } @@ -2927,7 +2935,8 @@ static unsigned int write_union_tfs(FILE *file, const attr_list_t *attrs, if (type_get_type(st) == TYPE_BASIC) { - switch (get_basic_fc(st)) + fc = get_basic_fc(st); + switch (fc) { case RPC_FC_CHAR: case RPC_FC_SMALL: @@ -2938,7 +2947,6 @@ static unsigned int write_union_tfs(FILE *file, const attr_list_t *attrs, case RPC_FC_USHORT: case RPC_FC_LONG: case RPC_FC_ULONG: - fc = get_basic_fc(st); break; default: fc = 0; @@ -2963,7 +2971,8 @@ static unsigned int write_union_tfs(FILE *file, const attr_list_t *attrs, if (type_get_type(st) == TYPE_BASIC) { - switch (get_basic_fc(st)) + fc = get_basic_fc(st); + switch (fc) { case RPC_FC_CHAR: case RPC_FC_SMALL: @@ -2974,7 +2983,6 @@ static unsigned int write_union_tfs(FILE *file, const attr_list_t *attrs, case RPC_FC_ULONG: case RPC_FC_ENUM16: case RPC_FC_ENUM32: - fc = get_basic_fc(st); break; default: fc = 0;
1
0
0
0
← Newer
1
...
72
73
74
75
76
77
78
...
81
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
Results per page:
10
25
50
100
200