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
January 2016
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
627 discussions
Start a n
N
ew thread
Józef Kucia : wined3d: Validate render state in wined3d_device_set_render_state().
by Alexandre Julliard
28 Jan '16
28 Jan '16
Module: wine Branch: master Commit: 99fbc04bfe13bf2471725f88000892f8fee9f526 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99fbc04bfe13bf2471725f880…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Thu Jan 28 00:17:46 2016 +0100 wined3d: Validate render state in wined3d_device_set_render_state(). Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/device.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 177d008..7059e21 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -2032,10 +2032,17 @@ static void resolve_depth_buffer(struct wined3d_state *state) void CDECL wined3d_device_set_render_state(struct wined3d_device *device, enum wined3d_render_state state, DWORD value) { - DWORD old_value = device->state.render_states[state]; + DWORD old_value; TRACE("device %p, state %s (%#x), value %#x.\n", device, debug_d3drenderstate(state), state, value); + if (state > WINEHIGHEST_RENDER_STATE) + { + WARN("Unhandled render state %#x.\n", state); + return; + } + + old_value = device->state.render_states[state]; device->update_state->render_states[state] = value; /* Handle recording of state blocks. */
1
0
0
0
Matteo Bruni : d3d8/tests: Test the creation of render targets with invalid multisample settings.
by Alexandre Julliard
28 Jan '16
28 Jan '16
Module: wine Branch: master Commit: e8e206069792068dc2860e231b52263cf86394d0 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e8e206069792068dc2860e231…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jan 28 00:15:48 2016 +0100 d3d8/tests: Test the creation of render targets with invalid multisample settings. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/tests/device.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 5b72b43..5dba46c 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -845,6 +845,65 @@ cleanup: DestroyWindow(window); } +static void test_invalid_multisample(void) +{ + IDirect3DDevice8 *device; + IDirect3DSurface8 *rt; + IDirect3D8 *d3d; + BOOL available; + ULONG refcount; + HWND window; + HRESULT hr; + + window = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + ok(!!window, "Failed to create a window.\n"); + d3d = Direct3DCreate8(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + + if (!(device = create_device(d3d, window, NULL))) + { + skip("Failed to create a 3D device, skipping test.\n"); + goto cleanup; + } + + available = SUCCEEDED(IDirect3D8_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES)); + + hr = IDirect3DDevice8_CreateRenderTarget(device, 128, 128, + D3DFMT_X8R8G8B8, D3DMULTISAMPLE_2_SAMPLES, FALSE, &rt); + if (available) + { + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + IDirect3DSurface8_Release(rt); + } + else + { + ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x.\n", hr); + } + + /* We assume D3DMULTISAMPLE_15_SAMPLES is never supported in practice. */ + available = SUCCEEDED(IDirect3D8_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_15_SAMPLES)); + hr = IDirect3DDevice8_CreateRenderTarget(device, 128, 128, + D3DFMT_X8R8G8B8, D3DMULTISAMPLE_15_SAMPLES, FALSE, &rt); + if (available) + { + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + IDirect3DSurface8_Release(rt); + } + else + { + ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x.\n", hr); + } + + refcount = IDirect3DDevice8_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +cleanup: + IDirect3D8_Release(d3d); + DestroyWindow(window); +} + static void test_cursor(void) { HMODULE user32_handle = GetModuleHandleA("user32.dll"); @@ -7842,6 +7901,7 @@ START_TEST(device) test_refcount(); test_mipmap_levels(); test_checkdevicemultisampletype(); + test_invalid_multisample(); test_cursor(); test_cursor_pos(); test_states();
1
0
0
0
Matteo Bruni : d3d8/tests: Port test_checkdevicemultisampletype() from d3d9.
by Alexandre Julliard
28 Jan '16
28 Jan '16
Module: wine Branch: master Commit: 5baa8f0d18990e8626a068905f7c8e01c0f119e5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=5baa8f0d18990e8626a068905…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jan 28 00:15:47 2016 +0100 d3d8/tests: Port test_checkdevicemultisampletype() from d3d9. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d8/tests/device.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index c1dc886..5b72b43 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -790,6 +790,61 @@ cleanup: DestroyWindow(window); } +static void test_checkdevicemultisampletype(void) +{ + IDirect3D8 *d3d; + HWND window; + HRESULT hr; + + window = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + ok(!!window, "Failed to create a window.\n"); + d3d = Direct3DCreate8(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + + if (IDirect3D8_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES) == D3DERR_NOTAVAILABLE) + { + skip("Multisampling not supported for D3DFMT_X8R8G8B8, skipping test.\n"); + goto cleanup; + } + + hr = IDirect3D8_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_UNKNOWN, TRUE, D3DMULTISAMPLE_NONE); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + hr = IDirect3D8_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + 65536, TRUE, D3DMULTISAMPLE_NONE); + todo_wine ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + + hr = IDirect3D8_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_NONE); + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + hr = IDirect3D8_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, FALSE, D3DMULTISAMPLE_NONE); + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + + hr = IDirect3D8_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES); + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + + /* We assume D3DMULTISAMPLE_15_SAMPLES is never supported in practice. */ + hr = IDirect3D8_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_15_SAMPLES); + ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3D8_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, 65536); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3D8_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_DXT5, TRUE, D3DMULTISAMPLE_2_SAMPLES); + ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x.\n", hr); + +cleanup: + IDirect3D8_Release(d3d); + DestroyWindow(window); +} + static void test_cursor(void) { HMODULE user32_handle = GetModuleHandleA("user32.dll"); @@ -7786,6 +7841,7 @@ START_TEST(device) test_swapchain(); test_refcount(); test_mipmap_levels(); + test_checkdevicemultisampletype(); test_cursor(); test_cursor_pos(); test_states();
1
0
0
0
Matteo Bruni : d3d9/tests: Test the creation of render targets with invalid multisample settings.
by Alexandre Julliard
28 Jan '16
28 Jan '16
Module: wine Branch: master Commit: 7fd7516922832dfc3dfa12ff91532a9e2891b6ba URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7fd7516922832dfc3dfa12ff9…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jan 28 00:15:46 2016 +0100 d3d9/tests: Test the creation of render targets with invalid multisample settings. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/tests/device.c | 73 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index ad3e21b..2f91efb 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -1084,6 +1084,78 @@ cleanup: DestroyWindow(window); } +static void test_invalid_multisample(void) +{ + IDirect3DDevice9 *device; + IDirect3DSurface9 *rt; + DWORD quality_levels; + IDirect3D9 *d3d; + BOOL available; + ULONG refcount; + HWND window; + HRESULT hr; + + window = CreateWindowA("d3d9_test_wc", "d3d9_test", WS_OVERLAPPEDWINDOW, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + ok(!!window, "Failed to create a window.\n"); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + + if (!(device = create_device(d3d, window, NULL))) + { + skip("Failed to create a 3D device, skipping test.\n"); + goto cleanup; + } + + available = SUCCEEDED(IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_NONMASKABLE, &quality_levels)); + hr = IDirect3DDevice9_CreateRenderTarget(device, 128, 128, + D3DFMT_X8R8G8B8, D3DMULTISAMPLE_NONMASKABLE, 0, FALSE, &rt, NULL); + if (available) + { + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + IDirect3DSurface9_Release(rt); + hr = IDirect3DDevice9_CreateRenderTarget(device, 128, 128, + D3DFMT_X8R8G8B8, D3DMULTISAMPLE_NONMASKABLE, quality_levels, FALSE, &rt, NULL); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + } + else + { + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + } + + available = SUCCEEDED(IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES, &quality_levels)); + hr = IDirect3DDevice9_CreateRenderTarget(device, 128, 128, + D3DFMT_X8R8G8B8, D3DMULTISAMPLE_2_SAMPLES, 0, FALSE, &rt, NULL); + if (available) + { + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + IDirect3DSurface9_Release(rt); + hr = IDirect3DDevice9_CreateRenderTarget(device, 128, 128, + D3DFMT_X8R8G8B8, D3DMULTISAMPLE_2_SAMPLES, quality_levels, FALSE, &rt, NULL); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + } + else + { + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + } + + /* We assume D3DMULTISAMPLE_15_SAMPLES is never supported in practice. */ + hr = IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_15_SAMPLES, NULL); + ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DDevice9_CreateRenderTarget(device, 128, 128, + D3DFMT_X8R8G8B8, D3DMULTISAMPLE_15_SAMPLES, 0, FALSE, &rt, NULL); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +cleanup: + IDirect3D9_Release(d3d); + DestroyWindow(window); +} + static void test_swapchain(void) { IDirect3DSwapChain9 *swapchain0; @@ -10714,6 +10786,7 @@ START_TEST(device) test_refcount(); test_mipmap_levels(); test_checkdevicemultisampletype(); + test_invalid_multisample(); test_cursor(); test_cursor_pos(); test_reset_fullscreen();
1
0
0
0
Matteo Bruni : d3d9/tests: Extend test_checkdevicemultisampletype().
by Alexandre Julliard
28 Jan '16
28 Jan '16
Module: wine Branch: master Commit: 57c1f072f0778405eab9a112f668ba1d74bac3fe URL:
http://source.winehq.org/git/wine.git/?a=commit;h=57c1f072f0778405eab9a112f…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jan 28 00:15:45 2016 +0100 d3d9/tests: Extend test_checkdevicemultisampletype(). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/tests/device.c | 71 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 54 insertions(+), 17 deletions(-) diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 39789a8..ad3e21b 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -1003,10 +1003,8 @@ cleanup: static void test_checkdevicemultisampletype(void) { - IDirect3DDevice9 *device; DWORD quality_levels; IDirect3D9 *d3d; - ULONG refcount; HWND window; HRESULT hr; @@ -1015,34 +1013,73 @@ static void test_checkdevicemultisampletype(void) ok(!!window, "Failed to create a window.\n"); d3d = Direct3DCreate9(D3D_SDK_VERSION); ok(!!d3d, "Failed to create a D3D object.\n"); - if (!(device = create_device(d3d, window, NULL))) + + if (IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES, NULL) == D3DERR_NOTAVAILABLE) { - skip("Failed to create a 3D device, skipping test.\n"); + skip("Multisampling not supported for D3DFMT_X8R8G8B8, skipping test.\n"); goto cleanup; } + hr = IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_UNKNOWN, TRUE, D3DMULTISAMPLE_NONE, NULL); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + hr = IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + 65536, TRUE, D3DMULTISAMPLE_NONE, NULL); + todo_wine ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + + hr = IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_NONE, NULL); + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + quality_levels = 0; hr = IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_NONE, &quality_levels); - ok(SUCCEEDED(hr) || hr == D3DERR_NOTAVAILABLE, "CheckDeviceMultiSampleType failed with (%08x)\n", hr); - if (hr == D3DERR_NOTAVAILABLE) - { - skip("IDirect3D9_CheckDeviceMultiSampleType not available\n"); - goto cleanup; - } + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); ok(quality_levels == 1, "Got unexpected quality_levels %u.\n", quality_levels); - + quality_levels = 0; hr = IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, FALSE, D3DMULTISAMPLE_NONE, &quality_levels); - ok(SUCCEEDED(hr), "CheckDeviceMultiSampleType failed with (%08x)\n", hr); + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(quality_levels == 1, "Got unexpected quality_levels %u.\n", quality_levels); + + quality_levels = 0; + hr = IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_NONMASKABLE, NULL); + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + hr = IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_NONMASKABLE, &quality_levels); + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(quality_levels, "Got unexpected quality_levels %u.\n", quality_levels); + + quality_levels = 0; + hr = IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES, NULL); + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + hr = IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_2_SAMPLES, &quality_levels); + ok(SUCCEEDED(hr), "Got unexpected hr %#x.\n", hr); + ok(quality_levels, "Got unexpected quality_levels %u.\n", quality_levels); + + /* We assume D3DMULTISAMPLE_15_SAMPLES is never supported in practice. */ + quality_levels = 0; + hr = IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_15_SAMPLES, NULL); + ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x.\n", hr); + hr = IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, D3DMULTISAMPLE_15_SAMPLES, &quality_levels); + ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x.\n", hr); ok(quality_levels == 1, "Got unexpected quality_levels %u.\n", quality_levels); + hr = IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, TRUE, 65536, NULL); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3D9_CheckDeviceMultiSampleType(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_DXT5, TRUE, D3DMULTISAMPLE_2_SAMPLES, NULL); + ok(hr == D3DERR_NOTAVAILABLE, "Got unexpected hr %#x.\n", hr); + cleanup: - if (device) - { - refcount = IDirect3DDevice9_Release(device); - ok(!refcount, "Device has %u references left.\n", refcount); - } IDirect3D9_Release(d3d); DestroyWindow(window); }
1
0
0
0
Matteo Bruni : wined3d: Fail texture creation when invalid multisample settings are specified.
by Alexandre Julliard
28 Jan '16
28 Jan '16
Module: wine Branch: master Commit: 99bcae02296c654c634d76fdd2c9edaf1eb61f6e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=99bcae02296c654c634d76fdd…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jan 28 00:15:44 2016 +0100 wined3d: Fail texture creation when invalid multisample settings are specified. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d11/texture.c | 2 ++ dlls/d3d9/device.c | 2 ++ dlls/wined3d/surface.c | 6 ------ dlls/wined3d/texture.c | 21 +++++++++++++++++++++ 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/dlls/d3d11/texture.c b/dlls/d3d11/texture.c index a73f3fc..11bda45 100644 --- a/dlls/d3d11/texture.c +++ b/dlls/d3d11/texture.c @@ -482,6 +482,8 @@ static HRESULT d3d_texture2d_init(struct d3d_texture2d *texture, struct d3d_devi WARN("Failed to create wined3d texture, hr %#x.\n", hr); wined3d_private_store_cleanup(&texture->private_store); wined3d_mutex_unlock(); + if (hr == WINED3DERR_NOTAVAILABLE) + hr = E_INVALIDARG; return hr; } texture->desc.MipLevels = levels; diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index e51cdd5..f357570 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -1137,6 +1137,8 @@ static HRESULT d3d9_device_create_surface(struct d3d9_device *device, UINT width { wined3d_mutex_unlock(); WARN("Failed to create texture, hr %#x.\n", hr); + if (hr == WINED3DERR_NOTAVAILABLE) + hr = D3DERR_INVALIDCALL; return hr; } diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 145e2c1..a8cab70 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2879,12 +2879,6 @@ static void surface_prepare_rb(struct wined3d_surface *surface, const struct win break; } } - if (i == sizeof(format->multisample_types) * 8) - { - WARN("Unsupported quality level %u requested for WINED3D_MULTISAMPLE_NON_MASKABLE.\n", - surface->resource.multisample_quality); - i = 1; - } samples = i + 1; } else diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c index 556ce0c..7ea1b63 100644 --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c @@ -1458,6 +1458,27 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct return WINED3DERR_INVALIDCALL; } + if (desc->multisample_type != WINED3D_MULTISAMPLE_NONE) + { + const struct wined3d_format *format = wined3d_get_format(&device->adapter->gl_info, desc->format); + + if (desc->multisample_type == WINED3D_MULTISAMPLE_NON_MASKABLE + && desc->multisample_quality >= wined3d_popcount(format->multisample_types)) + { + WARN("Unsupported quality level %u requested for WINED3D_MULTISAMPLE_NON_MASKABLE.\n", + desc->multisample_quality); + return WINED3DERR_NOTAVAILABLE; + } + if (desc->multisample_type != WINED3D_MULTISAMPLE_NON_MASKABLE + && (!(format->multisample_types & 1u << (desc->multisample_type - 1)) + || desc->multisample_quality)) + { + WARN("Unsupported multisample type %u quality %u requested.\n", desc->multisample_type, + desc->multisample_quality); + return WINED3DERR_NOTAVAILABLE; + } + } + if (!(object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)))) return E_OUTOFMEMORY;
1
0
0
0
Matteo Bruni : wined3d: Add a real implementation of wined3d_check_device_multisample_type().
by Alexandre Julliard
28 Jan '16
28 Jan '16
Module: wine Branch: master Commit: b1429f931e816feee2f7b7fe065a393c4caa7960 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b1429f931e816feee2f7b7fe0…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Thu Jan 28 00:15:43 2016 +0100 wined3d: Add a real implementation of wined3d_check_device_multisample_type(). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/directx.c | 37 ++++++++++++++++++++----------------- dlls/wined3d/surface.c | 26 +++++++++++++++++++++++++- dlls/wined3d/utils.c | 31 ++++++++++++++++++++++++++++++- dlls/wined3d/wined3d_private.h | 2 ++ 4 files changed, 77 insertions(+), 19 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 9faf4ec..c7b63f1 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -4408,36 +4408,39 @@ HRESULT CDECL wined3d_check_device_multisample_type(const struct wined3d *wined3 enum wined3d_device_type device_type, enum wined3d_format_id surface_format_id, BOOL windowed, enum wined3d_multisample_type multisample_type, DWORD *quality_levels) { - const struct wined3d_gl_info *gl_info; + const struct wined3d_gl_info *gl_info = &wined3d->adapters[adapter_idx].gl_info; + const struct wined3d_format *format = wined3d_get_format(gl_info, surface_format_id); + HRESULT hr = WINED3D_OK; - TRACE("wined3d %p, adapter_idx %u, device_type %s, surface_format %s,\n" + TRACE("wined3d %p, adapter_idx %u, device_type %s, surface_format %s, " "windowed %#x, multisample_type %#x, quality_levels %p.\n", wined3d, adapter_idx, debug_d3ddevicetype(device_type), debug_d3dformat(surface_format_id), windowed, multisample_type, quality_levels); if (adapter_idx >= wined3d->adapter_count) return WINED3DERR_INVALIDCALL; + if (surface_format_id == WINED3DFMT_UNKNOWN) + return WINED3DERR_INVALIDCALL; + if (multisample_type < WINED3D_MULTISAMPLE_NONE || multisample_type > WINED3D_MULTISAMPLE_16_SAMPLES) + return WINED3DERR_INVALIDCALL; - gl_info = &wined3d->adapters[adapter_idx].gl_info; + if (multisample_type && !(format->multisample_types & 1u << (multisample_type - 1))) + hr = WINED3DERR_NOTAVAILABLE; - if (multisample_type > gl_info->limits.samples) + if (SUCCEEDED(hr) || (multisample_type == WINED3D_MULTISAMPLE_NON_MASKABLE && format->multisample_types)) { - TRACE("Returning not supported.\n"); if (quality_levels) - *quality_levels = 0; - - return WINED3DERR_NOTAVAILABLE; - } - - if (quality_levels) - { - if (multisample_type == WINED3D_MULTISAMPLE_NON_MASKABLE) - *quality_levels = wined3d_log2i(gl_info->limits.samples); - else - *quality_levels = 1; + { + if (multisample_type == WINED3D_MULTISAMPLE_NON_MASKABLE) + *quality_levels = wined3d_popcount(format->multisample_types); + else + *quality_levels = 1; + } + return WINED3D_OK; } - return WINED3D_OK; + TRACE("Returning not supported.\n"); + return hr; } /* Check if the given DisplayFormat + DepthStencilFormat combination is valid for the Adapter */ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 48ff005..145e2c1 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -2863,10 +2863,34 @@ static void surface_prepare_rb(struct wined3d_surface *surface, const struct win * * AMD has a similar feature called Enhanced Quality Anti-Aliasing (EQAA), * but it does not have an equivalent OpenGL extension. */ + + /* We advertise as many WINED3D_MULTISAMPLE_NON_MASKABLE quality levels + * as the count of advertised multisample types for the surface format. */ if (surface->resource.multisample_type == WINED3D_MULTISAMPLE_NON_MASKABLE) - samples = 1u << (surface->resource.multisample_quality + 1); + { + const struct wined3d_format *format = surface->resource.format; + unsigned int i, count = 0; + + for (i = 0; i < sizeof(format->multisample_types) * 8; ++i) + { + if (format->multisample_types & 1u << i) + { + if (surface->resource.multisample_quality == count++) + break; + } + } + if (i == sizeof(format->multisample_types) * 8) + { + WARN("Unsupported quality level %u requested for WINED3D_MULTISAMPLE_NON_MASKABLE.\n", + surface->resource.multisample_quality); + i = 1; + } + samples = i + 1; + } else + { samples = surface->resource.multisample_type; + } gl_info->fbo_ops.glGenRenderbuffers(1, &surface->rb_multisample); gl_info->fbo_ops.glBindRenderbuffer(GL_RENDERBUFFER, surface->rb_multisample); diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c index 28a3216..6c2d08b 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -2162,10 +2162,11 @@ static void init_format_fbo_compat_info(struct wined3d_caps_gl_ctx *ctx) static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct wined3d_gl_info *gl_info) { + GLint count, multisample_types[MAX_MULTISAMPLE_TYPES]; struct fragment_caps fragment_caps; struct shader_caps shader_caps; BOOL srgb_write; - unsigned int i; + unsigned int i, j, max_log2; adapter->fragment_pipe->get_caps(gl_info, &fragment_caps); adapter->shader_backend->shader_get_caps(gl_info, &shader_caps); @@ -2284,6 +2285,34 @@ static BOOL init_format_texture_info(struct wined3d_adapter *adapter, struct win } } + if (format->glInternal && format->flags[WINED3D_GL_RES_TYPE_RB] + & (WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL)) + { + if (gl_info->supported[ARB_INTERNALFORMAT_QUERY]) + { + GL_EXTCALL(glGetInternalformativ(GL_RENDERBUFFER, format->glInternal, + GL_NUM_SAMPLE_COUNTS, 1, &count)); + checkGLcall("glGetInternalformativ(GL_NUM_SAMPLE_COUNTS)"); + count = min(count, MAX_MULTISAMPLE_TYPES); + GL_EXTCALL(glGetInternalformativ(GL_RENDERBUFFER, format->glInternal, + GL_SAMPLES, count, multisample_types)); + checkGLcall("glGetInternalformativ(GL_SAMPLES)"); + for (j = 0; j < count; ++j) + { + if (multisample_types[j] > sizeof(format->multisample_types) * 8) + continue; + format->multisample_types |= 1u << (multisample_types[j] - 1); + } + } + else + { + max_log2 = wined3d_log2i(min(gl_info->limits.samples, + sizeof(format->multisample_types) * 8)); + for (j = 1; j <= max_log2; ++j) + format->multisample_types |= 1u << ((1u << j) - 1); + } + } + /* Texture conversion stuff */ format->convert = format_texture_info[i].convert; format->conv_byte_count = format_texture_info[i].conv_byte_count; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 5f91dc4..0287088 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -185,6 +185,7 @@ void wined3d_rb_free(void *ptr) DECLSPEC_HIDDEN; #define MAX_SAMPLER_OBJECTS 16 #define MAX_SHADER_RESOURCE_VIEWS 128 #define MAX_VERTEX_BLENDS 4 +#define MAX_MULTISAMPLE_TYPES 8 struct min_lookup { @@ -3271,6 +3272,7 @@ struct wined3d_format GLint glFormat; GLint glType; UINT conv_byte_count; + DWORD multisample_types; unsigned int flags[WINED3D_GL_RES_TYPE_COUNT]; struct wined3d_rational height_scale; struct color_fixup_desc color_fixup;
1
0
0
0
Józef Kucia : wined3d: Recognize SM4 sample_c_lz opcode.
by Alexandre Julliard
28 Jan '16
28 Jan '16
Module: wine Branch: master Commit: 6ba0fee3697f2598d9735ae1ca862d1837f569f9 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=6ba0fee3697f2598d9735ae1c…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Jan 27 23:43:45 2016 +0100 wined3d: Recognize SM4 sample_c_lz opcode. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/arb_program_shader.c | 1 + dlls/wined3d/glsl_shader.c | 1 + dlls/wined3d/shader.c | 2 ++ dlls/wined3d/shader_sm4.c | 2 ++ dlls/wined3d/wined3d_private.h | 1 + 5 files changed, 7 insertions(+) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index 3674cfa..6c1e048 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -5304,6 +5304,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL /* WINED3DSIH_ROUND_Z */ NULL, /* WINED3DSIH_RSQ */ shader_hw_scalar_op, /* WINED3DSIH_SAMPLE */ NULL, + /* WINED3DSIH_SAMPLE_C_LZ */ NULL, /* WINED3DSIH_SAMPLE_GRAD */ NULL, /* WINED3DSIH_SAMPLE_LOD */ NULL, /* WINED3DSIH_SETP */ NULL, diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 3bcd6aa..23680ea 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -8080,6 +8080,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_ROUND_Z */ shader_glsl_map2gl, /* WINED3DSIH_RSQ */ shader_glsl_scalar_op, /* WINED3DSIH_SAMPLE */ shader_glsl_sample, + /* WINED3DSIH_SAMPLE_C_LZ */ NULL, /* WINED3DSIH_SAMPLE_GRAD */ NULL, /* WINED3DSIH_SAMPLE_LOD */ shader_glsl_sample_lod, /* WINED3DSIH_SETP */ NULL, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index 53f90af..7df4d1d 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -132,6 +132,7 @@ static const char * const shader_opcode_names[] = /* WINED3DSIH_ROUND_Z */ "round_z", /* WINED3DSIH_RSQ */ "rsq", /* WINED3DSIH_SAMPLE */ "sample", + /* WINED3DSIH_SAMPLE_C_LZ */ "sample_c_lz", /* WINED3DSIH_SAMPLE_GRAD */ "sample_d", /* WINED3DSIH_SAMPLE_LOD */ "sample_l", /* WINED3DSIH_SETP */ "setp", @@ -1072,6 +1073,7 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st --cur_loop_depth; } else if (ins.handler_idx == WINED3DSIH_SAMPLE + || ins.handler_idx == WINED3DSIH_SAMPLE_C_LZ || ins.handler_idx == WINED3DSIH_SAMPLE_GRAD || ins.handler_idx == WINED3DSIH_SAMPLE_LOD) { diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c index bad6567..dde341b 100644 --- a/dlls/wined3d/shader_sm4.c +++ b/dlls/wined3d/shader_sm4.c @@ -134,6 +134,7 @@ enum wined3d_sm4_opcode WINED3D_SM4_OP_ROUND_Z = 0x43, WINED3D_SM4_OP_RSQ = 0x44, WINED3D_SM4_OP_SAMPLE = 0x45, + WINED3D_SM4_OP_SAMPLE_C_LZ = 0x47, WINED3D_SM4_OP_SAMPLE_LOD = 0x48, WINED3D_SM4_OP_SAMPLE_GRAD = 0x49, WINED3D_SM4_OP_SQRT = 0x4b, @@ -318,6 +319,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] = {WINED3D_SM4_OP_ROUND_Z, WINED3DSIH_ROUND_Z, "F", "F"}, {WINED3D_SM4_OP_RSQ, WINED3DSIH_RSQ, "F", "F"}, {WINED3D_SM4_OP_SAMPLE, WINED3DSIH_SAMPLE, "U", "FRS"}, + {WINED3D_SM4_OP_SAMPLE_C_LZ, WINED3DSIH_SAMPLE_C_LZ, "F", "FRSF"}, {WINED3D_SM4_OP_SAMPLE_LOD, WINED3DSIH_SAMPLE_LOD, "U", "FRSF"}, {WINED3D_SM4_OP_SAMPLE_GRAD, WINED3DSIH_SAMPLE_GRAD, "U", "FRSFF"}, {WINED3D_SM4_OP_SQRT, WINED3DSIH_SQRT, "F", "F"}, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 78a49dd..461a1fe 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -560,6 +560,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER WINED3DSIH_ROUND_Z, WINED3DSIH_RSQ, WINED3DSIH_SAMPLE, + WINED3DSIH_SAMPLE_C_LZ, WINED3DSIH_SAMPLE_GRAD, WINED3DSIH_SAMPLE_LOD, WINED3DSIH_SETP,
1
0
0
0
Józef Kucia : wined3d: Implement SM4 round_z instruction.
by Alexandre Julliard
28 Jan '16
28 Jan '16
Module: wine Branch: master Commit: e4244954c67bd889b24105d3cb996e2bfe68f192 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4244954c67bd889b24105d3c…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Jan 27 23:43:44 2016 +0100 wined3d: Implement SM4 round_z instruction. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/glsl_shader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index a51032f..3bcd6aa 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -3261,6 +3261,7 @@ static void shader_glsl_map2gl(const struct wined3d_shader_instruction *ins) case WINED3DSIH_MIN: instruction = "min"; break; case WINED3DSIH_ROUND_NI: instruction = "floor"; break; case WINED3DSIH_ROUND_PI: instruction = "ceil"; break; + case WINED3DSIH_ROUND_Z: instruction = "trunc"; break; case WINED3DSIH_SQRT: instruction = "sqrt"; break; default: instruction = ""; FIXME("Opcode %s not yet handled in GLSL.\n", debug_d3dshaderinstructionhandler(ins->handler_idx)); @@ -8076,7 +8077,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_RET */ shader_glsl_ret, /* WINED3DSIH_ROUND_NI */ shader_glsl_map2gl, /* WINED3DSIH_ROUND_PI */ shader_glsl_map2gl, - /* WINED3DSIH_ROUND_Z */ NULL, + /* WINED3DSIH_ROUND_Z */ shader_glsl_map2gl, /* WINED3DSIH_RSQ */ shader_glsl_scalar_op, /* WINED3DSIH_SAMPLE */ shader_glsl_sample, /* WINED3DSIH_SAMPLE_GRAD */ NULL,
1
0
0
0
Józef Kucia : wined3d: Implement SM4 round_pi instruction.
by Alexandre Julliard
28 Jan '16
28 Jan '16
Module: wine Branch: master Commit: b79141d7580af4ca7b6069462fc9334b633975c3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b79141d7580af4ca7b6069462…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Wed Jan 27 23:43:43 2016 +0100 wined3d: Implement SM4 round_pi instruction. Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/wined3d/glsl_shader.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c index 697f5e9..a51032f 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -3260,6 +3260,7 @@ static void shader_glsl_map2gl(const struct wined3d_shader_instruction *ins) case WINED3DSIH_MAX: instruction = "max"; break; case WINED3DSIH_MIN: instruction = "min"; break; case WINED3DSIH_ROUND_NI: instruction = "floor"; break; + case WINED3DSIH_ROUND_PI: instruction = "ceil"; break; case WINED3DSIH_SQRT: instruction = "sqrt"; break; default: instruction = ""; FIXME("Opcode %s not yet handled in GLSL.\n", debug_d3dshaderinstructionhandler(ins->handler_idx)); @@ -8074,7 +8075,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_RESINFO */ shader_glsl_resinfo, /* WINED3DSIH_RET */ shader_glsl_ret, /* WINED3DSIH_ROUND_NI */ shader_glsl_map2gl, - /* WINED3DSIH_ROUND_PI */ NULL, + /* WINED3DSIH_ROUND_PI */ shader_glsl_map2gl, /* WINED3DSIH_ROUND_Z */ NULL, /* WINED3DSIH_RSQ */ shader_glsl_scalar_op, /* WINED3DSIH_SAMPLE */ shader_glsl_sample,
1
0
0
0
← Newer
1
2
3
4
5
6
7
8
9
...
63
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
Results per page:
10
25
50
100
200