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
Henri Verbeet : wined3d: Check for a valid source rectangle and destination in wined3d_device_update_surface ().
by Alexandre Julliard
15 Jun '11
15 Jun '11
Module: wine Branch: master Commit: 410a8e86f5cfbae84ea8f011d769d4e63fa67b78 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=410a8e86f5cfbae84ea8f011d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jun 14 20:28:09 2011 +0200 wined3d: Check for a valid source rectangle and destination in wined3d_device_update_surface(). --- dlls/wined3d/device.c | 44 +++++++++++++++++++++++++++++++++++--------- 1 files changed, 35 insertions(+), 9 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 19a9a45..d907d9a 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4738,7 +4738,9 @@ HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device, struct wined3d_context *context; struct wined3d_bo_address data; struct wined3d_format format; + UINT update_w, update_h; CONVERT_TYPES convert; + UINT dst_w, dst_h; DWORD sampler; POINT p; RECT r; @@ -4769,6 +4771,39 @@ HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device, p.y = 0; dst_point = &p; } + else if (dst_point->x < 0 || dst_point->y < 0) + { + WARN("Invalid destination point.\n"); + return WINED3DERR_INVALIDCALL; + } + + if (!src_rect) + { + r.left = 0; + r.top = 0; + r.right = src_surface->resource.width; + r.bottom = src_surface->resource.height; + src_rect = &r; + } + else if (src_rect->left < 0 || src_rect->left >= r.right + || src_rect->top < 0 || src_rect->top >= r.bottom) + { + WARN("Invalid source rectangle.\n"); + return WINED3DERR_INVALIDCALL; + } + + dst_w = dst_surface->resource.width; + dst_h = dst_surface->resource.height; + + update_w = src_rect->right - src_rect->left; + update_h = src_rect->bottom - src_rect->top; + + if (update_w > dst_w || dst_point->x > dst_w - update_w + || update_h > dst_h || dst_point->y > dst_h - update_h) + { + WARN("Destination out of bounds.\n"); + return WINED3DERR_INVALIDCALL; + } /* This call loads the OpenGL surface directly, instead of copying the * surface to the destination's sysmem copy. If surface conversion is @@ -4790,15 +4825,6 @@ HRESULT CDECL wined3d_device_update_surface(struct wined3d_device *device, surface_internal_preload(dst_surface, SRGB_RGB); surface_bind(dst_surface, gl_info, FALSE); - if (!src_rect) - { - r.left = 0; - r.top = 0; - r.right = src_surface->resource.width; - r.bottom = src_surface->resource.height; - src_rect = &r; - } - data.buffer_object = 0; data.addr = src_surface->resource.allocatedMemory;
1
0
0
0
Henri Verbeet : wined3d: Implement wined3d_device_update_surface() on top of surface_upload_data().
by Alexandre Julliard
15 Jun '11
15 Jun '11
Module: wine Branch: master Commit: b9133d7de059035220ba95cf2fb96b6f4146dd6e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b9133d7de059035220ba95cf2…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jun 14 20:28:08 2011 +0200 wined3d: Implement wined3d_device_update_surface() on top of surface_upload_data(). --- dlls/wined3d/device.c | 94 ++++++++++---------------------------- dlls/wined3d/surface.c | 99 +++++++++++++++++++++++++-------------- dlls/wined3d/wined3d_private.h | 3 + 3 files changed, 90 insertions(+), 106 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=b9133d7de059035220ba9…
1
0
0
0
Aric Stewart : usp10: Correct an endless loop in Chaining Contextual Substitution if it is a dead rule .
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: 4b2bfb4a8b887a149276e52005bc3004bfa550bb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4b2bfb4a8b887a149276e5200…
Author: Aric Stewart <aric(a)codeweavers.com> Date: Tue Jun 14 08:36:00 2011 -0500 usp10: Correct an endless loop in Chaining Contextual Substitution if it is a dead rule. --- dlls/usp10/shape.c | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 03d97f4..32833c9 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -1026,20 +1026,24 @@ static INT GSUB_apply_ChainContextSubst(const GSUB_LookupList* lookup, const GSU ccsf3_4 = (const GSUB_ChainContextSubstFormat3_4 *)(((LPBYTE)ccsf3_3)+sizeof(GSUB_ChainContextSubstFormat3_3) + (sizeof(WORD) * (GET_BE_WORD(ccsf3_3->LookaheadGlyphCount)-1))); - for (k = 0; k < GET_BE_WORD(ccsf3_4->SubstCount); k++) + if (GET_BE_WORD(ccsf3_4->SubstCount)) { - int lookupIndex = GET_BE_WORD(ccsf3_4->SubstLookupRecord[k].LookupListIndex); - int SequenceIndex = GET_BE_WORD(ccsf3_4->SubstLookupRecord[k].SequenceIndex) * write_dir; - - TRACE("SUBST: %i -> %i %i\n",k, SequenceIndex, lookupIndex); - newIndex = GSUB_apply_lookup(lookup, lookupIndex, glyphs, glyph_index + SequenceIndex, write_dir, glyph_count); - if (newIndex == -1) + for (k = 0; k < GET_BE_WORD(ccsf3_4->SubstCount); k++) { - ERR("Chain failed to generate a glyph\n"); - continue; + int lookupIndex = GET_BE_WORD(ccsf3_4->SubstLookupRecord[k].LookupListIndex); + int SequenceIndex = GET_BE_WORD(ccsf3_4->SubstLookupRecord[k].SequenceIndex) * write_dir; + + TRACE("SUBST: %i -> %i %i\n",k, SequenceIndex, lookupIndex); + newIndex = GSUB_apply_lookup(lookup, lookupIndex, glyphs, glyph_index + SequenceIndex, write_dir, glyph_count); + if (newIndex == -1) + { + ERR("Chain failed to generate a glyph\n"); + continue; + } } + return newIndex; } - return newIndex; + else return GSUB_E_NOGLYPH; } } return -1;
1
0
0
0
Alexandre Julliard : rpcrt4: Implement calling server functions on x86_64.
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: 0ce27385fd7c322dba74a3cb609f059865c5becd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0ce27385fd7c322dba74a3cb6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 13 12:43:12 2011 +0200 rpcrt4: Implement calling server functions on x86_64. --- dlls/rpcrt4/ndr_stubless.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index da895e1..7fd7e6a 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -1003,6 +1003,48 @@ __ASM_GLOBAL_FUNC(call_server_func, __ASM_CFI(".cfi_def_cfa %esp,4\n\t") __ASM_CFI(".cfi_same_value %ebp\n\t") "ret" ) +#elif defined __x86_64__ +LONG_PTR __cdecl call_server_func(SERVER_ROUTINE func, unsigned char * args, unsigned int stack_size); +__ASM_GLOBAL_FUNC( call_server_func, + "pushq %rbp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t") + __ASM_CFI(".cfi_rel_offset %rbp,0\n\t") + "movq %rsp,%rbp\n\t" + __ASM_CFI(".cfi_def_cfa_register %rbp\n\t") + "pushq %rsi\n\t" + __ASM_CFI(".cfi_rel_offset %rsi,-8\n\t") + "pushq %rdi\n\t" + __ASM_CFI(".cfi_rel_offset %rdi,-16\n\t") + "movq %rcx,%rax\n\t" /* function to call */ + "movq $32,%rcx\n\t" /* allocate max(32,stack_size) bytes of stack space */ + "cmpq %rcx,%r8\n\t" + "cmovgq %r8,%rcx\n\t" + "subq %rcx,%rsp\n\t" + "andq $~15,%rsp\n\t" + "movq %r8,%rcx\n\t" + "shrq $3,%rcx\n\t" + "movq %rsp,%rdi\n\t" + "movq %rdx,%rsi\n\t" + "rep; movsq\n\t" /* copy arguments */ + "movq 0(%rsp),%rcx\n\t" + "movq 8(%rsp),%rdx\n\t" + "movq 16(%rsp),%r8\n\t" + "movq 24(%rsp),%r9\n\t" + "movq %rcx,%xmm0\n\t" + "movq %rdx,%xmm1\n\t" + "movq %r8,%xmm2\n\t" + "movq %r9,%xmm3\n\t" + "callq *%rax\n\t" + "leaq -16(%rbp),%rsp\n\t" /* restore stack */ + "popq %rdi\n\t" + __ASM_CFI(".cfi_same_value %rdi\n\t") + "popq %rsi\n\t" + __ASM_CFI(".cfi_same_value %rsi\n\t") + __ASM_CFI(".cfi_def_cfa_register %rsp\n\t") + "popq %rbp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") + __ASM_CFI(".cfi_same_value %rbp\n\t") + "ret") #else #warning call_server_func not implemented for your architecture LONG_PTR __cdecl call_server_func(SERVER_ROUTINE func, unsigned char * args, unsigned short stack_size)
1
0
0
0
Alexandre Julliard : rpcrt4: Add an assembly wrapper to implement the NdrClientCall2 calling convention on x86_64 .
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: b6599bd7df87e3e0ade896fd0fd92a504f58f1f5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b6599bd7df87e3e0ade896fd0…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 13 12:40:30 2011 +0200 rpcrt4: Add an assembly wrapper to implement the NdrClientCall2 calling convention on x86_64. --- dlls/rpcrt4/ndr_stubless.c | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index 9591f2d..da895e1 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -913,6 +913,21 @@ done: return RetVal; } +#ifdef __x86_64__ + +__ASM_GLOBAL_FUNC( NdrClientCall2, + "movq %r8,0x18(%rsp)\n\t" + "movq %r9,0x20(%rsp)\n\t" + "leaq 0x18(%rsp),%r8\n\t" + "subq $0x28,%rsp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 0x28\n\t") + "call " __ASM_NAME("ndr_client_call") "\n\t" + "addq $0x28,%rsp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset -0x28\n\t") + "ret" ); + +#else /* __x86_64__ */ + /*********************************************************************** * NdrClientCall2 [RPCRT4.@] */ @@ -927,6 +942,7 @@ CLIENT_CALL_RETURN WINAPIV NdrClientCall2( PMIDL_STUB_DESC desc, PFORMAT_STRING return *(CLIENT_CALL_RETURN *)&ret; } +#endif /* __x86_64__ */ /* Calls a function with the specified arguments, restoring the stack * properly afterwards as we don't know the calling convention of the
1
0
0
0
Alexandre Julliard : rpcrt4: Add a wrapper for NdrClientCall2 to isolate calling convention differences .
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: 379479a973a49dcdb07eb806a2b8c0ad08fde403 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=379479a973a49dcdb07eb806a…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Jun 13 12:39:47 2011 +0200 rpcrt4: Add a wrapper for NdrClientCall2 to isolate calling convention differences. --- dlls/rpcrt4/cproxy.c | 12 +++++++----- dlls/rpcrt4/ndr_stubless.c | 42 +++++++++++++++++++----------------------- dlls/rpcrt4/ndr_stubless.h | 2 ++ dlls/rpcrt4/rpcrt4.spec | 2 +- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/dlls/rpcrt4/cproxy.c b/dlls/rpcrt4/cproxy.c index 8352ba3..6a73953 100644 --- a/dlls/rpcrt4/cproxy.c +++ b/dlls/rpcrt4/cproxy.c @@ -37,6 +37,7 @@ #include "cpsf.h" #include "ndr_misc.h" +#include "ndr_stubless.h" #include "wine/debug.h" WINE_DEFAULT_DEBUG_CHANNEL(ole); @@ -95,19 +96,20 @@ __ASM_GLOBAL_FUNC(call_stubless_func, "addl %edx,%esp\n\t" "jmp *%ecx" ); -CLIENT_CALL_RETURN WINAPI ObjectStubless(DWORD *args) +LONG_PTR WINAPI ObjectStubless(void **args) { - DWORD index = args[0]; + DWORD index = (DWORD)args[0]; void **iface = (void **)args[2]; const void **vtbl = (const void **)*iface; const MIDL_STUBLESS_PROXY_INFO *stubless = *(const MIDL_STUBLESS_PROXY_INFO **)(vtbl - 2); const PFORMAT_STRING fs = stubless->ProcFormatString + stubless->FormatStringOffset[index]; + DWORD arg_size = *(const WORD*)(fs + 8); /* store bytes to remove from stack */ - args[0] = *(const WORD*)(fs + 8); - TRACE("(%p)->(%d)([%d bytes]) ret=%08x\n", iface, index, args[0], args[1]); + args[0] = (void *)arg_size; + TRACE("(%p)->(%d)([%d bytes]) ret=%p\n", iface, index, arg_size, args[1]); - return NdrClientCall2(stubless->pStubDesc, fs, args + 2); + return ndr_client_call(stubless->pStubDesc, fs, args + 2); } #define BLOCK_SIZE 1024 diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index f019776..9591f2d 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -565,7 +565,7 @@ void client_do_args_old_format(PMIDL_STUB_MESSAGE pStubMsg, } } -CLIENT_CALL_RETURN WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, ...) +LONG_PTR CDECL ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, void **stack_top ) { /* pointer to start of stack where arguments start */ RPC_MESSAGE rpcMsg; @@ -594,7 +594,6 @@ CLIENT_CALL_RETURN WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STR PFORMAT_STRING pHandleFormat; /* correlation cache */ ULONG_PTR NdrCorrCache[256]; - __ms_va_list args; TRACE("pStubDesc %p, pFormat %p, ...\n", pStubDesc, pFormat); @@ -623,7 +622,7 @@ CLIENT_CALL_RETURN WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STR if (pProcHeader->Oi_flags & RPC_FC_PROC_OIF_OBJECT) { /* object is always the first argument */ - This = **(void *const **)(&pFormat+1); + This = stack_top[0]; NdrProxyInitialize(This, &rpcMsg, &stubMsg, pStubDesc, procedure_number); } else @@ -632,11 +631,7 @@ CLIENT_CALL_RETURN WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STR TRACE("Oi_flags = 0x%02x\n", pProcHeader->Oi_flags); TRACE("MIDL stub version = 0x%x\n", pStubDesc->MIDLVersion); - /* needed for conformance of top-level objects */ - __ms_va_start( args, pFormat ); - stubMsg.StackTop = va_arg( args, unsigned char * ); - __ms_va_end( args ); - + stubMsg.StackTop = (unsigned char *)stack_top; pHandleFormat = pFormat; /* we only need a handle if this isn't an object method */ @@ -915,9 +910,24 @@ CLIENT_CALL_RETURN WINAPIV NdrClientCall2(PMIDL_STUB_DESC pStubDesc, PFORMAT_STR done: TRACE("RetVal = 0x%lx\n", RetVal); - return *(CLIENT_CALL_RETURN *)&RetVal; + return RetVal; } +/*********************************************************************** + * NdrClientCall2 [RPCRT4.@] + */ +CLIENT_CALL_RETURN WINAPIV NdrClientCall2( PMIDL_STUB_DESC desc, PFORMAT_STRING format, ... ) +{ + __ms_va_list args; + LONG_PTR ret; + + __ms_va_start( args, format ); + ret = ndr_client_call( desc, format, va_arg( args, void ** )); + __ms_va_end( args ); + return *(CLIENT_CALL_RETURN *)&ret; +} + + /* Calls a function with the specified arguments, restoring the stack * properly afterwards as we don't know the calling convention of the * function */ @@ -1651,20 +1661,6 @@ void WINAPI NdrServerCall2(PRPC_MESSAGE pRpcMsg) } /*********************************************************************** - * NdrClientCall [RPCRT4.@] - */ -CLIENT_CALL_RETURN WINAPIV NdrClientCall( PMIDL_STUB_DESC desc, PFORMAT_STRING format, ... ) -{ - __ms_va_list args; - CLIENT_CALL_RETURN ret; - - __ms_va_start( args, format ); - ret = NdrClientCall2( desc, format, va_arg( args, unsigned char * )); - __ms_va_end( args ); - return ret; -} - -/*********************************************************************** * NdrStubCall [RPCRT4.@] */ LONG WINAPI NdrStubCall( struct IRpcStubBuffer *This, struct IRpcChannelBuffer *channel, diff --git a/dlls/rpcrt4/ndr_stubless.h b/dlls/rpcrt4/ndr_stubless.h index b672554..baa1f3e 100644 --- a/dlls/rpcrt4/ndr_stubless.h +++ b/dlls/rpcrt4/ndr_stubless.h @@ -236,6 +236,8 @@ typedef struct _NDR_EHD_CONTEXT #include "poppack.h" +LONG_PTR CDECL ndr_client_call( PMIDL_STUB_DESC pStubDesc, PFORMAT_STRING pFormat, + void **stack_top ) DECLSPEC_HIDDEN; void client_do_args_old_format(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, int phase, unsigned char *args, unsigned short stack_size, unsigned char *pRetVal, BOOL object_proc, diff --git a/dlls/rpcrt4/rpcrt4.spec b/dlls/rpcrt4/rpcrt4.spec index bacef8c..b88c16d 100644 --- a/dlls/rpcrt4/rpcrt4.spec +++ b/dlls/rpcrt4/rpcrt4.spec @@ -127,7 +127,7 @@ @ stdcall NdrCStdStubBuffer_Release(ptr ptr) @ stdcall NdrClearOutParameters(ptr ptr ptr) @ varargs NdrClientCall2(ptr ptr) -@ varargs NdrClientCall(ptr ptr) +@ varargs -arch=i386 NdrClientCall(ptr ptr) NdrClientCall2 @ stdcall NdrClientContextMarshall(ptr ptr long) @ stdcall NdrClientContextUnmarshall(ptr ptr ptr) @ stub NdrClientInitialize
1
0
0
0
Alexandre Julliard : rpcrt4: Preserve the previous MaxCount value when computing variance through a callback .
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: fa847909f2ae6a8118c300809c77d12e317dea3a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fa847909f2ae6a8118c300809…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Tue Jun 14 12:57:30 2011 +0200 rpcrt4: Preserve the previous MaxCount value when computing variance through a callback. --- dlls/rpcrt4/ndr_marshall.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 1e99c2e..c62675d 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -590,6 +590,8 @@ PFORMAT_STRING ComputeConformanceOrVariance( case RPC_FC_CALLBACK: { unsigned char *old_stack_top = pStubMsg->StackTop; + ULONG_PTR max_count, old_max_count = pStubMsg->MaxCount; + pStubMsg->StackTop = ptr; /* ofs is index into StubDesc->apfnExprEval */ @@ -599,7 +601,9 @@ PFORMAT_STRING ComputeConformanceOrVariance( pStubMsg->StackTop = old_stack_top; /* the callback function always stores the computed value in MaxCount */ - *pCount = pStubMsg->MaxCount; + max_count = pStubMsg->MaxCount; + pStubMsg->MaxCount = old_max_count; + *pCount = max_count; goto finish_conf; } default:
1
0
0
0
Rico Schüller : d3dx9: Parse resources in the effect parser.
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: 86d381a56babf2ad5c4b9a18496bdf759a253138 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=86d381a56babf2ad5c4b9a184…
Author: Rico Schüller <kgbricola(a)web.de> Date: Tue Jun 14 11:20:43 2011 +0200 d3dx9: Parse resources in the effect parser. --- dlls/d3dx9_36/effect.c | 169 ++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 158 insertions(+), 11 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index ca88f76..271594c 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -85,6 +85,11 @@ enum SHADER_CONSTANT_TYPE SCT_PSINT, }; +enum STATE_TYPE +{ + ST_CONSTANT, +}; + struct d3dx_parameter { char *name; @@ -108,7 +113,7 @@ struct d3dx_state { UINT operation; UINT index; - + enum STATE_TYPE type; D3DXHANDLE parameter; }; @@ -176,7 +181,7 @@ static struct d3dx_parameter *get_parameter_by_name(struct ID3DXBaseEffectImpl * struct d3dx_parameter *parameter, LPCSTR name); static struct d3dx_parameter *get_parameter_annotation_by_name(struct d3dx_parameter *parameter, LPCSTR name); static HRESULT d3dx9_parse_state(struct d3dx_state *state, const char *data, const char **ptr, D3DXHANDLE *objects); -static void free_parameter(D3DXHANDLE handle, BOOL element, BOOL child); +static void free_parameter_state(D3DXHANDLE handle, BOOL element, BOOL child, enum STATE_TYPE st); static const struct { @@ -552,7 +557,7 @@ static struct d3dx_parameter *is_valid_parameter(struct ID3DXBaseEffectImpl *bas static void free_state(struct d3dx_state *state) { - free_parameter(state->parameter, FALSE, FALSE); + free_parameter_state(state->parameter, FALSE, FALSE, state->type); } static void free_sampler(struct d3dx_sampler *sampler) @@ -568,10 +573,16 @@ static void free_sampler(struct d3dx_sampler *sampler) static void free_parameter(D3DXHANDLE handle, BOOL element, BOOL child) { + free_parameter_state(handle, element, child, ST_CONSTANT); +} + +static void free_parameter_state(D3DXHANDLE handle, BOOL element, BOOL child, enum STATE_TYPE st) +{ unsigned int i; struct d3dx_parameter *param = get_parameter_struct(handle); - TRACE("Free parameter %p, name %s, child %s\n", param, param->name, child ? "yes" : "no"); + TRACE("Free parameter %p, name %s, type %s, child %s, state_type %x\n", param, param->name, + debug_d3dxparameter_type(param->type), child ? "yes" : "no", st); if (!param) { @@ -617,7 +628,14 @@ static void free_parameter(D3DXHANDLE handle, BOOL element, BOOL child) case D3DXPT_TEXTURECUBE: case D3DXPT_PIXELSHADER: case D3DXPT_VERTEXSHADER: - if (*(IUnknown **)param->data) IUnknown_Release(*(IUnknown **)param->data); + if (st == ST_CONSTANT) + { + if (*(IUnknown **)param->data) IUnknown_Release(*(IUnknown **)param->data); + } + else + { + HeapFree(GetProcessHeap(), 0, *(LPSTR *)param->data); + } if (!child) HeapFree(GetProcessHeap(), 0, param->data); break; @@ -626,7 +644,14 @@ static void free_parameter(D3DXHANDLE handle, BOOL element, BOOL child) case D3DXPT_SAMPLER2D: case D3DXPT_SAMPLER3D: case D3DXPT_SAMPLERCUBE: - free_sampler((struct d3dx_sampler *)param->data); + if (st == ST_CONSTANT) + { + free_sampler((struct d3dx_sampler *)param->data); + } + else + { + HeapFree(GetProcessHeap(), 0, *(LPSTR *)param->data); + } /* samplers have always own data, so free that */ HeapFree(GetProcessHeap(), 0, param->data); break; @@ -640,6 +665,10 @@ static void free_parameter(D3DXHANDLE handle, BOOL element, BOOL child) { if (!child) { + if (st != ST_CONSTANT) + { + HeapFree(GetProcessHeap(), 0, *(LPSTR *)param->data); + } HeapFree(GetProcessHeap(), 0, param->data); } } @@ -4263,6 +4292,8 @@ static HRESULT d3dx9_parse_state(struct d3dx_state *state, const char *data, con return E_OUTOFMEMORY; } + state->type = ST_CONSTANT; + read_dword(ptr, &state->operation); TRACE("Operation: %#x (%s)\n", state->operation, state_table[state->operation].name); @@ -4615,13 +4646,112 @@ err_out: return hr; } +static HRESULT d3dx9_parse_resource(struct ID3DXBaseEffectImpl *base, const char *data, const char **ptr) +{ + DWORD technique_index; + DWORD index, state_index, usage; + struct d3dx_state *state; + struct d3dx_parameter *param; + HRESULT hr; + + read_dword(ptr, &technique_index); + TRACE("techn: %u\n", technique_index); + + read_dword(ptr, &index); + TRACE("index: %u\n", index); + + skip_dword_unknown(ptr, 1); + + read_dword(ptr, &state_index); + TRACE("state: %u\n", state_index); + + read_dword(ptr, &usage); + TRACE("usage: %u\n", usage); + + if (technique_index == 0xffffffff) + { + struct d3dx_parameter *parameter; + struct d3dx_sampler *sampler; + + if (index >= base->parameter_count) + { + FIXME("Index out of bounds: index %u >= parameter_count %u\n", index, base->parameter_count); + return E_FAIL; + } + + parameter = get_parameter_struct(base->parameter_handles[index]); + sampler = parameter->data; + if (state_index >= sampler->state_count) + { + FIXME("Index out of bounds: state_index %u >= state_count %u\n", state_index, sampler->state_count); + return E_FAIL; + } + + state = &sampler->states[state_index]; + } + else + { + struct d3dx_technique *technique; + struct d3dx_pass *pass; + + if (technique_index >= base->technique_count) + { + FIXME("Index out of bounds: technique_index %u >= technique_count %u\n", technique_index, base->technique_count); + return E_FAIL; + } + + technique = get_technique_struct(base->technique_handles[technique_index]); + if (index >= technique->pass_count) + { + FIXME("Index out of bounds: index %u >= pass_count %u\n", index, technique->pass_count); + return E_FAIL; + } + + pass = get_pass_struct(technique->pass_handles[index]); + if (state_index >= pass->state_count) + { + FIXME("Index out of bounds: state_index %u >= state_count %u\n", state_index, pass->state_count); + return E_FAIL; + } + + state = &pass->states[state_index]; + } + + param = get_parameter_struct(state->parameter); + + switch (usage) + { + case 0: + TRACE("usage 0: type %s\n", debug_d3dxparameter_type(param->type)); + switch (param->type) + { + case D3DXPT_VERTEXSHADER: + case D3DXPT_PIXELSHADER: + state->type = ST_CONSTANT; + hr = d3dx9_parse_data(param, ptr, base->effect->device); + break; + + default: + FIXME("Unhandled type %s\n", debug_d3dxparameter_type(param->type)); + break; + } + break; + + default: + FIXME("Unknown usage %x\n", usage); + break; + } + + return hr; +} + static HRESULT d3dx9_parse_effect(struct ID3DXBaseEffectImpl *base, const char *data, UINT data_size, DWORD start) { const char *ptr = data + start; D3DXHANDLE *parameter_handles = NULL; D3DXHANDLE *technique_handles = NULL; D3DXHANDLE *objects = NULL; - UINT stringcount, objectcount; + UINT stringcount, objectcount, resourcecount; HRESULT hr; UINT i; @@ -4710,10 +4840,15 @@ static HRESULT d3dx9_parse_effect(struct ID3DXBaseEffectImpl *base, const char * } } + /* needed for further parsing */ + base->technique_handles = technique_handles; + base->parameter_handles = parameter_handles; + read_dword(&ptr, &stringcount); TRACE("String count: %u\n", stringcount); - skip_dword_unknown(&ptr, 1); + read_dword(&ptr, &resourcecount); + TRACE("Resource count: %u\n", resourcecount); for (i = 0; i < stringcount; ++i) { @@ -4733,10 +4868,19 @@ static HRESULT d3dx9_parse_effect(struct ID3DXBaseEffectImpl *base, const char * } } - HeapFree(GetProcessHeap(), 0, objects); + for (i = 0; i < resourcecount; ++i) + { + TRACE("parse resource %u\n", i); - base->technique_handles = technique_handles; - base->parameter_handles = parameter_handles; + hr = d3dx9_parse_resource(base, data, &ptr); + if (hr != D3D_OK) + { + WARN("Failed to parse data\n"); + goto err_out; + } + } + + HeapFree(GetProcessHeap(), 0, objects); return D3D_OK; @@ -4760,6 +4904,9 @@ err_out: HeapFree(GetProcessHeap(), 0, parameter_handles); } + base->technique_handles = NULL; + base->parameter_handles = NULL; + HeapFree(GetProcessHeap(), 0, objects); return hr;
1
0
0
0
Mariusz Pluciński : shell32/tests: Add tests for SHGet /SetKnownFolderPath utilities.
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: 988db2c0c307a29e55ae0f6e0f7a40ba79b12c2c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=988db2c0c307a29e55ae0f6e0…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Tue Jun 14 13:09:31 2011 +0200 shell32/tests: Add tests for SHGet/SetKnownFolderPath utilities. --- dlls/shell32/tests/shellpath.c | 24 ++++++++++++++++++++++++ 1 files changed, 24 insertions(+), 0 deletions(-) diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index 5e27c9e..ee38e4e 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -95,6 +95,7 @@ static int (WINAPI *pSHFileOperationA)(LPSHFILEOPSTRUCTA); static HRESULT (WINAPI *pSHGetMalloc)(LPMALLOC *); static UINT (WINAPI *pGetSystemWow64DirectoryA)(LPSTR,UINT); static HRESULT (WINAPI *pSHGetKnownFolderPath)(REFKNOWNFOLDERID, DWORD, HANDLE, PWSTR *); +static HRESULT (WINAPI *pSHSetKnownFolderPath)(REFKNOWNFOLDERID, DWORD, HANDLE, PWSTR); static HRESULT (WINAPI *pSHGetFolderPathEx)(REFKNOWNFOLDERID, DWORD, HANDLE, LPWSTR, DWORD); static DLLVERSIONINFO shellVersion = { 0 }; @@ -194,6 +195,7 @@ static void loadShell32(void) GET_PROC(SHGetFolderPathEx) GET_PROC(SHGetFolderLocation) GET_PROC(SHGetKnownFolderPath) + GET_PROC(SHSetKnownFolderPath) GET_PROC(SHGetSpecialFolderPathA) GET_PROC(SHGetSpecialFolderLocation) GET_PROC(ILFindLastID) @@ -1214,6 +1216,28 @@ static void test_knownFolders(void) ok(lstrcmpiW(folderPath, sExamplePath)==0, "invalid known folder path retreived: \"%s\" when \"%s\" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sExamplePath)); CoTaskMemFree(folderPath); + /* check shell utility functions */ + if(!pSHGetKnownFolderPath || !pSHSetKnownFolderPath) + todo_wine + win_skip("cannot get SHGet/SetKnownFolderPath routines\n"); + else + { + /* check shell utility functions */ + /* try to get current known folder path */ + hr = pSHGetKnownFolderPath(&newFolderId, 0, NULL, &folderPath); + ok(hr==S_OK, "cannot get known folder path: hr=0x%0x\n", hr); + ok(lstrcmpW(folderPath, sExamplePath)==0, "invalid path returned: %s\n", wine_dbgstr_w(folderPath)); + + /* set it to new value */ + hr = pSHSetKnownFolderPath(&newFolderId, 0, NULL, sExample2Path); + ok(hr==S_OK, "cannot set known folder path: hr=0x%0x\n", hr); + + /* check if it changed */ + hr = pSHGetKnownFolderPath(&newFolderId, 0, NULL, &folderPath); + ok(hr==S_OK, "cannot get known folder path: hr=0x%0x\n", hr); + ok(lstrcmpW(folderPath, sExample2Path)==0, "invalid path returned: %s\n", wine_dbgstr_w(folderPath)); + } + hr = IKnownFolder_Release(folder); ok(hr == S_OK, "failed to release KnownFolder instance: 0x%08x\n", hr); }
1
0
0
0
Mariusz Pluciński : shell32/tests: Add test of redirecting known folders.
by Alexandre Julliard
14 Jun '11
14 Jun '11
Module: wine Branch: master Commit: da9a8a4b3d9e2f9df132502c72e3c1e3f157bbc1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=da9a8a4b3d9e2f9df132502c7…
Author: Mariusz Pluciński <vshader(a)gmail.com> Date: Tue Jun 14 13:09:25 2011 +0200 shell32/tests: Add test of redirecting known folders. --- dlls/shell32/tests/shellpath.c | 35 ++++++++++++++++++++++++++++++++++- 1 files changed, 34 insertions(+), 1 deletions(-) diff --git a/dlls/shell32/tests/shellpath.c b/dlls/shell32/tests/shellpath.c index a506488..5e27c9e 100644 --- a/dlls/shell32/tests/shellpath.c +++ b/dlls/shell32/tests/shellpath.c @@ -1039,6 +1039,7 @@ static void test_knownFolders(void) { static const WCHAR sWindows[] = {'W','i','n','d','o','w','s',0}; static const WCHAR sExample[] = {'E','x','a','m','p','l','e',0}; + static const WCHAR sExample2[] = {'E','x','a','m','p','l','e','2',0}; static const KNOWNFOLDERID newFolderId = {0x01234567, 0x89AB, 0xCDEF, {0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x01} }; HRESULT hr; IKnownFolderManager *mgr = NULL; @@ -1050,7 +1051,7 @@ static void test_knownFolders(void) UINT nCount = 0; LPWSTR folderPath; KF_REDIRECTION_CAPABILITIES redirectionCapabilities = 1; - WCHAR sWinDir[MAX_PATH], sExamplePath[MAX_PATH]; + WCHAR sWinDir[MAX_PATH], sExamplePath[MAX_PATH], sExample2Path[MAX_PATH]; BOOL bRes; GetWindowsDirectoryW( sWinDir, MAX_PATH ); @@ -1058,6 +1059,9 @@ static void test_knownFolders(void) GetTempPathW(sizeof(sExamplePath)/sizeof(sExamplePath[0]), sExamplePath); lstrcatW(sExamplePath, sExample); + GetTempPathW(sizeof(sExample2Path)/sizeof(sExample2Path[0]), sExample2Path); + lstrcatW(sExample2Path, sExample2); + CoInitialize(NULL); hr = CoCreateInstance(&CLSID_KnownFolderManager, NULL, CLSCTX_INPROC_SERVER, @@ -1145,6 +1149,8 @@ static void test_knownFolders(void) /* test of registering new known folders */ bRes = CreateDirectoryW(sExamplePath, NULL); ok(bRes, "cannot create example directory: %s\n", wine_dbgstr_w(sExamplePath)); + bRes = CreateDirectoryW(sExample2Path, NULL); + ok(bRes, "cannot create example directory: %s\n", wine_dbgstr_w(sExamplePath)); ZeroMemory(&kfDefinition, sizeof(kfDefinition)); kfDefinition.category = KF_CATEGORY_PERUSER; @@ -1182,6 +1188,32 @@ static void test_knownFolders(void) ok(lstrcmpiW(folderPath, sExamplePath)==0, "invalid known folder path retreived: \"%s\" when \"%s\" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sExamplePath)); CoTaskMemFree(folderPath); + /* try to set new path for folder */ + hr = IKnownFolder_SetPath(folder, 0, sExample2Path); + todo_wine + ok(hr == S_OK, "setting path failed: 0x%0x\n", hr); + + /* verify modified path */ + hr = IKnownFolder_GetPath(folder, 0, &folderPath); + todo_wine + ok(hr == S_OK, "failed to get path from known folder: 0x%08x\n", hr); + todo_wine + ok(lstrcmpiW(folderPath, sExample2Path)==0, "invalid known folder path retreived: \"%s\" when \"%s\" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sExamplePath)); + CoTaskMemFree(folderPath); + + /* set again to first path, but use another way */ + hr = IKnownFolderManager_Redirect(mgr, &newFolderId, NULL, 0, sExamplePath, 0, NULL, NULL); + todo_wine + ok(hr == S_OK, "redirection failed: 0x%08x\n", hr); + + /* again verify modified path */ + hr = IKnownFolder_GetPath(folder, 0, &folderPath); + todo_wine + ok(hr == S_OK, "failed to get path from known folder: 0x%08x\n", hr); + todo_wine + ok(lstrcmpiW(folderPath, sExamplePath)==0, "invalid known folder path retreived: \"%s\" when \"%s\" was expected\n", wine_dbgstr_w(folderPath), wine_dbgstr_w(sExamplePath)); + CoTaskMemFree(folderPath); + hr = IKnownFolder_Release(folder); ok(hr == S_OK, "failed to release KnownFolder instance: 0x%08x\n", hr); } @@ -1194,6 +1226,7 @@ static void test_knownFolders(void) FreeKnownFolderDefinitionFields(&kfDefinition); RemoveDirectoryW(sExamplePath); + RemoveDirectoryW(sExample2Path); hr = IKnownFolderManager_Release(mgr); ok(hr == S_OK, "failed to release KnownFolderManager instance: 0x%08x\n", hr);
1
0
0
0
← Newer
1
...
41
42
43
44
45
46
47
...
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