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 2006
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
3 participants
854 discussions
Start a n
N
ew thread
Pierre d'Herbemont : dbghelp: Implement fetch_thread_info on powerpc.
by Alexandre Julliard
09 Jun '06
09 Jun '06
Module: wine Branch: refs/heads/master Commit: deab87442499cc74b330223593e034f2c7f88d4f URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=deab87442499cc74b330223…
Author: Pierre d'Herbemont <stegefin(a)free.fr> Date: Thu Jun 8 22:41:22 2006 +0200 dbghelp: Implement fetch_thread_info on powerpc. --- dlls/dbghelp/minidump.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/dlls/dbghelp/minidump.c b/dlls/dbghelp/minidump.c index 7898bd5..6572248 100644 --- a/dlls/dbghelp/minidump.c +++ b/dlls/dbghelp/minidump.c @@ -168,6 +168,13 @@ #ifdef __i386__ mdThd->Stack.StartOfMemoryRange = (ULONG_PTR)tib.StackLimit; mdThd->Stack.Memory.DataSize = (ULONG_PTR)tib.StackBase - mdThd->Stack.StartOfMemoryRange; +#elif defined(__powerpc__) + if (ctx->Iar) + mdThd->Stack.StartOfMemoryRange = ctx->Iar - 4; + else + mdThd->Stack.StartOfMemoryRange = (ULONG_PTR)tib.StackLimit; + mdThd->Stack.Memory.DataSize = (ULONG_PTR)tib.StackBase - + mdThd->Stack.StartOfMemoryRange; #else #error unsupported CPU #endif
1
0
0
0
Pierre d'Herbemont : ntdll: Fix NtQueryInformationThread on non x86.
by Alexandre Julliard
09 Jun '06
09 Jun '06
Module: wine Branch: refs/heads/master Commit: 6d0e51fb66c7d22b7edcebac15d6fda2cc085dd0 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=6d0e51fb66c7d22b7edceba…
Author: Pierre d'Herbemont <stegefin(a)free.fr> Date: Thu Jun 8 22:32:59 2006 +0200 ntdll: Fix NtQueryInformationThread on non x86. --- dlls/ntdll/thread.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index b2d0c55..10cb72b 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -1128,10 +1128,10 @@ #ifdef __i386__ } SERVER_END_REQ; } + if (status == STATUS_SUCCESS && ret_len) *ret_len = sizeof(*tdi); #else status = STATUS_NOT_IMPLEMENTED; #endif - if (status == STATUS_SUCCESS && ret_len) *ret_len = sizeof(*tdi); return status; } case ThreadPriority:
1
0
0
0
Robert Shearman : rpcrt4: Clear an object pointer during unmarshaling, otherwise we
by Alexandre Julliard
09 Jun '06
09 Jun '06
Module: wine Branch: refs/heads/master Commit: d98b73a17ac2903001854b2fc80aad0550995cb2 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=d98b73a17ac2903001854b2…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Fri Jun 9 17:29:28 2006 +0100 rpcrt4: Clear an object pointer during unmarshaling, otherwise we could end up using the previously allocated memory even if it isn't the right size, causing heap corruption. --- dlls/rpcrt4/ndr_marshall.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 7bddb4f..6143c0c 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -842,7 +842,10 @@ static void PointerUnmarshall(PMIDL_STUB pointer_id = NDR_LOCAL_UINT32_READ(Buffer); TRACE("pointer_id is 0x%08lx\n", pointer_id); if (!fMustAlloc && *pPointer) + { FIXME("free object pointer %p\n", *pPointer); + *pPointer = NULL; + } if (pointer_id) pointer_needs_unmarshaling = 1; else
1
0
0
0
Robert Shearman : rpcrt4: Initialise pStubMsg-> MemorySize to zero before calling ComplexStructMemorySize from NdrComplexArrayUnmarshall .
by Alexandre Julliard
09 Jun '06
09 Jun '06
Module: wine Branch: refs/heads/master Commit: 578df90d6d7b3d974806a091790388f29a3a36d5 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=578df90d6d7b3d974806a09…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Fri Jun 9 17:25:16 2006 +0100 rpcrt4: Initialise pStubMsg->MemorySize to zero before calling ComplexStructMemorySize from NdrComplexArrayUnmarshall. --- dlls/rpcrt4/ndr_marshall.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 5ce8134..7bddb4f 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -2573,6 +2573,7 @@ unsigned long WINAPI NdrComplexArrayMemo SavedMemorySize = pStubMsg->MemorySize; Buffer = pStubMsg->Buffer; + pStubMsg->MemorySize = 0; esize = ComplexStructMemorySize(pStubMsg, pFormat); pStubMsg->Buffer = Buffer;
1
0
0
0
Robert Shearman : rpcrt4: Don' t raise an exception if there is no freer function - not all types have a freer .
by Alexandre Julliard
09 Jun '06
09 Jun '06
Module: wine Branch: refs/heads/master Commit: e3df112a39467d9ac6f71af82db45e84b33c9e63 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=e3df112a39467d9ac6f71af…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Fri Jun 9 17:25:07 2006 +0100 rpcrt4: Don't raise an exception if there is no freer function - not all types have a freer. --- dlls/rpcrt4/ndr_stubless.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/dlls/rpcrt4/ndr_stubless.c b/dlls/rpcrt4/ndr_stubless.c index 2c93ad5..189af5c 100644 --- a/dlls/rpcrt4/ndr_stubless.c +++ b/dlls/rpcrt4/ndr_stubless.c @@ -89,11 +89,6 @@ static inline void call_freer(PMIDL_STUB { NDR_FREE m = NdrFreer[pFormat[0] & NDR_TABLE_MASK]; if (m) m(pStubMsg, pMemory, pFormat); - else - { - FIXME("format type 0x%x not implemented\n", pFormat[0]); - RpcRaiseException(RPC_X_BAD_STUB_DATA); - } } static inline unsigned long call_memory_sizer(PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat)
1
0
0
0
Robert Shearman : rpcrt4: Implement more base types for complex types.
by Alexandre Julliard
09 Jun '06
09 Jun '06
Module: wine Branch: refs/heads/master Commit: 21673d03f902f1f66ffc5eaabb2ee293ae985c8d URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=21673d03f902f1f66ffc5ea…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Fri Jun 9 17:24:49 2006 +0100 rpcrt4: Implement more base types for complex types. --- dlls/rpcrt4/ndr_marshall.c | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/dlls/rpcrt4/ndr_marshall.c b/dlls/rpcrt4/ndr_marshall.c index 30f5ddc..5ce8134 100644 --- a/dlls/rpcrt4/ndr_marshall.c +++ b/dlls/rpcrt4/ndr_marshall.c @@ -1642,6 +1642,16 @@ static unsigned char * ComplexMarshall(P while (*pFormat != RPC_FC_END) { switch (*pFormat) { + case RPC_FC_BYTE: + case RPC_FC_CHAR: + case RPC_FC_SMALL: + case RPC_FC_USMALL: + TRACE("byte=%d <= %p\n", *(WORD*)pMemory, pMemory); + memcpy(pStubMsg->Buffer, pMemory, 1); + pStubMsg->Buffer += 1; + pMemory += 1; + break; + case RPC_FC_WCHAR: case RPC_FC_SHORT: case RPC_FC_USHORT: TRACE("short=%d <= %p\n", *(WORD*)pMemory, pMemory); @@ -1706,6 +1716,16 @@ static unsigned char * ComplexUnmarshall while (*pFormat != RPC_FC_END) { switch (*pFormat) { + case RPC_FC_BYTE: + case RPC_FC_CHAR: + case RPC_FC_SMALL: + case RPC_FC_USMALL: + memcpy(pMemory, pStubMsg->Buffer, 1); + TRACE("byte=%d => %p\n", *(WORD*)pMemory, pMemory); + pStubMsg->Buffer += 1; + pMemory += 1; + break; + case RPC_FC_WCHAR: case RPC_FC_SHORT: case RPC_FC_USHORT: memcpy(pMemory, pStubMsg->Buffer, 2); @@ -1771,6 +1791,14 @@ static unsigned char * ComplexBufferSize while (*pFormat != RPC_FC_END) { switch (*pFormat) { + case RPC_FC_BYTE: + case RPC_FC_CHAR: + case RPC_FC_SMALL: + case RPC_FC_USMALL: + pStubMsg->BufferLength += 1; + pMemory += 1; + break; + case RPC_FC_WCHAR: case RPC_FC_SHORT: case RPC_FC_USHORT: pStubMsg->BufferLength += 2; @@ -1829,6 +1857,13 @@ static unsigned char * ComplexFree(PMIDL while (*pFormat != RPC_FC_END) { switch (*pFormat) { + case RPC_FC_BYTE: + case RPC_FC_CHAR: + case RPC_FC_SMALL: + case RPC_FC_USMALL: + pMemory += 1; + break; + case RPC_FC_WCHAR: case RPC_FC_SHORT: case RPC_FC_USHORT: pMemory += 2; @@ -1882,6 +1917,14 @@ static unsigned long ComplexStructMemory while (*pFormat != RPC_FC_END) { switch (*pFormat) { + case RPC_FC_BYTE: + case RPC_FC_CHAR: + case RPC_FC_SMALL: + case RPC_FC_USMALL: + size += 1; + pStubMsg->Buffer += 1; + break; + case RPC_FC_WCHAR: case RPC_FC_SHORT: case RPC_FC_USHORT: size += 2;
1
0
0
0
Robert Shearman : rpcrt4: Now that there' s a process-wide pool of connections we don't
by Alexandre Julliard
09 Jun '06
09 Jun '06
Module: wine Branch: refs/heads/master Commit: 0b1e51ca2502813a3ea18006f0adba2433231a5f URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=0b1e51ca2502813a3ea1800…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Fri Jun 9 17:24:23 2006 +0100 rpcrt4: Now that there's a process-wide pool of connections we don't need to copy the FromConn field when copying bindings. --- dlls/rpcrt4/rpc_binding.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/dlls/rpcrt4/rpc_binding.c b/dlls/rpcrt4/rpc_binding.c index 2e9b40b..6b7770d 100644 --- a/dlls/rpcrt4/rpc_binding.c +++ b/dlls/rpcrt4/rpc_binding.c @@ -865,8 +865,6 @@ RPC_STATUS RPC_ENTRY RpcBindingCopy( DestBinding->NetworkAddr = RPCRT4_strndupA(SrcBinding->NetworkAddr, -1); DestBinding->Endpoint = RPCRT4_strndupA(SrcBinding->Endpoint, -1); - DestBinding->FromConn = SrcBinding->FromConn; - SrcBinding->FromConn = NULL; if (SrcBinding->AuthInfo) RpcAuthInfo_AddRef(SrcBinding->AuthInfo); DestBinding->AuthInfo = SrcBinding->AuthInfo;
1
0
0
0
Robert Shearman : rpcrt4: Return the status received from RPCRT4_Send in I_RpcSend instead of always returning RPC_S_OK .
by Alexandre Julliard
09 Jun '06
09 Jun '06
Module: wine Branch: refs/heads/master Commit: 56386bd88c3a18d832de5f00bdb984089b4d52a3 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=56386bd88c3a18d832de5f0…
Author: Robert Shearman <rob(a)codeweavers.com> Date: Fri Jun 9 17:24:15 2006 +0100 rpcrt4: Return the status received from RPCRT4_Send in I_RpcSend instead of always returning RPC_S_OK. --- dlls/rpcrt4/rpc_message.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/rpcrt4/rpc_message.c b/dlls/rpcrt4/rpc_message.c index ffde890..bd4b824 100644 --- a/dlls/rpcrt4/rpc_message.c +++ b/dlls/rpcrt4/rpc_message.c @@ -688,10 +688,9 @@ RPC_STATUS WINAPI I_RpcSend(PRPC_MESSAGE if (!bind->server) { /* save the connection, so the response can be read from it */ pMsg->ReservedForRuntime = conn; - return RPC_S_OK; + return status; } RPCRT4_CloseBinding(bind, conn); - status = RPC_S_OK; return status; }
1
0
0
0
H. Verbeet : d3d9: Add a test for default texture stage state values.
by Alexandre Julliard
09 Jun '06
09 Jun '06
Module: wine Branch: refs/heads/master Commit: 773309a403a9bc814a1fa0c4a5981a02fa25d364 URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=773309a403a9bc814a1fa0c…
Author: H. Verbeet <hverbeet(a)gmail.com> Date: Thu Jun 8 23:35:34 2006 +0200 d3d9: Add a test for default texture stage state values. --- dlls/d3d9/tests/.gitignore | 1 dlls/d3d9/tests/Makefile.in | 1 dlls/d3d9/tests/texture.c | 117 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 119 insertions(+), 0 deletions(-) create mode 100644 dlls/d3d9/tests/texture.c diff --git a/dlls/d3d9/tests/.gitignore b/dlls/d3d9/tests/.gitignore index 9c71ef1..3364874 100644 --- a/dlls/d3d9/tests/.gitignore +++ b/dlls/d3d9/tests/.gitignore @@ -4,5 +4,6 @@ shader.ok stateblock.ok surface.ok testlist.c +texture.ok vertexdeclaration.ok volume.ok diff --git a/dlls/d3d9/tests/Makefile.in b/dlls/d3d9/tests/Makefile.in index 1e825ae..336ca76 100644 --- a/dlls/d3d9/tests/Makefile.in +++ b/dlls/d3d9/tests/Makefile.in @@ -11,6 +11,7 @@ CTESTS = \ shader.c \ stateblock.c \ surface.c \ + texture.c \ vertexdeclaration.c \ volume.c diff --git a/dlls/d3d9/tests/texture.c b/dlls/d3d9/tests/texture.c new file mode 100644 index 0000000..c1e1269 --- /dev/null +++ b/dlls/d3d9/tests/texture.c @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2006 Henri Verbeet + * + * 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 + */ +#define COBJMACROS +#include <d3d9.h> +#include "wine/test.h" + +static HWND create_window(void) +{ + WNDCLASS wc = {0}; + wc.lpfnWndProc = &DefWindowProc; + wc.lpszClassName = "d3d9_test_wc"; + RegisterClass(&wc); + + return CreateWindow("d3d9_test_wc", "d3d9_test", + 0, 0, 0, 0, 0, 0, 0, 0, 0); +} + +static IDirect3DDevice9 *init_d3d9(HMODULE d3d9_handle) +{ + IDirect3D9 * (__stdcall * d3d9_create)(UINT SDKVersion) = 0; + IDirect3D9 *d3d9_ptr = 0; + IDirect3DDevice9 *device_ptr = 0; + D3DPRESENT_PARAMETERS present_parameters; + HRESULT hr; + + d3d9_create = (void *)GetProcAddress(d3d9_handle, "Direct3DCreate9"); + ok(d3d9_create != NULL, "Failed to get address of Direct3DCreate9\n"); + if (!d3d9_create) return NULL; + + d3d9_ptr = d3d9_create(D3D_SDK_VERSION); + ok(d3d9_ptr != NULL, "Failed to create IDirect3D9 object\n"); + if (!d3d9_ptr) return NULL; + + ZeroMemory(&present_parameters, sizeof(present_parameters)); + present_parameters.Windowed = TRUE; + present_parameters.hDeviceWindow = create_window(); + present_parameters.SwapEffect = D3DSWAPEFFECT_DISCARD; + + hr = IDirect3D9_CreateDevice(d3d9_ptr, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + NULL, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &present_parameters, &device_ptr); + ok(SUCCEEDED(hr), "IDirect3D_CreateDevice returned %#lx\n", hr); + + return device_ptr; +} + +static void test_texture_stage_state(IDirect3DDevice9 *device_ptr, DWORD stage, D3DTEXTURESTAGESTATETYPE type, DWORD expected) +{ + DWORD value; + + HRESULT hr = IDirect3DDevice9_GetTextureStageState(device_ptr, stage, type, &value); + ok(SUCCEEDED(hr) && value == expected, "GetTextureStageState (stage %#lx, type %#x) returned: hr %#lx, value %#lx. " + "Expected hr %#lx, value %#lx\n", stage, type, hr, value, D3D_OK, expected); +} + +/* Test the default texture stage state values */ +static void test_texture_stage_states(IDirect3DDevice9 *device_ptr, int num_stages) +{ + int i; + for (i = 0; i < num_stages; ++i) + { + test_texture_stage_state(device_ptr, i, D3DTSS_COLOROP, i ? D3DTOP_DISABLE : D3DTOP_MODULATE); + test_texture_stage_state(device_ptr, i, D3DTSS_COLORARG1, D3DTA_TEXTURE); + test_texture_stage_state(device_ptr, i, D3DTSS_COLORARG2, D3DTA_CURRENT); + test_texture_stage_state(device_ptr, i, D3DTSS_ALPHAOP, i ? D3DTOP_DISABLE : D3DTOP_SELECTARG1); + test_texture_stage_state(device_ptr, i, D3DTSS_ALPHAARG1, D3DTA_TEXTURE); + test_texture_stage_state(device_ptr, i, D3DTSS_ALPHAARG2, D3DTA_CURRENT); + test_texture_stage_state(device_ptr, i, D3DTSS_BUMPENVMAT00, 0); + test_texture_stage_state(device_ptr, i, D3DTSS_BUMPENVMAT01, 0); + test_texture_stage_state(device_ptr, i, D3DTSS_BUMPENVMAT10, 0); + test_texture_stage_state(device_ptr, i, D3DTSS_BUMPENVMAT11, 0); + test_texture_stage_state(device_ptr, i, D3DTSS_TEXCOORDINDEX, i); + test_texture_stage_state(device_ptr, i, D3DTSS_BUMPENVLSCALE, 0); + test_texture_stage_state(device_ptr, i, D3DTSS_BUMPENVLOFFSET, 0); + test_texture_stage_state(device_ptr, i, D3DTSS_TEXTURETRANSFORMFLAGS, D3DTTFF_DISABLE); + test_texture_stage_state(device_ptr, i, D3DTSS_COLORARG0, D3DTA_CURRENT); + test_texture_stage_state(device_ptr, i, D3DTSS_ALPHAARG0, D3DTA_CURRENT); + test_texture_stage_state(device_ptr, i, D3DTSS_RESULTARG, D3DTA_CURRENT); + test_texture_stage_state(device_ptr, i, D3DTSS_CONSTANT, 0); + test_texture_stage_state(device_ptr, i, D3DTSS_FORCE_DWORD, 0); + } +} + +START_TEST(texture) +{ + D3DCAPS9 caps; + HMODULE d3d9_handle; + IDirect3DDevice9 *device_ptr; + + d3d9_handle = LoadLibraryA("d3d9.dll"); + if (!d3d9_handle) + { + trace("Could not load d3d9.dll, skipping tests\n"); + return; + } + + device_ptr = init_d3d9(d3d9_handle); + if (!device_ptr) return; + + IDirect3DDevice9_GetDeviceCaps(device_ptr, &caps); + + test_texture_stage_states(device_ptr, caps.MaxTextureBlendStages); +}
1
0
0
0
Jeff Latimer : usp10: ScriptTextOut updated to reflect that it must have a hdc passed to it.
by Alexandre Julliard
09 Jun '06
09 Jun '06
Module: wine Branch: refs/heads/master Commit: 8bdeffa4efc12718aaacb61921d427a98da73dcc URL:
http://source.winehq.org/git/?p=wine.git;a=commit;h=8bdeffa4efc12718aaacb61…
Author: Jeff Latimer <lats(a)yless4u.com.au> Date: Fri Jun 9 20:06:51 2006 +1000 usp10: ScriptTextOut updated to reflect that it must have a hdc passed to it. --- dlls/usp10/tests/usp10.c | 18 ++++++++++-------- dlls/usp10/usp10.c | 25 ++++++++++--------------- 2 files changed, 20 insertions(+), 23 deletions(-) diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c index f65a1fa..cbaf44a 100644 --- a/dlls/usp10/tests/usp10.c +++ b/dlls/usp10/tests/usp10.c @@ -363,13 +363,13 @@ void test_ScriptTextOut(void) int cMaxItems; SCRIPT_ITEM pItem[255]; int pcItems; - WCHAR TestItem1[6] = {'T', 'e', 's', 't', 0x0166, 0}; + WCHAR TestItem1[6] = {'T', 'e', 's', 't', 'a', 0}; SCRIPT_CACHE psc; int cChars; int cMaxGlyphs; unsigned short pwOutGlyphs1[256]; - unsigned short pwLogClust[256]; + WORD pwLogClust[256]; SCRIPT_VISATTR psva[256]; int pcGlyphs; int piAdvance[256]; @@ -422,7 +422,8 @@ void test_ScriptTextOut(void) ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); ok (pcGlyphs == cChars, "Chars in (%d) should equal Glyphs out (%d)\n", cChars, pcGlyphs); if (hr ==0) { - hr = ScriptPlace(NULL, &psc, pwOutGlyphs1, pcGlyphs, psva, &pItem[0].a, piAdvance, + /* Note hdc is needed as glyph info is not yet in psc */ + hr = ScriptPlace(hdc, &psc, pwOutGlyphs1, pcGlyphs, psva, &pItem[0].a, piAdvance, pGoffset, pABC); ok (hr == 0, "Should return 0 not (%08x)\n", (unsigned int) hr); ScriptFreeCache(&psc); /* Get rid of psc for next test set */ @@ -444,25 +445,26 @@ void test_ScriptTextOut(void) "got %08x\n", (unsigned int)hr); ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); - /* Set psc to NULL, to be able to check if a pointer is returned in psc */ + /* Set psc to NULL, to be able to check if a pointer is returned in psc + * hdc is required for this one rather than the usual optional */ psc = NULL; hr = ScriptTextOut(NULL, &psc, 0, 0, 0, NULL, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs, piAdvance, NULL, pGoffset); - ok( hr == E_PENDING, "(NULL,&psc,), expected E_PENDING, got %08x\n", (unsigned int)hr); + ok( hr == E_INVALIDARG, "(NULL,&psc,), expected E_INVALIDARG, got %08x\n", (unsigned int)hr); ok( psc == NULL, "Expected psc to be NULL, got %p\n", psc); - /* Se that is gets a psc and that returns 0 status */ + /* Set that is gets a psc and that returns 0 status */ hr = ScriptTextOut(hdc, &psc, 0, 0, 0, NULL, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs, piAdvance, NULL, pGoffset); ok (hr == 0, "ScriptTextOut should return 0 not (%08x)\n", (unsigned int) hr); ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); - /* Test Rect Rgn is acceptable and that it works without hdc */ + /* Test Rect Rgn is acceptable */ rect.top = 10; rect.bottom = 20; rect.left = 10; rect.right = 40; - hr = ScriptTextOut(NULL, &psc, 0, 0, 0, &rect, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs, + hr = ScriptTextOut(hdc, &psc, 0, 0, 0, &rect, &pItem[0].a, NULL, 0, pwOutGlyphs1, pcGlyphs, piAdvance, NULL, pGoffset); ok (hr == 0, "ScriptTextOut should return 0 not (%08x)\n", (unsigned int) hr); ok (psc != NULL, "psc should not be null and have SCRIPT_CACHE buffer address\n"); diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 9919658..4bf7031 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -604,23 +604,18 @@ HRESULT WINAPI ScriptTextOut(const HDC h hdc, psc, x, y, fuOptions, lprc, psa, pwcReserved, iReserved, pwGlyphs, cGlyphs, piAdvance, piJustify, pGoffset); - if (!psc || !piAdvance || !psa || !pwGlyphs) + if (!hdc || !psc || !piAdvance || !psa || !pwGlyphs) /* hdc is mandatory */ return E_INVALIDARG; - if (!hdc && !*psc) { - TRACE("No Script_Cache (psc) and no hdc. Ask for one. Hdc=%p, psc=%p\n", hdc, *psc); - return E_PENDING; - } else - if (hdc && !*psc) { - pScriptcache = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(Scriptcache) ); - pScriptcache->hdc = hdc; - phdc = hdc; - *psc = pScriptcache; - } else - if (*psc) { - pScriptcache = *psc; - phdc = pScriptcache->hdc; - } + if (!*psc) { + pScriptcache = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(Scriptcache) ); + pScriptcache->hdc = hdc; + phdc = hdc; + *psc = pScriptcache; + } else { + pScriptcache = *psc; + phdc = pScriptcache->hdc; + } fuOptions &= ETO_CLIPPED + ETO_OPAQUE; if (!psa->fNoGlyphIndex) /* Have Glyphs? */
1
0
0
0
← Newer
1
...
60
61
62
63
64
65
66
...
86
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Results per page:
10
25
50
100
200