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 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
750 discussions
Start a n
N
ew thread
Henri Verbeet : d3d9/tests: Add some tests for the properties of the DC returned by surface GetDC().
by Alexandre Julliard
13 Apr '16
13 Apr '16
Module: wine Branch: master Commit: cf259ea41e313d48d971d9ac05c01db4c0e1f9f2 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=cf259ea41e313d48d971d9ac0…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 13 12:18:50 2016 +0200 d3d9/tests: Add some tests for the properties of the DC returned by surface GetDC(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/tests/d3d9ex.c | 8 ++++ dlls/d3d9/tests/device.c | 113 ++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 101 insertions(+), 20 deletions(-) diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index b74ae47..e9548de 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -1441,9 +1441,12 @@ done: static void test_user_memory_getdc(void) { IDirect3DDevice9Ex *device; + HBITMAP bitmap; + DIBSECTION dib; HWND window; HRESULT hr; ULONG ref; + int size; IDirect3DSurface9 *surface; DWORD *data; HDC dc; @@ -1464,6 +1467,11 @@ static void test_user_memory_getdc(void) hr = IDirect3DSurface9_GetDC(surface, &dc); ok(SUCCEEDED(hr), "Failed to get dc, hr %#x.\n", hr); + bitmap = GetCurrentObject(dc, OBJ_BITMAP); + ok(!!bitmap, "Failed to get bitmap.\n"); + size = GetObjectA(bitmap, sizeof(dib), &dib); + ok(size == sizeof(dib), "Got unexpected size %d.\n", size); + todo_wine ok(dib.dsBm.bmBits == data, "Got unexpected bits %p, expected %p.\n", dib.dsBm.bmBits, data); BitBlt(dc, 0, 0, 16, 8, NULL, 0, 0, WHITENESS); BitBlt(dc, 0, 8, 16, 8, NULL, 0, 0, BLACKNESS); hr = IDirect3DSurface9_ReleaseDC(surface, dc); diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 6fd75cd..a14e3d4 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -7567,30 +7567,32 @@ static void test_getdc(void) { const char *name; D3DFORMAT format; + unsigned int bit_count; + DWORD mask_r, mask_g, mask_b; BOOL getdc_supported; } testdata[] = { - {"D3DFMT_A8R8G8B8", D3DFMT_A8R8G8B8, TRUE }, - {"D3DFMT_X8R8G8B8", D3DFMT_X8R8G8B8, TRUE }, - {"D3DFMT_R5G6B5", D3DFMT_R5G6B5, TRUE }, - {"D3DFMT_X1R5G5B5", D3DFMT_X1R5G5B5, TRUE }, - {"D3DFMT_A1R5G5B5", D3DFMT_A1R5G5B5, TRUE }, - {"D3DFMT_R8G8B8", D3DFMT_R8G8B8, TRUE }, - {"D3DFMT_A2R10G10B10", D3DFMT_A2R10G10B10, FALSE}, /* Untested, card on windows didn't support it. */ - {"D3DFMT_V8U8", D3DFMT_V8U8, FALSE}, - {"D3DFMT_Q8W8V8U8", D3DFMT_Q8W8V8U8, FALSE}, - {"D3DFMT_A8B8G8R8", D3DFMT_A8B8G8R8, FALSE}, - {"D3DFMT_X8B8G8R8", D3DFMT_A8B8G8R8, FALSE}, - {"D3DFMT_R3G3B2", D3DFMT_R3G3B2, FALSE}, - {"D3DFMT_P8", D3DFMT_P8, FALSE}, - {"D3DFMT_L8", D3DFMT_L8, FALSE}, - {"D3DFMT_A8L8", D3DFMT_A8L8, FALSE}, - {"D3DFMT_DXT1", D3DFMT_DXT1, FALSE}, - {"D3DFMT_DXT2", D3DFMT_DXT2, FALSE}, - {"D3DFMT_DXT3", D3DFMT_DXT3, FALSE}, - {"D3DFMT_DXT4", D3DFMT_DXT4, FALSE}, - {"D3DFMT_DXT5", D3DFMT_DXT5, FALSE}, + {"A8R8G8B8", D3DFMT_A8R8G8B8, 32, 0x00000000, 0x00000000, 0x00000000, TRUE }, + {"X8R8G8B8", D3DFMT_X8R8G8B8, 32, 0x00000000, 0x00000000, 0x00000000, TRUE }, + {"R5G6B5", D3DFMT_R5G6B5, 16, 0x0000f800, 0x000007e0, 0x0000001f, TRUE }, + {"X1R5G5B5", D3DFMT_X1R5G5B5, 16, 0x00007c00, 0x000003e0, 0x0000001f, TRUE }, + {"A1R5G5B5", D3DFMT_A1R5G5B5, 16, 0x00007c00, 0x000003e0, 0x0000001f, TRUE }, + {"R8G8B8", D3DFMT_R8G8B8, 24, 0x00000000, 0x00000000, 0x00000000, TRUE }, + {"A2R10G10B10", D3DFMT_A2R10G10B10, 32, 0x00000000, 0x00000000, 0x00000000, FALSE}, + {"V8U8", D3DFMT_V8U8, 16, 0x00000000, 0x00000000, 0x00000000, FALSE}, + {"Q8W8V8U8", D3DFMT_Q8W8V8U8, 32, 0x00000000, 0x00000000, 0x00000000, FALSE}, + {"A8B8G8R8", D3DFMT_A8B8G8R8, 32, 0x00000000, 0x00000000, 0x00000000, FALSE}, + {"X8B8G8R8", D3DFMT_A8B8G8R8, 32, 0x00000000, 0x00000000, 0x00000000, FALSE}, + {"R3G3B2", D3DFMT_R3G3B2, 8, 0x00000000, 0x00000000, 0x00000000, FALSE}, + {"P8", D3DFMT_P8, 8, 0x00000000, 0x00000000, 0x00000000, FALSE}, + {"L8", D3DFMT_L8, 8, 0x00000000, 0x00000000, 0x00000000, FALSE}, + {"A8L8", D3DFMT_A8L8, 16, 0x00000000, 0x00000000, 0x00000000, FALSE}, + {"DXT1", D3DFMT_DXT1, 4, 0x00000000, 0x00000000, 0x00000000, FALSE}, + {"DXT2", D3DFMT_DXT2, 8, 0x00000000, 0x00000000, 0x00000000, FALSE}, + {"DXT3", D3DFMT_DXT3, 8, 0x00000000, 0x00000000, 0x00000000, FALSE}, + {"DXT4", D3DFMT_DXT4, 8, 0x00000000, 0x00000000, 0x00000000, FALSE}, + {"DXT5", D3DFMT_DXT5, 8, 0x00000000, 0x00000000, 0x00000000, FALSE}, }; IDirect3DSurface9 *surface, *surface2; IDirect3DCubeTexture9 *cube_texture; @@ -7643,6 +7645,77 @@ static void test_getdc(void) if (SUCCEEDED(hr)) { + unsigned int width_bytes; + DIBSECTION dib; + HBITMAP bitmap; + DWORD type; + int size; + + type = GetObjectType(dc); + ok(type == OBJ_MEMDC, "Got unexpected object type %#x for format %s.\n", type, testdata[i].name); + bitmap = GetCurrentObject(dc, OBJ_BITMAP); + type = GetObjectType(bitmap); + ok(type == OBJ_BITMAP, "Got unexpected object type %#x for format %s.\n", type, testdata[i].name); + + size = GetObjectA(bitmap, sizeof(dib), &dib); + ok(size == sizeof(dib), "Got unexpected size %d for format %s.\n", size, testdata[i].name); + ok(!dib.dsBm.bmType, "Got unexpected type %#x for format %s.\n", + dib.dsBm.bmType, testdata[i].name); + ok(dib.dsBm.bmWidth == 64, "Got unexpected width %d for format %s.\n", + dib.dsBm.bmWidth, testdata[i].name); + ok(dib.dsBm.bmHeight == 64, "Got unexpected height %d for format %s.\n", + dib.dsBm.bmHeight, testdata[i].name); + width_bytes = ((dib.dsBm.bmWidth * testdata[i].bit_count + 31) >> 3) & ~3; + ok(dib.dsBm.bmWidthBytes == width_bytes, "Got unexpected width bytes %d for format %s.\n", + dib.dsBm.bmWidthBytes, testdata[i].name); + ok(dib.dsBm.bmPlanes == 1, "Got unexpected plane count %d for format %s.\n", + dib.dsBm.bmPlanes, testdata[i].name); + ok(dib.dsBm.bmBitsPixel == testdata[i].bit_count, + "Got unexpected bit count %d for format %s.\n", + dib.dsBm.bmBitsPixel, testdata[i].name); + ok(!!dib.dsBm.bmBits, "Got unexpected bits %p for format %s.\n", + dib.dsBm.bmBits, testdata[i].name); + + ok(dib.dsBmih.biSize == sizeof(dib.dsBmih), "Got unexpected size %u for format %s.\n", + dib.dsBmih.biSize, testdata[i].name); + ok(dib.dsBmih.biWidth == 64, "Got unexpected width %d for format %s.\n", + dib.dsBmih.biHeight, testdata[i].name); + ok(dib.dsBmih.biHeight == 64, "Got unexpected height %d for format %s.\n", + dib.dsBmih.biHeight, testdata[i].name); + ok(dib.dsBmih.biPlanes == 1, "Got unexpected plane count %u for format %s.\n", + dib.dsBmih.biPlanes, testdata[i].name); + ok(dib.dsBmih.biBitCount == testdata[i].bit_count, "Got unexpected bit count %u for format %s.\n", + dib.dsBmih.biBitCount, testdata[i].name); + ok(dib.dsBmih.biCompression == (testdata[i].bit_count == 16 ? BI_BITFIELDS : BI_RGB), + "Got unexpected compression %#x for format %s.\n", + dib.dsBmih.biCompression, testdata[i].name); + todo_wine ok(!dib.dsBmih.biSizeImage, "Got unexpected image size %u for format %s.\n", + dib.dsBmih.biSizeImage, testdata[i].name); + ok(!dib.dsBmih.biXPelsPerMeter, "Got unexpected horizontal resolution %d for format %s.\n", + dib.dsBmih.biXPelsPerMeter, testdata[i].name); + ok(!dib.dsBmih.biYPelsPerMeter, "Got unexpected vertical resolution %d for format %s.\n", + dib.dsBmih.biYPelsPerMeter, testdata[i].name); + ok(!dib.dsBmih.biClrUsed, "Got unexpected used colour count %u for format %s.\n", + dib.dsBmih.biClrUsed, testdata[i].name); + ok(!dib.dsBmih.biClrImportant, "Got unexpected important colour count %u for format %s.\n", + dib.dsBmih.biClrImportant, testdata[i].name); + + if (dib.dsBmih.biCompression == BI_BITFIELDS) + { + ok(dib.dsBitfields[0] == testdata[i].mask_r && dib.dsBitfields[1] == testdata[i].mask_g + && dib.dsBitfields[2] == testdata[i].mask_b, + "Got unexpected colour masks 0x%08x 0x%08x 0x%08x for format %s.\n", + dib.dsBitfields[0], dib.dsBitfields[1], dib.dsBitfields[2], testdata[i].name); + } + else + { + ok(!dib.dsBitfields[0] && !dib.dsBitfields[1] && !dib.dsBitfields[2], + "Got unexpected colour masks 0x%08x 0x%08x 0x%08x for format %s.\n", + dib.dsBitfields[0], dib.dsBitfields[1], dib.dsBitfields[2], testdata[i].name); + } + ok(!dib.dshSection, "Got unexpected section %p for format %s.\n", dib.dshSection, testdata[i].name); + ok(!dib.dsOffset, "Got unexpected offset %u for format %s.\n", dib.dsOffset, testdata[i].name); + hr = IDirect3DSurface9_ReleaseDC(surface, dc); ok(hr == D3D_OK, "Failed to release DC, hr %#x.\n", hr); }
1
0
0
0
Henri Verbeet : ddraw/tests: Add some tests for the properties of the DC returned by surface GetDC().
by Alexandre Julliard
13 Apr '16
13 Apr '16
Module: wine Branch: master Commit: 2280487111bf2813151ca54e43f36779252fe61e URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2280487111bf2813151ca54e4…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 13 12:18:49 2016 +0200 ddraw/tests: Add some tests for the properties of the DC returned by surface GetDC(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ddraw/tests/ddraw1.c | 75 ++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw2.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw4.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++ dlls/ddraw/tests/ddraw7.c | 83 +++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 324 insertions(+) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2280487111bf2813151ca…
1
0
0
0
Henri Verbeet : wined3d: Be more strict with wined3d_texture_get_dc() calls from d3d9.
by Alexandre Julliard
13 Apr '16
13 Apr '16
Module: wine Branch: master Commit: 9e763ab92be2f6000565c50b851093c6146de01a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9e763ab92be2f6000565c50b8…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 13 12:18:48 2016 +0200 wined3d: Be more strict with wined3d_texture_get_dc() calls from d3d9. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/tests/device.c | 20 ++++++++++---------- dlls/wined3d/texture.c | 32 ++++++++++++++++++++------------ dlls/wined3d/wined3d_private.h | 2 +- 3 files changed, 31 insertions(+), 23 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=9e763ab92be2f6000565c…
1
0
0
0
Henri Verbeet : wined3d: Be more lenient with wined3d_texture_get_dc() calls from ddraw.
by Alexandre Julliard
13 Apr '16
13 Apr '16
Module: wine Branch: master Commit: c3d74913b7d28b0287fcb38f3faf67402cbe79ee URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c3d74913b7d28b0287fcb38f3…
Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Wed Apr 13 12:18:47 2016 +0200 wined3d: Be more lenient with wined3d_texture_get_dc() calls from ddraw. Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3d9/surface.c | 6 +----- dlls/d3d9/tests/device.c | 2 +- dlls/ddraw/surface.c | 19 +++++++++++++------ dlls/ddraw/tests/ddraw1.c | 8 ++++---- dlls/ddraw/tests/ddraw2.c | 8 ++++---- dlls/ddraw/tests/ddraw4.c | 8 ++++---- dlls/ddraw/tests/ddraw7.c | 8 ++++---- dlls/wined3d/texture.c | 23 ++++++++++------------- dlls/wined3d/wined3d_private.h | 1 + include/wine/wined3d.h | 4 +--- 10 files changed, 43 insertions(+), 44 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=c3d74913b7d28b0287fcb…
1
0
0
0
Józef Kucia : dxgi/tests: Add test for IDXGISwapChain_GetContainingOutput().
by Alexandre Julliard
13 Apr '16
13 Apr '16
Module: wine Branch: master Commit: 02e5560d99c326d44324be078bf349275f6e3452 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=02e5560d99c326d44324be078…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Apr 12 12:29:41 2016 +0200 dxgi/tests: Add test for IDXGISwapChain_GetContainingOutput(). 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/dxgi/tests/device.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/dlls/dxgi/tests/device.c b/dlls/dxgi/tests/device.c index 837618a..d8b1dd6 100644 --- a/dlls/dxgi/tests/device.c +++ b/dlls/dxgi/tests/device.c @@ -560,6 +560,120 @@ static void test_create_swapchain(void) DestroyWindow(creation_desc.OutputWindow); } +static void test_get_containing_output(void) +{ + DXGI_OUTPUT_DESC output_desc, output_desc2; + DXGI_SWAP_CHAIN_DESC swapchain_desc; + IDXGIOutput *output, *output2; + unsigned int output_count; + IDXGISwapChain *swapchain; + IDXGIFactory *factory; + IDXGIAdapter *adapter; + IDXGIDevice *device; + ULONG refcount; + HRESULT hr; + + if (!(device = create_device())) + { + skip("Failed to create device.\n"); + return; + } + + hr = IDXGIDevice_GetAdapter(device, &adapter); + ok(SUCCEEDED(hr), "GetAdapter failed, hr %#x.\n", hr); + + hr = IDXGIAdapter_GetParent(adapter, &IID_IDXGIFactory, (void **)&factory); + ok(SUCCEEDED(hr), "GetParent failed, hr %#x.\n", hr); + + swapchain_desc.BufferDesc.Width = 800; + swapchain_desc.BufferDesc.Height = 600; + swapchain_desc.BufferDesc.RefreshRate.Numerator = 60; + swapchain_desc.BufferDesc.RefreshRate.Denominator = 60; + swapchain_desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; + swapchain_desc.BufferDesc.ScanlineOrdering = DXGI_MODE_SCANLINE_ORDER_UNSPECIFIED; + swapchain_desc.BufferDesc.Scaling = DXGI_MODE_SCALING_UNSPECIFIED; + swapchain_desc.SampleDesc.Count = 1; + swapchain_desc.SampleDesc.Quality = 0; + swapchain_desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; + swapchain_desc.BufferCount = 1; + swapchain_desc.OutputWindow = CreateWindowA("static", "dxgi_test", 0, 0, 0, 0, 0, 0, 0, 0, 0); + swapchain_desc.Windowed = TRUE; + swapchain_desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; + swapchain_desc.Flags = 0; + + output_count = 0; + while (IDXGIAdapter_EnumOutputs(adapter, output_count, &output) != DXGI_ERROR_NOT_FOUND) + { + ok(SUCCEEDED(hr), "Failed to enumarate output %u, hr %#x.\n", output_count, hr); + IDXGIOutput_Release(output); + ++output_count; + } + + if (output_count != 1) + { + skip("Adapter has %u outputs.\n", output_count); + goto done; + } + + hr = IDXGIAdapter_EnumOutputs(adapter, 0, &output); + ok(SUCCEEDED(hr), "EnumOutputs failed, hr %#x.\n", hr); + + refcount = get_refcount((IUnknown *)output); + todo_wine ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + + hr = IDXGIFactory_CreateSwapChain(factory, (IUnknown *)device, &swapchain_desc, &swapchain); + ok(SUCCEEDED(hr), "CreateSwapChain failed, hr %#x.\n", hr); + + hr = IDXGISwapChain_GetContainingOutput(swapchain, &output2); + ok(SUCCEEDED(hr) || broken(hr == DXGI_ERROR_UNSUPPORTED) /* Win 7 testbot */, + "GetContainingOutput failed, hr %#x.\n", hr); + if (hr == DXGI_ERROR_UNSUPPORTED) + { + IDXGISwapChain_Release(swapchain); + IDXGIOutput_Release(output); + goto done; + } + + refcount = get_refcount((IUnknown *)output); + todo_wine ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + refcount = get_refcount((IUnknown *)output2); + todo_wine ok(refcount == 1, "Got unexpected refcount %u.\n", refcount); + + hr = IDXGIOutput_GetDesc(output, &output_desc); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + hr = IDXGIOutput_GetDesc(output2, &output_desc2); + ok(SUCCEEDED(hr), "GetDesc failed, hr %#x.\n", hr); + + ok(!lstrcmpW(output_desc.DeviceName, output_desc2.DeviceName), + "Got unexpected device name %s, expected %s.\n", + wine_dbgstr_w(output_desc.DeviceName), wine_dbgstr_w(output_desc2.DeviceName)); + ok(!memcmp(&output_desc.DesktopCoordinates, &output_desc2.DesktopCoordinates, + sizeof(output_desc.DesktopCoordinates)), + "Got unexpected desktop coordinates {%d, %d, %d, %d}, expected {%d, %d, %d, %d}.\n", + output_desc.DesktopCoordinates.left, output_desc.DesktopCoordinates.top, + output_desc.DesktopCoordinates.right, output_desc.DesktopCoordinates.bottom, + output_desc2.DesktopCoordinates.left, output_desc2.DesktopCoordinates.top, + output_desc2.DesktopCoordinates.right, output_desc2.DesktopCoordinates.bottom); + + refcount = IDXGIOutput_Release(output2); + todo_wine ok(!refcount, "IDXGIOuput has %u references left.\n", refcount); + + refcount = IDXGISwapChain_Release(swapchain); + ok(!refcount, "IDXGISwapChain has %u references left.\n", refcount); + + refcount = IDXGIOutput_Release(output); + todo_wine ok(!refcount, "IDXGIOuput has %u references left.\n", refcount); + +done: + refcount = IDXGIDevice_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + refcount = IDXGIAdapter_Release(adapter); + todo_wine ok(!refcount, "Adapter has %u references left.\n", refcount); + refcount = IDXGIFactory_Release(factory); + ok(!refcount, "Factory has %u references left.\n", refcount); + DestroyWindow(swapchain_desc.OutputWindow); +} + static void test_create_factory(void) { IDXGIFactory1 *factory; @@ -1412,6 +1526,7 @@ START_TEST(device) test_parents(); test_output(); test_create_swapchain(); + test_get_containing_output(); test_create_factory(); test_private_data(); test_swapchain_resize();
1
0
0
0
Daniel Lehman : ucrtbase: Add __stdio_common_vfwprintf.
by Alexandre Julliard
13 Apr '16
13 Apr '16
Module: wine Branch: master Commit: 2f783c6828938d09a7ef86cdd9bc394f7c441136 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=2f783c6828938d09a7ef86cdd…
Author: Daniel Lehman <dlehman(a)esri.com> Date: Wed Apr 6 15:56:43 2016 -0700 ucrtbase: Add __stdio_common_vfwprintf. Signed-off-by: Daniel Lehman <dlehman(a)esri.com> Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- .../api-ms-win-crt-stdio-l1-1-0.spec | 2 +- dlls/msvcrt/file.c | 28 ++++ dlls/ucrtbase/tests/printf.c | 157 +++++++++++++++++++++ dlls/ucrtbase/ucrtbase.spec | 2 +- 4 files changed, 187 insertions(+), 2 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=2f783c6828938d09a7ef8…
1
0
0
0
Nikolay Sivov : dwrite: Only use fsSelection to switch to sTypo* metrics, remove table version check.
by Alexandre Julliard
13 Apr '16
13 Apr '16
Module: wine Branch: master Commit: f0dd5a012df7c2f6da37d4c53e303af9312e1db5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f0dd5a012df7c2f6da37d4c53…
Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Wed Apr 13 07:02:12 2016 +0300 dwrite: Only use fsSelection to switch to sTypo* metrics, remove table version check. Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/dwrite/opentype.c | 15 +++++------- dlls/dwrite/tests/font.c | 59 ++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 60 insertions(+), 14 deletions(-) diff --git a/dlls/dwrite/opentype.c b/dlls/dwrite/opentype.c index b9bddea..cbb372c 100644 --- a/dlls/dwrite/opentype.c +++ b/dlls/dwrite/opentype.c @@ -1187,15 +1187,12 @@ void opentype_get_font_metrics(IDWriteFontFileStream *stream, DWRITE_FONT_FACE_T metrics->xHeight = GET_BE_WORD(tt_os2->sxHeight); } - /* version 4 fields */ - if (version >= 4) { - if (GET_BE_WORD(tt_os2->fsSelection) & OS2_FSSELECTION_USE_TYPO_METRICS) { - SHORT descent = GET_BE_WORD(tt_os2->sTypoDescender); - metrics->ascent = GET_BE_WORD(tt_os2->sTypoAscender); - metrics->descent = descent < 0 ? -descent : 0; - metrics->lineGap = GET_BE_WORD(tt_os2->sTypoLineGap); - metrics->hasTypographicMetrics = TRUE; - } + if (GET_BE_WORD(tt_os2->fsSelection) & OS2_FSSELECTION_USE_TYPO_METRICS) { + SHORT descent = GET_BE_WORD(tt_os2->sTypoDescender); + metrics->ascent = GET_BE_WORD(tt_os2->sTypoAscender); + metrics->descent = descent < 0 ? -descent : 0; + metrics->lineGap = GET_BE_WORD(tt_os2->sTypoLineGap); + metrics->hasTypographicMetrics = TRUE; } } diff --git a/dlls/dwrite/tests/font.c b/dlls/dwrite/tests/font.c index 5591913..25c85e8 100644 --- a/dlls/dwrite/tests/font.c +++ b/dlls/dwrite/tests/font.c @@ -180,6 +180,19 @@ typedef struct USHORT usMaxContext; } TT_OS2_V2; +enum OS2_FSSELECTION { + OS2_FSSELECTION_ITALIC = 1 << 0, + OS2_FSSELECTION_UNDERSCORE = 1 << 1, + OS2_FSSELECTION_NEGATIVE = 1 << 2, + OS2_FSSELECTION_OUTLINED = 1 << 3, + OS2_FSSELECTION_STRIKEOUT = 1 << 4, + OS2_FSSELECTION_BOLD = 1 << 5, + OS2_FSSELECTION_REGULAR = 1 << 6, + OS2_FSSELECTION_USE_TYPO_METRICS = 1 << 7, + OS2_FSSELECTION_WWS = 1 << 8, + OS2_FSSELECTION_OBLIQUE = 1 << 9 +}; + typedef struct { ULONG Version; ULONG italicAngle; @@ -1519,7 +1532,7 @@ todo_wine DELETE_FONTFILE(path); } -static void get_expected_font_metrics(IDWriteFontFace *fontface, DWRITE_FONT_METRICS *metrics) +static void get_expected_font_metrics(IDWriteFontFace *fontface, DWRITE_FONT_METRICS1 *metrics) { void *os2_context, *head_context, *post_context; const TT_OS2_V2 *tt_os2; @@ -1542,6 +1555,19 @@ static void get_expected_font_metrics(IDWriteFontFace *fontface, DWRITE_FONT_MET metrics->designUnitsPerEm = GET_BE_WORD(tt_head->unitsPerEm); if (tt_os2) { + if (GET_BE_WORD(tt_os2->fsSelection) & OS2_FSSELECTION_USE_TYPO_METRICS) { + SHORT descent = GET_BE_WORD(tt_os2->sTypoDescender); + metrics->ascent = GET_BE_WORD(tt_os2->sTypoAscender); + metrics->descent = descent < 0 ? -descent : 0; + metrics->hasTypographicMetrics = TRUE; + } + else { + metrics->ascent = GET_BE_WORD(tt_os2->usWinAscent); + /* Some fonts have usWinDescent value stored as signed short, which could be wrongly + interpreted as large unsigned value. */ + metrics->descent = abs((SHORT)GET_BE_WORD(tt_os2->usWinDescent)); + } + metrics->strikethroughPosition = GET_BE_WORD(tt_os2->yStrikeoutPosition); metrics->strikethroughThickness = GET_BE_WORD(tt_os2->yStrikeoutSize); } @@ -1570,10 +1596,15 @@ static void get_expected_font_metrics(IDWriteFontFace *fontface, DWRITE_FONT_MET IDWriteFontFace_ReleaseFontTable(fontface, post_context); } -static void check_font_metrics(const WCHAR *nameW, const DWRITE_FONT_METRICS *got, const DWRITE_FONT_METRICS *expected) +static void check_font_metrics(const WCHAR *nameW, BOOL has_metrics1, const DWRITE_FONT_METRICS *got, + const DWRITE_FONT_METRICS1 *expected) { ok(got->designUnitsPerEm == expected->designUnitsPerEm, "font %s: designUnitsPerEm %u, expected %u\n", wine_dbgstr_w(nameW), got->designUnitsPerEm, expected->designUnitsPerEm); + ok(got->ascent == expected->ascent, "font %s: ascent %u, expected %u\n", wine_dbgstr_w(nameW), got->ascent, + expected->ascent); + ok(got->descent == expected->descent, "font %s: descent %u, expected %u\n", wine_dbgstr_w(nameW), got->descent, + expected->descent); ok(got->underlinePosition == expected->underlinePosition, "font %s: underlinePosition %d, expected %d\n", wine_dbgstr_w(nameW), got->underlinePosition, expected->underlinePosition); ok(got->underlineThickness == expected->underlineThickness, "font %s: underlineThickness %u, " @@ -1582,6 +1613,12 @@ static void check_font_metrics(const WCHAR *nameW, const DWRITE_FONT_METRICS *go wine_dbgstr_w(nameW), got->strikethroughPosition, expected->strikethroughPosition); ok(got->strikethroughThickness == expected->strikethroughThickness, "font %s: strikethroughThickness %u, " "expected %u\n", wine_dbgstr_w(nameW), got->strikethroughThickness, expected->strikethroughThickness); + + if (has_metrics1) { + const DWRITE_FONT_METRICS1 *m1 = (const DWRITE_FONT_METRICS1*)got; + ok(m1->hasTypographicMetrics == expected->hasTypographicMetrics, "font %s: hasTypographicMetrics %d, " + "expected %d\n", wine_dbgstr_w(nameW), m1->hasTypographicMetrics, expected->hasTypographicMetrics); + } } static void get_enus_string(IDWriteLocalizedStrings *strings, WCHAR *buff, UINT32 size) @@ -1788,8 +1825,9 @@ if (0) /* crashes on native */ count = IDWriteFontCollection_GetFontFamilyCount(syscollection); for (i = 0; i < count; i++) { - DWRITE_FONT_METRICS expected_metrics; + DWRITE_FONT_METRICS1 expected_metrics, metrics1; IDWriteLocalizedStrings *names; + IDWriteFontFace1 *fontface1; IDWriteFontFamily *family; IDWriteFont *font; WCHAR nameW[256]; @@ -1804,6 +1842,9 @@ if (0) /* crashes on native */ hr = IDWriteFont_CreateFontFace(font, &fontface); ok(hr == S_OK, "got 0x%08x\n", hr); + fontface1 = NULL; + IDWriteFontFace_QueryInterface(fontface, &IID_IDWriteFontFace1, (void**)&fontface1); + hr = IDWriteFontFamily_GetFamilyNames(family, &names); ok(hr == S_OK, "got 0x%08x\n", hr); @@ -1812,10 +1853,18 @@ if (0) /* crashes on native */ IDWriteLocalizedStrings_Release(names); IDWriteFont_Release(font); - IDWriteFontFace_GetMetrics(fontface, &metrics); get_expected_font_metrics(fontface, &expected_metrics); - check_font_metrics(nameW, &metrics, &expected_metrics); + if (fontface1) { + IDWriteFontFace1_GetMetrics(fontface1, &metrics1); + check_font_metrics(nameW, TRUE, (const DWRITE_FONT_METRICS*)&metrics1, &expected_metrics); + } + else { + IDWriteFontFace_GetMetrics(fontface, &metrics); + check_font_metrics(nameW, FALSE, &metrics, &expected_metrics); + } + if (fontface1) + IDWriteFontFace1_Release(fontface1); IDWriteFontFace_Release(fontface); IDWriteFontFamily_Release(family); }
1
0
0
0
Austin English : sfc_os: Return success in SRSetRestorePointA/W.
by Alexandre Julliard
13 Apr '16
13 Apr '16
Module: wine Branch: master Commit: 78ebf5231b52379ce988d5ec2127416405ef6bf5 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=78ebf5231b52379ce988d5ec2…
Author: Austin English <austinenglish(a)gmail.com> Date: Tue Apr 12 22:12:16 2016 -0500 sfc_os: Return success in SRSetRestorePointA/W. Signed-off-by: Austin English <austinenglish(a)gmail.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/sfc_os/sfc_os.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/sfc_os/sfc_os.c b/dlls/sfc_os/sfc_os.c index c124b90..f4515f2 100644 --- a/dlls/sfc_os/sfc_os.c +++ b/dlls/sfc_os/sfc_os.c @@ -143,13 +143,13 @@ DWORD WINAPI SfcConnectToServer(DWORD unknown) BOOL WINAPI SRSetRestorePointA(RESTOREPOINTINFOA *restorepoint, STATEMGRSTATUS *status) { FIXME("%p %p\n", restorepoint, status); - status->nStatus = ERROR_SERVICE_DISABLED; + status->nStatus = ERROR_SUCCESS; return FALSE; } BOOL WINAPI SRSetRestorePointW(RESTOREPOINTINFOW *restorepoint, STATEMGRSTATUS *status) { FIXME("%p %p\n", restorepoint, status); - status->nStatus = ERROR_SERVICE_DISABLED; + status->nStatus = ERROR_SUCCESS; return FALSE; }
1
0
0
0
Sebastian Lackner : ntdll: Preinitialize OS version data in thread_init.
by Alexandre Julliard
13 Apr '16
13 Apr '16
Module: wine Branch: master Commit: 56b4d35d5279ad2325a734009e8252c00890e50a URL:
http://source.winehq.org/git/wine.git/?a=commit;h=56b4d35d5279ad2325a734009…
Author: Sebastian Lackner <sebastian(a)fds-team.de> Date: Tue Apr 12 21:22:05 2016 +0200 ntdll: Preinitialize OS version data in thread_init. Fixes a regression introduced by bd17022c90466cf06392e9ffac905b8b0b7e2cd7. Signed-off-by: Sebastian Lackner <sebastian(a)fds-team.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/thread.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c index 0b68185..40747d7 100644 --- a/dlls/ntdll/thread.c +++ b/dlls/ntdll/thread.c @@ -251,6 +251,10 @@ HANDLE thread_init(void) peb->TlsExpansionBitmap = &tls_expansion_bitmap; peb->FlsBitmap = &fls_bitmap; peb->LdrData = &ldr; + peb->OSMajorVersion = 5; + peb->OSMinorVersion = 1; + peb->OSBuildNumber = 0xA28; + peb->OSPlatformId = VER_PLATFORM_WIN32_NT; params.CurrentDirectory.DosPath.Buffer = current_dir; params.CurrentDirectory.DosPath.MaximumLength = sizeof(current_dir); params.wShowWindow = 1; /* SW_SHOWNORMAL */
1
0
0
0
Józef Kucia : dxgi: Partially implement dxgi_swapchain_GetContainingOutput().
by Alexandre Julliard
12 Apr '16
12 Apr '16
Module: wine Branch: master Commit: 944190bad442f19fba5e0073d284469bd2329652 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=944190bad442f19fba5e0073d…
Author: Józef Kucia <jkucia(a)codeweavers.com> Date: Tue Apr 12 12:29:40 2016 +0200 dxgi: Partially implement dxgi_swapchain_GetContainingOutput(). 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/dxgi/swapchain.c | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index b729970..da705e4 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -287,9 +287,32 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_ResizeTarget(IDXGISwapChain *ifa static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetContainingOutput(IDXGISwapChain *iface, IDXGIOutput **output) { - FIXME("iface %p, output %p stub!\n", iface, output); + IDXGIAdapter *adapter; + IDXGIDevice *device; + HRESULT hr; - return E_NOTIMPL; + TRACE("iface %p, output %p.\n", iface, output); + + if (FAILED(hr = dxgi_swapchain_GetDevice(iface, &IID_IDXGIDevice, (void **)&device))) + return hr; + + hr = IDXGIDevice_GetAdapter(device, &adapter); + IDXGIDevice_Release(device); + if (FAILED(hr)) + { + WARN("GetAdapter failed, hr %#x.\n", hr); + return hr; + } + + if (SUCCEEDED(IDXGIAdapter_EnumOutputs(adapter, 1, output))) + { + FIXME("Adapter has got multiple outputs, returning the first one.\n"); + IDXGIOutput_Release(*output); + } + + hr = IDXGIAdapter_EnumOutputs(adapter, 0, output); + IDXGIAdapter_Release(adapter); + return hr; } static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetFrameStatistics(IDXGISwapChain *iface, DXGI_FRAME_STATISTICS *stats)
1
0
0
0
← Newer
1
...
39
40
41
42
43
44
45
...
75
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Results per page:
10
25
50
100
200