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 2020
----- 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
1 participants
996 discussions
Start a n
N
ew thread
Zhiyi Zhang : wined3d: Pass a struct wined3d_output pointer to wined3d_check_device_format_conversion().
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: 5df462274df0e1b5c2b2a25c3d6669cdd5cbd265 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5df462274df0e1b5c2b2a25c…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Mar 9 15:40:40 2020 +0800 wined3d: Pass a struct wined3d_output pointer to wined3d_check_device_format_conversion(). Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/directx.c | 10 ++++++++-- dlls/wined3d/directx.c | 11 ++++++----- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 2 +- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/dlls/d3d9/directx.c b/dlls/d3d9/directx.c index d006cf2743..700c3cb145 100644 --- a/dlls/d3d9/directx.c +++ b/dlls/d3d9/directx.c @@ -361,14 +361,20 @@ static HRESULT WINAPI d3d9_CheckDeviceFormatConversion(IDirect3D9Ex *iface, UINT D3DDEVTYPE device_type, D3DFORMAT src_format, D3DFORMAT dst_format) { struct d3d9 *d3d9 = impl_from_IDirect3D9Ex(iface); + unsigned int output_idx; HRESULT hr; TRACE("iface %p, adapter %u, device_type %#x, src_format %#x, dst_format %#x.\n", iface, adapter, device_type, src_format, dst_format); + output_idx = adapter; + if (output_idx >= d3d9->wined3d_output_count) + return D3DERR_INVALIDCALL; + wined3d_mutex_lock(); - hr = wined3d_check_device_format_conversion(d3d9->wined3d, adapter, device_type, - wined3dformat_from_d3dformat(src_format), wined3dformat_from_d3dformat(dst_format)); + hr = wined3d_check_device_format_conversion(d3d9->wined3d_outputs[output_idx], + device_type, wined3dformat_from_d3dformat(src_format), + wined3dformat_from_d3dformat(dst_format)); wined3d_mutex_unlock(); return hr; diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index f5a94b93aa..3f46bb6a28 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1772,11 +1772,12 @@ UINT CDECL wined3d_calculate_format_pitch(const struct wined3d *wined3d, UINT ad return row_pitch; } -HRESULT CDECL wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx, - enum wined3d_device_type device_type, enum wined3d_format_id src_format, enum wined3d_format_id dst_format) +HRESULT CDECL wined3d_check_device_format_conversion(const struct wined3d_output *output, + enum wined3d_device_type device_type, enum wined3d_format_id src_format, + enum wined3d_format_id dst_format) { - FIXME("wined3d %p, adapter_idx %u, device_type %s, src_format %s, dst_format %s stub!\n", - wined3d, adapter_idx, debug_d3ddevicetype(device_type), debug_d3dformat(src_format), + FIXME("output %p, device_type %s, src_format %s, dst_format %s stub!\n", + output, debug_d3ddevicetype(device_type), debug_d3dformat(src_format), debug_d3dformat(dst_format)); return WINED3D_OK; @@ -1838,7 +1839,7 @@ HRESULT CDECL wined3d_check_device_type(const struct wined3d *wined3d, UINT adap if (backbuffer_format == WINED3DFMT_UNKNOWN) backbuffer_format = display_format; - if (FAILED(wined3d_check_device_format_conversion(wined3d, adapter_idx, + if (FAILED(wined3d_check_device_format_conversion(&wined3d->adapters[adapter_idx]->outputs[0], device_type, backbuffer_format, display_format))) { TRACE("Format conversion from %s to %s not supported.\n", diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index c426ffd0b6..d043b91cc4 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -4,7 +4,7 @@ @ cdecl wined3d_calculate_format_pitch(ptr long long long) @ cdecl wined3d_check_depth_stencil_match(ptr long long long long long) @ cdecl wined3d_check_device_format(ptr long long long long long long long) -@ cdecl wined3d_check_device_format_conversion(ptr long long long long) +@ cdecl wined3d_check_device_format_conversion(ptr long long long) @ cdecl wined3d_check_device_multisample_type(ptr long long long long long ptr) @ cdecl wined3d_check_device_type(ptr long long long long long) @ cdecl wined3d_create(long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 12defa4f40..a97b14b6c5 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2253,7 +2253,7 @@ HRESULT __cdecl wined3d_check_depth_stencil_match(const struct wined3d *wined3d, HRESULT __cdecl wined3d_check_device_format(const struct wined3d *wined3d, UINT adaper_idx, enum wined3d_device_type device_type, enum wined3d_format_id adapter_format_id, DWORD usage, unsigned int bind_flags, enum wined3d_resource_type resource_type, enum wined3d_format_id check_format_id); -HRESULT __cdecl wined3d_check_device_format_conversion(const struct wined3d *wined3d, UINT adapter_idx, +HRESULT __cdecl wined3d_check_device_format_conversion(const struct wined3d_output *output, enum wined3d_device_type device_type, enum wined3d_format_id source_format_id, enum wined3d_format_id target_format_id); HRESULT __cdecl wined3d_check_device_multisample_type(const struct wined3d *wined3d, UINT adapter_idx,
1
0
0
0
Zhiyi Zhang : wined3d: Refactor wined3d_get_adapter_raster_status() to wined3d_output_get_raster_status().
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: 2e7db80baddde577065150d862a0023a089d83fc URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2e7db80baddde577065150d8…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com> Date: Mon Mar 9 15:40:21 2020 +0800 wined3d: Refactor wined3d_get_adapter_raster_status() to wined3d_output_get_raster_status(). Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/ddraw.c | 4 ++-- dlls/wined3d/directx.c | 11 ++++------- dlls/wined3d/swapchain.c | 12 ++++++++++-- dlls/wined3d/wined3d.spec | 2 +- include/wine/wined3d.h | 4 ++-- 5 files changed, 19 insertions(+), 14 deletions(-) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index f947ca8b2b..17a02bbc05 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -1824,7 +1824,7 @@ static HRESULT WINAPI ddraw7_GetVerticalBlankStatus(IDirectDraw7 *iface, BOOL *s return DDERR_INVALIDPARAMS; wined3d_mutex_lock(); - hr = wined3d_get_adapter_raster_status(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &raster_status); + hr = wined3d_output_get_raster_status(ddraw->wined3d_output, &raster_status); wined3d_mutex_unlock(); if (FAILED(hr)) { @@ -2170,7 +2170,7 @@ static HRESULT WINAPI ddraw7_GetScanLine(IDirectDraw7 *iface, DWORD *Scanline) TRACE("iface %p, line %p.\n", iface, Scanline); wined3d_mutex_lock(); - hr = wined3d_get_adapter_raster_status(ddraw->wined3d, WINED3DADAPTER_DEFAULT, &raster_status); + hr = wined3d_output_get_raster_status(ddraw->wined3d_output, &raster_status); wined3d_mutex_unlock(); if (FAILED(hr)) { diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 9ca3053c89..f5a94b93aa 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1392,7 +1392,7 @@ fail: return WINED3DERR_INVALIDCALL; } -HRESULT CDECL wined3d_get_adapter_raster_status(const struct wined3d *wined3d, UINT adapter_idx, +HRESULT CDECL wined3d_output_get_raster_status(const struct wined3d_output *output, struct wined3d_raster_status *raster_status) { LONGLONG freq_per_frame, freq_per_line; @@ -1401,11 +1401,9 @@ HRESULT CDECL wined3d_get_adapter_raster_status(const struct wined3d *wined3d, U static UINT once; if (!once++) - FIXME("wined3d %p, adapter_idx %u, raster_status %p semi-stub!\n", - wined3d, adapter_idx, raster_status); + FIXME("output %p, raster_status %p semi-stub!\n", output, raster_status); else - WARN("wined3d %p, adapter_idx %u, raster_status %p semi-stub!\n", - wined3d, adapter_idx, raster_status); + WARN("output %p, raster_status %p semi-stub!\n", output, raster_status); /* Obtaining the raster status is a widely implemented but optional * feature. When this method returns OK StarCraft 2 expects the @@ -1416,8 +1414,7 @@ HRESULT CDECL wined3d_get_adapter_raster_status(const struct wined3d *wined3d, U if (!QueryPerformanceCounter(&counter) || !QueryPerformanceFrequency(&freq_per_sec)) return WINED3DERR_INVALIDCALL; - if (FAILED(wined3d_output_get_display_mode(&wined3d->adapters[adapter_idx]->outputs[0], &mode, - NULL))) + if (FAILED(wined3d_output_get_display_mode(output, &mode, NULL))) return WINED3DERR_INVALIDCALL; if (mode.refresh_rate == DEFAULT_REFRESH_RATE) mode.refresh_rate = 60; diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c index c0eb25ffb6..c5fd2879c0 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -307,10 +307,18 @@ struct wined3d_output * wined3d_swapchain_get_output(const struct wined3d_swapch HRESULT CDECL wined3d_swapchain_get_raster_status(const struct wined3d_swapchain *swapchain, struct wined3d_raster_status *raster_status) { + struct wined3d_output *output; + TRACE("swapchain %p, raster_status %p.\n", swapchain, raster_status); - return wined3d_get_adapter_raster_status(swapchain->device->wined3d, - swapchain->device->adapter->ordinal, raster_status); + output = wined3d_swapchain_get_output(swapchain); + if (!output) + { + ERR("Failed to get output from swapchain %p.\n", swapchain); + return E_FAIL; + } + + return wined3d_output_get_raster_status(output, raster_status); } struct wined3d_swapchain_state * CDECL wined3d_swapchain_get_state(struct wined3d_swapchain *swapchain) diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec index 51745e2418..c426ffd0b6 100644 --- a/dlls/wined3d/wined3d.spec +++ b/dlls/wined3d/wined3d.spec @@ -12,7 +12,6 @@ @ cdecl wined3d_get_adapter(ptr long) @ cdecl wined3d_get_adapter_count(ptr) @ cdecl wined3d_get_adapter_identifier(ptr long long ptr) -@ cdecl wined3d_get_adapter_raster_status(ptr long ptr) @ cdecl wined3d_get_device_caps(ptr long long ptr) @ cdecl wined3d_get_output_desc(ptr long ptr) @ cdecl wined3d_incref(ptr) @@ -161,6 +160,7 @@ @ cdecl wined3d_output_get_display_mode(ptr ptr ptr) @ cdecl wined3d_output_get_mode(ptr long long long ptr) @ cdecl wined3d_output_get_mode_count(ptr long long) +@ cdecl wined3d_output_get_raster_status(ptr ptr) @ cdecl wined3d_output_set_display_mode(ptr ptr) @ cdecl wined3d_output_release_ownership(ptr) @ cdecl wined3d_output_take_ownership(ptr long) diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 7691064f6e..12defa4f40 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2269,8 +2269,6 @@ struct wined3d_adapter * __cdecl wined3d_get_adapter(const struct wined3d *wined UINT __cdecl wined3d_get_adapter_count(const struct wined3d *wined3d); HRESULT __cdecl wined3d_get_adapter_identifier(const struct wined3d *wined3d, UINT adapter_idx, DWORD flags, struct wined3d_adapter_identifier *identifier); -HRESULT __cdecl wined3d_get_adapter_raster_status(const struct wined3d *wined3d, UINT adapter_idx, - struct wined3d_raster_status *raster_status); HRESULT __cdecl wined3d_get_device_caps(const struct wined3d *wined3d, unsigned int adapter_idx, enum wined3d_device_type device_type, struct wined3d_caps *caps); HRESULT __cdecl wined3d_get_output_desc(const struct wined3d *wined3d, unsigned int adapter_idx, @@ -2505,6 +2503,8 @@ HRESULT __cdecl wined3d_output_get_mode(const struct wined3d_output *output, unsigned int mode_idx, struct wined3d_display_mode *mode); unsigned int __cdecl wined3d_output_get_mode_count(const struct wined3d_output *output, enum wined3d_format_id format_id, enum wined3d_scanline_ordering scanline_ordering); +HRESULT __cdecl wined3d_output_get_raster_status(const struct wined3d_output *output, + struct wined3d_raster_status *raster_status); void __cdecl wined3d_output_release_ownership(const struct wined3d_output *output); HRESULT __cdecl wined3d_output_set_display_mode(struct wined3d_output *output, const struct wined3d_display_mode *mode);
1
0
0
0
Francois Gouget : dsound: Move make_fir to the dsound directory.
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: 75a5107c965019361bac5fbe7245ee38e5450878 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=75a5107c965019361bac5fbe…
Author: Francois Gouget <fgouget(a)codeweavers.com> Date: Mon Mar 9 01:30:22 2020 +0100 dsound: Move make_fir to the dsound directory. Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- {tools => dlls/dsound}/make_fir | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/make_fir b/dlls/dsound/make_fir similarity index 98% rename from tools/make_fir rename to dlls/dsound/make_fir index 97c5583d16..0fd26aaf7f 100755 --- a/tools/make_fir +++ b/dlls/dsound/make_fir @@ -136,8 +136,7 @@ foreach my $testfreq(@testfreqs) { # Now actually print the FIR to a C header file -chdir ".." if -f "./make_fir"; -open FILE, ">dlls/dsound/fir.h"; +open FILE, ">", "fir.h"; select FILE; print "/* generated by tools/make_fir; DO NOT EDIT! */\n";
1
0
0
0
Zebediah Figura : d3d11/tests: Add a test for color masks.
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: 495a95c38e4febf16feec0c7768cf5dfa15515e8 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=495a95c38e4febf16feec0c7…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Mar 6 22:18:38 2020 -0600 d3d11/tests: Add a test for color masks. 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/d3d11/tests/d3d11.c | 135 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c index f378ae52ec..4254f11bdd 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -29716,6 +29716,140 @@ static void test_sample_attached_rtv(void) release_test_context(&test_context); } +static void test_color_mask(void) +{ + struct d3d11_test_context test_context; + D3D11_TEXTURE2D_DESC texture_desc; + ID3D11RenderTargetView *rtvs[8]; + ID3D11BlendState *blend_state; + ID3D11DeviceContext *context; + struct resource_readback rb; + D3D11_BLEND_DESC blend_desc; + ID3D11Texture2D *rts[8]; + ID3D11PixelShader *ps; + ID3D11Device *device; + unsigned int i; + DWORD color; + HRESULT hr; + + static const DWORD expected_colors[] = + {0xff000080, 0xff0080ff, 0xff8000ff, 0x80808080, 0x800000ff, 0xff008080, 0x800080ff, 0xff0000ff}; + + static const DWORD ps_code[] = + { +#if 0 + void main(float4 position : SV_Position, + out float4 t0 : SV_Target0, out float4 t1 : SV_Target1, + out float4 t2 : SV_Target2, out float4 t3 : SV_Target3, + out float4 t4 : SV_Target4, out float4 t5 : SV_Target5, + out float4 t6 : SV_Target6, out float4 t7 : SV_Target7) + { + t0 = t1 = t2 = t3 = t4 = t5 = t6 = t7 = float4(0.5f, 0.5f, 0.5f, 0.5f); + } +#endif + 0x43425844, 0x7b1ab233, 0xdbe32d3b, 0x77084cc5, 0xe874d2b5, 0x00000001, 0x000002b0, 0x00000003, + 0x0000002c, 0x00000060, 0x0000013c, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x4e47534f, 0x000000d4, 0x00000008, 0x00000008, 0x000000c8, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x000000c8, 0x00000001, 0x00000000, 0x00000003, 0x00000001, 0x0000000f, + 0x000000c8, 0x00000002, 0x00000000, 0x00000003, 0x00000002, 0x0000000f, 0x000000c8, 0x00000003, + 0x00000000, 0x00000003, 0x00000003, 0x0000000f, 0x000000c8, 0x00000004, 0x00000000, 0x00000003, + 0x00000004, 0x0000000f, 0x000000c8, 0x00000005, 0x00000000, 0x00000003, 0x00000005, 0x0000000f, + 0x000000c8, 0x00000006, 0x00000000, 0x00000003, 0x00000006, 0x0000000f, 0x000000c8, 0x00000007, + 0x00000000, 0x00000003, 0x00000007, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, + 0x0000016c, 0x00000040, 0x0000005b, 0x03000065, 0x001020f2, 0x00000000, 0x03000065, 0x001020f2, + 0x00000001, 0x03000065, 0x001020f2, 0x00000002, 0x03000065, 0x001020f2, 0x00000003, 0x03000065, + 0x001020f2, 0x00000004, 0x03000065, 0x001020f2, 0x00000005, 0x03000065, 0x001020f2, 0x00000006, + 0x03000065, 0x001020f2, 0x00000007, 0x08000036, 0x001020f2, 0x00000000, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x08000036, 0x001020f2, 0x00000001, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x08000036, 0x001020f2, 0x00000002, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x08000036, 0x001020f2, 0x00000003, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x08000036, 0x001020f2, 0x00000004, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x08000036, 0x001020f2, 0x00000005, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x08000036, 0x001020f2, 0x00000006, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x08000036, 0x001020f2, 0x00000007, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x0100003e, + }; + + static const float red[] = {1.0f, 0.0f, 0.0f, 1.0f}; + + if (!init_test_context(&test_context, NULL)) + return; + + device = test_context.device; + context = test_context.immediate_context; + + hr = ID3D11Device_CreatePixelShader(device, ps_code, sizeof(ps_code), NULL, &ps); + ok(hr == S_OK, "Failed to create pixel shader, hr %#x.\n", hr); + ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0); + + memset(&blend_desc, 0, sizeof(blend_desc)); + blend_desc.IndependentBlendEnable = TRUE; + blend_desc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_RED; + blend_desc.RenderTarget[1].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_GREEN; + blend_desc.RenderTarget[2].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_BLUE; + blend_desc.RenderTarget[3].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL; + blend_desc.RenderTarget[4].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALPHA; + blend_desc.RenderTarget[5].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_RED | D3D11_COLOR_WRITE_ENABLE_GREEN; + blend_desc.RenderTarget[6].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_GREEN | D3D11_COLOR_WRITE_ENABLE_ALPHA; + blend_desc.RenderTarget[7].RenderTargetWriteMask = 0; + + hr = ID3D11Device_CreateBlendState(device, &blend_desc, &blend_state); + ok(hr == S_OK, "Failed to create blend state, hr %#x.\n", hr); + ID3D11DeviceContext_OMSetBlendState(context, blend_state, NULL, D3D11_DEFAULT_SAMPLE_MASK); + ID3D11BlendState_Release(blend_state); + + for (i = 0; i < 8; ++i) + { + ID3D11Texture2D_GetDesc(test_context.backbuffer, &texture_desc); + hr = ID3D11Device_CreateTexture2D(device, &texture_desc, NULL, &rts[i]); + ok(hr == S_OK, "Failed to create texture %u, hr %#x.\n", i, hr); + + hr = ID3D11Device_CreateRenderTargetView(device, (ID3D11Resource *)rts[i], NULL, &rtvs[i]); + ok(hr == S_OK, "Failed to create rendertarget view %u, hr %#x.\n", i, hr); + } + + ID3D11DeviceContext_OMSetRenderTargets(context, 8, rtvs, NULL); + + for (i = 0; i < 8; ++i) + ID3D11DeviceContext_ClearRenderTargetView(context, rtvs[i], red); + draw_quad(&test_context); + + for (i = 0; i < 8; ++i) + { + get_texture_readback(rts[i], 0, &rb); + color = get_readback_color(&rb, 320, 240, 0); + todo_wine_if (i >= 4) + ok(color == expected_colors[i], "%u: Got unexpected color 0x%08x.\n", i, color); + release_resource_readback(&rb); + } + + blend_desc.IndependentBlendEnable = FALSE; + hr = ID3D11Device_CreateBlendState(device, &blend_desc, &blend_state); + ok(hr == S_OK, "Failed to create blend state, hr %#x.\n", hr); + ID3D11DeviceContext_OMSetBlendState(context, blend_state, NULL, D3D11_DEFAULT_SAMPLE_MASK); + ID3D11BlendState_Release(blend_state); + + for (i = 0; i < 8; ++i) + ID3D11DeviceContext_ClearRenderTargetView(context, rtvs[i], red); + draw_quad(&test_context); + + for (i = 0; i < 8; ++i) + { + get_texture_readback(rts[i], 0, &rb); + color = get_readback_color(&rb, 320, 240, 0); + todo_wine_if (i >= 4) + ok(color == expected_colors[0], "%u: Got unexpected color 0x%08x.\n", i, color); + release_resource_readback(&rb); + + ID3D11Texture2D_Release(rts[i]); + ID3D11RenderTargetView_Release(rtvs[i]); + } + + ID3D11PixelShader_Release(ps); + release_test_context(&test_context); +} + START_TEST(d3d11) { unsigned int argc, i; @@ -29876,6 +30010,7 @@ START_TEST(d3d11) queue_test(test_standard_pattern); queue_test(test_desktop_window); queue_test(test_sample_attached_rtv); + queue_test(test_color_mask); run_queued_tests(); }
1
0
0
0
Zebediah Figura : d3d10core/tests: Add a test for color masks.
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: 3b043c1fdf8aabefd50a68c07ce9aa15294b1d7a URL:
https://source.winehq.org/git/wine.git/?a=commit;h=3b043c1fdf8aabefd50a68c0…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Mar 6 22:18:37 2020 -0600 d3d10core/tests: Add a test for color masks. 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/d3d10core/tests/d3d10core.c | 113 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) diff --git a/dlls/d3d10core/tests/d3d10core.c b/dlls/d3d10core/tests/d3d10core.c index d291c881e3..3c3438aa37 100644 --- a/dlls/d3d10core/tests/d3d10core.c +++ b/dlls/d3d10core/tests/d3d10core.c @@ -18064,6 +18064,118 @@ static void test_desktop_window(void) ok(!refcount, "Device has %u references left.\n", refcount); } +static void test_color_mask(void) +{ + struct d3d10core_test_context test_context; + D3D10_TEXTURE2D_DESC texture_desc; + ID3D10RenderTargetView *rtvs[8]; + ID3D10BlendState *blend_state; + struct resource_readback rb; + D3D10_BLEND_DESC blend_desc; + ID3D10Texture2D *rts[8]; + ID3D10PixelShader *ps; + ID3D10Device *device; + unsigned int i; + DWORD color; + HRESULT hr; + + static const DWORD expected_colors[] = + {0xff000080, 0xff0080ff, 0xff8000ff, 0x80808080, 0x800000ff, 0xff008080, 0x800080ff, 0xff0000ff}; + + static const DWORD ps_code[] = + { +#if 0 + void main(float4 position : SV_Position, + out float4 t0 : SV_Target0, out float4 t1 : SV_Target1, + out float4 t2 : SV_Target2, out float4 t3 : SV_Target3, + out float4 t4 : SV_Target4, out float4 t5 : SV_Target5, + out float4 t6 : SV_Target6, out float4 t7 : SV_Target7) + { + t0 = t1 = t2 = t3 = t4 = t5 = t6 = t7 = float4(0.5f, 0.5f, 0.5f, 0.5f); + } +#endif + 0x43425844, 0x7b1ab233, 0xdbe32d3b, 0x77084cc5, 0xe874d2b5, 0x00000001, 0x000002b0, 0x00000003, + 0x0000002c, 0x00000060, 0x0000013c, 0x4e475349, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, + 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x505f5653, 0x7469736f, 0x006e6f69, + 0x4e47534f, 0x000000d4, 0x00000008, 0x00000008, 0x000000c8, 0x00000000, 0x00000000, 0x00000003, + 0x00000000, 0x0000000f, 0x000000c8, 0x00000001, 0x00000000, 0x00000003, 0x00000001, 0x0000000f, + 0x000000c8, 0x00000002, 0x00000000, 0x00000003, 0x00000002, 0x0000000f, 0x000000c8, 0x00000003, + 0x00000000, 0x00000003, 0x00000003, 0x0000000f, 0x000000c8, 0x00000004, 0x00000000, 0x00000003, + 0x00000004, 0x0000000f, 0x000000c8, 0x00000005, 0x00000000, 0x00000003, 0x00000005, 0x0000000f, + 0x000000c8, 0x00000006, 0x00000000, 0x00000003, 0x00000006, 0x0000000f, 0x000000c8, 0x00000007, + 0x00000000, 0x00000003, 0x00000007, 0x0000000f, 0x545f5653, 0x65677261, 0xabab0074, 0x52444853, + 0x0000016c, 0x00000040, 0x0000005b, 0x03000065, 0x001020f2, 0x00000000, 0x03000065, 0x001020f2, + 0x00000001, 0x03000065, 0x001020f2, 0x00000002, 0x03000065, 0x001020f2, 0x00000003, 0x03000065, + 0x001020f2, 0x00000004, 0x03000065, 0x001020f2, 0x00000005, 0x03000065, 0x001020f2, 0x00000006, + 0x03000065, 0x001020f2, 0x00000007, 0x08000036, 0x001020f2, 0x00000000, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x08000036, 0x001020f2, 0x00000001, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x08000036, 0x001020f2, 0x00000002, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x08000036, 0x001020f2, 0x00000003, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x08000036, 0x001020f2, 0x00000004, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x08000036, 0x001020f2, 0x00000005, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x08000036, 0x001020f2, 0x00000006, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x08000036, 0x001020f2, 0x00000007, 0x00004002, 0x3f000000, + 0x3f000000, 0x3f000000, 0x3f000000, 0x0100003e, + }; + + static const float red[] = {1.0f, 0.0f, 0.0f, 1.0f}; + + if (!init_test_context(&test_context)) + return; + + device = test_context.device; + + hr = ID3D10Device_CreatePixelShader(device, ps_code, sizeof(ps_code), &ps); + ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); + ID3D10Device_PSSetShader(device, ps); + + memset(&blend_desc, 0, sizeof(blend_desc)); + blend_desc.RenderTargetWriteMask[0] = D3D10_COLOR_WRITE_ENABLE_RED; + blend_desc.RenderTargetWriteMask[1] = D3D10_COLOR_WRITE_ENABLE_GREEN; + blend_desc.RenderTargetWriteMask[2] = D3D10_COLOR_WRITE_ENABLE_BLUE; + blend_desc.RenderTargetWriteMask[3] = D3D10_COLOR_WRITE_ENABLE_ALL; + blend_desc.RenderTargetWriteMask[4] = D3D10_COLOR_WRITE_ENABLE_ALPHA; + blend_desc.RenderTargetWriteMask[5] = D3D10_COLOR_WRITE_ENABLE_RED | D3D10_COLOR_WRITE_ENABLE_GREEN; + blend_desc.RenderTargetWriteMask[6] = D3D10_COLOR_WRITE_ENABLE_GREEN | D3D10_COLOR_WRITE_ENABLE_ALPHA; + blend_desc.RenderTargetWriteMask[7] = 0; + + hr = ID3D10Device_CreateBlendState(device, &blend_desc, &blend_state); + ok(hr == S_OK, "Failed to create blend state, hr %#x.\n", hr); + ID3D10Device_OMSetBlendState(device, blend_state, NULL, D3D10_DEFAULT_SAMPLE_MASK); + + for (i = 0; i < 8; ++i) + { + ID3D10Texture2D_GetDesc(test_context.backbuffer, &texture_desc); + hr = ID3D10Device_CreateTexture2D(device, &texture_desc, NULL, &rts[i]); + ok(hr == S_OK, "Failed to create texture %u, hr %#x.\n", i, hr); + + hr = ID3D10Device_CreateRenderTargetView(device, (ID3D10Resource *)rts[i], NULL, &rtvs[i]); + ok(hr == S_OK, "Failed to create rendertarget view %u, hr %#x.\n", i, hr); + } + + ID3D10Device_OMSetRenderTargets(device, 8, rtvs, NULL); + + for (i = 0; i < 8; ++i) + ID3D10Device_ClearRenderTargetView(device, rtvs[i], red); + draw_quad(&test_context); + + for (i = 0; i < 8; ++i) + { + get_texture_readback(rts[i], 0, &rb); + color = get_readback_color(&rb, 320, 240); + todo_wine_if (i >= 4) + ok(color == expected_colors[i], "%u: Got unexpected color 0x%08x.\n", i, color); + release_resource_readback(&rb); + + ID3D10Texture2D_Release(rts[i]); + ID3D10RenderTargetView_Release(rtvs[i]); + } + + ID3D10BlendState_Release(blend_state); + ID3D10PixelShader_Release(ps); + release_test_context(&test_context); +} + START_TEST(d3d10core) { unsigned int argc, i; @@ -18182,6 +18294,7 @@ START_TEST(d3d10core) queue_test(test_staging_buffers); queue_test(test_render_a8); queue_test(test_desktop_window); + queue_test(test_color_mask); run_queued_tests();
1
0
0
0
Zebediah Figura : wined3d: Move the line antialias state to wined3d_rasterizer_state.
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: 8ddf4e20a53fcc6b37468d30b69b657f14b51ec0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=8ddf4e20a53fcc6b37468d30…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Mar 6 22:18:36 2020 -0600 wined3d: Move the line antialias state to wined3d_rasterizer_state. 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/d3d11/device.c | 3 --- dlls/d3d11/state.c | 1 + dlls/wined3d/device.c | 2 ++ dlls/wined3d/state.c | 10 +++++----- include/wine/wined3d.h | 1 + 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 82292662e4..555d998da2 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -937,7 +937,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon { wined3d_device_set_rasterizer_state(device->wined3d_device, NULL); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, FALSE); - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ANTIALIASEDLINEENABLE, FALSE); wined3d_mutex_unlock(); return; } @@ -946,8 +945,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon desc = &rasterizer_state_impl->desc; wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, desc->MultisampleEnable); - wined3d_device_set_render_state(device->wined3d_device, - WINED3D_RS_ANTIALIASEDLINEENABLE, desc->AntialiasedLineEnable); wined3d_mutex_unlock(); } diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c index 7402ff8ce8..dd2eb6306e 100644 --- a/dlls/d3d11/state.c +++ b/dlls/d3d11/state.c @@ -1084,6 +1084,7 @@ static HRESULT d3d_rasterizer_state_init(struct d3d_rasterizer_state *state, str wined3d_desc.scale_bias = desc->SlopeScaledDepthBias; wined3d_desc.depth_clip = desc->DepthClipEnable; wined3d_desc.scissor = desc->ScissorEnable; + wined3d_desc.line_antialias = desc->AntialiasedLineEnable; /* We cannot fail after creating a wined3d_rasterizer_state object. It * would lead to double free. */ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 13b3348c04..bcad597178 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3603,6 +3603,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, case WINED3D_RS_SLOPESCALEDEPTHBIAS: case WINED3D_RS_DEPTHBIAS: case WINED3D_RS_SCISSORTESTENABLE: + case WINED3D_RS_ANTIALIASEDLINEENABLE: set_rasterizer_state = TRUE; break; @@ -3633,6 +3634,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, desc.scale_bias = bias.f; desc.depth_clip = TRUE; desc.scissor = state->rs[WINED3D_RS_SCISSORTESTENABLE]; + desc.line_antialias = state->rs[WINED3D_RS_ANTIALIASEDLINEENABLE]; if ((entry = wine_rb_get(&device->rasterizer_states, &desc))) { diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 53daca8d52..ca59eba1d7 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1707,9 +1707,9 @@ static void state_msaa(struct wined3d_context *context, const struct wined3d_sta static void state_line_antialias(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info; + const struct wined3d_rasterizer_state *r = state->rasterizer_state; - if (state->render_states[WINED3D_RS_EDGEANTIALIAS] - || state->render_states[WINED3D_RS_ANTIALIASEDLINEENABLE]) + if (state->render_states[WINED3D_RS_EDGEANTIALIAS] || (r && r->desc.line_antialias)) { gl_info->gl_ops.gl.p_glEnable(GL_LINE_SMOOTH); checkGLcall("glEnable(GL_LINE_SMOOTH)"); @@ -4334,6 +4334,7 @@ static void rasterizer(struct wined3d_context *context, const struct wined3d_sta cullmode(r, gl_info); depth_clip(r, gl_info); scissor(r, gl_info); + state_line_antialias(context, state, STATE_RENDER(WINED3D_RS_ANTIALIASEDLINEENABLE)); } static void rasterizer_cc(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) @@ -4351,6 +4352,7 @@ static void rasterizer_cc(struct wined3d_context *context, const struct wined3d_ cullmode(r, gl_info); depth_clip(r, gl_info); scissor(r, gl_info); + state_line_antialias(context, state, STATE_RENDER(WINED3D_RS_ANTIALIASEDLINEENABLE)); } static void psorigin_w(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) @@ -4511,7 +4513,6 @@ const struct wined3d_state_entry_template misc_state_template[] = { STATE_RENDER(WINED3D_RS_DESTBLEND), { STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE), NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE), { STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE), state_blend }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_EDGEANTIALIAS), { STATE_RENDER(WINED3D_RS_EDGEANTIALIAS), state_line_antialias}, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3D_RS_ANTIALIASEDLINEENABLE), { STATE_RENDER(WINED3D_RS_ANTIALIASEDLINEENABLE), state_line_antialias}, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_SEPARATEALPHABLENDENABLE), { STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE), NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_SRCBLENDALPHA), { STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE), NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_DESTBLENDALPHA), { STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE), NULL }, WINED3D_GL_EXT_NONE }, @@ -5431,8 +5432,7 @@ static void validate_state_table(struct wined3d_state_entry *state_table) { 61, 127}, {149, 150}, {169, 169}, - {174, 175}, - {177, 177}, + {174, 177}, {193, 193}, {195, 197}, { 0, 0}, diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 211e9d37d0..7691064f6e 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2041,6 +2041,7 @@ struct wined3d_rasterizer_state_desc float scale_bias; BOOL depth_clip; BOOL scissor; + BOOL line_antialias; }; struct wined3d_sampler_desc
1
0
0
0
Zebediah Figura : wined3d: Move the scissor test state to wined3d_rasterizer_state.
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: a6009fa21ff3703ac32983f873e915098ccf033f URL:
https://source.winehq.org/git/wine.git/?a=commit;h=a6009fa21ff3703ac32983f8…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Mar 6 22:18:35 2020 -0600 wined3d: Move the scissor test state to wined3d_rasterizer_state. 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/d3d11/device.c | 2 -- dlls/d3d11/state.c | 1 + dlls/wined3d/context.c | 5 ++--- dlls/wined3d/cs.c | 2 +- dlls/wined3d/device.c | 2 ++ dlls/wined3d/state.c | 11 +++++------ dlls/wined3d/surface.c | 4 ++-- include/wine/wined3d.h | 1 + 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 59e3ab25af..82292662e4 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -936,7 +936,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon if (!(rasterizer_state_impl = unsafe_impl_from_ID3D11RasterizerState(rasterizer_state))) { wined3d_device_set_rasterizer_state(device->wined3d_device, NULL); - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SCISSORTESTENABLE, FALSE); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, FALSE); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ANTIALIASEDLINEENABLE, FALSE); wined3d_mutex_unlock(); @@ -946,7 +945,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon wined3d_device_set_rasterizer_state(device->wined3d_device, rasterizer_state_impl->wined3d_state); desc = &rasterizer_state_impl->desc; - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SCISSORTESTENABLE, desc->ScissorEnable); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, desc->MultisampleEnable); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ANTIALIASEDLINEENABLE, desc->AntialiasedLineEnable); diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c index c1aaa094e0..7402ff8ce8 100644 --- a/dlls/d3d11/state.c +++ b/dlls/d3d11/state.c @@ -1083,6 +1083,7 @@ static HRESULT d3d_rasterizer_state_init(struct d3d_rasterizer_state *state, str wined3d_desc.depth_bias_clamp = desc->DepthBiasClamp; wined3d_desc.scale_bias = desc->SlopeScaledDepthBias; wined3d_desc.depth_clip = desc->DepthClipEnable; + wined3d_desc.scissor = desc->ScissorEnable; /* We cannot fail after creating a wined3d_rasterizer_state object. It * would lead to double free. */ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 28e0d262a5..f4a5189ba1 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -3150,11 +3150,10 @@ void wined3d_context_gl_apply_blit_state(struct wined3d_context_gl *context_gl, gl_info->gl_ops.gl.p_glDisable(GL_BLEND); context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE)); gl_info->gl_ops.gl.p_glDisable(GL_CULL_FACE); + gl_info->gl_ops.gl.p_glDisable(GL_SCISSOR_TEST); context_invalidate_state(context, STATE_RASTERIZER); gl_info->gl_ops.gl.p_glDisable(GL_STENCIL_TEST); context_invalidate_state(context, STATE_RENDER(WINED3D_RS_STENCILENABLE)); - gl_info->gl_ops.gl.p_glDisable(GL_SCISSOR_TEST); - context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE)); if (gl_info->supported[ARB_POINT_SPRITE]) { gl_info->gl_ops.gl.p_glDisable(GL_POINT_SPRITE_ARB); @@ -3428,7 +3427,7 @@ BOOL wined3d_context_gl_apply_clear_state(struct wined3d_context_gl *context_gl, checkGLcall("setting up state for clear"); context_invalidate_state(&context_gl->c, STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE)); - context_invalidate_state(&context_gl->c, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE)); + context_invalidate_state(&context_gl->c, STATE_RASTERIZER); context_invalidate_state(&context_gl->c, STATE_SCISSORRECT); return TRUE; diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index ac518cae04..dbdf5f2ec2 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -614,7 +614,7 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT * op->rt_count = rt_count; op->fb = &cs->fb; SetRect(&op->draw_rect, vp->x, vp->y, vp->x + vp->width, vp->y + vp->height); - if (state->render_states[WINED3D_RS_SCISSORTESTENABLE]) + if (state->rasterizer_state && state->rasterizer_state->desc.scissor) IntersectRect(&op->draw_rect, &op->draw_rect, &state->scissor_rects[0]); op->color = *color; op->depth = depth; diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 50a0a740bf..13b3348c04 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3602,6 +3602,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, case WINED3D_RS_CULLMODE: case WINED3D_RS_SLOPESCALEDEPTHBIAS: case WINED3D_RS_DEPTHBIAS: + case WINED3D_RS_SCISSORTESTENABLE: set_rasterizer_state = TRUE; break; @@ -3631,6 +3632,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, bias.d = state->rs[WINED3D_RS_SLOPESCALEDEPTHBIAS]; desc.scale_bias = bias.f; desc.depth_clip = TRUE; + desc.scissor = state->rs[WINED3D_RS_SCISSORTESTENABLE]; if ((entry = wine_rb_get(&device->rasterizer_states, &desc))) { diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 4d5455e19b..53daca8d52 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1721,11 +1721,9 @@ static void state_line_antialias(struct wined3d_context *context, const struct w } } -static void state_scissor(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +static void scissor(const struct wined3d_rasterizer_state *r, const struct wined3d_gl_info *gl_info) { - const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info; - - if (state->render_states[WINED3D_RS_SCISSORTESTENABLE]) + if (r && r->desc.scissor) { gl_info->gl_ops.gl.p_glEnable(GL_SCISSOR_TEST); checkGLcall("glEnable(GL_SCISSOR_TEST)"); @@ -4335,6 +4333,7 @@ static void rasterizer(struct wined3d_context *context, const struct wined3d_sta fillmode(r, gl_info); cullmode(r, gl_info); depth_clip(r, gl_info); + scissor(r, gl_info); } static void rasterizer_cc(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) @@ -4351,6 +4350,7 @@ static void rasterizer_cc(struct wined3d_context *context, const struct wined3d_ fillmode(r, gl_info); cullmode(r, gl_info); depth_clip(r, gl_info); + scissor(r, gl_info); } static void psorigin_w(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) @@ -4660,7 +4660,6 @@ const struct wined3d_state_entry_template misc_state_template[] = { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE), { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE), state_colorwrite }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_BLENDOP), { STATE_RENDER(WINED3D_RS_BLENDOP), state_blendop }, WINED3D_GL_BLEND_EQUATION }, { STATE_RENDER(WINED3D_RS_BLENDOP), { STATE_RENDER(WINED3D_RS_BLENDOP), state_blendop_w }, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE), { STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE), state_scissor }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE1), { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE1), state_colorwrite1 }, EXT_DRAW_BUFFERS2 }, { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE1), { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE), NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE2), { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE2), state_colorwrite2 }, EXT_DRAW_BUFFERS2 }, @@ -5432,7 +5431,7 @@ static void validate_state_table(struct wined3d_state_entry *state_table) { 61, 127}, {149, 150}, {169, 169}, - {175, 175}, + {174, 175}, {177, 177}, {193, 193}, {195, 197}, diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index c0f28099cf..d8dc379c1a 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -131,7 +131,7 @@ static void texture2d_depth_blt_fbo(const struct wined3d_device *device, struct } gl_info->gl_ops.gl.p_glDisable(GL_SCISSOR_TEST); - context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE)); + context_invalidate_state(context, STATE_RASTERIZER); gl_info->fbo_ops.glBlitFramebuffer(src_rect->left, src_rect->top, src_rect->right, src_rect->bottom, dst_rect->left, dst_rect->top, dst_rect->right, dst_rect->bottom, gl_mask, GL_NEAREST); @@ -267,7 +267,7 @@ void texture2d_blt_fbo(struct wined3d_device *device, struct wined3d_context *co context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE3)); gl_info->gl_ops.gl.p_glDisable(GL_SCISSOR_TEST); - context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE)); + context_invalidate_state(context, STATE_RASTERIZER); gl_info->fbo_ops.glBlitFramebuffer(src_rect->left, src_rect->top, src_rect->right, src_rect->bottom, dst_rect->left, dst_rect->top, dst_rect->right, dst_rect->bottom, GL_COLOR_BUFFER_BIT, gl_filter); diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 85d7885f49..211e9d37d0 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2040,6 +2040,7 @@ struct wined3d_rasterizer_state_desc float depth_bias_clamp; float scale_bias; BOOL depth_clip; + BOOL scissor; }; struct wined3d_sampler_desc
1
0
0
0
Zebediah Figura : wined3d: Move the constant depth bias to wined3d_rasterizer_state.
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: 327d1792dcae470f58004d05c0c88df9ce0d9b9c URL:
https://source.winehq.org/git/wine.git/?a=commit;h=327d1792dcae470f58004d05…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Mar 6 22:18:34 2020 -0600 wined3d: Move the constant depth bias to wined3d_rasterizer_state. 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/d3d11/device.c | 8 -------- dlls/d3d11/state.c | 1 + dlls/wined3d/cs.c | 4 ++-- dlls/wined3d/device.c | 3 +++ dlls/wined3d/state.c | 27 ++++++++++++--------------- include/wine/wined3d.h | 1 + 6 files changed, 19 insertions(+), 25 deletions(-) diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index 0e46816246..59e3ab25af 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -929,11 +929,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon struct d3d_device *device = device_from_immediate_ID3D11DeviceContext1(iface); struct d3d_rasterizer_state *rasterizer_state_impl; const D3D11_RASTERIZER_DESC *desc; - union - { - DWORD d; - float f; - } const_bias; TRACE("iface %p, rasterizer_state %p.\n", iface, rasterizer_state); @@ -941,7 +936,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon if (!(rasterizer_state_impl = unsafe_impl_from_ID3D11RasterizerState(rasterizer_state))) { wined3d_device_set_rasterizer_state(device->wined3d_device, NULL); - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, 0); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SCISSORTESTENABLE, FALSE); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, FALSE); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_ANTIALIASEDLINEENABLE, FALSE); @@ -952,8 +946,6 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_RSSetState(ID3D11DeviceCon wined3d_device_set_rasterizer_state(device->wined3d_device, rasterizer_state_impl->wined3d_state); desc = &rasterizer_state_impl->desc; - const_bias.f = desc->DepthBias; - wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_DEPTHBIAS, const_bias.d); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_SCISSORTESTENABLE, desc->ScissorEnable); wined3d_device_set_render_state(device->wined3d_device, WINED3D_RS_MULTISAMPLEANTIALIAS, desc->MultisampleEnable); wined3d_device_set_render_state(device->wined3d_device, diff --git a/dlls/d3d11/state.c b/dlls/d3d11/state.c index 4d56f7dc75..c1aaa094e0 100644 --- a/dlls/d3d11/state.c +++ b/dlls/d3d11/state.c @@ -1079,6 +1079,7 @@ static HRESULT d3d_rasterizer_state_init(struct d3d_rasterizer_state *state, str wined3d_desc.fill_mode = desc->FillMode; wined3d_desc.cull_mode = desc->CullMode; wined3d_desc.front_ccw = desc->FrontCounterClockwise; + wined3d_desc.depth_bias = desc->DepthBias; wined3d_desc.depth_bias_clamp = desc->DepthBiasClamp; wined3d_desc.scale_bias = desc->SlopeScaledDepthBias; wined3d_desc.depth_clip = desc->DepthClipEnable; diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index ec17b59d71..ac518cae04 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1150,12 +1150,12 @@ static void wined3d_cs_exec_set_depth_stencil_view(struct wined3d_cs *cs, const device_invalidate_state(device, STATE_RENDER(WINED3D_RS_ZENABLE)); device_invalidate_state(device, STATE_RENDER(WINED3D_RS_STENCILENABLE)); device_invalidate_state(device, STATE_RENDER(WINED3D_RS_STENCILWRITEMASK)); - device_invalidate_state(device, STATE_RENDER(WINED3D_RS_DEPTHBIAS)); + device_invalidate_state(device, STATE_RASTERIZER); } else if (prev) { if (prev->format->depth_bias_scale != op->view->format->depth_bias_scale) - device_invalidate_state(device, STATE_RENDER(WINED3D_RS_DEPTHBIAS)); + device_invalidate_state(device, STATE_RASTERIZER); if (prev->format->stencil_size != op->view->format->stencil_size) device_invalidate_state(device, STATE_RENDER(WINED3D_RS_STENCILREF)); } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 7e727242f4..50a0a740bf 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3601,6 +3601,7 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, case WINED3D_RS_FILLMODE: case WINED3D_RS_CULLMODE: case WINED3D_RS_SLOPESCALEDEPTHBIAS: + case WINED3D_RS_DEPTHBIAS: set_rasterizer_state = TRUE; break; @@ -3625,6 +3626,8 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, memset(&desc, 0, sizeof(desc)); desc.fill_mode = state->rs[WINED3D_RS_FILLMODE]; desc.cull_mode = state->rs[WINED3D_RS_CULLMODE]; + bias.d = state->rs[WINED3D_RS_DEPTHBIAS]; + desc.depth_bias = bias.f; bias.d = state->rs[WINED3D_RS_SLOPESCALEDEPTHBIAS]; desc.scale_bias = bias.f; desc.depth_clip = TRUE; diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 85bd1e24a3..4d5455e19b 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1752,25 +1752,25 @@ static void state_scissor(struct wined3d_context *context, const struct wined3d_ * * Note that SLOPESCALEDEPTHBIAS is a scaling factor for the depth slope, and * doesn't need to be scaled to account for GL vs D3D differences. */ -static void state_depthbias(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) +static void depthbias(struct wined3d_context *context, const struct wined3d_state *state) { const struct wined3d_gl_info *gl_info = wined3d_context_gl(context)->gl_info; const struct wined3d_rasterizer_state *r = state->rasterizer_state; float scale_bias = r ? r->desc.scale_bias : 0.0f; + union + { + DWORD d; + float f; + } const_bias; - if (scale_bias || state->render_states[WINED3D_RS_DEPTHBIAS]) + const_bias.f = r ? r->desc.depth_bias : 0.0f; + + if (scale_bias || const_bias.f) { const struct wined3d_rendertarget_view *depth = state->fb->depth_stencil; float factor, units, scale, clamp; - union - { - DWORD d; - float f; - } const_bias; - clamp = r ? r->desc.depth_bias_clamp : 0.0f; - const_bias.d = state->render_states[WINED3D_RS_DEPTHBIAS]; if (context->d3d_info->wined3d_creation_flags & WINED3D_LEGACY_DEPTH_BIAS) { @@ -4331,8 +4331,7 @@ static void rasterizer(struct wined3d_context *context, const struct wined3d_sta gl_info->gl_ops.gl.p_glFrontFace(mode); checkGLcall("glFrontFace"); - if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_DEPTHBIAS))) - state_depthbias(context, state, STATE_RENDER(WINED3D_RS_DEPTHBIAS)); + depthbias(context, state); fillmode(r, gl_info); cullmode(r, gl_info); depth_clip(r, gl_info); @@ -4348,8 +4347,7 @@ static void rasterizer_cc(struct wined3d_context *context, const struct wined3d_ gl_info->gl_ops.gl.p_glFrontFace(mode); checkGLcall("glFrontFace"); - if (!isStateDirty(context, STATE_RENDER(WINED3D_RS_DEPTHBIAS))) - state_depthbias(context, state, STATE_RENDER(WINED3D_RS_DEPTHBIAS)); + depthbias(context, state); fillmode(r, gl_info); cullmode(r, gl_info); depth_clip(r, gl_info); @@ -4669,7 +4667,6 @@ const struct wined3d_state_entry_template misc_state_template[] = { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE2), { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE), NULL }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE3), { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE3), state_colorwrite3 }, EXT_DRAW_BUFFERS2 }, { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE3), { STATE_RENDER(WINED3D_RS_COLORWRITEENABLE), NULL }, WINED3D_GL_EXT_NONE }, - { STATE_RENDER(WINED3D_RS_DEPTHBIAS), { STATE_RENDER(WINED3D_RS_DEPTHBIAS), state_depthbias }, WINED3D_GL_EXT_NONE }, { STATE_RENDER(WINED3D_RS_ZVISIBLE), { STATE_RENDER(WINED3D_RS_ZVISIBLE), state_zvisible }, WINED3D_GL_EXT_NONE }, /* Samplers */ { STATE_SAMPLER(0), { STATE_SAMPLER(0), sampler }, WINED3D_GL_EXT_NONE }, @@ -5438,7 +5435,7 @@ static void validate_state_table(struct wined3d_state_entry *state_table) {175, 175}, {177, 177}, {193, 193}, - {196, 197}, + {195, 197}, { 0, 0}, }; static const DWORD simple_states[] = diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index 6fc3a1aaa8..85d7885f49 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2036,6 +2036,7 @@ struct wined3d_rasterizer_state_desc enum wined3d_fill_mode fill_mode; enum wined3d_cull cull_mode; BOOL front_ccw; + float depth_bias; float depth_bias_clamp; float scale_bias; BOOL depth_clip;
1
0
0
0
Zebediah Figura : wined3d: Explicitly zero the whole wined3d_rasterizer_state_desc structure in wined3d_device_apply_stateblock().
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: ae6fdbea39e6c51c97049da24ee072ca8f3f3060 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=ae6fdbea39e6c51c97049da2…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Fri Mar 6 22:18:33 2020 -0600 wined3d: Explicitly zero the whole wined3d_rasterizer_state_desc structure in wined3d_device_apply_stateblock(). 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/device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 407dd20469..7e727242f4 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3622,10 +3622,9 @@ void CDECL wined3d_device_apply_stateblock(struct wined3d_device *device, float f; } bias; + memset(&desc, 0, sizeof(desc)); desc.fill_mode = state->rs[WINED3D_RS_FILLMODE]; desc.cull_mode = state->rs[WINED3D_RS_CULLMODE]; - desc.front_ccw = FALSE; - desc.depth_bias_clamp = 0.0f; bias.d = state->rs[WINED3D_RS_SLOPESCALEDEPTHBIAS]; desc.scale_bias = bias.f; desc.depth_clip = TRUE;
1
0
0
0
Zebediah Figura : ntdll/tests: Test renaming a file to the same name.
by Alexandre Julliard
09 Mar '20
09 Mar '20
Module: wine Branch: master Commit: 42b7bf06920daa65ed3c22d5ffdcf9c7776343a4 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=42b7bf06920daa65ed3c22d5…
Author: Zebediah Figura <z.figura12(a)gmail.com> Date: Thu Mar 5 20:47:14 2020 -0600 ntdll/tests: Test renaming a file to the same name. Signed-off-by: Zebediah Figura <zfigura(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/tests/file.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c index 28a3e12334..e71f887c2b 100644 --- a/dlls/ntdll/tests/file.c +++ b/dlls/ntdll/tests/file.c @@ -2106,6 +2106,30 @@ static void test_file_rename_information(void) HeapFree( GetProcessHeap(), 0, fri ); delete_object( oldpath ); delete_object( newpath ); + + /* oldpath == newpath */ + res = GetTempFileNameW( tmp_path, fooW, 0, oldpath ); + ok( res != 0, "failed to create temp file\n" ); + handle = CreateFileW( oldpath, GENERIC_WRITE | DELETE, 0, NULL, CREATE_ALWAYS, 0, 0 ); + ok( handle != INVALID_HANDLE_VALUE, "CreateFileW failed\n" ); + + pRtlDosPathNameToNtPathName_U( oldpath, &name_str, NULL, NULL ); + fri = HeapAlloc( GetProcessHeap(), 0, sizeof(FILE_RENAME_INFORMATION) + name_str.Length ); + fri->ReplaceIfExists = FALSE; + fri->RootDirectory = NULL; + fri->FileNameLength = name_str.Length; + memcpy( fri->FileName, name_str.Buffer, name_str.Length ); + pRtlFreeUnicodeString( &name_str ); + + U(io).Status = 0xdeadbeef; + res = pNtSetInformationFile( handle, &io, fri, sizeof(FILE_RENAME_INFORMATION) + fri->FileNameLength, FileRenameInformation ); + todo_wine ok( U(io).Status == STATUS_SUCCESS, "got io status %#x\n", U(io).Status ); + todo_wine ok( res == STATUS_SUCCESS, "got status %x\n", res ); + ok( GetFileAttributesW( oldpath ) != INVALID_FILE_ATTRIBUTES, "file should exist\n" ); + + CloseHandle( handle ); + HeapFree( GetProcessHeap(), 0, fri ); + delete_object( oldpath ); } static void test_file_link_information(void)
1
0
0
0
← Newer
1
...
76
77
78
79
80
81
82
...
100
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
Results per page:
10
25
50
100
200