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 2016
----- 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
750 discussions
Start a n
N
ew thread
Caron Wills : wined3d: Add Nvidia GeForce 830M.
by Alexandre Julliard
15 Apr '16
15 Apr '16
Module: wine Branch: master Commit: e184b81ce264d243c44bff3428149c21e838bf40 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e184b81ce264d243c44bff342…
Author: Caron Wills <caron(a)codeweavers.com> Date: Thu Apr 14 18:23:11 2016 +0000 wined3d: Add Nvidia GeForce 830M. Signed-off-by: Caron Wills <caron(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/directx.c | 2 ++ dlls/wined3d/wined3d_private.h | 1 + 2 files changed, 3 insertions(+) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index fa47125..8358930 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1286,6 +1286,7 @@ static const struct gpu_description gpu_description_table[] = {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX780TI, "NVIDIA GeForce GTX 780 Ti", DRIVER_NVIDIA_GEFORCE8, 3072}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTXTITAN, "NVIDIA GeForce GTX TITAN Black", DRIVER_NVIDIA_GEFORCE8, 6144}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_820M, "NVIDIA GeForce 820M", DRIVER_NVIDIA_GEFORCE8, 2048}, + {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_830M, "NVIDIA GeForce 830M", DRIVER_NVIDIA_GEFORCE8, 2048}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX860M, "NVIDIA GeForce GTX 860M", DRIVER_NVIDIA_GEFORCE8, 2048}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX950, "NVIDIA GeForce GTX 950", DRIVER_NVIDIA_GEFORCE8, 2048}, {HW_VENDOR_NVIDIA, CARD_NVIDIA_GEFORCE_GTX950M, "NVIDIA GeForce GTX 950M", DRIVER_NVIDIA_GEFORCE8, 4096}, @@ -1750,6 +1751,7 @@ cards_nvidia_binary[] = {"GTX 950M", CARD_NVIDIA_GEFORCE_GTX950M}, /* GeForce 900 - midend mobile */ {"GTX 950", CARD_NVIDIA_GEFORCE_GTX950}, /* GeForce 900 - midend */ {"GTX 860M", CARD_NVIDIA_GEFORCE_GTX860M}, /* GeForce 800 - mobile */ + {"GeForce 830M", CARD_NVIDIA_GEFORCE_830M}, /* GeForce 800 - mobile */ {"GeForce 820M", CARD_NVIDIA_GEFORCE_820M}, /* GeForce 800 - mobile */ {"GTX 780 Ti", CARD_NVIDIA_GEFORCE_GTX780TI}, /* Geforce 700 - highend */ {"GTX TITAN Black", CARD_NVIDIA_GEFORCE_GTXTITAN}, /* Geforce 700 - highend */ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 0f55d79..24515da 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1795,6 +1795,7 @@ enum wined3d_pci_device CARD_NVIDIA_GEFORCE_GTX780TI = 0x100a, CARD_NVIDIA_GEFORCE_GTXTITAN = 0x100c, CARD_NVIDIA_GEFORCE_820M = 0x0fed, + CARD_NVIDIA_GEFORCE_830M = 0x1340, CARD_NVIDIA_GEFORCE_GTX860M = 0x1392, /* Other PCI ID 0x119a */ CARD_NVIDIA_GEFORCE_GTX950 = 0x1402, CARD_NVIDIA_GEFORCE_GTX950M = 0x139a,
1
0
0
0
Sebastian Lackner : services: Initialize environment block immediately after startup.
by Alexandre Julliard
15 Apr '16
15 Apr '16
Module: wine Branch: master Commit: ce07a77610dec0f273912425dc68fc646a7f3624 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ce07a77610dec0f273912425d…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Fri Apr 15 10:03:52 2016 +0200 services: Initialize environment block immediately after startup. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- programs/services/services.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/programs/services/services.c b/programs/services/services.c index 8f53e7e..0f8615f 100644 --- a/programs/services/services.c +++ b/programs/services/services.c @@ -724,17 +724,6 @@ static DWORD service_start_process(struct service_entry *service_entry) service_lock(service_entry); - if (!env) - { - HANDLE htok; - - if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY|TOKEN_DUPLICATE, &htok)) - CreateEnvironmentBlock(&env, htok, FALSE); - - if (!env) - WINE_ERR("failed to create services environment\n"); - } - if ((err = get_service_binary_path(service_entry, &path))) { service_unlock(service_entry); @@ -976,9 +965,20 @@ static void load_registry_parameters(void) int main(int argc, char *argv[]) { static const WCHAR svcctl_started_event[] = SVCCTL_STARTED_EVENT; + HANDLE htok; DWORD err; g_hStartedEvent = CreateEventW(NULL, TRUE, FALSE, svcctl_started_event); + + if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY|TOKEN_DUPLICATE, &htok)) + { + CreateEnvironmentBlock(&env, htok, FALSE); + CloseHandle(htok); + } + + if (!env) + WINE_ERR("failed to create services environment\n"); + load_registry_parameters(); err = scmdatabase_create(&active_database); if (err != ERROR_SUCCESS)
1
0
0
0
Sebastian Lackner : kernel32/tests: Port stack commit tests to x86_64.
by Alexandre Julliard
15 Apr '16
15 Apr '16
Module: wine Branch: master Commit: 99130182bafe311b358ba7dc520b866c3f79124c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99130182bafe311b358ba7dc5…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Fri Apr 15 10:54:04 2016 +0200 kernel32/tests: Port stack commit tests to x86_64. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/virtual.c | 160 ++++++++++++++++++++++++------------------ 1 file changed, 90 insertions(+), 70 deletions(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index bfec2b9..5503e25 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -1805,6 +1805,93 @@ static void test_write_watch(void) VirtualFree( base, 0, MEM_RELEASE ); } +#if defined(__i386__) || defined(__x86_64__) + +static DWORD WINAPI stack_commit_func( void *arg ) +{ + volatile char *p = (char *)&p; + + /* trigger all guard pages, to ensure that the pages are committed */ + while (p >= (char *)NtCurrentTeb()->DeallocationStack + 4 * 0x1000) + { + p[0] |= 0; + p -= 0x1000; + } + + ok( arg == (void *)0xdeadbeef, "expected 0xdeadbeef, got %p\n", arg ); + return 42; +} + +static void test_stack_commit(void) +{ +#ifdef __i386__ + static const char code_call_on_stack[] = { + 0x55, /* pushl %ebp */ + 0x56, /* pushl %esi */ + 0x89, 0xe6, /* movl %esp,%esi */ + 0x8b, 0x4c, 0x24, 0x0c, /* movl 12(%esp),%ecx - func */ + 0x8b, 0x54, 0x24, 0x10, /* movl 16(%esp),%edx - arg */ + 0x8b, 0x44, 0x24, 0x14, /* movl 20(%esp),%eax - stack */ + 0x83, 0xe0, 0xf0, /* andl $~15,%eax */ + 0x83, 0xe8, 0x0c, /* subl $12,%eax */ + 0x89, 0xc4, /* movl %eax,%esp */ + 0x52, /* pushl %edx */ + 0x31, 0xed, /* xorl %ebp,%ebp */ + 0xff, 0xd1, /* call *%ecx */ + 0x89, 0xf4, /* movl %esi,%esp */ + 0x5e, /* popl %esi */ + 0x5d, /* popl %ebp */ + 0xc2, 0x0c, 0x00 }; /* ret $12 */ +#else + static const char code_call_on_stack[] = { + 0x55, /* pushq %rbp */ + 0x48, 0x89, 0xe5, /* movq %rsp,%rbp */ + /* %rcx - func, %rdx - arg, %r8 - stack */ + 0x48, 0x87, 0xca, /* xchgq %rcx,%rdx */ + 0x49, 0x83, 0xe0, 0xf0, /* andq $~15,%r8 */ + 0x49, 0x83, 0xe8, 0x20, /* subq $0x20,%r8 */ + 0x4c, 0x89, 0xc4, /* movq %r8,%rsp */ + 0xff, 0xd2, /* callq *%rdx */ + 0x48, 0x89, 0xec, /* movq %rbp,%rsp */ + 0x5d, /* popq %rbp */ + 0xc3 }; /* ret */ +#endif + DWORD (WINAPI *call_on_stack)( DWORD (WINAPI *func)(void *), void *arg, void *stack ); + void *old_stack, *old_stack_base, *old_stack_limit; + void *new_stack, *new_stack_base; + DWORD result; + + call_on_stack = VirtualAlloc( 0, 0x1000, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE ); + ok( call_on_stack != NULL, "VirtualAlloc failed %u\n", GetLastError() ); + memcpy( call_on_stack, code_call_on_stack, sizeof(code_call_on_stack) ); + + /* allocate a new stack, only the first guard page is committed */ + new_stack = VirtualAlloc( 0, 0x400000, MEM_RESERVE, PAGE_READWRITE ); + ok( new_stack != NULL, "VirtualAlloc failed %u\n", GetLastError() ); + new_stack_base = (char *)new_stack + 0x400000; + VirtualAlloc( (char *)new_stack_base - 0x1000, 0x1000, MEM_COMMIT, PAGE_READWRITE | PAGE_GUARD ); + + old_stack = NtCurrentTeb()->DeallocationStack; + old_stack_base = NtCurrentTeb()->Tib.StackBase; + old_stack_limit = NtCurrentTeb()->Tib.StackLimit; + + NtCurrentTeb()->DeallocationStack = new_stack; + NtCurrentTeb()->Tib.StackBase = new_stack_base; + NtCurrentTeb()->Tib.StackLimit = new_stack_base; + + result = call_on_stack( stack_commit_func, (void *)0xdeadbeef, new_stack_base ); + + NtCurrentTeb()->DeallocationStack = old_stack; + NtCurrentTeb()->Tib.StackBase = old_stack_base; + NtCurrentTeb()->Tib.StackLimit = old_stack_limit; + + ok( result == 42, "expected 42, got %u\n", result ); + + VirtualFree( new_stack, 0, MEM_RELEASE ); + VirtualFree( call_on_stack, 0, MEM_RELEASE ); +} + +#endif /* defined(__i386__) || defined(__x86_64__) */ #ifdef __i386__ static LONG num_guard_page_calls; @@ -2050,75 +2137,6 @@ static void test_guard_page(void) VirtualFree( base, 0, MEM_RELEASE ); } -static DWORD WINAPI stack_commit_func( void *arg ) -{ - volatile char *p = (char *)&p; - - /* trigger all guard pages, to ensure that the pages are committed */ - while (p >= (char *)NtCurrentTeb()->DeallocationStack + 3 * 0x1000) - { - p[0] |= 0; - p -= 0x1000; - } - - ok( arg == (void *)0xdeadbeef, "expected 0xdeadbeef, got %p\n", arg ); - return 42; -} - -static void test_stack_commit(void) -{ - static const char code_call_on_stack[] = { - 0x55, /* pushl %ebp */ - 0x56, /* pushl %esi */ - 0x89, 0xe6, /* movl %esp,%esi */ - 0x8b, 0x4c, 0x24, 0x0c, /* movl 12(%esp),%ecx - func */ - 0x8b, 0x54, 0x24, 0x10, /* movl 16(%esp),%edx - arg */ - 0x8b, 0x44, 0x24, 0x14, /* movl 20(%esp),%eax - stack */ - 0x83, 0xe0, 0xf0, /* andl $~15,%eax */ - 0x83, 0xe8, 0x0c, /* subl $12,%eax */ - 0x89, 0xc4, /* movl %eax,%esp */ - 0x52, /* pushl %edx */ - 0x31, 0xed, /* xorl %ebp,%ebp */ - 0xff, 0xd1, /* call *%ecx */ - 0x89, 0xf4, /* movl %esi,%esp */ - 0x5e, /* popl %esi */ - 0x5d, /* popl %ebp */ - 0xc2, 0x0c, 0x00 }; /* ret $12 */ - - DWORD (WINAPI *call_on_stack)( DWORD (WINAPI *func)(void *), void *arg, void *stack ); - void *old_stack, *old_stack_base, *old_stack_limit; - void *new_stack, *new_stack_base; - DWORD result; - - call_on_stack = VirtualAlloc( 0, 0x1000, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE ); - ok( call_on_stack != NULL, "VirtualAlloc failed %u\n", GetLastError() ); - memcpy( call_on_stack, code_call_on_stack, sizeof(code_call_on_stack) ); - - /* allocate a new stack, only the first guard page is committed */ - new_stack = VirtualAlloc( 0, 0x400000, MEM_RESERVE, PAGE_READWRITE ); - ok( new_stack != NULL, "VirtualAlloc failed %u\n", GetLastError() ); - new_stack_base = (char *)new_stack + 0x400000; - VirtualAlloc( (char *)new_stack_base - 0x1000, 0x1000, MEM_COMMIT, PAGE_READWRITE | PAGE_GUARD ); - - old_stack = NtCurrentTeb()->DeallocationStack; - old_stack_base = NtCurrentTeb()->Tib.StackBase; - old_stack_limit = NtCurrentTeb()->Tib.StackLimit; - - NtCurrentTeb()->DeallocationStack = new_stack; - NtCurrentTeb()->Tib.StackBase = new_stack_base; - NtCurrentTeb()->Tib.StackLimit = new_stack_base; - - result = call_on_stack( stack_commit_func, (void *)0xdeadbeef, new_stack_base ); - ok( result == 42, "expected 42, got %u\n", result ); - - NtCurrentTeb()->DeallocationStack = old_stack; - NtCurrentTeb()->Tib.StackBase = old_stack_base; - NtCurrentTeb()->Tib.StackLimit = old_stack_limit; - - VirtualFree( new_stack, 0, MEM_RELEASE ); - VirtualFree( call_on_stack, 0, MEM_RELEASE ); -} - static LONG num_execute_fault_calls; static DWORD execute_fault_seh_handler( EXCEPTION_RECORD *rec, EXCEPTION_REGISTRATION_RECORD *frame, @@ -3824,9 +3842,11 @@ START_TEST(virtual) test_IsBadWritePtr(); test_IsBadCodePtr(); test_write_watch(); +#if defined(__i386__) || defined(__x86_64__) + test_stack_commit(); +#endif #ifdef __i386__ test_guard_page(); - test_stack_commit(); /* The following tests should be executed as a last step, and in exactly this * order, since ATL thunk emulation cannot be enabled anymore on Windows. */ test_atl_thunk_emulation( MEM_EXECUTE_OPTION_ENABLE );
1
0
0
0
Sebastian Lackner : kernel32/tests: Use inline implementation of NtCurrentTeb for virtual tests.
by Alexandre Julliard
15 Apr '16
15 Apr '16
Module: wine Branch: master Commit: 2aee9b1ee3343c9711869562bb538c6076bb2dd4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2aee9b1ee3343c9711869562b…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Fri Apr 15 10:53:38 2016 +0200 kernel32/tests: Use inline implementation of NtCurrentTeb for virtual tests. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/kernel32/tests/virtual.c | 76 ++++++++++++++++--------------------------- 1 file changed, 28 insertions(+), 48 deletions(-) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c index 1a8fd6f..bfec2b9 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c @@ -43,7 +43,6 @@ static UINT (WINAPI *pResetWriteWatch)(LPVOID,SIZE_T); static NTSTATUS (WINAPI *pNtAreMappedFilesTheSame)(PVOID,PVOID); static NTSTATUS (WINAPI *pNtMapViewOfSection)(HANDLE, HANDLE, PVOID *, ULONG, SIZE_T, const LARGE_INTEGER *, SIZE_T *, ULONG, ULONG, ULONG); static DWORD (WINAPI *pNtUnmapViewOfSection)(HANDLE, PVOID); -static struct _TEB * (WINAPI *pNtCurrentTeb)(void); static PVOID (WINAPI *pRtlAddVectoredExceptionHandler)(ULONG, PVECTORED_EXCEPTION_HANDLER); static ULONG (WINAPI *pRtlRemoveVectoredExceptionHandler)(PVOID); static BOOL (WINAPI *pGetProcessDEPPolicy)(HANDLE, LPDWORD, PBOOL); @@ -1838,12 +1837,6 @@ static void test_guard_page(void) BOOL success; char *base; - if (!pNtCurrentTeb) - { - win_skip( "NtCurrentTeb not supported\n" ); - return; - } - size = 0x1000; base = VirtualAlloc( 0, size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE | PAGE_GUARD ); ok( base != NULL, "VirtualAlloc failed %u\n", GetLastError() ); @@ -1906,8 +1899,8 @@ static void test_guard_page(void) /* test directly accessing the memory - we need to setup an exception handler first */ frame.Handler = guard_page_handler; - frame.Prev = pNtCurrentTeb()->Tib.ExceptionList; - pNtCurrentTeb()->Tib.ExceptionList = &frame; + frame.Prev = NtCurrentTeb()->Tib.ExceptionList; + NtCurrentTeb()->Tib.ExceptionList = &frame; InterlockedExchange( &num_guard_page_calls, 0 ); InterlockedExchange( &old_value, *value ); /* exception handler increments value by 0x100 */ @@ -1915,7 +1908,7 @@ static void test_guard_page(void) ok( old_value == 0x101, "memory block contains wrong value, expected 0x101, got 0x%x\n", old_value ); ok( num_guard_page_calls == 1, "expected one callback of guard page handler, got %d calls\n", num_guard_page_calls ); - pNtCurrentTeb()->Tib.ExceptionList = frame.Prev; + NtCurrentTeb()->Tib.ExceptionList = frame.Prev; /* check info structure again, PAGE_GUARD should be removed now */ ret = VirtualQuery( base, &info, sizeof(info) ); @@ -1928,8 +1921,8 @@ static void test_guard_page(void) /* test accessing second integer in memory */ frame.Handler = guard_page_handler; - frame.Prev = pNtCurrentTeb()->Tib.ExceptionList; - pNtCurrentTeb()->Tib.ExceptionList = &frame; + frame.Prev = NtCurrentTeb()->Tib.ExceptionList; + NtCurrentTeb()->Tib.ExceptionList = &frame; InterlockedExchange( &num_guard_page_calls, 0 ); old_value = *(value + 1); @@ -1937,7 +1930,7 @@ static void test_guard_page(void) ok( *value == 2, "memory block contains wrong value, expected 2, got 0x%x\n", *value ); ok( num_guard_page_calls == 1, "expected one callback of guard page handler, got %d calls\n", num_guard_page_calls ); - pNtCurrentTeb()->Tib.ExceptionList = frame.Prev; + NtCurrentTeb()->Tib.ExceptionList = frame.Prev; success = VirtualLock( base, size ); ok( success, "VirtualLock failed %u\n", GetLastError() ); @@ -1982,15 +1975,15 @@ static void test_guard_page(void) /* writing to a page should trigger should trigger guard page, even if write watch is set */ frame.Handler = guard_page_handler; - frame.Prev = pNtCurrentTeb()->Tib.ExceptionList; - pNtCurrentTeb()->Tib.ExceptionList = &frame; + frame.Prev = NtCurrentTeb()->Tib.ExceptionList; + NtCurrentTeb()->Tib.ExceptionList = &frame; InterlockedExchange( &num_guard_page_calls, 0 ); *value = 1; *(value + 1) = 2; ok( num_guard_page_calls == 1, "expected one callback of guard page handler, got %d calls\n", num_guard_page_calls ); - pNtCurrentTeb()->Tib.ExceptionList = frame.Prev; + NtCurrentTeb()->Tib.ExceptionList = frame.Prev; count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); @@ -2003,8 +1996,8 @@ static void test_guard_page(void) /* write watch is triggered from inside of the guard page handler */ frame.Handler = guard_page_handler; - frame.Prev = pNtCurrentTeb()->Tib.ExceptionList; - pNtCurrentTeb()->Tib.ExceptionList = &frame; + frame.Prev = NtCurrentTeb()->Tib.ExceptionList; + NtCurrentTeb()->Tib.ExceptionList = &frame; InterlockedExchange( &num_guard_page_calls, 0 ); old_value = *(value + 1); /* doesn't trigger write watch */ @@ -2012,7 +2005,7 @@ static void test_guard_page(void) ok( *value == 1, "memory block contains wrong value, expected 1, got 0x%x\n", *value ); ok( num_guard_page_calls == 1, "expected one callback of guard page handler, got %d calls\n", num_guard_page_calls ); - pNtCurrentTeb()->Tib.ExceptionList = frame.Prev; + NtCurrentTeb()->Tib.ExceptionList = frame.Prev; count = 64; ret = pGetWriteWatch( WRITE_WATCH_FLAG_RESET, base, size, results, &count, &pagesize ); @@ -2062,7 +2055,7 @@ static DWORD WINAPI stack_commit_func( void *arg ) volatile char *p = (char *)&p; /* trigger all guard pages, to ensure that the pages are committed */ - while (p >= (char *)pNtCurrentTeb()->DeallocationStack + 3 * 0x1000) + while (p >= (char *)NtCurrentTeb()->DeallocationStack + 3 * 0x1000) { p[0] |= 0; p -= 0x1000; @@ -2097,12 +2090,6 @@ static void test_stack_commit(void) void *new_stack, *new_stack_base; DWORD result; - if (!pNtCurrentTeb) - { - win_skip( "NtCurrentTeb not supported\n" ); - return; - } - call_on_stack = VirtualAlloc( 0, 0x1000, MEM_RESERVE | MEM_COMMIT, PAGE_EXECUTE_READWRITE ); ok( call_on_stack != NULL, "VirtualAlloc failed %u\n", GetLastError() ); memcpy( call_on_stack, code_call_on_stack, sizeof(code_call_on_stack) ); @@ -2113,20 +2100,20 @@ static void test_stack_commit(void) new_stack_base = (char *)new_stack + 0x400000; VirtualAlloc( (char *)new_stack_base - 0x1000, 0x1000, MEM_COMMIT, PAGE_READWRITE | PAGE_GUARD ); - old_stack = pNtCurrentTeb()->DeallocationStack; - old_stack_base = pNtCurrentTeb()->Tib.StackBase; - old_stack_limit = pNtCurrentTeb()->Tib.StackLimit; + old_stack = NtCurrentTeb()->DeallocationStack; + old_stack_base = NtCurrentTeb()->Tib.StackBase; + old_stack_limit = NtCurrentTeb()->Tib.StackLimit; - pNtCurrentTeb()->DeallocationStack = new_stack; - pNtCurrentTeb()->Tib.StackBase = new_stack_base; - pNtCurrentTeb()->Tib.StackLimit = new_stack_base; + NtCurrentTeb()->DeallocationStack = new_stack; + NtCurrentTeb()->Tib.StackBase = new_stack_base; + NtCurrentTeb()->Tib.StackLimit = new_stack_base; result = call_on_stack( stack_commit_func, (void *)0xdeadbeef, new_stack_base ); ok( result == 42, "expected 42, got %u\n", result ); - pNtCurrentTeb()->DeallocationStack = old_stack; - pNtCurrentTeb()->Tib.StackBase = old_stack_base; - pNtCurrentTeb()->Tib.StackLimit = old_stack_limit; + NtCurrentTeb()->DeallocationStack = old_stack; + NtCurrentTeb()->Tib.StackBase = old_stack_base; + NtCurrentTeb()->Tib.StackLimit = old_stack_limit; VirtualFree( new_stack, 0, MEM_RELEASE ); VirtualFree( call_on_stack, 0, MEM_RELEASE ); @@ -2211,14 +2198,14 @@ static inline DWORD send_message_excpt( HWND hWnd, UINT uMsg, WPARAM wParam, LPA DWORD ret; frame.Handler = execute_fault_seh_handler; - frame.Prev = pNtCurrentTeb()->Tib.ExceptionList; - pNtCurrentTeb()->Tib.ExceptionList = &frame; + frame.Prev = NtCurrentTeb()->Tib.ExceptionList; + NtCurrentTeb()->Tib.ExceptionList = &frame; InterlockedExchange( &num_guard_page_calls, 0 ); InterlockedExchange( &num_execute_fault_calls, 0 ); ret = SendMessageA( hWnd, uMsg, wParam, lParam ); - pNtCurrentTeb()->Tib.ExceptionList = frame.Prev; + NtCurrentTeb()->Tib.ExceptionList = frame.Prev; return ret; } @@ -2229,14 +2216,14 @@ static inline DWORD call_proc_excpt( DWORD (CALLBACK *code)(void *), void *arg ) DWORD ret; frame.Handler = execute_fault_seh_handler; - frame.Prev = pNtCurrentTeb()->Tib.ExceptionList; - pNtCurrentTeb()->Tib.ExceptionList = &frame; + frame.Prev = NtCurrentTeb()->Tib.ExceptionList; + NtCurrentTeb()->Tib.ExceptionList = &frame; InterlockedExchange( &num_guard_page_calls, 0 ); InterlockedExchange( &num_execute_fault_calls, 0 ); ret = code( arg ); - pNtCurrentTeb()->Tib.ExceptionList = frame.Prev; + NtCurrentTeb()->Tib.ExceptionList = frame.Prev; return ret; } @@ -2283,12 +2270,6 @@ static void test_atl_thunk_emulation( ULONG dep_flags ) char *base; HWND hWnd; - if (!pNtCurrentTeb) - { - win_skip( "NtCurrentTeb not supported\n" ); - return; - } - trace( "Running DEP tests with ProcessExecuteFlags = %d\n", dep_flags ); NtQueryInformationProcess( GetCurrentProcess(), ProcessExecuteFlags, &old_flags, sizeof(old_flags), NULL ); @@ -3819,7 +3800,6 @@ START_TEST(virtual) pNtAreMappedFilesTheSame = (void *)GetProcAddress( hntdll, "NtAreMappedFilesTheSame" ); pNtMapViewOfSection = (void *)GetProcAddress( hntdll, "NtMapViewOfSection" ); pNtUnmapViewOfSection = (void *)GetProcAddress( hntdll, "NtUnmapViewOfSection" ); - pNtCurrentTeb = (void *)GetProcAddress( hntdll, "NtCurrentTeb" ); pRtlAddVectoredExceptionHandler = (void *)GetProcAddress( hntdll, "RtlAddVectoredExceptionHandler" ); pRtlRemoveVectoredExceptionHandler = (void *)GetProcAddress( hntdll, "RtlRemoveVectoredExceptionHandler" ); pNtProtectVirtualMemory = (void *)GetProcAddress( hntdll, "NtProtectVirtualMemory" );
1
0
0
0
Sebastian Lackner : ntdll: Handle stack guard pages on x86_64.
by Alexandre Julliard
15 Apr '16
15 Apr '16
Module: wine Branch: master Commit: d25ae3ca25c177f659eb0cd54e3d171b048811f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d25ae3ca25c177f659eb0cd54…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Fri Apr 15 10:52:17 2016 +0200 ntdll: Handle stack guard pages on x86_64. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/signal_x86_64.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/signal_x86_64.c b/dlls/ntdll/signal_x86_64.c index a79fd6e..ca3e6ca 100644 --- a/dlls/ntdll/signal_x86_64.c +++ b/dlls/ntdll/signal_x86_64.c @@ -2587,9 +2587,27 @@ static inline BOOL handle_interrupt( unsigned int interrupt, EXCEPTION_RECORD *r */ static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext ) { - EXCEPTION_RECORD *rec = setup_exception( sigcontext, raise_segv_exception ); + EXCEPTION_RECORD *rec; ucontext_t *ucontext = sigcontext; + /* check for page fault inside the thread stack */ + if (TRAP_sig(ucontext) == TRAP_x86_PAGEFLT && + (char *)siginfo->si_addr >= (char *)NtCurrentTeb()->DeallocationStack && + (char *)siginfo->si_addr < (char *)NtCurrentTeb()->Tib.StackBase && + virtual_handle_stack_fault( siginfo->si_addr )) + { + /* check if this was the last guard page */ + if ((char *)siginfo->si_addr < (char *)NtCurrentTeb()->DeallocationStack + 2*4096) + { + rec = setup_exception( sigcontext, raise_segv_exception ); + rec->ExceptionCode = EXCEPTION_STACK_OVERFLOW; + } + return; + } + + rec = setup_exception( sigcontext, raise_segv_exception ); + if (rec->ExceptionCode == EXCEPTION_STACK_OVERFLOW) return; + switch(TRAP_sig(ucontext)) { case TRAP_x86_OFLOW: /* Overflow exception */
1
0
0
0
Nikolay Sivov : dwrite/tests: Test for superscript/subscript font metrics.
by Alexandre Julliard
15 Apr '16
15 Apr '16
Module: wine Branch: master Commit: c7a174f76b1761529a0bb470635783856cef574b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c7a174f76b1761529a0bb4706…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Apr 14 23:22:56 2016 +0300 dwrite/tests: Test for superscript/subscript font metrics. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/tests/font.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 9687dc5..5d8a4ca 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -1575,6 +1575,15 @@ static void get_expected_font_metrics(IDWriteFontFace *fontface, DWRITE_FONT_MET metrics->strikethroughPosition = GET_BE_WORD(tt_os2->yStrikeoutPosition); metrics->strikethroughThickness = GET_BE_WORD(tt_os2->yStrikeoutSize); + + metrics->subscriptPositionX = GET_BE_WORD(tt_os2->ySubscriptXOffset); + metrics->subscriptPositionY = -GET_BE_WORD(tt_os2->ySubscriptYOffset); + metrics->subscriptSizeX = GET_BE_WORD(tt_os2->ySubscriptXSize); + metrics->subscriptSizeY = GET_BE_WORD(tt_os2->ySubscriptYSize); + metrics->superscriptPositionX = GET_BE_WORD(tt_os2->ySuperscriptXOffset); + metrics->superscriptPositionY = GET_BE_WORD(tt_os2->ySuperscriptYOffset); + metrics->superscriptSizeX = GET_BE_WORD(tt_os2->ySuperscriptXSize); + metrics->superscriptSizeY = GET_BE_WORD(tt_os2->ySuperscriptYSize); } if (tt_post) { @@ -1631,6 +1640,23 @@ static void check_font_metrics(const WCHAR *nameW, BOOL has_metrics1, const DWRI m1->glyphBoxRight, expected->glyphBoxRight); ok(m1->glyphBoxBottom == expected->glyphBoxBottom, "font %s: glyphBoxBottom %d, expected %d\n", wine_dbgstr_w(nameW), m1->glyphBoxBottom, expected->glyphBoxBottom); + + ok(m1->subscriptPositionX == expected->subscriptPositionX, "font %s: subscriptPositionX %d, expected %d\n", + wine_dbgstr_w(nameW), m1->subscriptPositionX, expected->subscriptPositionX); + ok(m1->subscriptPositionY == expected->subscriptPositionY, "font %s: subscriptPositionY %d, expected %d\n", + wine_dbgstr_w(nameW), m1->subscriptPositionY, expected->subscriptPositionY); + ok(m1->subscriptSizeX == expected->subscriptSizeX, "font %s: subscriptSizeX %d, expected %d\n", + wine_dbgstr_w(nameW), m1->subscriptSizeX, expected->subscriptSizeX); + ok(m1->subscriptSizeY == expected->subscriptSizeY, "font %s: subscriptSizeY %d, expected %d\n", + wine_dbgstr_w(nameW), m1->subscriptSizeY, expected->subscriptSizeY); + ok(m1->superscriptPositionX == expected->superscriptPositionX, "font %s: superscriptPositionX %d, expected %d\n", + wine_dbgstr_w(nameW), m1->superscriptPositionX, expected->superscriptPositionX); + ok(m1->superscriptPositionY == expected->superscriptPositionY, "font %s: superscriptPositionY %d, expected %d\n", + wine_dbgstr_w(nameW), m1->superscriptPositionY, expected->superscriptPositionY); + ok(m1->superscriptSizeX == expected->superscriptSizeX, "font %s: superscriptSizeX %d, expected %d\n", + wine_dbgstr_w(nameW), m1->superscriptSizeX, expected->superscriptSizeX); + ok(m1->superscriptSizeY == expected->superscriptSizeY, "font %s: superscriptSizeY %d, expected %d\n", + wine_dbgstr_w(nameW), m1->superscriptSizeY, expected->superscriptSizeY); } }
1
0
0
0
Michael Müller : compobj.dll16: Fix implementation of StringFromGUID2.
by Alexandre Julliard
15 Apr '16
15 Apr '16
Module: wine Branch: master Commit: 7e1d1aa573c438aa3bf80595723167b1ff0a31a6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7e1d1aa573c438aa3bf805957…
Author: Michael Müller <michael(a)fds-team.de> Date: Thu Apr 14 21:01:03 2016 +0200 compobj.dll16: Fix implementation of StringFromGUID2. Signed-off-by: Michael Müller <michael(a)fds-team.de> Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/compobj.dll16/compobj.c | 10 ++++++++-- dlls/compobj.dll16/compobj.dll16.spec | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dlls/compobj.dll16/compobj.c b/dlls/compobj.dll16/compobj.c index 6261c13..b934a06 100644 --- a/dlls/compobj.dll16/compobj.c +++ b/dlls/compobj.dll16/compobj.c @@ -54,6 +54,7 @@ typedef LPCSTR LPCOLESTR16; #define STDMETHOD16(m) HRESULT (STDMETHOD16CALLTYPE *m) #define STDMETHOD16_(t,m) t (STDMETHOD16CALLTYPE *m) +#define CHARS_IN_GUID 39 /*********************************************************************** * IMalloc16 interface @@ -689,9 +690,14 @@ HRESULT WINAPI CLSIDFromProgID16(LPCOLESTR16 progid, LPCLSID riid) /****************************************************************************** * StringFromGUID2 [COMPOBJ.76] */ -INT WINAPI StringFromGUID216(REFGUID id, LPOLESTR str, INT cmax) +INT16 WINAPI StringFromGUID216(REFGUID id, LPOLESTR16 str, INT16 cmax) { - return StringFromGUID2( id, str, cmax ); + static const char format[] = "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"; + if (!id || cmax < CHARS_IN_GUID) return 0; + sprintf( str, format, id->Data1, id->Data2, id->Data3, + id->Data4[0], id->Data4[1], id->Data4[2], id->Data4[3], + id->Data4[4], id->Data4[5], id->Data4[6], id->Data4[7] ); + return CHARS_IN_GUID; } diff --git a/dlls/compobj.dll16/compobj.dll16.spec b/dlls/compobj.dll16/compobj.dll16.spec index d3022ae..03cf925 100644 --- a/dlls/compobj.dll16/compobj.dll16.spec +++ b/dlls/compobj.dll16/compobj.dll16.spec @@ -72,7 +72,7 @@ 72 stub _IID_IEXTERNALCONNECTION 73 pascal CoCreateGuid(ptr) CoCreateGuid16 75 stub FNASSERT -76 pascal StringFromGUID2(ptr ptr word) StringFromGUID216 +76 pascal -ret16 StringFromGUID2(ptr ptr word) StringFromGUID216 77 stub COGETCLASSEXT 78 stub OLE1CLASSFROMCLSID2 79 stub CLSIDFROMOLE1CLASS
1
0
0
0
Dmitry Timoshkov : windowscodecs: Allocate correct amount of memory for PNG image data.
by Alexandre Julliard
15 Apr '16
15 Apr '16
Module: wine Branch: master Commit: 2f74d91d87b20d6f3e131b1afcedb646329ab1af URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f74d91d87b20d6f3e131b1af…
Author: Dmitry Timoshkov <dmitry(a)baikal.ru> Date: Thu Apr 14 18:47:50 2016 +0200 windowscodecs: Allocate correct amount of memory for PNG image data. Signed-off-by: Dmitry Timoshkov <dmitry(a)baikal.ru> Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/windowscodecs/pngformat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/windowscodecs/pngformat.c b/dlls/windowscodecs/pngformat.c index cd9165b..3eb4d0e 100644 --- a/dlls/windowscodecs/pngformat.c +++ b/dlls/windowscodecs/pngformat.c @@ -664,7 +664,7 @@ static HRESULT WINAPI PngDecoder_Initialize(IWICBitmapDecoder *iface, IStream *p /* read the image data */ This->width = ppng_get_image_width(This->png_ptr, This->info_ptr); This->height = ppng_get_image_height(This->png_ptr, This->info_ptr); - This->stride = This->width * This->bpp; + This->stride = (This->width * This->bpp + 7) / 8; image_size = This->stride * This->height; This->image_bits = HeapAlloc(GetProcessHeap(), 0, image_size);
1
0
0
0
Stefan Dösinger : wined3d: Explicitly pass a wined3d_state structure to context_apply_draw_state().
by Alexandre Julliard
15 Apr '16
15 Apr '16
Module: wine Branch: master Commit: aad6fb4a424d3ae1952da1633073ff9a9b3abf82 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aad6fb4a424d3ae1952da1633…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Apr 14 19:32:50 2016 +0200 wined3d: Explicitly pass a wined3d_state structure to context_apply_draw_state(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/context.c | 4 ++-- dlls/wined3d/drawprim.c | 2 +- dlls/wined3d/wined3d_private.h | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index d683327..3cd7c8c 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -3318,9 +3318,9 @@ static void context_bind_shader_resources(struct wined3d_context *context, const } /* Context activation is done by the caller. */ -BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_device *device) +BOOL context_apply_draw_state(struct wined3d_context *context, + const struct wined3d_device *device, const struct wined3d_state *state) { - const struct wined3d_state *state = &device->state; const struct StateEntry *state_table = context->state_table; const struct wined3d_fb_state *fb = state->fb; unsigned int i; diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c index 6857b0d..bd62b68 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -488,7 +488,7 @@ void draw_primitive(struct wined3d_device *device, const struct wined3d_state *s wined3d_surface_prepare(ds, context, location); } - if (!context_apply_draw_state(context, device)) + if (!context_apply_draw_state(context, device, state)) { context_release(context); WARN("Unable to apply draw state, skipping draw.\n"); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 7c3ea65..0f55d79 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1582,7 +1582,8 @@ void context_alloc_occlusion_query(struct wined3d_context *context, void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN; BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_state *state, UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN; -BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_device *device) DECLSPEC_HIDDEN; +BOOL context_apply_draw_state(struct wined3d_context *context, + const struct wined3d_device *device, const struct wined3d_state *state) DECLSPEC_HIDDEN; void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target, struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN; void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info,
1
0
0
0
Henri Verbeet : wined3d: Check texture usage/pool in volumetexture_init().
by Alexandre Julliard
15 Apr '16
15 Apr '16
Module: wine Branch: master Commit: 5eedb704f18d555b0252f31053ac6859a1ff16a5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5eedb704f18d555b0252f3105…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Apr 14 19:32:49 2016 +0200 wined3d: Check texture usage/pool in volumetexture_init(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/texture.c | 7 +++++++ dlls/wined3d/volume.c | 9 --------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 52b026b..0f29367 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1850,6 +1850,13 @@ static HRESULT volumetexture_init(struct wined3d_texture *texture, const struct } } + if (desc->usage & WINED3DUSAGE_DYNAMIC && (desc->pool == WINED3D_POOL_MANAGED + || desc->pool == WINED3D_POOL_SCRATCH)) + { + WARN("Attempted to create a DYNAMIC texture in pool %s.\n", debug_d3dpool(desc->pool)); + return WINED3DERR_INVALIDCALL; + } + if (!gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO]) { UINT pow2_w, pow2_h, pow2_d; diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index cb60a24..643969c 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -441,15 +441,6 @@ HRESULT wined3d_volume_init(struct wined3d_volume *volume, struct wined3d_textur HRESULT hr; UINT size; - /* TODO: Write tests for other resources and move this check - * to resource_init, if applicable. */ - if (desc->usage & WINED3DUSAGE_DYNAMIC - && (desc->pool == WINED3D_POOL_MANAGED || desc->pool == WINED3D_POOL_SCRATCH)) - { - WARN("Attempted to create a DYNAMIC texture in pool %s.\n", debug_d3dpool(desc->pool)); - return WINED3DERR_INVALIDCALL; - } - size = wined3d_format_calculate_size(format, device->surface_alignment, desc->width, desc->height, desc->depth); if (FAILED(hr = resource_init(&volume->resource, device, WINED3D_RTYPE_VOLUME, format,
1
0
0
0
← Newer
1
...
33
34
35
36
37
38
39
...
75
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
Results per page:
10
25
50
100
200