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 ds_size_test().
by Alexandre Julliard
09 Apr '14
09 Apr '14
Module: wine Branch: master Commit: 0513d79526179ba49f7bdb2ea344a2ee9bd43b6c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0513d79526179ba49f7bdb2ea…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 9 08:54:45 2014 +0200 d3d9/tests: Use a separate device for ds_size_test(). --- dlls/d3d9/tests/visual.c | 41 +++++++++++++++++++++++++++++++---------- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 8755fff..62feac0 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -14178,23 +14178,38 @@ done: DestroyWindow(window); } -static void ds_size_test(IDirect3DDevice9 *device) +static void ds_size_test(void) { IDirect3DSurface9 *ds, *rt, *old_rt, *old_ds, *readback; - HRESULT hr; + IDirect3DDevice9 *device; DWORD num_passes; - struct + IDirect3D9 *d3d; + ULONG refcount; + HWND window; + HRESULT hr; + + static const struct { float x, y, z; } quad[] = { - {-1.0, -1.0, 0.0 }, - {-1.0, 1.0, 0.0 }, - { 1.0, -1.0, 0.0 }, - { 1.0, 1.0, 0.0 } + {-1.0f, -1.0f, 0.0f}, + {-1.0f, 1.0f, 0.0f}, + { 1.0f, -1.0f, 0.0f}, + { 1.0f, 1.0f, 0.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_CreateRenderTarget(device, 64, 64, D3DFMT_A8R8G8B8, D3DMULTISAMPLE_NONE, 0, FALSE, &rt, NULL); ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateRenderTarget failed, hr %#x.\n", hr); hr = IDirect3DDevice9_CreateDepthStencilSurface(device, 32, 32, D3DFMT_D24X8, D3DMULTISAMPLE_NONE, 0, TRUE, &ds, NULL); @@ -14202,6 +14217,9 @@ static void ds_size_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 64, 64, D3DFMT_A8R8G8B8, D3DPOOL_SYSTEMMEM, &readback, NULL); ok(SUCCEEDED(hr), "IDirect3DDevice9_CreateOffscreenPlainSurface failed, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); + ok(SUCCEEDED(hr), "Failed to set FVF, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZENABLE, FALSE); ok(SUCCEEDED(hr), "IDirect3DDevice9_SetRenderState failed, hr %#x.\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_STENCILENABLE, FALSE); @@ -14247,8 +14265,6 @@ static void ds_size_test(IDirect3DDevice9 *device) "D3DERR_CONFLICTINGRENDERSTATE.\n", hr); /* Try to draw with the device in an invalid state */ - hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); - ok(SUCCEEDED(hr), "IDirect3DDevice9_SetFVF failed, hr %#x.\n", hr); hr = IDirect3DDevice9_BeginScene(device); ok(SUCCEEDED(hr), "IDirect3DDevice9_BeginScene failed, hr %#x.\n", hr); if(SUCCEEDED(hr)) @@ -14275,6 +14291,11 @@ static void ds_size_test(IDirect3DDevice9 *device) IDirect3DSurface9_Release(rt); IDirect3DSurface9_Release(old_rt); IDirect3DSurface9_Release(old_ds); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void unbound_sampler_test(void) @@ -16650,11 +16671,11 @@ START_TEST(visual) } offscreen_test(device_ptr); - ds_size_test(device_ptr); cleanup_device(device_ptr); device_ptr = NULL; + ds_size_test(); alpha_test(); shademode_test(); srgbtexture_test();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for alpha_test().
by Alexandre Julliard
09 Apr '14
09 Apr '14
Module: wine Branch: master Commit: e41a6c827f48dee233dae7fb2d0e7c00d19b7a6f URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e41a6c827f48dee233dae7fb2…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 9 08:54:44 2014 +0200 d3d9/tests: Use a separate device for alpha_test(). --- dlls/d3d9/tests/visual.c | 81 +++++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 37 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 4cc5104..8755fff 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -7890,52 +7890,62 @@ done: DestroyWindow(window); } -static void alpha_test(IDirect3DDevice9 *device) +static void alpha_test(void) { - HRESULT hr; + IDirect3DSurface9 *backbuffer, *offscreen; IDirect3DTexture9 *offscreenTexture; - IDirect3DSurface9 *backbuffer = NULL, *offscreen = NULL; - DWORD color; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + D3DCOLOR color; + ULONG refcount; + HWND window; + HRESULT hr; - struct vertex quad1[] = + static const struct vertex quad1[] = { - {-1.0f, -1.0f, 0.1f, 0x4000ff00}, - {-1.0f, 0.0f, 0.1f, 0x4000ff00}, - { 1.0f, -1.0f, 0.1f, 0x4000ff00}, - { 1.0f, 0.0f, 0.1f, 0x4000ff00}, + {-1.0f, -1.0f, 0.1f, 0x4000ff00}, + {-1.0f, 0.0f, 0.1f, 0x4000ff00}, + { 1.0f, -1.0f, 0.1f, 0x4000ff00}, + { 1.0f, 0.0f, 0.1f, 0x4000ff00}, }; - struct vertex quad2[] = + static const struct vertex quad2[] = { - {-1.0f, 0.0f, 0.1f, 0xc00000ff}, - {-1.0f, 1.0f, 0.1f, 0xc00000ff}, - { 1.0f, 0.0f, 0.1f, 0xc00000ff}, - { 1.0f, 1.0f, 0.1f, 0xc00000ff}, + {-1.0f, 0.0f, 0.1f, 0xc00000ff}, + {-1.0f, 1.0f, 0.1f, 0xc00000ff}, + { 1.0f, 0.0f, 0.1f, 0xc00000ff}, + { 1.0f, 1.0f, 0.1f, 0xc00000ff}, }; - static const float composite_quad[][5] = { + static const float composite_quad[][5] = + { { 0.0f, -1.0f, 0.1f, 0.0f, 1.0f}, { 0.0f, 1.0f, 0.1f, 0.0f, 0.0f}, { 1.0f, -1.0f, 0.1f, 1.0f, 1.0f}, { 1.0f, 1.0f, 0.1f, 1.0f, 0.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; + } + /* Clear the render target with alpha = 0.5 */ - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x80ff0000, 0.0, 0); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x80ff0000, 1.0f, 0); ok(hr == D3D_OK, "Clear failed, hr = %08x\n", hr); - hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 1, D3DUSAGE_RENDERTARGET, D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &offscreenTexture, NULL); - ok(hr == D3D_OK || hr == D3DERR_INVALIDCALL, "Creating the offscreen render target failed, hr = %#08x\n", hr); + hr = IDirect3DDevice9_CreateTexture(device, 128, 128, 1, D3DUSAGE_RENDERTARGET, + D3DFMT_X8R8G8B8, D3DPOOL_DEFAULT, &offscreenTexture, NULL); + ok(SUCCEEDED(hr), "Failed to create texture, hr %#x.\n", hr); 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) { - goto out; - } hr = IDirect3DTexture9_GetSurfaceLevel(offscreenTexture, 0, &offscreen); ok(hr == D3D_OK, "Can't get offscreen surface, hr = %08x\n", hr); - if(!offscreen) { - goto out; - } hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed, hr = %#08x\n", hr); @@ -7975,7 +7985,7 @@ static void alpha_test(IDirect3DDevice9 *device) * targets without alpha channel, they give essentially ZERO and ONE blend factors. */ hr = IDirect3DDevice9_SetRenderTarget(device, 0, offscreen); ok(hr == D3D_OK, "Can't get back buffer, hr = %08x\n", hr); - hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x80ff0000, 0.0, 0); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x80ff0000, 1.0f, 0); ok(hr == D3D_OK, "Clear failed, hr = %08x\n", hr); hr = IDirect3DDevice9_SetRenderState(device, D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); @@ -8032,17 +8042,14 @@ static void alpha_test(IDirect3DDevice9 *device) IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); - out: - /* restore things */ - if(backbuffer) { - IDirect3DSurface9_Release(backbuffer); - } - if(offscreenTexture) { - IDirect3DTexture9_Release(offscreenTexture); - } - if(offscreen) { - IDirect3DSurface9_Release(offscreen); - } + IDirect3DSurface9_Release(backbuffer); + IDirect3DTexture9_Release(offscreenTexture); + IDirect3DSurface9_Release(offscreen); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } struct vertex_shortcolor { @@ -16644,11 +16651,11 @@ START_TEST(visual) offscreen_test(device_ptr); ds_size_test(device_ptr); - alpha_test(device_ptr); cleanup_device(device_ptr); device_ptr = NULL; + alpha_test(); shademode_test(); srgbtexture_test(); release_buffer_test();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for shademode_test().
by Alexandre Julliard
09 Apr '14
09 Apr '14
Module: wine Branch: master Commit: b7977c9f6ba4b250535e558ed323621563f016b8 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b7977c9f6ba4b250535e558ed…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 9 08:54:43 2014 +0200 d3d9/tests: Use a separate device for shademode_test(). --- dlls/d3d9/tests/visual.c | 82 +++++++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 38 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 49c9d1f..4cc5104 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -7732,45 +7732,50 @@ done: DestroyWindow(window); } -static void shademode_test(IDirect3DDevice9 *device) +static void shademode_test(void) { /* Render a quad and try all of the different fixed function shading models. */ - struct IDirect3DVertexBuffer9 *vb_strip = NULL; - struct IDirect3DVertexBuffer9 *vb_list = NULL; - HRESULT hr; - DWORD color0, color1; DWORD color0_gouraud = 0, color1_gouraud = 0; - DWORD shademode = D3DSHADE_FLAT; DWORD primtype = D3DPT_TRIANGLESTRIP; + IDirect3DVertexBuffer9 *vb_strip; + IDirect3DVertexBuffer9 *vb_list; + DWORD shademode = D3DSHADE_FLAT; + IDirect3DDevice9 *device; + DWORD color0, color1; void *data = NULL; + IDirect3D9 *d3d; + ULONG refcount; + HWND window; + HRESULT hr; UINT i, j; - struct vertex quad_strip[] = + + static const struct vertex quad_strip[] = { - {-1.0f, -1.0f, 0.0f, 0xffff0000 }, - {-1.0f, 1.0f, 0.0f, 0xff00ff00 }, - { 1.0f, -1.0f, 0.0f, 0xff0000ff }, - { 1.0f, 1.0f, 0.0f, 0xffffffff } + {-1.0f, -1.0f, 0.0f, 0xffff0000}, + {-1.0f, 1.0f, 0.0f, 0xff00ff00}, + { 1.0f, -1.0f, 0.0f, 0xff0000ff}, + { 1.0f, 1.0f, 0.0f, 0xffffffff}, }; - struct vertex quad_list[] = + static const struct vertex quad_list[] = { - {-1.0f, -1.0f, 0.0f, 0xffff0000 }, - {-1.0f, 1.0f, 0.0f, 0xff00ff00 }, - { 1.0f, -1.0f, 0.0f, 0xff0000ff }, + {-1.0f, -1.0f, 0.0f, 0xffff0000}, + {-1.0f, 1.0f, 0.0f, 0xff00ff00}, + { 1.0f, -1.0f, 0.0f, 0xff0000ff}, - {-1.0f, 1.0f, 0.0f, 0xff00ff00 }, - { 1.0f, -1.0f, 0.0f, 0xff0000ff }, - { 1.0f, 1.0f, 0.0f, 0xffffffff } + { 1.0f, -1.0f, 0.0f, 0xff0000ff}, + {-1.0f, 1.0f, 0.0f, 0xff00ff00}, + { 1.0f, 1.0f, 0.0f, 0xffffffff}, }; - hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(quad_strip), - 0, 0, D3DPOOL_MANAGED, &vb_strip, NULL); - ok(hr == D3D_OK, "CreateVertexBuffer failed with %08x\n", hr); - if (FAILED(hr)) goto bail; - - hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(quad_list), - 0, 0, D3DPOOL_MANAGED, &vb_list, NULL); - ok(hr == D3D_OK, "CreateVertexBuffer failed with %08x\n", hr); - if (FAILED(hr)) goto bail; + 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_SetRenderState(device, D3DRS_LIGHTING, FALSE); ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); @@ -7778,12 +7783,16 @@ static void shademode_test(IDirect3DDevice9 *device) hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | D3DFVF_DIFFUSE); ok(hr == D3D_OK, "IDirect3DDevice9_SetFVF failed with %08x\n", hr); + hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(quad_strip), 0, 0, D3DPOOL_MANAGED, &vb_strip, NULL); + ok(hr == D3D_OK, "CreateVertexBuffer failed with %08x\n", hr); hr = IDirect3DVertexBuffer9_Lock(vb_strip, 0, sizeof(quad_strip), &data, 0); ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, quad_strip, sizeof(quad_strip)); hr = IDirect3DVertexBuffer9_Unlock(vb_strip); ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Unlock failed with %08x\n", hr); + hr = IDirect3DDevice9_CreateVertexBuffer(device, sizeof(quad_list), 0, 0, D3DPOOL_MANAGED, &vb_list, NULL); + ok(hr == D3D_OK, "CreateVertexBuffer failed with %08x\n", hr); hr = IDirect3DVertexBuffer9_Lock(vb_list, 0, sizeof(quad_list), &data, 0); ok(hr == D3D_OK, "IDirect3DVertexBuffer9_Lock failed with %08x\n", hr); memcpy(data, quad_list, sizeof(quad_list)); @@ -7872,16 +7881,13 @@ static void shademode_test(IDirect3DDevice9 *device) shademode = D3DSHADE_FLAT; } -bail: - hr = IDirect3DDevice9_SetStreamSource(device, 0, NULL, 0, 0); - ok(hr == D3D_OK, "IDirect3DDevice9_SetStreamSource failed with %08x\n", hr); - hr = IDirect3DDevice9_SetRenderState(device, D3DRS_SHADEMODE, D3DSHADE_GOURAUD); - ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); - - if (vb_strip) - IDirect3DVertexBuffer9_Release(vb_strip); - if (vb_list) - IDirect3DVertexBuffer9_Release(vb_list); + IDirect3DVertexBuffer9_Release(vb_strip); + IDirect3DVertexBuffer9_Release(vb_list); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); } static void alpha_test(IDirect3DDevice9 *device) @@ -16639,11 +16645,11 @@ START_TEST(visual) offscreen_test(device_ptr); ds_size_test(device_ptr); alpha_test(device_ptr); - shademode_test(device_ptr); cleanup_device(device_ptr); device_ptr = NULL; + shademode_test(); srgbtexture_test(); release_buffer_test(); float_texture_test();
1
0
0
0
Henri Verbeet : d3d9/tests: Use a separate device for srgbtexture_test().
by Alexandre Julliard
09 Apr '14
09 Apr '14
Module: wine Branch: master Commit: 91e9ca707085ae3ca1990f3fed2f7ff4a85c131d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=91e9ca707085ae3ca1990f3fe…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 9 08:54:42 2014 +0200 d3d9/tests: Use a separate device for srgbtexture_test(). --- dlls/d3d9/tests/visual.c | 72 ++++++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 34 deletions(-) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index bd2edba..49c9d1f 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -7645,44 +7645,50 @@ done: DestroyWindow(window); } -static void srgbtexture_test(IDirect3DDevice9 *device) +static void srgbtexture_test(void) { /* Fill a texture with 0x7f (~ .5), and then turn on the D3DSAMP_SRGBTEXTURE * texture stage state to render a quad using that texture. The resulting * color components should be 0x36 (~ 0.21), per this formula: * linear_color = ((srgb_color + 0.055) / 1.055) ^ 2.4 * This is true where srgb_color > 0.04045. */ - struct IDirect3DTexture9 *texture = NULL; - struct IDirect3DSurface9 *surface = NULL; - IDirect3D9 *d3d = NULL; + struct IDirect3DTexture9 *texture; + struct IDirect3DSurface9 *surface; + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + D3DCOLOR color; + ULONG refcount; + HWND window; HRESULT hr; - D3DLOCKED_RECT lr; - DWORD color; - float quad[] = { - -1.0, 1.0, 0.0, 0.0, 0.0, - 1.0, 1.0, 0.0, 1.0, 0.0, - -1.0, -1.0, 0.0, 0.0, 1.0, - 1.0, -1.0, 0.0, 1.0, 1.0, - }; + static const float quad[] = + { + -1.0f, -1.0f, 0.0f, 0.0f, 1.0f, + -1.0f, 1.0f, 0.0f, 0.0f, 0.0f, + 1.0f, -1.0f, 0.0f, 1.0f, 1.0f, + 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, + }; - memset(&lr, 0, sizeof(lr)); - IDirect3DDevice9_GetDirect3D(device, &d3d); - if(IDirect3D9_CheckDeviceFormat(d3d, 0, D3DDEVTYPE_HAL, D3DFMT_X8R8G8B8, - D3DUSAGE_QUERY_SRGBREAD, D3DRTYPE_TEXTURE, - D3DFMT_A8R8G8B8) != D3D_OK) { - skip("D3DFMT_A8R8G8B8 textures with SRGBREAD not supported\n"); - goto out; + 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_CreateTexture(device, 16, 16, 1, 0, - D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, - &texture, NULL); - ok(hr == D3D_OK, "IDirect3DDevice9_CreateTexture failed with %08x\n", hr); - if(!texture) { - skip("Failed to create A8R8G8B8 texture with SRGBREAD\n"); - goto out; + if (IDirect3D9_CheckDeviceFormat(d3d, 0, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, D3DUSAGE_QUERY_SRGBREAD, D3DRTYPE_TEXTURE, D3DFMT_A8R8G8B8) != D3D_OK) + { + skip("D3DFMT_A8R8G8B8 textures with SRGBREAD not supported.\n"); + IDirect3DDevice9_Release(device); + goto done; } + + hr = IDirect3DDevice9_CreateTexture(device, 16, 16, 1, 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(hr == D3D_OK, "IDirect3DTexture9_GetSurfaceLevel failed with %08x\n", hr); @@ -7712,20 +7718,18 @@ static void srgbtexture_test(IDirect3DDevice9 *device) ok(hr == D3D_OK, "IDirect3DDevice9_EndScene failed with %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_SRGBTEXTURE, FALSE); - ok(hr == D3D_OK, "IDirect3DDevice9_SetSamplerState failed with %08x\n", hr); - color = getPixelColor(device, 320, 240); ok(color_match(color, 0x00363636, 1), "sRGB quad has color 0x%08x, expected 0x00363636.\n", color); hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); -out: - if(texture) IDirect3DTexture9_Release(texture); + IDirect3DTexture9_Release(texture); + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); +done: IDirect3D9_Release(d3d); + DestroyWindow(window); } static void shademode_test(IDirect3DDevice9 *device) @@ -16636,11 +16640,11 @@ START_TEST(visual) ds_size_test(device_ptr); alpha_test(device_ptr); shademode_test(device_ptr); - srgbtexture_test(device_ptr); cleanup_device(device_ptr); device_ptr = NULL; + srgbtexture_test(); release_buffer_test(); float_texture_test(); g16r16_texture_test();
1
0
0
0
Andrey Gusev : Fix broken link
by Jeremy Newman
09 Apr '14
09 Apr '14
Module: website Branch: master Commit: a283c86d2f94d604de992faf43f66048eb22a562 URL:
http://source.winehq.org/git/website.git/?a=commit;h=a283c86d2f94d604de992f…
Author: Andrey Gusev <andrey.goosev(a)gmail.com> Date: Wed Apr 9 12:02:50 2014 +0300 Fix broken link Fixes bug #35746 --- templates/de/download/debian.template | 2 +- templates/de/download/ubuntu.template | 2 +- templates/en/download/debian.template | 2 +- templates/en/download/ubuntu.template | 2 +- templates/fr/download/debian.template | 2 +- templates/fr/download/ubuntu.template | 2 +- templates/he/download/deb.template | 2 +- templates/he/download/deblenny.template | 2 +- templates/pl/download/debian.template | 2 +- templates/pl/download/ubuntu.template | 2 +- templates/pt/download/debian.template | 2 +- templates/pt/download/ubuntu.template | 2 +- templates/tr/download/debian.template | 2 +- templates/tr/download/ubuntu.template | 2 +- templates/uk/download/debian.template | 2 +- templates/uk/download/ubuntu.template | 2 +- templates/zh-cn/download/debian.template | 2 +- templates/zh-cn/download/ubuntu.template | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) Diff:
http://source.winehq.org/git/website.git/?a=commitdiff;h=a283c86d2f94d604de…
1
0
0
0
Zhenbo Li : mshtml: Added IHTMLTable::bgColor property implementation.
by Alexandre Julliard
08 Apr '14
08 Apr '14
Module: wine Branch: master Commit: 22c2d81a2d334a8ec324fb9bdb71c8f08ce12158 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=22c2d81a2d334a8ec324fb9bd…
Author: Zhenbo Li <litimetal(a)gmail.com> Date: Sun Apr 6 22:48:41 2014 +0800 mshtml: Added IHTMLTable::bgColor property implementation. --- dlls/mshtml/htmltable.c | 41 +++++++++++++++++++++++++++++++++++++---- dlls/mshtml/tests/dom.c | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 4 deletions(-) diff --git a/dlls/mshtml/htmltable.c b/dlls/mshtml/htmltable.c index e3a1264..d711ed7 100644 --- a/dlls/mshtml/htmltable.c +++ b/dlls/mshtml/htmltable.c @@ -246,15 +246,48 @@ static HRESULT WINAPI HTMLTable_get_background(IHTMLTable *iface, BSTR *p) static HRESULT WINAPI HTMLTable_put_bgColor(IHTMLTable *iface, VARIANT v) { HTMLTable *This = impl_from_IHTMLTable(iface); - FIXME("(%p)->(%s)\n", This, debugstr_variant(&v)); - return E_NOTIMPL; + nsAString val; + nsresult nsres; + + TRACE("(%p)->(%s)\n", This, debugstr_variant(&v)); + + nsAString_InitDepend(&val, V_BSTR(&v)); + variant_to_nscolor(&v, &val); + nsres = nsIDOMHTMLTableElement_SetBgColor(This->nstable, &val); + nsAString_Finish(&val); + + if (NS_FAILED(nsres)){ + ERR("Set BgColor(%s) failed!\n", debugstr_variant(&v)); + return E_FAIL; + } + + return S_OK; } static HRESULT WINAPI HTMLTable_get_bgColor(IHTMLTable *iface, VARIANT *p) { HTMLTable *This = impl_from_IHTMLTable(iface); - FIXME("(%p)->(%p)\n", This, p); - return E_NOTIMPL; + nsAString strColor; + nsresult nsres; + HRESULT hres; + const PRUnichar *color; + + TRACE("(%p)->(%p)\n", This, p); + + nsAString_Init(&strColor, NULL); + nsres = nsIDOMHTMLTableElement_GetBgColor(This->nstable, &strColor); + + if(NS_SUCCEEDED(nsres)) { + nsAString_GetData(&strColor, &color); + V_VT(p) = VT_BSTR; + hres = nscolor_to_str(color, &V_BSTR(p)); + }else { + ERR("SetBgColor failed: %08x\n", nsres); + hres = E_FAIL; + } + + nsAString_Finish(&strColor); + return hres; } static HRESULT WINAPI HTMLTable_put_borderColor(IHTMLTable *iface, VARIANT v) diff --git a/dlls/mshtml/tests/dom.c b/dlls/mshtml/tests/dom.c index 76c283a..23677f4 100644 --- a/dlls/mshtml/tests/dom.c +++ b/dlls/mshtml/tests/dom.c @@ -5729,6 +5729,7 @@ static void test_table_elem(IHTMLElement *elem) VARIANT v; HRESULT hres; BSTR bstr; + VARIANT vbg, vDefaultbg; static const elem_type_t row_types[] = {ET_TR,ET_TR}; static const elem_type_t all_types[] = {ET_TBODY,ET_TR,ET_TR,ET_TD,ET_TD}; @@ -5794,6 +5795,40 @@ static void test_table_elem(IHTMLElement *elem) ok(!strcmp_wa(bstr, "left"), "get_align returned %s\n", wine_dbgstr_w(bstr)); SysFreeString(bstr); + hres = IHTMLTable_get_bgColor(table, &vDefaultbg); + ok(hres == S_OK, "get_bgColor failed: %08x\n", hres); + ok(V_VT(&vDefaultbg) == VT_BSTR, "bstr != NULL\n"); + ok(!V_BSTR(&vDefaultbg), "V_BSTR(bgColor) = %s\n", wine_dbgstr_w(V_BSTR(&vDefaultbg))); + + V_VT(&vbg) = VT_BSTR; + V_BSTR(&vbg) = a2bstr("red"); + hres = IHTMLTable_put_bgColor(table, vbg); + ok(hres == S_OK, "put_bgColor failed: %08x\n", hres); + VariantClear(&vbg); + + hres = IHTMLTable_get_bgColor(table, &vbg); + ok(hres == S_OK, "get_bgColor failed: %08x\n", hres); + ok(V_VT(&vDefaultbg) == VT_BSTR, "V_VT(&vDefaultbg) != VT_BSTR\n"); + ok(!strcmp_wa(V_BSTR(&vbg), "#ff0000"), "Unexpected bgcolor %s\n", wine_dbgstr_w(V_BSTR(&vbg))); + VariantClear(&vbg); + + V_VT(&vbg) = VT_I4; + V_I4(&vbg) = 0xff0000; + hres = IHTMLTable_put_bgColor(table, vbg); + ok(hres == S_OK, "put_bgColor failed: %08x\n", hres); + VariantClear(&vbg); + + hres = IHTMLTable_get_bgColor(table, &vbg); + ok(hres == S_OK, "get_bgColor failed: %08x\n", hres); + ok(V_VT(&vDefaultbg) == VT_BSTR, "V_VT(&vDefaultbg) != VT_BSTR\n"); + ok(!strcmp_wa(V_BSTR(&vbg), "#ff0000"), "Unexpected bgcolor %s\n", wine_dbgstr_w(V_BSTR(&vbg))); + VariantClear(&vbg); + + /* Restore Originial */ + hres = IHTMLTable_put_bgColor(table, vDefaultbg); + ok(hres == S_OK, "put_bgColor failed: %08x\n", hres); + VariantClear(&vDefaultbg); + IHTMLTable_Release(table); }
1
0
0
0
Zhenbo Li : mshtml: Don't free a string too early.
by Alexandre Julliard
08 Apr '14
08 Apr '14
Module: wine Branch: master Commit: c4a51b0b0afa2ad03bea76d540f6028532e7acd1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c4a51b0b0afa2ad03bea76d54…
Author: Zhenbo Li <litimetal(a)gmail.com> Date: Sun Apr 6 22:44:39 2014 +0800 mshtml: Don't free a string too early. --- dlls/mshtml/htmltablerow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/mshtml/htmltablerow.c b/dlls/mshtml/htmltablerow.c index f3a4970..74750bd 100644 --- a/dlls/mshtml/htmltablerow.c +++ b/dlls/mshtml/htmltablerow.c @@ -200,7 +200,6 @@ static HRESULT WINAPI HTMLTableRow_get_bgColor(IHTMLTableRow *iface, VARIANT *p) nsAString_Init(&strColor, NULL); nsres = nsIDOMHTMLTableRowElement_GetBgColor(This->nsrow, &strColor); - nsAString_Finish(&strColor); if(NS_SUCCEEDED(nsres)) { nsAString_GetData(&strColor, &color); @@ -211,6 +210,7 @@ static HRESULT WINAPI HTMLTableRow_get_bgColor(IHTMLTableRow *iface, VARIANT *p) hres = E_FAIL; } + nsAString_Finish(&strColor); return hres; }
1
0
0
0
Jacek Caban : qcap: Store max frame size separately from video format bitmap info and restore it before each ICCompress call.
by Alexandre Julliard
08 Apr '14
08 Apr '14
Module: wine Branch: master Commit: 531a6ceb5ddf494ddfc97b375171e84cb38ecbe6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=531a6ceb5ddf494ddfc97b375…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 8 14:25:52 2014 +0200 qcap: Store max frame size separately from video format bitmap info and restore it before each ICCompress call. --- dlls/qcap/avico.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dlls/qcap/avico.c b/dlls/qcap/avico.c index caef183..0287271 100644 --- a/dlls/qcap/avico.c +++ b/dlls/qcap/avico.c @@ -45,6 +45,7 @@ typedef struct { VIDEOINFOHEADER *videoinfo; size_t videoinfo_size; DWORD driver_flags; + DWORD max_frame_size; DWORD frame_cnt; } AVICompressor; @@ -111,6 +112,7 @@ static HRESULT fill_format_info(AVICompressor *This, VIDEOINFOHEADER *src_videoi This->videoinfo->dwBitRate = 10000000/src_videoinfo->AvgTimePerFrame * This->videoinfo->bmiHeader.biSizeImage * 8; This->videoinfo->AvgTimePerFrame = src_videoinfo->AvgTimePerFrame; + This->max_frame_size = This->videoinfo->bmiHeader.biSizeImage; return S_OK; } @@ -547,6 +549,7 @@ static HRESULT WINAPI AVICompressorIn_Receive(BaseInputPin *base, IMediaSample * FIXME("Unsupported temporal compression\n"); src_videoinfo = (VIDEOINFOHEADER*)This->in->pin.mtCurrent.pbFormat; + This->videoinfo->bmiHeader.biSizeImage = This->max_frame_size; res = ICCompress(This->hic, sync_point ? ICCOMPRESS_KEYFRAME : 0, &This->videoinfo->bmiHeader, buf, &src_videoinfo->bmiHeader, ptr, 0, &comp_flags, This->frame_cnt, 0, 0, NULL, NULL); if(res != ICERR_OK) { @@ -658,8 +661,8 @@ static HRESULT WINAPI AVICompressorOut_DecideBufferSize(BaseOutputPin *base, IMe if (!ppropInputRequest->cBuffers) ppropInputRequest->cBuffers = 1; - if (ppropInputRequest->cbBuffer < This->videoinfo->bmiHeader.biSizeImage) - ppropInputRequest->cbBuffer = This->videoinfo->bmiHeader.biSizeImage; + if (ppropInputRequest->cbBuffer < This->max_frame_size) + ppropInputRequest->cbBuffer = This->max_frame_size; if (!ppropInputRequest->cbAlign) ppropInputRequest->cbAlign = 1;
1
0
0
0
Jacek Caban : services: Skip tests if OpenSCManager failed.
by Alexandre Julliard
08 Apr '14
08 Apr '14
Module: wine Branch: master Commit: 98e9e4a3b0fcc0ca526f286dbe680f4311f836e3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=98e9e4a3b0fcc0ca526f286db…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 8 11:20:27 2014 +0200 services: Skip tests if OpenSCManager failed. This should also fix failures on VMs with insufficient privileges. --- programs/services/tests/service.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/programs/services/tests/service.c b/programs/services/tests/service.c index 8511b92..203882d 100644 --- a/programs/services/tests/service.c +++ b/programs/services/tests/service.c @@ -471,10 +471,14 @@ START_TEST(service) return; } - argc = winetest_get_mainargs(&argv); - scm_handle = OpenSCManagerA(NULL, NULL, GENERIC_ALL); - ok(scm_handle != NULL, "OpenSCManager failed: %u\n", GetLastError()); + ok(scm_handle != NULL || GetLastError() == ERROR_ACCESS_DENIED, "OpenSCManager failed: %u\n", GetLastError()); + if(!scm_handle) { + skip("OpenSCManager failed, skipping tests\n"); + return; + } + + argc = winetest_get_mainargs(&argv); if(argc < 3) { test_runner(test_service);
1
0
0
0
Jacek Caban : mshtml: Ignore QueryHitPoint calls in activex.c tests.
by Alexandre Julliard
08 Apr '14
08 Apr '14
Module: wine Branch: master Commit: 7b88e378395455b1c523c4ce6c0504e236512756 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7b88e378395455b1c523c4ce6…
Author: Jacek Caban <jacek(a)codeweavers.com> Date: Tue Apr 8 10:53:14 2014 +0200 mshtml: Ignore QueryHitPoint calls in activex.c tests. --- dlls/mshtml/tests/activex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/mshtml/tests/activex.c b/dlls/mshtml/tests/activex.c index 00b8ba2..2ceb8f0 100644 --- a/dlls/mshtml/tests/activex.c +++ b/dlls/mshtml/tests/activex.c @@ -977,7 +977,7 @@ static HRESULT WINAPI ViewObjectEx_GetViewStatus(IViewObjectEx *iface, DWORD *pd static HRESULT WINAPI ViewObjectEx_QueryHitPoint(IViewObjectEx *iface, DWORD dwAspect, LPCRECT pRectBounds, POINT ptlLoc, LONG lCloseHint, DWORD *pHitResult) { - ok(0, "unexpected call\n"); + trace("QueryHitPoint call ignored\n"); return E_NOTIMPL; }
1
0
0
0
← Newer
1
...
32
33
34
35
36
37
38
...
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