winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
April 2014
----- 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
500 discussions
Start a n
N
ew thread
Henri Verbeet : d3d9/tests: Use a separate device for color_fill_test().
by Alexandre Julliard
10 Apr '14
10 Apr '14
Module: wine Branch: master Commit: 9595526932d6db0baea1c912f7160749bf809e4e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9595526932d6db0baea1c912f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Apr 10 10:05:46 2014 +0200 d3d9/tests: Use a separate device for color_fill_test(). --- dlls/d3d9/tests/visual.c | 94 ++++++++++++++++++++++++++-------------------- 1 file changed, 53 insertions(+), 41 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 06e1e68..50d563a 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -719,72 +719,84 @@ static void clear_test(IDirect3DDevice9 *device) IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); } -static void color_fill_test(IDirect3DDevice9 *device) +static void color_fill_test(void) { + IDirect3DSurface9 *offscreen_surface; + IDirect3DSurface9 *backbuffer; + IDirect3DSurface9 *rt_surface; + D3DCOLOR fill_color, color; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + ULONG refcount; + HWND window; HRESULT hr; - IDirect3DSurface9 *backbuffer = NULL; - IDirect3DSurface9 *rt_surface = NULL; - IDirect3DSurface9 *offscreen_surface = NULL; - DWORD fill_color, color; + + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } /* Test ColorFill on a the backbuffer (should pass) */ hr = IDirect3DDevice9_GetBackBuffer(device, 0, 0, D3DBACKBUFFER_TYPE_MONO, &backbuffer); ok(hr == D3D_OK, "Can't get back buffer, hr = %08x\n", hr); - if(backbuffer) - { - fill_color = 0x112233; - hr = IDirect3DDevice9_ColorFill(device, backbuffer, NULL, fill_color); - ok(SUCCEEDED(hr), "Color fill failed, hr %#x.\n", hr); - color = getPixelColor(device, 0, 0); - ok(color == fill_color, "Expected color %08x, got %08x\n", fill_color, color); + fill_color = 0x112233; + hr = IDirect3DDevice9_ColorFill(device, backbuffer, NULL, fill_color); + ok(SUCCEEDED(hr), "Color fill failed, hr %#x.\n", hr); - IDirect3DSurface9_Release(backbuffer); - } + color = getPixelColor(device, 0, 0); + ok(color == fill_color, "Expected color %08x, got %08x\n", fill_color, color); + + IDirect3DSurface9_Release(backbuffer); /* Test ColorFill on a render target surface (should pass) */ - hr = IDirect3DDevice9_CreateRenderTarget(device, 32, 32, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, TRUE, &rt_surface, NULL ); + hr = IDirect3DDevice9_CreateRenderTarget(device, 32, 32, D3DFMT_A8R8G8B8, + D3DMULTISAMPLE_NONE, 0, TRUE, &rt_surface, NULL ); ok(hr == D3D_OK, "Unable to create render target surface, hr = %08x\n", hr); - if(rt_surface) - { - fill_color = 0x445566; - hr = IDirect3DDevice9_ColorFill(device, rt_surface, NULL, fill_color); - ok(SUCCEEDED(hr), "Color fill failed, hr %#x.\n", hr); - color = getPixelColorFromSurface(rt_surface, 0, 0); - ok(color == fill_color, "Expected color %08x, got %08x\n", fill_color, color); + fill_color = 0x445566; + hr = IDirect3DDevice9_ColorFill(device, rt_surface, NULL, fill_color); + ok(SUCCEEDED(hr), "Color fill failed, hr %#x.\n", hr); - IDirect3DSurface9_Release(rt_surface); - } + color = getPixelColorFromSurface(rt_surface, 0, 0); + ok(color == fill_color, "Expected color %08x, got %08x\n", fill_color, color); + + IDirect3DSurface9_Release(rt_surface); /* Test ColorFill on an offscreen plain surface in D3DPOOL_DEFAULT (should pass) */ hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 32, 32, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &offscreen_surface, NULL); ok(hr == D3D_OK, "Unable to create offscreen plain surface, hr = %08x\n", hr); - if(offscreen_surface) - { - fill_color = 0x778899; - hr = IDirect3DDevice9_ColorFill(device, offscreen_surface, NULL, fill_color); - ok(SUCCEEDED(hr), "Color fill failed, hr %#x.\n", hr); - color = getPixelColorFromSurface(offscreen_surface, 0, 0); - ok(color == fill_color, "Expected color %08x, got %08x\n", fill_color, color); + fill_color = 0x778899; + hr = IDirect3DDevice9_ColorFill(device, offscreen_surface, NULL, fill_color); + ok(SUCCEEDED(hr), "Color fill failed, hr %#x.\n", hr); - IDirect3DSurface9_Release(offscreen_surface); - } + color = getPixelColorFromSurface(offscreen_surface, 0, 0); + ok(color == fill_color, "Expected color %08x, got %08x\n", fill_color, color); + + IDirect3DSurface9_Release(offscreen_surface); /* Try ColorFill on an offscreen surface in sysmem (should fail) */ - offscreen_surface = NULL; hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 32, 32, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &offscreen_surface, NULL); ok(hr == D3D_OK, "Unable to create offscreen plain surface, hr = %08x\n", hr); - if(offscreen_surface) - { - hr = IDirect3DDevice9_ColorFill(device, offscreen_surface, NULL, 0); - ok(hr == D3DERR_INVALIDCALL, "ColorFill on offscreen sysmem surface failed with hr = %08x\n", hr); - IDirect3DSurface9_Release(offscreen_surface); - } + hr = IDirect3DDevice9_ColorFill(device, offscreen_surface, NULL, 0); + ok(hr == D3DERR_INVALIDCALL, "ColorFill on offscreen sysmem surface failed with hr = %08x\n", hr); + + IDirect3DSurface9_Release(offscreen_surface); + + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } /* @@ -16736,11 +16748,11 @@ START_TEST(visual) stretchrect_test(device_ptr); lighting_test(device_ptr); clear_test(device_ptr); - color_fill_test(device_ptr); cleanup_device(device_ptr); device_ptr = NULL; + color_fill_test(); fog_test(); test_cube_wrap(); z_range_test();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for fog_test().
by Alexandre Julliard
10 Apr '14
10 Apr '14
Module: wine Branch: master Commit: b7f323e8c6e420b41e21155198c70937c2cac9c4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b7f323e8c6e420b41e2115519…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Apr 10 10:05:45 2014 +0200 d3d9/tests: Use a separate device for fog_test(). --- dlls/d3d9/tests/visual.c | 268 +++++++++++++++++++++++++--------------------- 1 file changed, 146 insertions(+), 122 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=b7f323e8c6e420b41e211…
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for test_cube_wrap().
by Alexandre Julliard
10 Apr '14
10 Apr '14
Module: wine Branch: master Commit: 0453e4e44a556c5dbcac68a03b59c5d4ca8433dc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0453e4e44a556c5dbcac68a03…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Apr 10 10:05:44 2014 +0200 d3d9/tests: Use a separate device for test_cube_wrap(). --- dlls/d3d9/tests/visual.c | 78 +++++++++++++++++++++++++++++----------------- 1 file changed, 50 insertions(+), 28 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 4094ff3..67099a5 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -1496,40 +1496,65 @@ static void fog_test(IDirect3DDevice9 *device) * interpolate between the edge texels of the three involved faces. It should * never involve the border color or the other side (texcoord wrapping) of a * face in the interpolation. */ -static void test_cube_wrap(IDirect3DDevice9 *device) +static void test_cube_wrap(void) { - static const float quad[][6] = { + IDirect3DVertexDeclaration9 *vertex_declaration; + IDirect3DSurface9 *face_surface, *surface; + IDirect3DCubeTexture9 *texture; + D3DLOCKED_RECT locked_rect; + IDirect3DDevice9 *device; + unsigned int x, y, face; + IDirect3D9 *d3d; + ULONG refcount; + D3DCAPS9 caps; + HWND window; + HRESULT hr; + + static const float quad[][6] = + { {-1.0f, -1.0f, 0.0f, 1.0f, 1.0f, 1.0f}, {-1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f}, { 1.0f, -1.0f, 0.0f, 1.0f, 1.0f, 1.0f}, { 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f}, }; - - static const D3DVERTEXELEMENT9 decl_elements[] = { + static const D3DVERTEXELEMENT9 decl_elements[] = + { {0, 0, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_POSITION, 0}, {0, 12, D3DDECLTYPE_FLOAT3, D3DDECLMETHOD_DEFAULT, D3DDECLUSAGE_TEXCOORD, 0}, D3DDECL_END() }; - - static const struct { + static const struct + { D3DTEXTUREADDRESS mode; const char *name; - } address_modes[] = { - {D3DTADDRESS_WRAP, "D3DTADDRESS_WRAP"}, - {D3DTADDRESS_MIRROR, "D3DTADDRESS_MIRROR"}, - {D3DTADDRESS_CLAMP, "D3DTADDRESS_CLAMP"}, - {D3DTADDRESS_BORDER, "D3DTADDRESS_BORDER"}, + } + address_modes[] = + { + {D3DTADDRESS_WRAP, "D3DTADDRESS_WRAP"}, + {D3DTADDRESS_MIRROR, "D3DTADDRESS_MIRROR"}, + {D3DTADDRESS_CLAMP, "D3DTADDRESS_CLAMP"}, + {D3DTADDRESS_BORDER, "D3DTADDRESS_BORDER"}, {D3DTADDRESS_MIRRORONCE, "D3DTADDRESS_MIRRORONCE"}, }; - IDirect3DVertexDeclaration9 *vertex_declaration = NULL; - IDirect3DCubeTexture9 *texture = NULL; - IDirect3DSurface9 *surface = NULL; - IDirect3DSurface9 *face_surface; - D3DLOCKED_RECT locked_rect; - HRESULT hr; - UINT x; - INT y, face; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (!(caps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP)) + { + skip("No cube texture support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; + } hr = IDirect3DDevice9_CreateVertexDeclaration(device, decl_elements, &vertex_declaration); ok(SUCCEEDED(hr), "CreateVertexDeclaration failed (0x%08x)\n", hr); @@ -1645,12 +1670,14 @@ static void test_cube_wrap(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "Clear failed (0x%08x)\n", hr); } - hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(SUCCEEDED(hr), "SetTexture failed (0x%08x)\n", hr); - IDirect3DVertexDeclaration9_Release(vertex_declaration); IDirect3DCubeTexture9_Release(texture); IDirect3DSurface9_Release(surface); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void offscreen_test(void) @@ -16687,16 +16714,11 @@ START_TEST(visual) clear_test(device_ptr); color_fill_test(device_ptr); fog_test(device_ptr); - if(caps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP) - { - test_cube_wrap(device_ptr); - } else { - skip("No cube texture support\n"); - } cleanup_device(device_ptr); device_ptr = NULL; + test_cube_wrap(); z_range_test(); maxmip_test(); offscreen_test();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for z_range_test().
by Alexandre Julliard
10 Apr '14
10 Apr '14
Module: wine Branch: master Commit: 8a170e9d48885ddcd509a2e58dc3ea257d9a6859 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8a170e9d48885ddcd509a2e58…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Apr 10 10:05:43 2014 +0200 d3d9/tests: Use a separate device for z_range_test(). --- dlls/d3d9/tests/visual.c | 57 ++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 22 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 75ec355..4094ff3 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -2551,8 +2551,17 @@ done: DestroyWindow(window); } -static void z_range_test(IDirect3DDevice9 *device) +static void z_range_test(void) { + IDirect3DVertexShader9 *shader; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + ULONG refcount; + D3DCAPS9 caps; + DWORD color; + HWND window; + HRESULT hr; + static const struct vertex quad[] = { {-1.0f, 0.0f, 1.1f, 0xffff0000}, @@ -2569,22 +2578,18 @@ static void z_range_test(IDirect3DDevice9 *device) }; static const struct tvertex quad3[] = { - { 0.0f, 240.0f, 1.1f, 1.0f, 0xffffff00}, - { 0.0f, 480.0f, 1.1f, 1.0f, 0xffffff00}, {640.0f, 240.0f, -1.1f, 1.0f, 0xffffff00}, {640.0f, 480.0f, -1.1f, 1.0f, 0xffffff00}, + { 0.0f, 240.0f, 1.1f, 1.0f, 0xffffff00}, + { 0.0f, 480.0f, 1.1f, 1.0f, 0xffffff00}, }; static const struct tvertex quad4[] = { - { 0.0f, 240.0f, 1.1f, 1.0f, 0xff00ff00}, - { 0.0f, 480.0f, 1.1f, 1.0f, 0xff00ff00}, {640.0f, 240.0f, -1.1f, 1.0f, 0xff00ff00}, {640.0f, 480.0f, -1.1f, 1.0f, 0xff00ff00}, + { 0.0f, 240.0f, 1.1f, 1.0f, 0xff00ff00}, + { 0.0f, 480.0f, 1.1f, 1.0f, 0xff00ff00}, }; - HRESULT hr; - DWORD color; - IDirect3DVertexShader9 *shader; - D3DCAPS9 caps; static const DWORD shader_code[] = { 0xfffe0101, /* vs_1_1 */ @@ -2596,6 +2601,16 @@ static void z_range_test(IDirect3DDevice9 *device) static const float color_const_1[] = {1.0f, 0.0f, 0.0f, 1.0f}; static const float color_const_2[] = {0.0f, 0.0f, 1.0f, 1.0f}; + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); @@ -2610,6 +2625,8 @@ static void z_range_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 0.0f, 0); ok(SUCCEEDED(hr), "Failed to clear, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CLIPPING, TRUE); ok(SUCCEEDED(hr), "Failed to enable clipping, hr %#x.\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, D3DZB_TRUE); @@ -2698,8 +2715,9 @@ static void z_range_test(IDirect3DDevice9 *device) /* Test the shader path */ if (caps.VertexShaderVersion < D3DVS_VERSION(1, 1)) { - skip("Vertex shaders not supported\n"); - goto out; + skip("Vertex shaders not supported, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; } hr = IDirect3DDevice9_CreateVertexShader(device, shader_code, &shader); ok(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); @@ -2730,9 +2748,6 @@ static void z_range_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_EndScene(device); ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); - hr = IDirect3DDevice9_SetVertexShader(device, NULL); - ok(SUCCEEDED(hr), "Failed to set vertex shader, hr %#x.\n", hr); - IDirect3DVertexShader9_Release(shader); /* Z < 1.0 */ @@ -2759,13 +2774,11 @@ static void z_range_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Failed to present, hr %#x.\n", hr); -out: - hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, D3DZB_FALSE); - ok(SUCCEEDED(hr), "Failed to disable z test, hr %#x.\n", hr); - hr = IDirect3DDevice9_SetRenderState(device, D3DRS_CLIPPING, FALSE); - ok(SUCCEEDED(hr), "Failed to disable clipping, hr %#x.\n", hr); - hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZWRITEENABLE, TRUE); - ok(SUCCEEDED(hr), "Failed to enable z writes, hr %#x.\n", hr); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void fill_surface(IDirect3DSurface9 *surface, DWORD color, DWORD flags) @@ -16680,11 +16693,11 @@ START_TEST(visual) } else { skip("No cube texture support\n"); } - z_range_test(device_ptr); cleanup_device(device_ptr); device_ptr = NULL; + z_range_test(); maxmip_test(); offscreen_test(); ds_size_test();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for maxmip_test().
by Alexandre Julliard
10 Apr '14
10 Apr '14
Module: wine Branch: master Commit: f329a2b5866ec70391e0778f8daa4ab33887fe0b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f329a2b5866ec70391e0778f8…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu Apr 10 10:05:42 2014 +0200 d3d9/tests: Use a separate device for maxmip_test(). --- dlls/d3d9/tests/visual.c | 62 ++++++++++++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 24 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 3d4cda7..75ec355 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -3472,12 +3472,18 @@ out: } } -static void maxmip_test(IDirect3DDevice9 *device) +static void maxmip_test(void) { - IDirect3DTexture9 *texture = NULL; - IDirect3DSurface9 *surface = NULL; + IDirect3DTexture9 *texture; + IDirect3DSurface9 *surface; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + D3DCOLOR color; + ULONG refcount; + D3DCAPS9 caps; + HWND window; HRESULT hr; - DWORD color; + static const struct { struct @@ -3515,15 +3521,29 @@ static void maxmip_test(IDirect3DDevice9 *device) }}, }; - hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 3, 0, D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, - &texture, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed with %08x\n", hr); - if(!texture) + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) { - skip("Failed to create test texture\n"); - return; + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (!(caps.TextureCaps & D3DPTEXTURECAPS_MIPMAP)) + { + skip("No mipmap support, skipping tests.\n"); + IDirect3DDevice9_Release(device); + goto done; } + hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 3, 0, + D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &texture, NULL); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); + hr = IDirect3DTexture9_GetSurfaceLevel(texture, 0, &surface); ok(SUCCEEDED(hr), "IDirect3DTexture9_GetSurfaceLevel returned %#x.\n", hr); fill_surface(surface, 0xffff0000, 0); @@ -3542,6 +3562,8 @@ static void maxmip_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_TEX1); ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(SUCCEEDED(hr), "Failed to disable lighting, hr %#x.\n", hr); hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MIPFILTER, D3DTEXF_NONE); ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); @@ -3696,13 +3718,12 @@ static void maxmip_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(SUCCEEDED(hr), "Present failed (0x%08x)\n", hr); - hr = IDirect3DDevice9_SetTexture(device, 0, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_SetTexture failed with %08x\n", hr); - hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MIPFILTER, D3DTEXF_NONE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); - hr = IDirect3DDevice9_SetSamplerState(device, 0, D3DSAMP_MAXMIPLEVEL, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); IDirect3DTexture9_Release(texture); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void release_buffer_test(void) @@ -16660,18 +16681,11 @@ START_TEST(visual) skip("No cube texture support\n"); } z_range_test(device_ptr); - if(caps.TextureCaps & D3DPTEXTURECAPS_MIPMAP) - { - maxmip_test(device_ptr); - } - else - { - skip("No mipmap support\n"); - } cleanup_device(device_ptr); device_ptr = NULL; + maxmip_test(); offscreen_test(); ds_size_test(); alpha_test();
1
0
0
0
Alexandre Julliard : makedep: Store the sources list inside the makefile structure.
by Alexandre Julliard
10 Apr '14
10 Apr '14
Module: wine Branch: master Commit: 4cb68d2322a396ba7ef3ff9b5601a6ce59e57e92 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4cb68d2322a396ba7ef3ff9b5…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 10 13:50:37 2014 +0200 makedep: Store the sources list inside the makefile structure. --- tools/makedep.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index 63b4de9..3c1f8bd 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -82,7 +82,6 @@ static const struct { FLAG_IDL_HEADER, ".h" } }; -static struct list sources = LIST_INIT(sources); static struct list includes = LIST_INIT(includes); struct strarray @@ -126,6 +125,7 @@ struct makefile struct strarray imports; struct strarray delayimports; struct strarray extradllflags; + struct list sources; const char *base_dir; const char *src_dir; const char *obj_dir; @@ -654,11 +654,11 @@ static char *get_line( FILE *file ) /******************************************************************* * find_src_file */ -static struct incl_file *find_src_file( const char *name ) +static struct incl_file *find_src_file( struct makefile *make, const char *name ) { struct incl_file *file; - LIST_FOR_EACH_ENTRY( file, &sources, struct incl_file, entry ) + LIST_FOR_EACH_ENTRY( file, &make->sources, struct incl_file, entry ) if (!strcmp( name, file->name )) return file; return NULL; } @@ -741,13 +741,13 @@ static struct incl_file *add_generated_source( struct makefile *make, { struct incl_file *file; - if ((file = find_src_file( name ))) return file; /* we already have it */ + if ((file = find_src_file( make, name ))) return file; /* we already have it */ file = xmalloc( sizeof(*file) ); memset( file, 0, sizeof(*file) ); file->name = xstrdup( name ); file->filename = obj_dir_path( make, filename ? filename : name ); file->flags = FLAG_GENERATED; - list_add_tail( &sources, &file->entry ); + list_add_tail( &make->sources, &file->entry ); return file; } @@ -1280,11 +1280,11 @@ static struct incl_file *add_src_file( struct makefile *make, const char *name ) { struct incl_file *file; - if ((file = find_src_file( name ))) return file; /* we already have it */ + if ((file = find_src_file( make, name ))) return file; /* we already have it */ file = xmalloc( sizeof(*file) ); memset( file, 0, sizeof(*file) ); file->name = xstrdup(name); - list_add_tail( &sources, &file->entry ); + list_add_tail( &make->sources, &file->entry ); parse_file( make, file, 1 ); return file; } @@ -1434,7 +1434,7 @@ static void add_generated_sources( struct makefile *make ) { struct incl_file *source, *next, *file; - LIST_FOR_EACH_ENTRY_SAFE( source, next, &sources, struct incl_file, entry ) + LIST_FOR_EACH_ENTRY_SAFE( source, next, &make->sources, struct incl_file, entry ) { if (source->flags & FLAG_IDL_CLIENT) { @@ -1582,7 +1582,7 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t if (make->use_msvcrt) strarray_add( &includes, strmake( "-I%s", top_dir_path( make, "include/msvcrt" ))); strarray_addall( &includes, make->include_args ); - LIST_FOR_EACH_ENTRY( source, &sources, struct incl_file, entry ) + LIST_FOR_EACH_ENTRY( source, &make->sources, struct incl_file, entry ) { struct strarray extradefs; char *obj = xstrdup( source->name ); @@ -1690,7 +1690,7 @@ static struct strarray output_sources( struct makefile *make, struct strarray *t { if (!(source->flags & idl_outputs[i].flag)) continue; dest = strmake( "%s%s", obj, idl_outputs[i].ext ); - if (!find_src_file( dest )) strarray_add( &clean_files, dest ); + if (!find_src_file( make, dest )) strarray_add( &clean_files, dest ); strarray_add( &targets, dest ); } if (source->flags & FLAG_IDL_PROXY) strarray_add( &dlldata_files, source->name ); @@ -2444,7 +2444,7 @@ static void update_makefile( const char *path ) strarray_add_uniq( &make->define_args, value.str[i] ); strarray_addall( &make->define_args, get_expanded_make_var_array( make, "EXTRADEFS" )); - list_init( &sources ); + list_init( &make->sources ); list_init( &includes ); for (var = source_vars; *var; var++)
1
0
0
0
Alexandre Julliard : makedep: Add a helper function to check if a string exists in an array.
by Alexandre Julliard
10 Apr '14
10 Apr '14
Module: wine Branch: master Commit: 299ce6f9f04224f72161ff7d6698de129eacb919 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=299ce6f9f04224f72161ff7d6…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 10 13:15:13 2014 +0200 makedep: Add a helper function to check if a string exists in an array. --- tools/makedep.c | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/tools/makedep.c b/tools/makedep.c index a83320f..63b4de9 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -343,14 +343,23 @@ static void strarray_addall( struct strarray *array, struct strarray added ) /******************************************************************* - * strarray_add_uniq + * strarray_exists */ -static void strarray_add_uniq( struct strarray *array, const char *str ) +static int strarray_exists( struct strarray *array, const char *str ) { unsigned int i; - for (i = 0; i < array->count; i++) if (!strcmp( array->str[i], str )) return; - strarray_add( array, str ); + for (i = 0; i < array->count; i++) if (!strcmp( array->str[i], str )) return 1; + return 0; +} + + +/******************************************************************* + * strarray_add_uniq + */ +static void strarray_add_uniq( struct strarray *array, const char *str ) +{ + if (!strarray_exists( array, str )) strarray_add( array, str ); } @@ -2417,16 +2426,12 @@ static void update_makefile( const char *path ) if (make->module && strendswith( make->module, ".a" )) make->staticlib = make->module; - make->use_msvcrt = 0; - for (i = 0; i < make->appmode.count && !make->use_msvcrt; i++) - make->use_msvcrt = !strcmp( make->appmode.str[i], "-mno-cygwin" ); + make->is_win16 = strarray_exists( &make->extradllflags, "-m16" ); + make->use_msvcrt = strarray_exists( &make->appmode, "-mno-cygwin" ); + for (i = 0; i < make->imports.count && !make->use_msvcrt; i++) make->use_msvcrt = !strncmp( make->imports.str[i], "msvcr", 5 ); - make->is_win16 = 0; - for (i = 0; i < make->extradllflags.count && !make->is_win16; i++) - if (!strcmp( make->extradllflags.str[i], "-m16" )) make->is_win16 = 1; - make->include_args = empty_strarray; make->define_args = empty_strarray; strarray_add( &make->define_args, "-D__WINESRC__" );
1
0
0
0
Alexandre Julliard : makedep: Pass a makefile pointer to all internal functions.
by Alexandre Julliard
10 Apr '14
10 Apr '14
Module: wine Branch: master Commit: f9ddafa807b95f743764dea0f3bddf4acf71dcbc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f9ddafa807b95f743764dea0f…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 10 13:41:23 2014 +0200 makedep: Pass a makefile pointer to all internal functions. --- tools/makedep.c | 588 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 307 insertions(+), 281 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=f9ddafa807b95f743764d…
1
0
0
0
Alexandre Julliard : makedep: Add support for specifying an object directory different from the current directory.
by Alexandre Julliard
10 Apr '14
10 Apr '14
Module: wine Branch: master Commit: dcf6060ab8aab4724ada508db295a85634ca51d4 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=dcf6060ab8aab4724ada508db…
Author: Alexandre Julliard <julliard(a)winehq.org> Date: Thu Apr 10 10:03:03 2014 +0200 makedep: Add support for specifying an object directory different from the current directory. --- tools/makedep.c | 222 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 124 insertions(+), 98 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=dcf6060ab8aab4724ada5…
1
0
0
0
Nikolay Sivov : shlwapi: Always close find handle (Coverity).
by Alexandre Julliard
10 Apr '14
10 Apr '14
Module: wine Branch: master Commit: 14dab8ab4b998b7f104d7529e40a9d1bc906cb8e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=14dab8ab4b998b7f104d7529e…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Thu Apr 10 09:23:00 2014 +0400 shlwapi: Always close find handle (Coverity). --- dlls/shlwapi/path.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/dlls/shlwapi/path.c b/dlls/shlwapi/path.c index 5f70bcc..eba1f69 100644 --- a/dlls/shlwapi/path.c +++ b/dlls/shlwapi/path.c @@ -3885,16 +3885,14 @@ BOOL WINAPI PathIsDirectoryEmptyW(LPCWSTR lpszPath) strcpyW(szSearch + dwLen, szAllFiles); hfind = FindFirstFileW(szSearch, &find_data); - - if (hfind != INVALID_HANDLE_VALUE && - find_data.cFileName[0] == '.' && - find_data.cFileName[1] == '.') + if (hfind != INVALID_HANDLE_VALUE) { - /* The only directory entry should be the parent */ - if (!FindNextFileW(hfind, &find_data)) - retVal = TRUE; + if (find_data.cFileName[0] == '.' && find_data.cFileName[1] == '.') + /* The only directory entry should be the parent */ + retVal = !FindNextFileW(hfind, &find_data); FindClose(hfind); } + return retVal; }
1
0
0
0
← Newer
1
...
29
30
31
32
33
34
35
...
50
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
Results per page:
10
25
50
100
200