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
April 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
898 discussions
Start a n
N
ew thread
Christian Costa : mciqtz32: Only call CoUninitialize when CoInitializeEx succeeds.
by Alexandre Julliard
12 Apr '10
12 Apr '10
Module: wine Branch: master Commit: 0d1cba8e4f1dbe0dd9c693da80e243fc29e2cdba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0d1cba8e4f1dbe0dd9c693da8…
Author: Christian Costa <titan.costa(a)wanadoo.fr> Date: Mon Apr 12 11:21:27 2010 +0200 mciqtz32: Only call CoUninitialize when CoInitializeEx succeeds. --- dlls/mciqtz32/mciqtz.c | 9 ++++++--- dlls/mciqtz32/mciqtz_private.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dlls/mciqtz32/mciqtz.c b/dlls/mciqtz32/mciqtz.c index b98e163..c826de1 100644 --- a/dlls/mciqtz32/mciqtz.c +++ b/dlls/mciqtz32/mciqtz.c @@ -153,7 +153,8 @@ static DWORD MCIQTZ_mciOpen(UINT wDevID, DWORD dwFlags, MCIQTZ_mciStop(wDevID, MCI_WAIT, NULL); - CoInitializeEx(NULL, COINIT_MULTITHREADED); + hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); + wma->uninit = SUCCEEDED(hr); hr = CoCreateInstance(&CLSID_FilterGraph, NULL, CLSCTX_INPROC_SERVER, &IID_IGraphBuilder, (LPVOID*)&wma->pgraph); if (FAILED(hr)) { @@ -197,7 +198,8 @@ err: IMediaControl_Release(wma->pmctrl); wma->pmctrl = NULL; - CoUninitialize(); + if (wma->uninit) + CoUninitialize(); return MCIERR_INTERNAL; } @@ -220,7 +222,8 @@ static DWORD MCIQTZ_mciClose(UINT wDevID, DWORD dwFlags, LPMCI_GENERIC_PARMS lpP if (wma->opened) { IGraphBuilder_Release(wma->pgraph); IMediaControl_Release(wma->pmctrl); - CoUninitialize(); + if (wma->uninit) + CoUninitialize(); wma->opened = FALSE; } diff --git a/dlls/mciqtz32/mciqtz_private.h b/dlls/mciqtz32/mciqtz_private.h index dcfcad0..caf80de 100644 --- a/dlls/mciqtz32/mciqtz_private.h +++ b/dlls/mciqtz32/mciqtz_private.h @@ -28,6 +28,7 @@ typedef struct { MCIDEVICEID wDevID; BOOL opened; + BOOL uninit; IGraphBuilder* pgraph; IMediaControl* pmctrl; BOOL started;
1
0
0
0
Alexandre Julliard : ntdll: Make cfi annotations optional for x86_64.
by Alexandre Julliard
12 Apr '10
12 Apr '10
Module: wine Branch: master Commit: 281f70188001885e214dd644e3d6baeff2942644 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=281f70188001885e214dd644e…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 12 12:38:27 2010 +0200 ntdll: Make cfi annotations optional for x86_64. --- dlls/ntdll/relay.c | 20 ++++++++++---------- dlls/ntdll/signal_x86_64.c | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/dlls/ntdll/relay.c b/dlls/ntdll/relay.c index ee042de..95575bb 100644 --- a/dlls/ntdll/relay.c +++ b/dlls/ntdll/relay.c @@ -353,14 +353,14 @@ __ASM_GLOBAL_FUNC( call_entry_point, #else __ASM_GLOBAL_FUNC( call_entry_point, "pushq %rbp\n\t" - ".cfi_adjust_cfa_offset 8\n\t" - ".cfi_rel_offset %rbp,0\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" - ".cfi_def_cfa_register %rbp\n\t" + __ASM_CFI(".cfi_def_cfa_register %rbp\n\t") "pushq %rsi\n\t" - ".cfi_rel_offset %rsi,-8\n\t" + __ASM_CFI(".cfi_rel_offset %rsi,-8\n\t") "pushq %rdi\n\t" - ".cfi_rel_offset %rdi,-16\n\t" + __ASM_CFI(".cfi_rel_offset %rdi,-16\n\t") "movq %rcx,%rax\n\t" "movq $4,%rcx\n\t" "cmp %rcx,%rdx\n\t" @@ -378,13 +378,13 @@ __ASM_GLOBAL_FUNC( call_entry_point, "callq *%rax\n\t" "leaq -16(%rbp),%rsp\n\t" "popq %rdi\n\t" - ".cfi_same_value %rdi\n\t" + __ASM_CFI(".cfi_same_value %rdi\n\t") "popq %rsi\n\t" - ".cfi_same_value %rsi\n\t" - ".cfi_def_cfa_register %rsp\n\t" + __ASM_CFI(".cfi_same_value %rsi\n\t") + __ASM_CFI(".cfi_def_cfa_register %rsp\n\t") "popq %rbp\n\t" - ".cfi_adjust_cfa_offset -8\n\t" - ".cfi_same_value %rbp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") + __ASM_CFI(".cfi_same_value %rbp\n\t") "ret") #endif diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index 4900b43..688cafb 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -1610,10 +1610,10 @@ NTSTATUS context_from_server( CONTEXT *to, const context_t *from ) extern void raise_func_trampoline( EXCEPTION_RECORD *rec, CONTEXT *context, raise_func func ); __ASM_GLOBAL_FUNC( raise_func_trampoline, - ".cfi_signal_frame\n\t" - ".cfi_def_cfa %rbp,144\n\t" /* red zone + rip + rbp */ - ".cfi_rel_offset %rip,8\n\t" - ".cfi_rel_offset %rbp,0\n\t" + __ASM_CFI(".cfi_signal_frame\n\t") + __ASM_CFI(".cfi_def_cfa %rbp,144\n\t") /* red zone + rip + rbp */ + __ASM_CFI(".cfi_rel_offset %rip,8\n\t") + __ASM_CFI(".cfi_rel_offset %rbp,0\n\t") "call *%rdx\n\t" "int $3") @@ -2975,14 +2975,14 @@ void call_thread_func( LPTHREAD_START_ROUTINE entry, void *arg, void *frame ) extern void DECLSPEC_NORETURN call_thread_entry_point( LPTHREAD_START_ROUTINE entry, void *arg ); __ASM_GLOBAL_FUNC( call_thread_entry_point, "subq $8,%rsp\n\t" - ".cfi_adjust_cfa_offset 8\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t") "movq %rsp,%rdx\n\t" "call " __ASM_NAME("call_thread_func") ); extern void DECLSPEC_NORETURN call_thread_exit_func( int status, void (*func)(int), void *frame ); __ASM_GLOBAL_FUNC( call_thread_exit_func, "subq $8,%rsp\n\t" - ".cfi_adjust_cfa_offset 8\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t") "movq %rdx,%rsp\n\t" "call *%rsi" );
1
0
0
0
Alexandre Julliard : libwine: Make cfi annotations optional for x86_64.
by Alexandre Julliard
12 Apr '10
12 Apr '10
Module: wine Branch: master Commit: fd9c41ed20018c4070ea8e2fa96fbbb0e7208a55 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=fd9c41ed20018c4070ea8e2fa…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 12 12:37:35 2010 +0200 libwine: Make cfi annotations optional for x86_64. --- libs/wine/port.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/wine/port.c b/libs/wine/port.c index ce32653..f4ad2e9 100644 --- a/libs/wine/port.c +++ b/libs/wine/port.c @@ -139,20 +139,20 @@ __declspec(naked) int wine_call_on_stack( int (*func)(void *), void *arg, void * #elif defined(__x86_64__) && defined(__GNUC__) __ASM_GLOBAL_FUNC( wine_call_on_stack, "pushq %rbp\n\t" - ".cfi_adjust_cfa_offset 8\n\t" - ".cfi_rel_offset %rbp,0\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" - ".cfi_def_cfa_register %rbp\n\t" + __ASM_CFI(".cfi_def_cfa_register %rbp\n\t") "movq %rdi,%rax\n\t" /* func */ "movq %rsi,%rdi\n\t" /* arg */ "andq $~15,%rdx\n\t" /* stack */ "movq %rdx,%rsp\n\t" "callq *%rax\n\t" /* call func */ "movq %rbp,%rsp\n\t" - ".cfi_def_cfa_register %rsp\n\t" + __ASM_CFI(".cfi_def_cfa_register %rsp\n\t") "popq %rbp\n\t" - ".cfi_adjust_cfa_offset -8\n\t" - ".cfi_same_value %rbp\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") + __ASM_CFI(".cfi_same_value %rbp\n\t") "ret") #elif defined(__powerpc__) && defined(__GNUC__) __ASM_GLOBAL_FUNC( wine_call_on_stack,
1
0
0
0
Alexandre Julliard : libport: Make cfi annotations optional for x86_64.
by Alexandre Julliard
12 Apr '10
12 Apr '10
Module: wine Branch: master Commit: 671eb84f9eca0ae7037873c99740eace5125a119 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=671eb84f9eca0ae7037873c99…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 12 12:37:32 2010 +0200 libport: Make cfi annotations optional for x86_64. --- libs/port/interlocked.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/port/interlocked.c b/libs/port/interlocked.c index b2d4b52..8fb9972 100644 --- a/libs/port/interlocked.c +++ b/libs/port/interlocked.c @@ -164,8 +164,8 @@ __ASM_GLOBAL_FUNC(interlocked_xchg_add, "ret") __ASM_GLOBAL_FUNC(interlocked_cmpxchg128, "push %rbx\n\t" - ".cfi_adjust_cfa_offset 8\n\t" - ".cfi_rel_offset %rbx,0\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset 8\n\t") + __ASM_CFI(".cfi_rel_offset %rbx,0\n\t") "mov %rcx,%r8\n\t" /* compare */ "mov %rdx,%rbx\n\t" /* xchg_low */ "mov %rsi,%rcx\n\t" /* xchg_high */ @@ -176,8 +176,8 @@ __ASM_GLOBAL_FUNC(interlocked_cmpxchg128, "mov %rdx,8(%r8)\n\t" "setz %al\n\t" "pop %rbx\n\t" - ".cfi_adjust_cfa_offset -8\n\t" - ".cfi_same_value %rbx\n\t" + __ASM_CFI(".cfi_adjust_cfa_offset -8\n\t") + __ASM_CFI(".cfi_same_value %rbx\n\t") "ret") #elif defined(__powerpc__)
1
0
0
0
Alexandre Julliard : winebuild: Add cfi annotations to the relay functions for i386.
by Alexandre Julliard
12 Apr '10
12 Apr '10
Module: wine Branch: master Commit: 5c2db41cdc9ee899953aba57c864a64cc961c2d8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5c2db41cdc9ee899953aba57c…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 12 12:33:19 2010 +0200 winebuild: Add cfi annotations to the relay functions for i386. --- tools/winebuild/relay.c | 35 ++++++++++++++++++++++++++++++++++- tools/winebuild/spec16.c | 15 +++++++++++++-- 2 files changed, 47 insertions(+), 3 deletions(-) diff --git a/tools/winebuild/relay.c b/tools/winebuild/relay.c index 723bd17..1c84394 100644 --- a/tools/winebuild/relay.c +++ b/tools/winebuild/relay.c @@ -386,13 +386,20 @@ static void BuildCallTo16Core( int reg_func ) function_header( name ); /* Function entry sequence */ + output_cfi( ".cfi_startproc" ); output( "\tpushl %%ebp\n" ); + output_cfi( ".cfi_adjust_cfa_offset 4" ); + output_cfi( ".cfi_rel_offset %%ebp,0" ); output( "\tmovl %%esp, %%ebp\n" ); + output_cfi( ".cfi_def_cfa_register %%ebp" ); /* Save the 32-bit registers */ output( "\tpushl %%ebx\n" ); + output_cfi( ".cfi_rel_offset %%ebx,-4" ); output( "\tpushl %%esi\n" ); + output_cfi( ".cfi_rel_offset %%esi,-8" ); output( "\tpushl %%edi\n" ); + output_cfi( ".cfi_rel_offset %%edi,-12" ); output( "\t.byte 0x64\n\tmov %%gs,(%d)\n", GS_OFFSET ); /* Setup exception frame */ @@ -443,12 +450,18 @@ static void BuildCallTo16Core( int reg_func ) /* Restore the 32-bit registers */ output( "\tpopl %%edi\n" ); + output_cfi( ".cfi_same_value %%edi" ); output( "\tpopl %%esi\n" ); + output_cfi( ".cfi_same_value %%esi" ); output( "\tpopl %%ebx\n" ); + output_cfi( ".cfi_same_value %%ebx" ); /* Function exit sequence */ output( "\tpopl %%ebp\n" ); + output_cfi( ".cfi_def_cfa %%esp,4" ); + output_cfi( ".cfi_same_value %%ebp" ); output( "\tret $12\n" ); + output_cfi( ".cfi_endproc" ); /* Start of the actual CallTo16 routine */ @@ -652,11 +665,18 @@ static void BuildCallTo32CBClient( int isEx ) /* Entry code */ + output_cfi( ".cfi_startproc" ); output( "\tpushl %%ebp\n" ); + output_cfi( ".cfi_adjust_cfa_offset 4" ); + output_cfi( ".cfi_rel_offset %%ebp,0" ); output( "\tmovl %%esp,%%ebp\n" ); + output_cfi( ".cfi_def_cfa_register %%ebp" ); output( "\tpushl %%edi\n" ); + output_cfi( ".cfi_rel_offset %%edi,-4" ); output( "\tpushl %%esi\n" ); + output_cfi( ".cfi_rel_offset %%esi,-8" ); output( "\tpushl %%ebx\n" ); + output_cfi( ".cfi_rel_offset %%ebx,-12" ); /* Get pointer to temporary area and save the 32-bit stack pointer */ @@ -694,10 +714,16 @@ static void BuildCallTo32CBClient( int isEx ) /* Restore registers and return */ output( "\tpopl %%ebx\n" ); + output_cfi( ".cfi_same_value %%ebx" ); output( "\tpopl %%esi\n" ); + output_cfi( ".cfi_same_value %%esi" ); output( "\tpopl %%edi\n" ); + output_cfi( ".cfi_same_value %%edi" ); output( "\tpopl %%ebp\n" ); + output_cfi( ".cfi_def_cfa %%esp,4" ); + output_cfi( ".cfi_same_value %%ebp" ); output( "\tret\n" ); + output_cfi( ".cfi_endproc" ); output_function_size( isEx ? "CALL32_CBClientEx" : "CALL32_CBClient" ); /* '16-bit' return stub */ @@ -757,8 +783,12 @@ static void build_call_from_regs_x86(void) /* Allocate some buffer space on the stack */ + output_cfi( ".cfi_startproc" ); output( "\tpushl %%ebp\n" ); - output( "\tmovl %%esp,%%ebp\n "); + output_cfi( ".cfi_adjust_cfa_offset 4" ); + output_cfi( ".cfi_rel_offset %%ebp,0" ); + output( "\tmovl %%esp,%%ebp\n" ); + output_cfi( ".cfi_def_cfa_register %%ebp" ); output( "\tleal -%d(%%esp),%%esp\n", STACK_SPACE ); /* Build the context structure */ @@ -846,11 +876,14 @@ static void build_call_from_regs_x86(void) output( "\tpopl %%ds\n" ); output( "\tiret\n" ); + output_cfi( ".cfi_endproc" ); output_function_size( "__wine_call_from_regs" ); function_header( "__wine_restore_regs" ); + output_cfi( ".cfi_startproc" ); output( "\tmovl 4(%%esp),%%ecx\n" ); output( "\tjmp 2b\n" ); + output_cfi( ".cfi_endproc" ); output_function_size( "__wine_restore_regs" ); } diff --git a/tools/winebuild/spec16.c b/tools/winebuild/spec16.c index e60b4bc..57ee533 100644 --- a/tools/winebuild/spec16.c +++ b/tools/winebuild/spec16.c @@ -312,12 +312,17 @@ static void output_call16_function( ORDDEF *odp ) output( "\t.align %d\n", get_alignment(4) ); output( "\t%s\n", func_declaration(name) ); output( "%s:\n", name ); + output_cfi( ".cfi_startproc" ); output( "\tpushl %%ebp\n" ); + output_cfi( ".cfi_adjust_cfa_offset 4" ); + output_cfi( ".cfi_rel_offset %%ebp,0" ); output( "\tmovl %%esp,%%ebp\n" ); + output_cfi( ".cfi_def_cfa_register %%ebp" ); stack_words = 2; if (needs_ldt) { output( "\tpushl %%esi\n" ); + output_cfi( ".cfi_rel_offset %%esi,-4" ); stack_words++; if (UsePIC) { @@ -390,10 +395,16 @@ static void output_call16_function( ORDDEF *odp ) output( "\tcall *8(%%ebp)\n" ); - if (needs_ldt) output( "\tmovl -4(%%ebp),%%esi\n" ); - + if (needs_ldt) + { + output( "\tmovl -4(%%ebp),%%esi\n" ); + output_cfi( ".cfi_same_value %%esi" ); + } output( "\tleave\n" ); + output_cfi( ".cfi_def_cfa %%esp,4" ); + output_cfi( ".cfi_same_value %%ebp" ); output( "\tret\n" ); + output_cfi( ".cfi_endproc" ); output_function_size( name ); }
1
0
0
0
Alexandre Julliard : winebuild: Add cfi annotations to the import thunk for i386.
by Alexandre Julliard
12 Apr '10
12 Apr '10
Module: wine Branch: master Commit: eba56752fd9ef5d41a7f1c2a3149f062ee4b9e75 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=eba56752fd9ef5d41a7f1c2a3…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Mon Apr 12 12:04:50 2010 +0200 winebuild: Add cfi annotations to the import thunk for i386. --- tools/winebuild/import.c | 42 +++++++++++++++++++++++++----------------- 1 files changed, 25 insertions(+), 17 deletions(-) diff --git a/tools/winebuild/import.c b/tools/winebuild/import.c index bc34b5f..99619da 100644 --- a/tools/winebuild/import.c +++ b/tools/winebuild/import.c @@ -645,9 +645,10 @@ void output_get_pc_thunk(void) output( "\t.align %d\n", get_alignment(4) ); output( "\t%s\n", func_declaration("__wine_spec_get_pc_thunk_eax") ); output( "%s:\n", asm_name("__wine_spec_get_pc_thunk_eax") ); - output( "\tpopl %%eax\n" ); - output( "\tpushl %%eax\n" ); + output_cfi( ".cfi_startproc" ); + output( "\tmovl (%%esp),%%eax\n" ); output( "\tret\n" ); + output_cfi( ".cfi_endproc" ); output_function_size( "__wine_spec_get_pc_thunk_eax" ); } @@ -657,6 +658,7 @@ static void output_import_thunk( const char *name, const char *table, int pos ) output( "\n\t.align %d\n", get_alignment(4) ); output( "\t%s\n", func_declaration(name) ); output( "%s\n", asm_globl(name) ); + output_cfi( ".cfi_startproc" ); switch(target_cpu) { @@ -672,9 +674,7 @@ static void output_import_thunk( const char *name, const char *table, int pos ) } break; case CPU_x86_64: - output_cfi( ".cfi_startproc" ); output( "\tjmpq *%s+%d(%%rip)\n", table, pos ); - output_cfi( ".cfi_endproc" ); break; case CPU_SPARC: if ( !UsePIC ) @@ -725,6 +725,7 @@ static void output_import_thunk( const char *name, const char *table, int pos ) output( "\tbctr\n" ); break; } + output_cfi( ".cfi_endproc" ); output_function_size( name ); } @@ -968,19 +969,25 @@ static void output_delayed_import_thunks( const DLLSPEC *spec ) output( "%s:\n", asm_name(delayed_import_loaders)); output( "\t%s\n", func_declaration("__wine_delay_load_asm") ); output( "%s:\n", asm_name("__wine_delay_load_asm") ); + output_cfi( ".cfi_startproc" ); switch(target_cpu) { case CPU_x86: output( "\tpushl %%ecx\n" ); + output_cfi( ".cfi_adjust_cfa_offset 4" ); output( "\tpushl %%edx\n" ); + output_cfi( ".cfi_adjust_cfa_offset 4" ); output( "\tpushl %%eax\n" ); + output_cfi( ".cfi_adjust_cfa_offset 4" ); output( "\tcall %s\n", asm_name("__wine_spec_delay_load") ); + output_cfi( ".cfi_adjust_cfa_offset -4" ); output( "\tpopl %%edx\n" ); + output_cfi( ".cfi_adjust_cfa_offset -4" ); output( "\tpopl %%ecx\n" ); + output_cfi( ".cfi_adjust_cfa_offset -4" ); output( "\tjmp *%%eax\n" ); break; case CPU_x86_64: - output_cfi( ".cfi_startproc" ); output( "\tsubq $88,%%rsp\n" ); output_cfi( ".cfi_adjust_cfa_offset 88" ); output( "\tmovq %%rdx,80(%%rsp)\n" ); @@ -1000,7 +1007,6 @@ static void output_delayed_import_thunks( const DLLSPEC *spec ) output( "\taddq $88,%%rsp\n" ); output_cfi( ".cfi_adjust_cfa_offset -88" ); output( "\tjmp *%%rax\n" ); - output_cfi( ".cfi_endproc" ); break; case CPU_SPARC: output( "\tsave %%sp, -96, %%sp\n" ); @@ -1068,6 +1074,7 @@ static void output_delayed_import_thunks( const DLLSPEC *spec ) output( "\tbctr\n"); break; } + output_cfi( ".cfi_endproc" ); output_function_size( "__wine_delay_load_asm" ); output( "\n" ); @@ -1080,6 +1087,7 @@ static void output_delayed_import_thunks( const DLLSPEC *spec ) const char *name = odp->name ? odp->name : odp->export_name; output( ".L__wine_delay_imp_%d_%s:\n", i, name ); + output_cfi( ".cfi_startproc" ); switch(target_cpu) { case CPU_x86: @@ -1087,10 +1095,8 @@ static void output_delayed_import_thunks( const DLLSPEC *spec ) output( "\tjmp %s\n", asm_name("__wine_delay_load_asm") ); break; case CPU_x86_64: - output_cfi( ".cfi_startproc" ); output( "\tmovq $%d,%%rax\n", (idx << 16) | j ); output( "\tjmp %s\n", asm_name("__wine_delay_load_asm") ); - output_cfi( ".cfi_endproc" ); break; case CPU_SPARC: output( "\tset %d, %%g1\n", (idx << 16) | j ); @@ -1132,6 +1138,7 @@ static void output_delayed_import_thunks( const DLLSPEC *spec ) } break; } + output_cfi( ".cfi_endproc" ); } idx++; } @@ -1214,6 +1221,7 @@ void output_stubs( DLLSPEC *spec ) output( "\t.align %d\n", get_alignment(4) ); output( "\t%s\n", func_declaration(name) ); output( "%s:\n", asm_name(name) ); + output_cfi( ".cfi_startproc" ); switch (target_cpu) { @@ -1229,7 +1237,8 @@ void output_stubs( DLLSPEC *spec ) output(" \tnop\n" ); output(" \tnop\n" ); - output( "\tsubl $4,%%esp\n" ); + output( "\tsubl $12,%%esp\n" ); + output_cfi( ".cfi_adjust_cfa_offset 12" ); if (UsePIC) { output( "\tcall %s\n", asm_name("__wine_spec_get_pc_thunk_eax") ); @@ -1237,29 +1246,28 @@ void output_stubs( DLLSPEC *spec ) if (exp_name) { output( "\tleal .L%s_string-1b(%%eax),%%ecx\n", name ); - output( "\tpushl %%ecx\n" ); + output( "\tmovl %%ecx,4(%%esp)\n" ); count++; } else - output( "\tpushl $%d\n", odp->ordinal ); + output( "\tmovl $%d,4(%%esp)\n", odp->ordinal ); output( "\tleal .L__wine_spec_file_name-1b(%%eax),%%ecx\n" ); - output( "\tpushl %%ecx\n" ); + output( "\tmovl %%ecx,(%%esp)\n" ); } else { if (exp_name) { - output( "\tpushl $.L%s_string\n", name ); + output( "\tmovl $.L%s_string,4(%%esp)\n", name ); count++; } else - output( "\tpushl $%d\n", odp->ordinal ); - output( "\tpushl $.L__wine_spec_file_name\n" ); + output( "\tmovl $%d,4(%%esp)\n", odp->ordinal ); + output( "\tmovl $.L__wine_spec_file_name,(%%esp)\n" ); } output( "\tcall %s\n", asm_name("__wine_spec_unimplemented_stub") ); break; case CPU_x86_64: - output_cfi( ".cfi_startproc" ); output( "\tsubq $8,%%rsp\n" ); output_cfi( ".cfi_adjust_cfa_offset 8" ); output( "\tleaq .L__wine_spec_file_name(%%rip),%%rdi\n" ); @@ -1271,11 +1279,11 @@ void output_stubs( DLLSPEC *spec ) else output( "\tmovq $%d,%%rsi\n", odp->ordinal ); output( "\tcall %s\n", asm_name("__wine_spec_unimplemented_stub") ); - output_cfi( ".cfi_endproc" ); break; default: assert(0); } + output_cfi( ".cfi_endproc" ); output_function_size( name ); }
1
0
0
0
Henri Verbeet : winex11.drv: Allow OpenGL on minimized windows.
by Alexandre Julliard
12 Apr '10
12 Apr '10
Module: wine Branch: master Commit: 3255b21456622769c783db8350d70fab38b04005 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=3255b21456622769c783db835…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Apr 11 21:47:49 2010 +0200 winex11.drv: Allow OpenGL on minimized windows. --- dlls/opengl32/tests/opengl.c | 70 ++++++++++++++++++++++++++++++++++++++++++ dlls/winex11.drv/window.c | 12 +++--- 2 files changed, 76 insertions(+), 6 deletions(-) diff --git a/dlls/opengl32/tests/opengl.c b/dlls/opengl32/tests/opengl.c index b2d8e18..d0eb24f 100644 --- a/dlls/opengl32/tests/opengl.c +++ b/dlls/opengl32/tests/opengl.c @@ -650,6 +650,75 @@ static void test_opengl3(HDC hdc) } } +static void test_minimized(void) +{ + PIXELFORMATDESCRIPTOR pf_desc = + { + sizeof(PIXELFORMATDESCRIPTOR), + 1, /* version */ + PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, + PFD_TYPE_RGBA, + 24, /* 24-bit color depth */ + 0, 0, 0, 0, 0, 0, /* color bits */ + 0, /* alpha buffer */ + 0, /* shift bit */ + 0, /* accumulation buffer */ + 0, 0, 0, 0, /* accum bits */ + 32, /* z-buffer */ + 0, /* stencil buffer */ + 0, /* auxiliary buffer */ + PFD_MAIN_PLANE, /* main layer */ + 0, /* reserved */ + 0, 0, 0 /* layer masks */ + }; + int pixel_format; + HWND window; + LONG style; + HGLRC ctx; + BOOL ret; + HDC dc; + + window = CreateWindowA("static", "opengl32_test", + WS_POPUP | WS_MINIMIZE, 0, 0, 640, 480, 0, 0, 0, 0); + ok(!!window, "Failed to create window, last error %#x.\n", GetLastError()); + + dc = GetDC(window); + ok(!!dc, "Failed to get DC.\n"); + + pixel_format = ChoosePixelFormat(dc, &pf_desc); + if (!pixel_format) + { + win_skip("Failed to find pixel format.\n"); + ReleaseDC(window, dc); + DestroyWindow(window); + return; + } + + ret = SetPixelFormat(dc, pixel_format, &pf_desc); + ok(ret, "Failed to set pixel format, last error %#x.\n", GetLastError()); + + style = GetWindowLongA(window, GWL_STYLE); + ok(style & WS_MINIMIZE, "Window should be minimized, got style %#x.\n", style); + + ctx = wglCreateContext(dc); + ok(!!ctx, "Failed to create GL context, last error %#x.\n", GetLastError()); + + ret = wglMakeCurrent(dc, ctx); + ok(ret, "Failed to make context current, last error %#x.\n", GetLastError()); + + style = GetWindowLongA(window, GWL_STYLE); + ok(style & WS_MINIMIZE, "window should be minimized, got style %#x.\n", style); + + ret = wglMakeCurrent(NULL, NULL); + ok(ret, "Failed to clear current context, last error %#x.\n", GetLastError()); + + ret = wglDeleteContext(ctx); + ok(ret, "Failed to delete GL context, last error %#x.\n", GetLastError()); + + ReleaseDC(window, dc); + DestroyWindow(window); +} + START_TEST(opengl) { HWND hwnd; @@ -704,6 +773,7 @@ START_TEST(opengl) res = SetPixelFormat(hdc, iPixelFormat, &pfd); ok(res, "SetPixelformat failed: %x\n", GetLastError()); + test_minimized(); test_dc(hwnd, hdc); hglrc = wglCreateContext(hdc); diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index ef197ca..a9a3769 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -1951,16 +1951,16 @@ void CDECL X11DRV_GetDC( HDC hdc, HWND hwnd, HWND top, const RECT *win_rect, escape.pixmap = 0; escape.gl_copy = FALSE; - if (top == hwnd && data && IsIconic( hwnd ) && data->icon_window) - { - escape.drawable = data->icon_window; - } - else if (top == hwnd) + if (top == hwnd) { escape.fbconfig_id = data ? data->fbconfig_id : (XID)GetPropA( hwnd, fbconfig_id_prop ); /* GL draws to the client area even for window DCs */ escape.gl_drawable = data ? data->client_window : X11DRV_get_client_window( hwnd ); - if (flags & DCX_WINDOW) + if (data && IsIconic( hwnd ) && data->icon_window) + { + escape.drawable = data->icon_window; + } + else if (flags & DCX_WINDOW) escape.drawable = data ? data->whole_window : X11DRV_get_whole_window( hwnd ); else escape.drawable = escape.gl_drawable;
1
0
0
0
Henri Verbeet : wined3d: Don't write past the end of the buffer' s conversion_map.
by Alexandre Julliard
12 Apr '10
12 Apr '10
Module: wine Branch: master Commit: a4fad54134ec8f547218b61e2a20e87c6692ceaa URL:
http://source.winehq.org/git/wine.git/?a=commit;h=a4fad54134ec8f547218b61e2…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Apr 11 21:47:48 2010 +0200 wined3d: Don't write past the end of the buffer's conversion_map. --- dlls/wined3d/buffer.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c index 8bb1f63..a8fc0d1 100644 --- a/dlls/wined3d/buffer.c +++ b/dlls/wined3d/buffer.c @@ -275,12 +275,13 @@ static BOOL buffer_process_converted_attribute(struct wined3d_buffer *This, attrib_size = attrib->format_desc->component_count * attrib->format_desc->component_size; for (i = 0; i < attrib_size; ++i) { - if (This->conversion_map[data + i] != conversion_type) + DWORD_PTR idx = (data + i) % This->stride; + if (This->conversion_map[idx] != conversion_type) { - TRACE("Byte %ld in vertex changed\n", i + data); - TRACE("It was type %d, is %d now\n", This->conversion_map[data + i], conversion_type); + TRACE("Byte %ld in vertex changed\n", idx); + TRACE("It was type %d, is %d now\n", This->conversion_map[idx], conversion_type); ret = TRUE; - This->conversion_map[data + i] = conversion_type; + This->conversion_map[idx] = conversion_type; } }
1
0
0
0
Henri Verbeet : wined3d: Fix a GL extension prototype.
by Alexandre Julliard
12 Apr '10
12 Apr '10
Module: wine Branch: master Commit: 5f7e087644beb50c9ea287a590ea1526327e5adb URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5f7e087644beb50c9ea287a59…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Apr 11 21:47:47 2010 +0200 wined3d: Fix a GL extension prototype. --- dlls/wined3d/wined3d_gl.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h index b529c52..0fd7fb0 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h @@ -3919,7 +3919,7 @@ typedef BOOL (WINAPI *WINED3D_PFNWGLSETPIXELFORMATWINE)(HDC hdc, int iPixelForma glUniform3iARB, ARB_SHADER_OBJECTS, NULL) \ USE_GL_FUNC(WINED3D_PFNGLUNIFORM4IARBPROC, \ glUniform4iARB, ARB_SHADER_OBJECTS, NULL) \ - USE_GL_FUNC(WINED3D_PFNGLUNIFORM1IARBPROC, \ + USE_GL_FUNC(WINED3D_PFNGLUNIFORM1FARBPROC, \ glUniform1fARB, ARB_SHADER_OBJECTS, NULL) \ USE_GL_FUNC(WINED3D_PFNGLUNIFORM2FARBPROC, \ glUniform2fARB, ARB_SHADER_OBJECTS, NULL) \
1
0
0
0
Henri Verbeet : d3d8/tests: Add some depth buffer tests.
by Alexandre Julliard
12 Apr '10
12 Apr '10
Module: wine Branch: master Commit: 51ccd69e7c3a1e86a0884d600e8b74abaca79540 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=51ccd69e7c3a1e86a0884d600…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Sun Apr 11 21:47:46 2010 +0200 d3d8/tests: Add some depth buffer tests. --- dlls/d3d8/tests/visual.c | 136 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 136 insertions(+), 0 deletions(-) diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c index dd4d372..42f5f21 100644 --- a/dlls/d3d8/tests/visual.c +++ b/dlls/d3d8/tests/visual.c @@ -1286,6 +1286,8 @@ static void texop_test(IDirect3DDevice8 *device) ok(SUCCEEDED(hr), "IDirect3DDevice9_Clear failed with 0x%08x\n", hr); } + hr = IDirect3DDevice8_SetTexture(device, 0, NULL); + ok(SUCCEEDED(hr), "SetTexture failed with 0x%08x\n", hr); if (texture) IDirect3DTexture8_Release(texture); } @@ -1421,6 +1423,139 @@ static void depth_clamp_test(IDirect3DDevice8 *device) ok(SUCCEEDED(hr), "SetViewport failed, hr %#x.\n", hr); } +static void depth_buffer_test(IDirect3DDevice8 *device) +{ + static const struct vertex quad1[] = + { + { -1.0, 1.0, 0.33f, 0xff00ff00}, + { 1.0, 1.0, 0.33f, 0xff00ff00}, + { -1.0, -1.0, 0.33f, 0xff00ff00}, + { 1.0, -1.0, 0.33f, 0xff00ff00}, + }; + static const struct vertex quad2[] = + { + { -1.0, 1.0, 0.50f, 0xffff00ff}, + { 1.0, 1.0, 0.50f, 0xffff00ff}, + { -1.0, -1.0, 0.50f, 0xffff00ff}, + { 1.0, -1.0, 0.50f, 0xffff00ff}, + }; + static const struct vertex quad3[] = + { + { -1.0, 1.0, 0.66f, 0xffff0000}, + { 1.0, 1.0, 0.66f, 0xffff0000}, + { -1.0, -1.0, 0.66f, 0xffff0000}, + { 1.0, -1.0, 0.66f, 0xffff0000}, + }; + static const DWORD expected_colors[4][4] = + { + {0x000000ff, 0x000000ff, 0x0000ff00, 0x00ff0000}, + {0x000000ff, 0x000000ff, 0x0000ff00, 0x00ff0000}, + {0x0000ff00, 0x0000ff00, 0x0000ff00, 0x00ff0000}, + {0x00ff0000, 0x00ff0000, 0x00ff0000, 0x00ff0000}, + }; + + IDirect3DSurface8 *backbuffer, *rt1, *rt2, *rt3; + IDirect3DSurface8 *depth_stencil; + unsigned int i, j; + D3DVIEWPORT8 vp; + D3DCOLOR color; + HRESULT hr; + + vp.X = 0; + vp.Y = 0; + vp.Width = 640; + vp.Height = 480; + vp.MinZ = 0.0; + vp.MaxZ = 1.0; + + hr = IDirect3DDevice8_SetViewport(device, &vp); + ok(SUCCEEDED(hr), "SetViewport failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ZENABLE, D3DZB_TRUE); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ZWRITEENABLE, TRUE); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ZFUNC, D3DCMP_LESSEQUAL); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); + ok(SUCCEEDED(hr), "SetVertexShader failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_GetDepthStencilSurface(device, &depth_stencil); + ok(SUCCEEDED(hr), "GetDepthStencilSurface failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_GetRenderTarget(device, &backbuffer); + ok(SUCCEEDED(hr), "GetRenderTarget failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_CreateRenderTarget(device, 320, 240, D3DFMT_A8R8G8B8, + D3DMULTISAMPLE_NONE, FALSE, &rt1); + ok(SUCCEEDED(hr), "CreateRenderTarget failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_CreateRenderTarget(device, 480, 360, D3DFMT_A8R8G8B8, + D3DMULTISAMPLE_NONE, FALSE, &rt2); + ok(SUCCEEDED(hr), "CreateRenderTarget failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_CreateRenderTarget(device, 640, 480, D3DFMT_A8R8G8B8, + D3DMULTISAMPLE_NONE, FALSE, &rt3); + ok(SUCCEEDED(hr), "CreateRenderTarget failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderTarget(device, rt3, depth_stencil); + ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 0.0f, 0); + ok(SUCCEEDED(hr), "Clear failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderTarget(device, backbuffer, depth_stencil); + ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff0000ff, 1.0f, 0); + ok(SUCCEEDED(hr), "Clear failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderTarget(device, rt1, depth_stencil); + ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xffffffff, 0.0f, 0); + ok(SUCCEEDED(hr), "Clear failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderTarget(device, rt2, depth_stencil); + ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_BeginScene(device); + ok(SUCCEEDED(hr), "BeginScene failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad2, sizeof(*quad2)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_EndScene(device); + ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_SetRenderTarget(device, backbuffer, depth_stencil); + ok(SUCCEEDED(hr), "SetRenderTarget failed, hr %#x.\n", hr); + IDirect3DSurface8_Release(depth_stencil); + IDirect3DSurface8_Release(backbuffer); + IDirect3DSurface8_Release(rt3); + IDirect3DSurface8_Release(rt2); + IDirect3DSurface8_Release(rt1); + + hr = IDirect3DDevice8_SetRenderState(device, D3DRS_ZWRITEENABLE, FALSE); + ok(SUCCEEDED(hr), "SetRenderState failed, hr %#x.\n", hr); + + hr = IDirect3DDevice8_BeginScene(device); + ok(SUCCEEDED(hr), "BeginScene failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad1, sizeof(*quad1)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad3, sizeof(*quad3)); + ok(SUCCEEDED(hr), "DrawPrimitiveUP failed, hr %#x.\n", hr); + hr = IDirect3DDevice8_EndScene(device); + ok(SUCCEEDED(hr), "EndScene failed, hr %#x.\n", hr); + + for (i = 0; i < 4; ++i) + { + for (j = 0; j < 4; ++j) + { + unsigned int x = 80 * ((2 * j) + 1); + unsigned int y = 60 * ((2 * i) + 1); + color = getPixelColor(device, x, y); + ok(color_match(color, expected_colors[i][j], 0), + "Expected color 0x%08x at %u,%u, got 0x%08x.\n", expected_colors[i][j], x, y, color); + } + } + + hr = IDirect3DDevice8_Present(device, NULL, NULL, NULL, NULL); + ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr); +} + START_TEST(visual) { IDirect3DDevice8 *device_ptr; @@ -1495,6 +1630,7 @@ START_TEST(visual) p8_texture_test(device_ptr); texop_test(device_ptr); + depth_buffer_test(device_ptr); cleanup: if(device_ptr) {
1
0
0
0
← Newer
1
...
58
59
60
61
62
63
64
...
90
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Results per page:
10
25
50
100
200