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
March 2019
----- 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
1097 discussions
Start a n
N
ew thread
Alexandre Julliard : libwine: Move wctype tables to libwine_port.
by Alexandre Julliard
25 Mar '19
25 Mar '19
Module: wine Branch: master Commit: a67dca1bc814900189912bda837d9ea881d7474e URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a67dca1bc814900189912bda…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Sat Mar 23 13:35:33 2019 +0100 libwine: Move wctype tables to libwine_port. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- include/wine/unicode.h | 2 +- libs/port/Makefile.in | 3 ++- libs/{wine => port}/wctype.c | 2 +- libs/wine/Makefile.in | 3 +-- tools/make_unicode | 6 +++--- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/wine/unicode.h b/include/wine/unicode.h index a4b483a..de3ac56 100644 --- a/include/wine/unicode.h +++ b/include/wine/unicode.h @@ -138,7 +138,7 @@ WINE_UNICODE_INLINE WCHAR toupperW( WCHAR ch ) /* and the C2_* type in the high 4 bits */ WINE_UNICODE_INLINE unsigned short get_char_typeW( WCHAR ch ) { - extern WINE_UNICODE_API const unsigned short wine_wctype_table[]; + extern const unsigned short wine_wctype_table[]; return wine_wctype_table[wine_wctype_table[ch >> 8] + (ch & 0xff)]; } diff --git a/libs/port/Makefile.in b/libs/port/Makefile.in index 86b9022..45ce182 100644 --- a/libs/port/Makefile.in +++ b/libs/port/Makefile.in @@ -102,4 +102,5 @@ C_SRCS = \ symlink.c \ usleep.c \ utf8.c \ - wctomb.c + wctomb.c \ + wctype.c diff --git a/libs/wine/wctype.c b/libs/port/wctype.c similarity index 99% rename from libs/wine/wctype.c rename to libs/port/wctype.c index 4153cb8..bb0eab5 100644 --- a/libs/wine/wctype.c +++ b/libs/port/wctype.c @@ -3,7 +3,7 @@ #include "wine/unicode.h" -const unsigned short wine_wctype_table[17152] = +const unsigned short DECLSPEC_HIDDEN wine_wctype_table[17152] = { /* offsets */ 0x0100, 0x0200, 0x0300, 0x0400, 0x0500, 0x0600, 0x0700, 0x0800, diff --git a/libs/wine/Makefile.in b/libs/wine/Makefile.in index 4833eb5..e544d99 100644 --- a/libs/wine/Makefile.in +++ b/libs/wine/Makefile.in @@ -11,8 +11,7 @@ C_SRCS = \ mmap.c \ port.c \ sortkey.c \ - string.c \ - wctype.c + string.c EXTRA_OBJS = version.o diff --git a/tools/make_unicode b/tools/make_unicode index bbd26e4..d674570 100755 --- a/tools/make_unicode +++ b/tools/make_unicode @@ -1891,7 +1891,7 @@ sub dump_simple_mapping($$@) my $def = shift; my @array = compress_array( 256, $def, @_[0..65535] ); - printf OUTPUT "const unsigned short %s[%d] =\n{\n", $name, $#array+1; + printf OUTPUT "const unsigned short DECLSPEC_HIDDEN %s[%d] =\n{\n", $name, $#array+1; printf OUTPUT " /* offsets */\n%s,\n", DUMP_ARRAY( "0x%04x", 0, @array[0..255] ); printf OUTPUT " /* values */\n%s\n};\n", DUMP_ARRAY( "0x%04x", 0, @array[256..$#array] ); } @@ -2178,7 +2178,7 @@ sub dump_nameprep($) ################################################################ # dump the ctype tables -sub DUMP_CTYPE_TABLES($) +sub dump_ctype_tables($) { my $filename = shift; open OUTPUT,">$filename.new" or die "Cannot create $filename"; @@ -2770,7 +2770,7 @@ DUMP_CASE_MAPPINGS( "libs/wine/casemap.c" ); DUMP_SORTKEYS( "libs/wine/collation.c", READ_SORTKEYS_FILE() ); dump_compose_table( "libs/port/compose.c" ); dump_decompose_table( "libs/port/decompose.c" ); -DUMP_CTYPE_TABLES( "libs/wine/wctype.c" ); +dump_ctype_tables( "libs/port/wctype.c" ); dump_digit_folding( "libs/port/digitmap.c" ); dump_combining_class( "libs/port/combclass.c" ); dump_mirroring( "dlls/usp10/mirror.c" );
1
0
0
0
Derek Lesho : ntoskrnl.exe: Update the tick count in KUSER_SHARED_DATA when accessed.
by Alexandre Julliard
22 Mar '19
22 Mar '19
Module: wine Branch: master Commit: c988910caeebfd1415ad4d036964a67078493e46 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=c988910caeebfd1415ad4d03…
Author: Derek Lesho <dereklesho52(a)gmail.com> Date: Thu Mar 21 00:23:09 2019 -0400 ntoskrnl.exe: Update the tick count in KUSER_SHARED_DATA when accessed. EasyAntiCheat.sys constantly reads this value, so I think keeping it up-to-date is a good idea. Signed-off-by: Derek Lesho <dereklesho52(a)Gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/instr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dlls/ntoskrnl.exe/instr.c b/dlls/ntoskrnl.exe/instr.c index 90a63b0..d5d197d 100644 --- a/dlls/ntoskrnl.exe/instr.c +++ b/dlls/ntoskrnl.exe/instr.c @@ -26,6 +26,7 @@ #include <stdarg.h> +#define NONAMELESSUNION #include "windef.h" #include "winbase.h" #include "winternl.h" @@ -594,6 +595,15 @@ static void fake_syscall_function(void) } +static void update_shared_data(void) +{ + struct _KUSER_SHARED_DATA *shared_data = (struct _KUSER_SHARED_DATA *)wine_user_shared_data; + + shared_data->u.TickCountQuad = GetTickCount64(); + shared_data->u.TickCount.High2Time = shared_data->u.TickCount.High1Time; +} + + /*********************************************************************** * emulate_instruction * @@ -794,6 +804,7 @@ static DWORD emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context ) if (offset <= sizeof(KSHARED_USER_DATA) - data_size) { ULONGLONG temp = 0; + update_shared_data(); memcpy( &temp, wine_user_shared_data + offset, data_size ); store_reg_word( context, instr[2], (BYTE *)&temp, long_op, rex ); context->Rip += prefixlen + len + 2; @@ -814,6 +825,7 @@ static DWORD emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context ) if (offset <= sizeof(KSHARED_USER_DATA) - data_size) { + update_shared_data(); switch (*instr) { case 0x8a: store_reg_byte( context, instr[1], wine_user_shared_data + offset, rex ); break; @@ -835,6 +847,7 @@ static DWORD emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context ) if (offset <= sizeof(KSHARED_USER_DATA) - data_size) { + update_shared_data(); memcpy( &context->Rax, wine_user_shared_data + offset, data_size ); context->Rip += prefixlen + len + 1; return ExceptionContinueExecution;
1
0
0
0
Derek Lesho : ntoskrnl.exe: Add emulation of rdmsr for MSR_LSTAR control register.
by Alexandre Julliard
22 Mar '19
22 Mar '19
Module: wine Branch: master Commit: e7863eaa4e401aa98c3946daae0a2607fbd72ab4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=e7863eaa4e401aa98c3946da…
Author: Derek Lesho <dereklesho52(a)gmail.com> Date: Thu Mar 21 11:10:08 2019 -0400 ntoskrnl.exe: Add emulation of rdmsr for MSR_LSTAR control register. Signed-off-by: Derek Lesho <dereklesho52(a)Gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntoskrnl.exe/instr.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/dlls/ntoskrnl.exe/instr.c b/dlls/ntoskrnl.exe/instr.c index 67cdd32..90a63b0 100644 --- a/dlls/ntoskrnl.exe/instr.c +++ b/dlls/ntoskrnl.exe/instr.c @@ -473,6 +473,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(int); #define REX_R 4 #define REX_W 8 +#define MSR_LSTAR 0xc0000082 + #define REGMODRM_MOD( regmodrm, rex ) ((regmodrm) >> 6) #define REGMODRM_REG( regmodrm, rex ) (((regmodrm) >> 3) & 7) | (((rex) & REX_R) ? 8 : 0) #define REGMODRM_RM( regmodrm, rex ) (((regmodrm) & 7) | (((rex) & REX_B) ? 8 : 0)) @@ -586,6 +588,12 @@ static BYTE *INSTR_GetOperandAddr( CONTEXT *context, BYTE *instr, } +static void fake_syscall_function(void) +{ + TRACE("() stub\n"); +} + + /*********************************************************************** * emulate_instruction * @@ -757,6 +765,24 @@ static DWORD emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context ) context->Rip += prefixlen + 3; return ExceptionContinueExecution; } + case 0x32: /* rdmsr */ + { + ULONG reg = context->Rcx; + TRACE("rdmsr CR 0x%08x\n", reg); + switch (reg) + { + case MSR_LSTAR: + { + ULONG_PTR syscall_address = (ULONG_PTR)fake_syscall_function; + context->Rdx = (ULONG)(syscall_address >> 32); + context->Rax = (ULONG)syscall_address; + break; + } + default: return ExceptionContinueSearch; + } + context->Rip += prefixlen + 2; + return ExceptionContinueExecution; + } case 0xb6: /* movzx Eb, Gv */ case 0xb7: /* movzx Ew, Gv */ {
1
0
0
0
Zebediah Figura : wined3d: Get rid of the "src_state" local variable from wined3d_stateblock_capture().
by Alexandre Julliard
22 Mar '19
22 Mar '19
Module: wine Branch: master Commit: 9a2ff8440270cf1200271d5f4e0a1708a8098ab6 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9a2ff8440270cf1200271d5f…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Mar 22 10:23:13 2019 -0500 wined3d: Get rid of the "src_state" local variable from wined3d_stateblock_capture(). Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/stateblock.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c index 7495d21..ee552c1 100644 --- a/dlls/wined3d/stateblock.c +++ b/dlls/wined3d/stateblock.c @@ -749,14 +749,11 @@ static void wined3d_state_record_lights(struct wined3d_light_state *dst_state, void CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock) { const struct wined3d_stateblock_state *state = &stateblock->device->stateblock_state; - const struct wined3d_state *src_state = &stateblock->device->state; unsigned int i; DWORD map; TRACE("stateblock %p.\n", stateblock); - TRACE("Capturing state %p.\n", src_state); - if (stateblock->changed.vertexShader && stateblock->stateblock_state.vs != state->vs) { TRACE("Updating vertex shader from %p to %p.\n", stateblock->stateblock_state.vs, state->vs);
1
0
0
0
Zebediah Figura : wined3d: Make wined3d_device_set_texture() infallible.
by Alexandre Julliard
22 Mar '19
22 Mar '19
Module: wine Branch: master Commit: 4d67ac17584053c6f913f05580cb9d80624065b9 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4d67ac17584053c6f913f055…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Mar 22 09:47:06 2019 -0500 wined3d: Make wined3d_device_set_texture() infallible. Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/device.c | 5 ++--- dlls/d3d9/device.c | 7 +++---- dlls/ddraw/device.c | 8 ++++---- dlls/wined3d/device.c | 10 +++++----- include/wine/wined3d.h | 2 +- 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c index 61bd7bb..5016ac4 100644 --- a/dlls/d3d8/device.c +++ b/dlls/d3d8/device.c @@ -2101,18 +2101,17 @@ static HRESULT WINAPI d3d8_device_SetTexture(IDirect3DDevice8 *iface, DWORD stag { struct d3d8_device *device = impl_from_IDirect3DDevice8(iface); struct d3d8_texture *texture_impl; - HRESULT hr; TRACE("iface %p, stage %u, texture %p.\n", iface, stage, texture); texture_impl = unsafe_impl_from_IDirect3DBaseTexture8(texture); wined3d_mutex_lock(); - hr = wined3d_device_set_texture(device->wined3d_device, stage, + wined3d_device_set_texture(device->wined3d_device, stage, texture_impl ? texture_impl->wined3d_texture : NULL); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static const struct tss_lookup diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 5844d2c..4a41443 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -2448,16 +2448,15 @@ static HRESULT WINAPI d3d9_device_SetTexture(IDirect3DDevice9Ex *iface, DWORD st { struct d3d9_device *device = impl_from_IDirect3DDevice9Ex(iface); struct d3d9_texture *texture_impl; - HRESULT hr; TRACE("iface %p, stage %u, texture %p.\n", iface, stage, texture); texture_impl = unsafe_impl_from_IDirect3DBaseTexture9(texture); wined3d_mutex_lock(); - hr = wined3d_device_set_texture(device->wined3d_device, stage, + wined3d_device_set_texture(device->wined3d_device, stage, texture_impl ? texture_impl->wined3d_texture : NULL); - if (SUCCEEDED(hr) && !device->recording) + if (!device->recording) { unsigned int i = stage < 16 || (stage >= D3DVERTEXTEXTURESAMPLER0 && stage <= D3DVERTEXTEXTURESAMPLER3) ? stage < 16 ? stage : stage - D3DVERTEXTEXTURESAMPLER0 + 16 : ~0u; @@ -2472,7 +2471,7 @@ static HRESULT WINAPI d3d9_device_SetTexture(IDirect3DDevice9Ex *iface, DWORD st } wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static const enum wined3d_texture_stage_state tss_lookup[] = diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c index d2f11c1..85ebfb6 100644 --- a/dlls/ddraw/device.c +++ b/dlls/ddraw/device.c @@ -2760,7 +2760,8 @@ static HRESULT WINAPI d3d_device3_SetRenderState(IDirect3DDevice3 *iface, if (value == 0) { - hr = wined3d_device_set_texture(device->wined3d_device, 0, NULL); + wined3d_device_set_texture(device->wined3d_device, 0, NULL); + hr = D3D_OK; break; } @@ -4814,7 +4815,6 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface, struct d3d_device *device = impl_from_IDirect3DDevice7(iface); struct ddraw_surface *surf = unsafe_impl_from_IDirectDrawSurface7(texture); struct wined3d_texture *wined3d_texture = NULL; - HRESULT hr; TRACE("iface %p, stage %u, texture %p.\n", iface, stage, texture); @@ -4822,10 +4822,10 @@ static HRESULT d3d_device7_SetTexture(IDirect3DDevice7 *iface, wined3d_texture = surf->wined3d_texture; wined3d_mutex_lock(); - hr = wined3d_device_set_texture(device->wined3d_device, stage, wined3d_texture); + wined3d_device_set_texture(device->wined3d_device, stage, wined3d_texture); wined3d_mutex_unlock(); - return hr; + return D3D_OK; } static HRESULT WINAPI d3d_device7_SetTexture_FPUSetup(IDirect3DDevice7 *iface, diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index f9a43c2..5039e0a 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3533,7 +3533,7 @@ DWORD CDECL wined3d_device_get_texture_stage_state(const struct wined3d_device * return device->state.texture_states[stage][state]; } -HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device, +void CDECL wined3d_device_set_texture(struct wined3d_device *device, UINT stage, struct wined3d_texture *texture) { struct wined3d_texture *prev; @@ -3547,7 +3547,7 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device, if (stage >= ARRAY_SIZE(device->state.textures)) { WARN("Ignoring invalid stage %u.\n", stage); - return WINED3D_OK; + return; } if (texture) @@ -3559,7 +3559,7 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device, if (device->recording) { device->recording->changed.textures |= 1u << stage; - return WINED3D_OK; + return; } prev = device->state.textures[stage]; @@ -3568,7 +3568,7 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device, if (texture == prev) { TRACE("App is setting the same texture again, nothing to do.\n"); - return WINED3D_OK; + return; } TRACE("Setting new texture to %p.\n", texture); @@ -3580,7 +3580,7 @@ HRESULT CDECL wined3d_device_set_texture(struct wined3d_device *device, if (prev) wined3d_texture_decref(prev); - return WINED3D_OK; + return; } struct wined3d_texture * CDECL wined3d_device_get_texture(const struct wined3d_device *device, UINT stage) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 9e4eb87..51fb7e6 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2458,7 +2458,7 @@ void __cdecl wined3d_device_set_stream_output(struct wined3d_device *device, UIN HRESULT __cdecl wined3d_device_set_stream_source(struct wined3d_device *device, UINT stream_idx, struct wined3d_buffer *buffer, UINT offset, UINT stride); HRESULT __cdecl wined3d_device_set_stream_source_freq(struct wined3d_device *device, UINT stream_idx, UINT divider); -HRESULT __cdecl wined3d_device_set_texture(struct wined3d_device *device, UINT stage, struct wined3d_texture *texture); +void __cdecl wined3d_device_set_texture(struct wined3d_device *device, UINT stage, struct wined3d_texture *texture); void __cdecl wined3d_device_set_texture_stage_state(struct wined3d_device *device, UINT stage, enum wined3d_texture_stage_state state, DWORD value); void __cdecl wined3d_device_set_transform(struct wined3d_device *device,
1
0
0
0
Paul Gofman : ddraw/tests: Port test for adding the same light to viewports multiple times for ddraw1.
by Alexandre Julliard
22 Mar '19
22 Mar '19
Module: wine Branch: master Commit: 61c32ac8d6674f6c4aaa9a4affc8a6b6884abfc7 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=61c32ac8d6674f6c4aaa9a4a…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Fri Mar 22 14:17:48 2019 +0300 ddraw/tests: Port test for adding the same light to viewports multiple times for ddraw1. Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/tests/ddraw1.c | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index cf53cc1..44e4c88 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -6029,25 +6029,25 @@ static void test_lighting(void) {&mat_nonaffine, translatedquad, 0x000000ff, "Lit quad with non-affine matrix"}, }; - HWND window; - IDirect3D *d3d; - IDirect3DDevice *device; - IDirectDraw *ddraw; - IDirectDrawSurface *rt; - IDirect3DViewport *viewport; - IDirect3DMaterial *material; - IDirect3DLight *light; + D3DMATRIXHANDLE world_handle, view_handle, proj_handle; + IDirect3DViewport *viewport, *viewport2; IDirect3DExecuteBuffer *execute_buffer; D3DEXECUTEBUFFERDESC exec_desc; D3DMATERIALHANDLE mat_handle; - D3DMATRIXHANDLE world_handle, view_handle, proj_handle; + IDirect3DMaterial *material; + IDirect3DDevice *device; + IDirectDrawSurface *rt; + IDirect3DLight *light; D3DLIGHT light_desc; - HRESULT hr; - D3DCOLOR color; - void *ptr; + IDirectDraw *ddraw; UINT inst_length; ULONG refcount; unsigned int i; + IDirect3D *d3d; + D3DCOLOR color; + HWND window; + HRESULT hr; + void *ptr; window = create_window(); ddraw = create_ddraw(); @@ -6202,9 +6202,16 @@ static void test_lighting(void) U4(light_desc.dcvColor).a = 1.0f; U3(light_desc.dvDirection).z = 1.0f; hr = IDirect3DLight_SetLight(light, &light_desc); - ok(SUCCEEDED(hr), "Failed to set light, hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DViewport_AddLight(viewport, light); - ok(SUCCEEDED(hr), "Failed to add a light to the viewport, hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DViewport_AddLight(viewport, light); + ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#x.\n", hr); + + viewport2 = create_viewport(device, 0, 0, 640, 480); + hr = IDirect3DViewport_AddLight(viewport2, light); + ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#x.\n", hr); + destroy_viewport(device, viewport2); for (i = 0; i < ARRAY_SIZE(tests); ++i) {
1
0
0
0
Paul Gofman : ddraw/tests: Port test for adding the same light to viewports multiple times for ddraw2.
by Alexandre Julliard
22 Mar '19
22 Mar '19
Module: wine Branch: master Commit: 927d509aa2178d99f0869d9aeb8bcfd72a688525 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=927d509aa2178d99f0869d9a…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Fri Mar 22 14:17:47 2019 +0300 ddraw/tests: Port test for adding the same light to viewports multiple times for ddraw2. Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/tests/ddraw2.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 7bf6dca..fd74d75 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -7048,20 +7048,20 @@ static void test_lighting(void) {&mat_nonaffine, translatedquad, 0x000000ff, "Lit quad with non-affine matrix"}, }; - HWND window; - IDirect3D2 *d3d; + IDirect3DViewport2 *viewport, *viewport2; + D3DMATERIALHANDLE mat_handle; + IDirect3DMaterial2 *material; IDirect3DDevice2 *device; - IDirectDraw2 *ddraw; IDirectDrawSurface *rt; - IDirect3DViewport2 *viewport; - IDirect3DMaterial2 *material; IDirect3DLight *light; - D3DMATERIALHANDLE mat_handle; D3DLIGHT2 light_desc; - HRESULT hr; + IDirectDraw2 *ddraw; + IDirect3D2 *d3d; D3DCOLOR color; ULONG refcount; unsigned int i; + HWND window; + HRESULT hr; window = create_window(); ddraw = create_ddraw(); @@ -7158,9 +7158,16 @@ static void test_lighting(void) U4(light_desc.dcvColor).a = 1.0f; U3(light_desc.dvDirection).z = 1.0f; hr = IDirect3DLight_SetLight(light, (D3DLIGHT *)&light_desc); - ok(SUCCEEDED(hr), "Failed to set light, hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DViewport2_AddLight(viewport, light); - ok(SUCCEEDED(hr), "Failed to add a light to the viewport, hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DViewport2_AddLight(viewport, light); + ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#x.\n", hr); + + viewport2 = create_viewport(device, 0, 0, 640, 480); + hr = IDirect3DViewport2_AddLight(viewport2, light); + ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#x.\n", hr); + destroy_viewport(device, viewport2); hr = IDirect3DViewport2_Clear(viewport, 1, &clear_rect, D3DCLEAR_TARGET); ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr);
1
0
0
0
Paul Gofman : ddraw: Deny adding the same light to viewports multiple times.
by Alexandre Julliard
22 Mar '19
22 Mar '19
Module: wine Branch: master Commit: 9bd6b2c2bf5e7603e65215432f3a3e5dad43616c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9bd6b2c2bf5e7603e6521543…
Author: Paul Gofman <gofmanp(a)gmail.com> Date: Fri Mar 22 14:17:46 2019 +0300 ddraw: Deny adding the same light to viewports multiple times. According to the logs attached to the bug, the application seems to spin in endless LIST_FOR_EACH_ENTRY() in viewport_activate(), which is the result of adding the same light structure to the list twice. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=46807
Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/tests/ddraw4.c | 27 +++++++++++++++++---------- dlls/ddraw/viewport.c | 7 +++++++ 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 51052fb..56ff8a6 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -4051,21 +4051,21 @@ static void test_lighting(void) {&mat_nonaffine, translatedquad, 0x000000ff, "Lit quad with non-affine matrix"}, }; - HWND window; - IDirect3D3 *d3d; + DWORD nfvf = D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_NORMAL; + IDirect3DViewport3 *viewport, *viewport2; + DWORD fvf = D3DFVF_XYZ | D3DFVF_DIFFUSE; + IDirect3DMaterial3 *material; + D3DMATERIALHANDLE mat_handle; IDirect3DDevice3 *device; IDirectDrawSurface4 *rt; - IDirect3DViewport3 *viewport; - IDirect3DMaterial3 *material; IDirect3DLight *light; - D3DMATERIALHANDLE mat_handle; D3DLIGHT2 light_desc; - HRESULT hr; - DWORD fvf = D3DFVF_XYZ | D3DFVF_DIFFUSE; - DWORD nfvf = D3DFVF_XYZ | D3DFVF_DIFFUSE | D3DFVF_NORMAL; + IDirect3D3 *d3d; D3DCOLOR color; ULONG refcount; unsigned int i; + HWND window; + HRESULT hr; window = create_window(); if (!(device = create_device(window, DDSCL_NORMAL))) @@ -4160,9 +4160,16 @@ static void test_lighting(void) U4(light_desc.dcvColor).a = 1.0f; U3(light_desc.dvDirection).z = 1.0f; hr = IDirect3DLight_SetLight(light, (D3DLIGHT *)&light_desc); - ok(SUCCEEDED(hr), "Failed to set light, hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DViewport3_AddLight(viewport, light); - ok(SUCCEEDED(hr), "Failed to add a light to the viewport, hr %#x.\n", hr); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DViewport3_AddLight(viewport, light); + ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#x.\n", hr); + + viewport2 = create_viewport(device, 0, 0, 640, 480); + hr = IDirect3DViewport3_AddLight(viewport2, light); + ok(hr == D3DERR_LIGHTHASVIEWPORT, "Got unexpected hr %#x.\n", hr); + IDirect3DViewport3_Release(viewport2); hr = IDirect3DViewport3_Clear2(viewport, 1, &clear_rect, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); ok(SUCCEEDED(hr), "Failed to clear viewport, hr %#x.\n", hr); diff --git a/dlls/ddraw/viewport.c b/dlls/ddraw/viewport.c index 78a2fde..e7e4463 100644 --- a/dlls/ddraw/viewport.c +++ b/dlls/ddraw/viewport.c @@ -760,6 +760,13 @@ static HRESULT WINAPI d3d_viewport_AddLight(IDirect3DViewport3 *iface, IDirect3D return DDERR_INVALIDPARAMS; } + if (light_impl->active_viewport) + { + wined3d_mutex_unlock(); + WARN("Light %p is active in viewport %p.\n", light_impl, light_impl->active_viewport); + return D3DERR_LIGHTHASVIEWPORT; + } + /* Find a light number and update both light and viewports objects accordingly */ while (map & 1) {
1
0
0
0
Stefan Dösinger : ddraw/tests: Test invalid clipper objects.
by Alexandre Julliard
22 Mar '19
22 Mar '19
Module: wine Branch: master Commit: 4968ca3d7965e19cb805b7ca5ab1b96d75800cfa URL:
https://source.winehq.org/git/wine.git/?a=commit;h=4968ca3d7965e19cb805b7ca…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Mar 22 12:50:05 2019 +0300 ddraw/tests: Test invalid clipper objects. Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/tests/ddraw1.c | 151 ++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw2.c | 158 ++++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw4.c | 157 +++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw7.c | 157 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 623 insertions(+) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=4968ca3d7965e19cb805…
1
0
0
0
Stefan Dösinger : ddraw: Don' t operate on stored invalid clippers.
by Alexandre Julliard
22 Mar '19
22 Mar '19
Module: wine Branch: master Commit: 347efb985c7685ffd2e0a24090fc35be003dd84f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=347efb985c7685ffd2e0a240…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Fri Mar 22 12:50:04 2019 +0300 ddraw: Don't operate on stored invalid clippers. Signed-off-by: Stefan Dösinger <stefan(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/clipper.c | 2 +- dlls/ddraw/ddraw_private.h | 1 + dlls/ddraw/surface.c | 13 ++++++++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/dlls/ddraw/clipper.c b/dlls/ddraw/clipper.c index e4b7ec2..68a0a7f 100644 --- a/dlls/ddraw/clipper.c +++ b/dlls/ddraw/clipper.c @@ -33,7 +33,7 @@ static inline struct ddraw_clipper *impl_from_IDirectDrawClipper(IDirectDrawClip return CONTAINING_RECORD(iface, struct ddraw_clipper, IDirectDrawClipper_iface); } -static BOOL ddraw_clipper_is_valid(const struct ddraw_clipper *clipper) +BOOL ddraw_clipper_is_valid(const struct ddraw_clipper *clipper) { /* Native is very lenient when you invoke the clipper methods with a clipper pointer that * points to something that is either not accessible or not a clipper, or if you break diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h index 77e2866..087c709 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h @@ -391,6 +391,7 @@ struct ddraw_clipper HRESULT ddraw_clipper_init(struct ddraw_clipper *clipper) DECLSPEC_HIDDEN; struct ddraw_clipper *unsafe_impl_from_IDirectDrawClipper(IDirectDrawClipper *iface) DECLSPEC_HIDDEN; +BOOL ddraw_clipper_is_valid(const struct ddraw_clipper *clipper) DECLSPEC_HIDDEN; /***************************************************************************** * IDirectDrawPalette implementation structure diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c index b8cc2d2..4e2faef 100644 --- a/dlls/ddraw/surface.c +++ b/dlls/ddraw/surface.c @@ -1549,6 +1549,12 @@ static HRESULT ddraw_surface_blt_clipped(struct ddraw_surface *dst_surface, cons return hr; } + if (!ddraw_clipper_is_valid(dst_surface->clipper)) + { + FIXME("Attempting to blit with an invalid clipper.\n"); + return DDERR_INVALIDPARAMS; + } + scale_x = (float)(src_rect.right - src_rect.left) / (float)(dst_rect.right - dst_rect.left); scale_y = (float)(src_rect.bottom - src_rect.top) / (float)(dst_rect.bottom - dst_rect.top); @@ -4426,7 +4432,8 @@ static HRESULT WINAPI ddraw_surface7_GetClipper(IDirectDrawSurface7 *iface, IDir } *clipper = &surface->clipper->IDirectDrawClipper_iface; - IDirectDrawClipper_AddRef(*clipper); + if (ddraw_clipper_is_valid(surface->clipper)) + IDirectDrawClipper_AddRef(*clipper); wined3d_mutex_unlock(); return DD_OK; @@ -4501,7 +4508,7 @@ static HRESULT WINAPI ddraw_surface7_SetClipper(IDirectDrawSurface7 *iface, if (clipper != NULL) IDirectDrawClipper_AddRef(iclipper); - if (old_clipper) + if (old_clipper && ddraw_clipper_is_valid(old_clipper)) IDirectDrawClipper_Release(&old_clipper->IDirectDrawClipper_iface); if ((This->surface_desc.ddsCaps.dwCaps & DDSCAPS_PRIMARYSURFACE) && This->ddraw->wined3d_swapchain) @@ -5782,7 +5789,7 @@ static void STDMETHODCALLTYPE ddraw_surface_wined3d_object_destroyed(void *paren /* Reduce the ddraw surface count. */ list_remove(&surface->surface_list_entry); - if (surface->clipper) + if (surface->clipper && ddraw_clipper_is_valid(surface->clipper)) IDirectDrawClipper_Release(&surface->clipper->IDirectDrawClipper_iface); if (surface == surface->ddraw->primary)
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
110
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
Results per page:
10
25
50
100
200