ReactOS.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
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
List overview
Download
Ros-diffs
February 2021
----- 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
ros-diffs@reactos.org
30 participants
434 discussions
Start a n
N
ew thread
[reactos] 119/218: [WINESYNC] d3dx9/tests: Add a test for loading surfaces not divisible by the block size.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7b66aec721c94d7e0bd67…
commit 7b66aec721c94d7e0bd674b9258f57693906ee72 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:56:59 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9/tests: Add a test for loading surfaces not divisible by the block size. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 7f39c726fc91d84d4b26241c3a031381ad9e59cb by Matteo Bruni <mbruni(a)codeweavers.com> --- modules/rostests/winetests/d3dx9_36/surface.c | 34 +++++++++++++++++++++++++++ sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/modules/rostests/winetests/d3dx9_36/surface.c b/modules/rostests/winetests/d3dx9_36/surface.c index 4a10492a08f..2f8149fd01a 100644 --- a/modules/rostests/winetests/d3dx9_36/surface.c +++ b/modules/rostests/winetests/d3dx9_36/surface.c @@ -167,6 +167,20 @@ static const unsigned char dds_volume_map[] = { 0x0f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x84,0xef,0x7b,0xaa,0xab,0xab,0xab }; +/* 4x2 dxt5 */ +static const BYTE dds_dxt5[] = +{ + 0x44,0x44,0x53,0x20,0x7c,0x00,0x00,0x00,0x07,0x10,0x08,0x00,0x02,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00, + 0x04,0x00,0x00,0x00,0x44,0x58,0x54,0x35,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x10,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0xef,0x87,0x0f,0x78,0x05,0x05,0x50,0x50, +}; + static HRESULT create_file(const char *filename, const unsigned char *data, const unsigned int size) { DWORD received; @@ -1269,6 +1283,26 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr); hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0); todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels to DXT5 format.\n"); + + SetRect(&rect, 0, 0, 4, 2); + hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, &rect, surf, NULL, &rect, D3DX_FILTER_NONE, 0); + todo_wine ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = D3DXLoadSurfaceFromMemory(newsurf, NULL, &rect, &dds_dxt5[128], + D3DFMT_DXT5, 16, NULL, &rect, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + check_release((IUnknown *)newsurf, 1); + check_release((IUnknown *)tex, 0); + + /* Test a rect larger than but not an integer multiple of the block size. */ + hr = IDirect3DDevice9_CreateTexture(device, 4, 8, 1, 0, D3DFMT_DXT5, D3DPOOL_SYSTEMMEM, &tex, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + SetRect(&rect, 0, 0, 4, 6); + hr = D3DXLoadSurfaceFromMemory(newsurf, NULL, &rect, &dds_dxt5[112], + D3DFMT_DXT5, 16, NULL, &rect, D3DX_FILTER_POINT, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + check_release((IUnknown*)newsurf, 1); check_release((IUnknown*)tex, 0); } diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 9119a897fda..2bf3eabe470 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h, include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h, include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h} -tags: {wine: e371085aaf4424e6ef9b5b76ebf3107121d22f50} +tags: {wine: 7f39c726fc91d84d4b26241c3a031381ad9e59cb}
3 years, 10 months
1
0
0
0
[reactos] 118/218: [WINESYNC] d3dx9: Relax a block alignment check.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eaf1129b76073d0081d64…
commit eaf1129b76073d0081d64309414851f509d58e58 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:56:59 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9: Relax a block alignment check. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id e371085aaf4424e6ef9b5b76ebf3107121d22f50 by Matteo Bruni <mbruni(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/surface.c | 6 +----- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index 2809cc71eb1..245f902b181 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -1909,11 +1909,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, && color_key == 0) /* Simple copy. */ { if (src_rect->left & (srcformatdesc->block_width - 1) - || src_rect->top & (srcformatdesc->block_height - 1) - || (src_rect->right & (srcformatdesc->block_width - 1) - && src_size.width != surfdesc.Width) - || (src_rect->bottom & (srcformatdesc->block_height - 1) - && src_size.height != surfdesc.Height)) + || src_rect->top & (srcformatdesc->block_height - 1)) { WARN("Source rect %s is misaligned.\n", wine_dbgstr_rect(src_rect)); unlock_surface(dst_surface, dst_rect, surface, FALSE); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 54dfc067b78..9119a897fda 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h, include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h, include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h} -tags: {wine: b744a309ace15a8c5494cf7134294c5869d2dade} +tags: {wine: e371085aaf4424e6ef9b5b76ebf3107121d22f50}
3 years, 10 months
1
0
0
0
[reactos] 117/218: [WINESYNC] d3dx9: Simplify unsupported format check.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=74df1d450bced87485896…
commit 74df1d450bced874858963be35ad03b56f1645df Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:56:59 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9: Simplify unsupported format check. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id b744a309ace15a8c5494cf7134294c5869d2dade by Matteo Bruni <mbruni(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/surface.c | 4 ++-- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index 5d775c1617b..2809cc71eb1 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -1894,9 +1894,9 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, srcformatdesc = get_format_info(src_format); destformatdesc = get_format_info(surfdesc.Format); - if (srcformatdesc->type == FORMAT_UNKNOWN || destformatdesc->type == FORMAT_UNKNOWN) + if (srcformatdesc->type == FORMAT_UNKNOWN) { - FIXME("Unsupported pixel format conversion %#x -> %#x\n", src_format, surfdesc.Format); + FIXME("Unsupported format %#x.\n", src_format); return E_NOTIMPL; } diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index e3c8931ca37..54dfc067b78 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h, include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h, include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h} -tags: {wine: 92c00c51b21594987d342b5ce00c174ab4e84595} +tags: {wine: b744a309ace15a8c5494cf7134294c5869d2dade}
3 years, 10 months
1
0
0
0
[reactos] 116/218: [WINESYNC] d3dx9_36/tests: Spelling fixes in ok() messages.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8cce0b90073c22852e4d3…
commit 8cce0b90073c22852e4d352b19ad7bafa4df6c9d Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:56:58 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9_36/tests: Spelling fixes in ok() messages. Signed-off-by: Francois Gouget <fgouget(a)free.fr> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 92c00c51b21594987d342b5ce00c174ab4e84595 by Francois Gouget <fgouget(a)free.fr> --- modules/rostests/winetests/d3dx9_36/shader.c | 6 +++--- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/rostests/winetests/d3dx9_36/shader.c b/modules/rostests/winetests/d3dx9_36/shader.c index b67ffb209c4..e6326bc4119 100644 --- a/modules/rostests/winetests/d3dx9_36/shader.c +++ b/modules/rostests/winetests/d3dx9_36/shader.c @@ -1491,7 +1491,7 @@ static void test_setting_constants(void) ok(refcnt == 0, "The Direct3D device reference count was %u, should be 0\n", refcnt); refcnt = IDirect3D9_Release(d3d); - ok(refcnt == 0, "The Direct3D object referenct count was %u, should be 0\n", refcnt); + ok(refcnt == 0, "The Direct3D object reference count was %u, should be 0\n", refcnt); if (wnd) DestroyWindow(wnd); } @@ -6170,7 +6170,7 @@ static void test_registerset(void) ok(count == 0, "The Direct3D device reference count was %u, should be 0\n", count); count = IDirect3D9_Release(d3d); - ok(count == 0, "The Direct3D object referenct count was %u, should be 0\n", count); + ok(count == 0, "The Direct3D object reference count was %u, should be 0\n", count); if (wnd) DestroyWindow(wnd); } @@ -6407,7 +6407,7 @@ static void test_registerset_defaults(void) ok(count == 0, "The Direct3D device reference count was %u, should be 0\n", count); count = IDirect3D9_Release(d3d); - ok(count == 0, "The Direct3D object referenct count was %u, should be 0\n", count); + ok(count == 0, "The Direct3D object reference count was %u, should be 0\n", count); if (wnd) DestroyWindow(wnd); } diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 8d20a58c4fb..e3c8931ca37 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h, include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h, include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h} -tags: {wine: 08b569d50599328df1531f20cceb5331bf718524} +tags: {wine: 92c00c51b21594987d342b5ce00c174ab4e84595}
3 years, 10 months
1
0
0
0
[reactos] 115/218: [WINESYNC] d3dx9: Make qsort() callback functions cdecl.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3ff51fd68e9c3c392cc4e…
commit 3ff51fd68e9c3c392cc4eb041d2d7906bea28bf7 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:56:58 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9: Make qsort() callback functions cdecl. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 08b569d50599328df1531f20cceb5331bf718524 by Alexandre Julliard <julliard(a)winehq.org> --- dll/directx/wine/d3dx9_36/mesh.c | 6 +++--- dll/directx/wine/d3dx9_36/preshader.c | 2 +- sdk/tools/winesync/d3dx9.cfg | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/mesh.c b/dll/directx/wine/d3dx9_36/mesh.c index 2b664a0e51c..6c6628a1127 100644 --- a/dll/directx/wine/d3dx9_36/mesh.c +++ b/dll/directx/wine/d3dx9_36/mesh.c @@ -1212,7 +1212,7 @@ struct vertex_metadata { DWORD first_shared_index; }; -static int compare_vertex_keys(const void *a, const void *b) +static int __cdecl compare_vertex_keys(const void *a, const void *b) { const struct vertex_metadata *left = a; const struct vertex_metadata *right = b; @@ -1590,7 +1590,7 @@ static void fill_attribute_table(DWORD *attrib_buffer, DWORD numfaces, void *ind attrib_table_size++; } -static int attrib_entry_compare(const void *a, const void *b) +static int __cdecl attrib_entry_compare(const void *a, const void *b) { const DWORD *ptr_a = *(const DWORD **)a; const DWORD *ptr_b = *(const DWORD **)b; @@ -5845,7 +5845,7 @@ static D3DXVECTOR2 *triangulation_get_next_point(struct triangulation *t, struct return &outline->items[i].pos; } -static int compare_vertex_indices(const void *a, const void *b) +static int __cdecl compare_vertex_indices(const void *a, const void *b) { const struct point2d_index *idx1 = a, *idx2 = b; const D3DXVECTOR2 *p1 = &idx1->outline->items[idx1->vertex].pos; diff --git a/dll/directx/wine/d3dx9_36/preshader.c b/dll/directx/wine/d3dx9_36/preshader.c index cf418b98879..c80cea73b74 100644 --- a/dll/directx/wine/d3dx9_36/preshader.c +++ b/dll/directx/wine/d3dx9_36/preshader.c @@ -650,7 +650,7 @@ static void append_pres_const_sets_for_shader_input(struct d3dx_const_tab *const } } -static int compare_const_set(const void *a, const void *b) +static int __cdecl compare_const_set(const void *a, const void *b) { const struct d3dx_const_param_eval_output *r1 = a; const struct d3dx_const_param_eval_output *r2 = b; diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 585a4be6be8..8d20a58c4fb 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h, include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h, include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h} -tags: {wine: 15dd8e2b981ca32cae94409153627b3300bbeab8} +tags: {wine: 08b569d50599328df1531f20cceb5331bf718524}
3 years, 10 months
1
0
0
0
[reactos] 114/218: [WINESYNC] d3dx9/tests: Make the pixels array static.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=30042a521150d6bc58a63…
commit 30042a521150d6bc58a63deb3482d75307f913bc Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:56:57 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9/tests: Make the pixels array static. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 15dd8e2b981ca32cae94409153627b3300bbeab8 by Matteo Bruni <mbruni(a)codeweavers.com> --- modules/rostests/winetests/d3dx9_36/surface.c | 2 +- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/rostests/winetests/d3dx9_36/surface.c b/modules/rostests/winetests/d3dx9_36/surface.c index a43072ff1f4..4a10492a08f 100644 --- a/modules/rostests/winetests/d3dx9_36/surface.c +++ b/modules/rostests/winetests/d3dx9_36/surface.c @@ -1403,7 +1403,7 @@ static void test_D3DXSaveSurfaceToFileInMemory(IDirect3DDevice9 *device) static void test_D3DXSaveSurfaceToFile(IDirect3DDevice9 *device) { - const BYTE pixels[] = + static const BYTE pixels[] = {0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,}; DWORD pitch = sizeof(pixels) / 2; diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index fcefba28744..585a4be6be8 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h, include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h, include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h} -tags: {wine: eadc7b3128afdf59891c6f9a1c568077c4e6d087} +tags: {wine: 15dd8e2b981ca32cae94409153627b3300bbeab8}
3 years, 10 months
1
0
0
0
[reactos] 113/218: [WINESYNC] d3dx9: Get rid of unused unlock_surface() argument.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=3b3672360f9fe2bdb58ca…
commit 3b3672360f9fe2bdb58ca4274a4f8884a8dd1154 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:56:57 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9: Get rid of unused unlock_surface() argument. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id eadc7b3128afdf59891c6f9a1c568077c4e6d087 by Matteo Bruni <mbruni(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/d3dx9_private.h | 2 +- dll/directx/wine/d3dx9_36/surface.c | 16 ++++++++-------- dll/directx/wine/d3dx9_36/texture.c | 2 +- sdk/tools/winesync/d3dx9.cfg | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/d3dx9_private.h b/dll/directx/wine/d3dx9_36/d3dx9_private.h index b847b7a681f..66bbe21b4ae 100644 --- a/dll/directx/wine/d3dx9_36/d3dx9_private.h +++ b/dll/directx/wine/d3dx9_36/d3dx9_private.h @@ -123,7 +123,7 @@ HRESULT load_volume_texture_from_dds(IDirect3DVolumeTexture9 *volume_texture, co const PALETTEENTRY *palette, DWORD filter, DWORD color_key, const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN; HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock, IDirect3DSurface9 **temp_surface, BOOL write) DECLSPEC_HIDDEN; -HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock, +HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, IDirect3DSurface9 *temp_surface, BOOL update) DECLSPEC_HIDDEN; unsigned short float_32_to_16(const float in) DECLSPEC_HIDDEN; diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index a310a05e391..5d775c1617b 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -260,7 +260,7 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO return hr; } -HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock, +HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, IDirect3DSurface9 *temp_surface, BOOL update) { IDirect3DDevice9 *device; @@ -612,7 +612,7 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur copy_pixels(locked_rect.pBits, locked_rect.Pitch, 0, pixels, dst_pitch, 0, &volume, pixel_format); - unlock_surface(src_surface, NULL, &locked_rect, temp_surface, FALSE); + unlock_surface(src_surface, NULL, temp_surface, FALSE); *dst_buffer = buffer; return D3D_OK; @@ -1916,7 +1916,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, && src_size.height != surfdesc.Height)) { WARN("Source rect %s is misaligned.\n", wine_dbgstr_rect(src_rect)); - unlock_surface(dst_surface, dst_rect, &lockrect, surface, FALSE); + unlock_surface(dst_surface, dst_rect, surface, FALSE); return D3DXERR_INVALIDDATA; } @@ -1929,7 +1929,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, || !is_conversion_to_supported(destformatdesc)) { FIXME("Unsupported format conversion %#x -> %#x.\n", src_format, surfdesc.Format); - unlock_surface(dst_surface, dst_rect, &lockrect, surface, FALSE); + unlock_surface(dst_surface, dst_rect, surface, FALSE); return E_NOTIMPL; } @@ -1950,7 +1950,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, } } - return unlock_surface(dst_surface, dst_rect, &lockrect, surface, TRUE); + return unlock_surface(dst_surface, dst_rect, surface, TRUE); } /************************************************************ @@ -2040,7 +2040,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, hr = D3DXLoadSurfaceFromMemory(dst_surface, dst_palette, dst_rect, lock.pBits, src_desc.Format, lock.Pitch, src_palette, src_rect, filter, color_key); - if (FAILED(unlock_surface(src_surface, NULL, &lock, temp_surface, FALSE))) + if (FAILED(unlock_surface(src_surface, NULL, temp_surface, FALSE))) return D3DXERR_INVALIDDATA; return hr; @@ -2221,7 +2221,7 @@ HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE IWICBitmapFrameEncode_WritePixels(frame, height, locked_rect.Pitch, height * locked_rect.Pitch, locked_rect.pBits); - unlock_surface(src_surface, src_rect, &locked_rect, temp_surface, FALSE); + unlock_surface(src_surface, src_rect, temp_surface, FALSE); } else /* Pixel format conversion */ { @@ -2258,7 +2258,7 @@ HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE } convert_argb_pixels(locked_rect.pBits, locked_rect.Pitch, 0, &size, src_format_desc, dst_data, dst_pitch, 0, &size, dst_format_desc, 0, NULL); - unlock_surface(src_surface, src_rect, &locked_rect, temp_surface, FALSE); + unlock_surface(src_surface, src_rect, temp_surface, FALSE); IWICBitmapFrameEncode_WritePixels(frame, height, dst_pitch, dst_pitch * height, dst_data); HeapFree(GetProcessHeap(), 0, dst_data); diff --git a/dll/directx/wine/d3dx9_36/texture.c b/dll/directx/wine/d3dx9_36/texture.c index 0ebb4bea4a0..25a0fe0524a 100644 --- a/dll/directx/wine/d3dx9_36/texture.c +++ b/dll/directx/wine/d3dx9_36/texture.c @@ -1383,7 +1383,7 @@ HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D f fill_texture(format, data + y * lock_rect.Pitch + x * format->bytes_per_pixel, &value); } } - if (FAILED(hr = unlock_surface(surface, NULL, &lock_rect, temp_surface, TRUE))) + if (FAILED(hr = unlock_surface(surface, NULL, temp_surface, TRUE))) { IDirect3DSurface9_Release(surface); return hr; diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 7c5682d4be6..fcefba28744 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h, include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h, include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h} -tags: {wine: 378204527e1f42ed1373a0cd7356770d235e319d} +tags: {wine: eadc7b3128afdf59891c6f9a1c568077c4e6d087}
3 years, 10 months
1
0
0
0
[reactos] 112/218: [WINESYNC] d3dx9: Pass rectangle to {lock|unlock}_surface().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8dcbf4645c6d293a19cb2…
commit 8dcbf4645c6d293a19cb27f7835155e08eb00cb0 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:56:57 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:03 2021 +0100 [WINESYNC] d3dx9: Pass rectangle to {lock|unlock}_surface(). This fixes regressions introduced by commits 65956ae50a136fe8467a0332c7495f36617a16dc, 092c14b9d86ee1e96e465908cc524ec85988d0ff. Surface source or destination rectangles were left behind. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47546
Signed-off-by: Paul Gofman <gofmanp(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 378204527e1f42ed1373a0cd7356770d235e319d by Paul Gofman <gofmanp(a)gmail.com> --- dll/directx/wine/d3dx9_36/d3dx9_private.h | 4 +- dll/directx/wine/d3dx9_36/surface.c | 68 +++++++---- dll/directx/wine/d3dx9_36/texture.c | 4 +- modules/rostests/winetests/d3dx9_36/surface.c | 166 ++++++++++++++++---------- sdk/tools/winesync/d3dx9.cfg | 2 +- 5 files changed, 155 insertions(+), 89 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/d3dx9_private.h b/dll/directx/wine/d3dx9_36/d3dx9_private.h index 5bb68b281ba..b847b7a681f 100644 --- a/dll/directx/wine/d3dx9_36/d3dx9_private.h +++ b/dll/directx/wine/d3dx9_36/d3dx9_private.h @@ -121,9 +121,9 @@ HRESULT load_volume_from_dds(IDirect3DVolume9 *dst_volume, const PALETTEENTRY *d const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN; HRESULT load_volume_texture_from_dds(IDirect3DVolumeTexture9 *volume_texture, const void *src_data, const PALETTEENTRY *palette, DWORD filter, DWORD color_key, const D3DXIMAGE_INFO *src_info) DECLSPEC_HIDDEN; -HRESULT lock_surface(IDirect3DSurface9 *surface, D3DLOCKED_RECT *lock, +HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock, IDirect3DSurface9 **temp_surface, BOOL write) DECLSPEC_HIDDEN; -HRESULT unlock_surface(IDirect3DSurface9 *surface, D3DLOCKED_RECT *lock, +HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock, IDirect3DSurface9 *temp_surface, BOOL update) DECLSPEC_HIDDEN; unsigned short float_32_to_16(const float in) DECLSPEC_HIDDEN; diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index c3c19e056be..a310a05e391 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -202,9 +202,10 @@ static const struct { { 32, 0x000000ff, 0x0000ff00, 0x00ff0000, 0x00000000, D3DFMT_X8B8G8R8 }, }; -HRESULT lock_surface(IDirect3DSurface9 *surface, D3DLOCKED_RECT *lock, +HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock, IDirect3DSurface9 **temp_surface, BOOL write) { + unsigned int width, height; IDirect3DDevice9 *device; D3DSURFACE_DESC desc; DWORD lock_flag; @@ -212,25 +213,36 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, D3DLOCKED_RECT *lock, lock_flag = write ? D3DLOCK_DISCARD : D3DLOCK_READONLY; *temp_surface = NULL; - if (FAILED(hr = IDirect3DSurface9_LockRect(surface, lock, NULL, lock_flag))) + if (FAILED(hr = IDirect3DSurface9_LockRect(surface, lock, surface_rect, lock_flag))) { IDirect3DSurface9_GetDevice(surface, &device); IDirect3DSurface9_GetDesc(surface, &desc); - hr = write ? IDirect3DDevice9_CreateOffscreenPlainSurface(device, desc.Width, desc.Height, + if (surface_rect) + { + width = surface_rect->right - surface_rect->left; + height = surface_rect->bottom - surface_rect->top; + } + else + { + width = desc.Width; + height = desc.Height; + } + + hr = write ? IDirect3DDevice9_CreateOffscreenPlainSurface(device, width, height, desc.Format, D3DPOOL_SYSTEMMEM, temp_surface, NULL) - : IDirect3DDevice9_CreateRenderTarget(device, desc.Width, desc.Height, + : IDirect3DDevice9_CreateRenderTarget(device, width, height, desc.Format, D3DMULTISAMPLE_NONE, 0, TRUE, temp_surface, NULL); if (FAILED(hr)) { WARN("Failed to create temporary surface, surface %p, format %#x," " usage %#x, pool %#x, write %#x, width %u, height %u.\n", - surface, desc.Format, desc.Usage, desc.Pool, write, desc.Width, desc.Height); + surface, desc.Format, desc.Usage, desc.Pool, write, width, height); IDirect3DDevice9_Release(device); return hr; } - if (write || SUCCEEDED(hr = IDirect3DDevice9_StretchRect(device, surface, NULL, + if (write || SUCCEEDED(hr = IDirect3DDevice9_StretchRect(device, surface, surface_rect, *temp_surface, NULL, D3DTEXF_NONE))) hr = IDirect3DSurface9_LockRect(*temp_surface, lock, NULL, lock_flag); @@ -248,20 +260,34 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, D3DLOCKED_RECT *lock, return hr; } -HRESULT unlock_surface(IDirect3DSurface9 *surface, D3DLOCKED_RECT *lock, +HRESULT unlock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLOCKED_RECT *lock, IDirect3DSurface9 *temp_surface, BOOL update) { IDirect3DDevice9 *device; + POINT surface_point; HRESULT hr; if (!temp_surface) - return IDirect3DSurface9_UnlockRect(surface); + { + hr = IDirect3DSurface9_UnlockRect(surface); + return hr; + } hr = IDirect3DSurface9_UnlockRect(temp_surface); if (update) { + if (surface_rect) + { + surface_point.x = surface_rect->left; + surface_point.y = surface_rect->top; + } + else + { + surface_point.x = 0; + surface_point.y = 0; + } IDirect3DSurface9_GetDevice(surface, &device); - if (FAILED(hr = IDirect3DDevice9_UpdateSurface(device, temp_surface, NULL, surface, NULL))) + if (FAILED(hr = IDirect3DDevice9_UpdateSurface(device, temp_surface, NULL, surface, &surface_point))) WARN("Updating surface failed, hr %#x, surface %p, temp_surface %p.\n", hr, surface, temp_surface); IDirect3DDevice9_Release(device); @@ -573,7 +599,7 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur return hr; } - hr = lock_surface(src_surface, &locked_rect, &temp_surface, FALSE); + hr = lock_surface(src_surface, NULL, &locked_rect, &temp_surface, FALSE); if (FAILED(hr)) { ID3DXBuffer_Release(buffer); @@ -586,7 +612,7 @@ static HRESULT save_dds_surface_to_memory(ID3DXBuffer **dst_buffer, IDirect3DSur copy_pixels(locked_rect.pBits, locked_rect.Pitch, 0, pixels, dst_pitch, 0, &volume, pixel_format); - unlock_surface(src_surface, &locked_rect, temp_surface, FALSE); + unlock_surface(src_surface, NULL, &locked_rect, temp_surface, FALSE); *dst_buffer = buffer; return D3D_OK; @@ -1874,7 +1900,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, return E_NOTIMPL; } - if (FAILED(hr = lock_surface(dst_surface, &lockrect, &surface, TRUE))) + if (FAILED(hr = lock_surface(dst_surface, dst_rect, &lockrect, &surface, TRUE))) return hr; if (src_format == surfdesc.Format @@ -1890,7 +1916,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, && src_size.height != surfdesc.Height)) { WARN("Source rect %s is misaligned.\n", wine_dbgstr_rect(src_rect)); - unlock_surface(dst_surface, &lockrect, surface, FALSE); + unlock_surface(dst_surface, dst_rect, &lockrect, surface, FALSE); return D3DXERR_INVALIDDATA; } @@ -1903,7 +1929,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, || !is_conversion_to_supported(destformatdesc)) { FIXME("Unsupported format conversion %#x -> %#x.\n", src_format, surfdesc.Format); - unlock_surface(dst_surface, &lockrect, surface, FALSE); + unlock_surface(dst_surface, dst_rect, &lockrect, surface, FALSE); return E_NOTIMPL; } @@ -1924,7 +1950,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, } } - return unlock_surface(dst_surface, &lockrect, surface, TRUE); + return unlock_surface(dst_surface, dst_rect, &lockrect, surface, TRUE); } /************************************************************ @@ -2008,13 +2034,13 @@ HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, src_rect = &s; } - if (FAILED(lock_surface(src_surface, &lock, &temp_surface, FALSE))) + if (FAILED(lock_surface(src_surface, NULL, &lock, &temp_surface, FALSE))) return D3DXERR_INVALIDDATA; hr = D3DXLoadSurfaceFromMemory(dst_surface, dst_palette, dst_rect, lock.pBits, src_desc.Format, lock.Pitch, src_palette, src_rect, filter, color_key); - if (FAILED(unlock_surface(src_surface, &lock, temp_surface, FALSE))) + if (FAILED(unlock_surface(src_surface, NULL, &lock, temp_surface, FALSE))) return D3DXERR_INVALIDDATA; return hr; @@ -2190,12 +2216,12 @@ HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE TRACE("Using pixel format %s %#x\n", debugstr_guid(&wic_pixel_format), d3d_pixel_format); if (src_surface_desc.Format == d3d_pixel_format) /* Simple copy */ { - if (FAILED(hr = lock_surface(src_surface, &locked_rect, &temp_surface, FALSE))) + if (FAILED(hr = lock_surface(src_surface, src_rect, &locked_rect, &temp_surface, FALSE))) goto cleanup; IWICBitmapFrameEncode_WritePixels(frame, height, locked_rect.Pitch, height * locked_rect.Pitch, locked_rect.pBits); - unlock_surface(src_surface, &locked_rect, temp_surface, FALSE); + unlock_surface(src_surface, src_rect, &locked_rect, temp_surface, FALSE); } else /* Pixel format conversion */ { @@ -2225,14 +2251,14 @@ HRESULT WINAPI D3DXSaveSurfaceToFileInMemory(ID3DXBuffer **dst_buffer, D3DXIMAGE hr = E_OUTOFMEMORY; goto cleanup; } - if (FAILED(hr = lock_surface(src_surface, &locked_rect, &temp_surface, FALSE))) + if (FAILED(hr = lock_surface(src_surface, src_rect, &locked_rect, &temp_surface, FALSE))) { HeapFree(GetProcessHeap(), 0, dst_data); goto cleanup; } convert_argb_pixels(locked_rect.pBits, locked_rect.Pitch, 0, &size, src_format_desc, dst_data, dst_pitch, 0, &size, dst_format_desc, 0, NULL); - unlock_surface(src_surface, &locked_rect, temp_surface, FALSE); + unlock_surface(src_surface, src_rect, &locked_rect, temp_surface, FALSE); IWICBitmapFrameEncode_WritePixels(frame, height, dst_pitch, dst_pitch * height, dst_data); HeapFree(GetProcessHeap(), 0, dst_data); diff --git a/dll/directx/wine/d3dx9_36/texture.c b/dll/directx/wine/d3dx9_36/texture.c index 943e7fec06f..0ebb4bea4a0 100644 --- a/dll/directx/wine/d3dx9_36/texture.c +++ b/dll/directx/wine/d3dx9_36/texture.c @@ -1357,7 +1357,7 @@ HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D f if (FAILED(hr = IDirect3DTexture9_GetSurfaceLevel(texture, m, &surface))) return hr; - if (FAILED(hr = lock_surface(surface, &lock_rect, &temp_surface, TRUE))) + if (FAILED(hr = lock_surface(surface, NULL, &lock_rect, &temp_surface, TRUE))) { IDirect3DSurface9_Release(surface); return hr; @@ -1383,7 +1383,7 @@ HRESULT WINAPI D3DXFillTexture(struct IDirect3DTexture9 *texture, LPD3DXFILL2D f fill_texture(format, data + y * lock_rect.Pitch + x * format->bytes_per_pixel, &value); } } - if (FAILED(hr = unlock_surface(surface, &lock_rect, temp_surface, TRUE))) + if (FAILED(hr = unlock_surface(surface, NULL, &lock_rect, temp_surface, TRUE))) { IDirect3DSurface9_Release(surface); return hr; diff --git a/modules/rostests/winetests/d3dx9_36/surface.c b/modules/rostests/winetests/d3dx9_36/surface.c index 56b79d80cb2..a43072ff1f4 100644 --- a/modules/rostests/winetests/d3dx9_36/surface.c +++ b/modules/rostests/winetests/d3dx9_36/surface.c @@ -957,17 +957,34 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) check_pixel_4bpp(&lockrect, 1, 1, 0xfffe9aff); IDirect3DSurface9_UnlockRect(surf); - hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8b8g8r8, D3DFMT_A8B8G8R8, 8, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); - IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); + hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a8b8g8r8, D3DFMT_A8B8G8R8, + 8, NULL, &rect, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); check_pixel_4bpp(&lockrect, 0, 0, 0xc3f04c39); check_pixel_4bpp(&lockrect, 1, 0, 0x2392e85a); check_pixel_4bpp(&lockrect, 0, 1, 0x09fd97b1); check_pixel_4bpp(&lockrect, 1, 1, 0x8df62bc3); IDirect3DSurface9_UnlockRect(surf); - hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a2r10g10b10, D3DFMT_A2R10G10B10, 8, NULL, &rect, D3DX_FILTER_NONE, 0); - ok(hr == D3D_OK, "D3DXLoadSurfaceFromMemory returned %#x, expected %#x\n", hr, D3D_OK); + SetRect(&rect, 0, 0, 1, 1); + SetRect(&destrect, 1, 1, 2, 2); + hr = D3DXLoadSurfaceFromMemory(surf, NULL, &destrect, pixdata_a8b8g8r8, D3DFMT_A8B8G8R8, + 8, NULL, &rect, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); + check_pixel_4bpp(&lockrect, 0, 0, 0xc3f04c39); + check_pixel_4bpp(&lockrect, 1, 0, 0x2392e85a); + check_pixel_4bpp(&lockrect, 0, 1, 0x09fd97b1); + check_pixel_4bpp(&lockrect, 1, 1, 0xc3f04c39); + IDirect3DSurface9_UnlockRect(surf); + + SetRect(&rect, 0, 0, 2, 2); + + hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, pixdata_a2r10g10b10, D3DFMT_A2R10G10B10, + 8, NULL, &rect, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); IDirect3DSurface9_LockRect(surf, &lockrect, NULL, D3DLOCK_READONLY); check_pixel_4bpp(&lockrect, 0, 0, 0x555c95bf); check_pixel_4bpp(&lockrect, 1, 0, 0x556d663f); @@ -1386,98 +1403,121 @@ static void test_D3DXSaveSurfaceToFileInMemory(IDirect3DDevice9 *device) static void test_D3DXSaveSurfaceToFile(IDirect3DDevice9 *device) { - HRESULT hr; + const BYTE pixels[] = + {0xff, 0x00, 0x00, 0x00, 0xff, 0x00, + 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,}; + DWORD pitch = sizeof(pixels) / 2; IDirect3DSurface9 *surface; - RECT rect; - D3DLOCKED_RECT lock_rect; D3DXIMAGE_INFO image_info; - const BYTE pixels[] = { 0xff, 0x00, 0x00, 0x00, 0xff, 0x00, - 0x00, 0x00, 0xff, 0x00, 0x00, 0xff }; - DWORD pitch = sizeof(pixels) / 2; + D3DLOCKED_RECT lock_rect; + HRESULT hr; + RECT rect; hr = IDirect3DDevice9_CreateOffscreenPlainSurface(device, 2, 2, D3DFMT_R8G8B8, D3DPOOL_SCRATCH, &surface, NULL); - if (FAILED(hr)) { - skip("Couldn't create surface\n"); + if (FAILED(hr)) + { + skip("Couldn't create surface.\n"); return; } SetRect(&rect, 0, 0, 2, 2); - hr = D3DXLoadSurfaceFromMemory(surface, NULL, NULL, pixels, D3DFMT_R8G8B8, pitch, NULL, &rect, D3DX_FILTER_NONE, 0); - if (SUCCEEDED(hr)) { - hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, NULL); - ok(hr == D3D_OK, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3D_OK); + hr = D3DXLoadSurfaceFromMemory(surface, NULL, NULL, pixels, D3DFMT_R8G8B8, + pitch, NULL, &rect, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - hr = D3DXLoadSurfaceFromFileA(surface, NULL, NULL, "saved_surface.bmp", NULL, D3DX_FILTER_NONE, 0, &image_info); - ok(hr == D3D_OK, "Couldn't load saved surface %#x\n", hr); - if (FAILED(hr)) goto next_tests; + hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - ok(image_info.Width == 2, "Wrong width %u\n", image_info.Width); - ok(image_info.Height == 2, "Wrong height %u\n", image_info.Height); - ok(image_info.Format == D3DFMT_R8G8B8, "Wrong format %#x\n", image_info.Format); - ok(image_info.ImageFileFormat == D3DXIFF_BMP, "Wrong file format %u\n", image_info.ImageFileFormat); + hr = D3DXLoadSurfaceFromFileA(surface, NULL, NULL, "saved_surface.bmp", + NULL, D3DX_FILTER_NONE, 0, &image_info); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); - hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Couldn't lock surface %#x\n", hr); - if (FAILED(hr)) goto next_tests; + ok(image_info.Width == 2, "Wrong width %u.\n", image_info.Width); + ok(image_info.Height == 2, "Wrong height %u.\n", image_info.Height); + ok(image_info.Format == D3DFMT_R8G8B8, "Wrong format %#x.\n", image_info.Format); + ok(image_info.ImageFileFormat == D3DXIFF_BMP, "Wrong file format %u.\n", image_info.ImageFileFormat); - ok(!memcmp(lock_rect.pBits, pixels, pitch), "Pixel data mismatch in first row\n"); - ok(!memcmp((BYTE *)lock_rect.pBits + lock_rect.Pitch, pixels + pitch, pitch), "Pixel data mismatch in second row\n"); + hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + ok(!memcmp(lock_rect.pBits, pixels, pitch), + "Pixel data mismatch in the first row.\n"); + ok(!memcmp((BYTE *)lock_rect.pBits + lock_rect.Pitch, pixels + pitch, pitch), + "Pixel data mismatch in the second row.\n"); - IDirect3DSurface9_UnlockRect(surface); - } else skip("Couldn't fill surface\n"); + IDirect3DSurface9_UnlockRect(surface); + + SetRect(&rect, 0, 1, 2, 2); + hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + SetRect(&rect, 0, 0, 2, 1); + hr = D3DXLoadSurfaceFromFileA(surface, NULL, &rect, "saved_surface.bmp", NULL, + D3DX_FILTER_NONE, 0, &image_info); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(!memcmp(lock_rect.pBits, pixels + pitch, pitch), + "Pixel data mismatch in the first row.\n"); + ok(!memcmp((BYTE *)lock_rect.pBits + lock_rect.Pitch, pixels + pitch, pitch), + "Pixel data mismatch in the second row.\n"); + IDirect3DSurface9_UnlockRect(surface); + + SetRect(&rect, 0, 0, 2, 2); + hr = D3DXLoadSurfaceFromMemory(surface, NULL, NULL, pixels, D3DFMT_R8G8B8, + pitch, NULL, &rect, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); -next_tests: hr = D3DXSaveSurfaceToFileA(NULL, D3DXIFF_BMP, surface, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); /* PPM and TGA are supported, even though MSDN claims they aren't */ - todo_wine { - hr = D3DXSaveSurfaceToFileA("saved_surface.ppm", D3DXIFF_PPM, surface, NULL, NULL); - ok(hr == D3D_OK, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3D_OK); - hr = D3DXSaveSurfaceToFileA("saved_surface.tga", D3DXIFF_TGA, surface, NULL, NULL); - ok(hr == D3D_OK, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3D_OK); + todo_wine + { + hr = D3DXSaveSurfaceToFileA("saved_surface.ppm", D3DXIFF_PPM, surface, NULL, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = D3DXSaveSurfaceToFileA("saved_surface.tga", D3DXIFF_TGA, surface, NULL, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); } hr = D3DXSaveSurfaceToFileA("saved_surface.dds", D3DXIFF_DDS, surface, NULL, NULL); - ok(hr == D3D_OK, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3D_OK); - if (SUCCEEDED(hr)) { - hr = D3DXLoadSurfaceFromFileA(surface, NULL, NULL, "saved_surface.dds", NULL, D3DX_FILTER_NONE, 0, &image_info); - ok(hr == D3D_OK, "Couldn't load saved surface %#x\n", hr); - - if (SUCCEEDED(hr)) { - ok(image_info.Width == 2, "Wrong width %u\n", image_info.Width); - ok(image_info.Format == D3DFMT_R8G8B8, "Wrong format %#x\n", image_info.Format); - ok(image_info.ImageFileFormat == D3DXIFF_DDS, "Wrong file format %u\n", image_info.ImageFileFormat); - - hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY); - ok(hr == D3D_OK, "Couldn't lock surface %#x\n", hr); - if (SUCCEEDED(hr)) { - ok(!memcmp(lock_rect.pBits, pixels, pitch), "Pixel data mismatch in first row\n"); - ok(!memcmp((BYTE *)lock_rect.pBits + lock_rect.Pitch, pixels + pitch, pitch), "Pixel data mismatch in second row\n"); - IDirect3DSurface9_UnlockRect(surface); - } - } - } else skip("Couldn't save surface\n"); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = D3DXLoadSurfaceFromFileA(surface, NULL, NULL, "saved_surface.dds", + NULL, D3DX_FILTER_NONE, 0, &image_info); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + ok(image_info.Width == 2, "Wrong width %u.\n", image_info.Width); + ok(image_info.Format == D3DFMT_R8G8B8, "Wrong format %#x.\n", image_info.Format); + ok(image_info.ImageFileFormat == D3DXIFF_DDS, "Wrong file format %u.\n", image_info.ImageFileFormat); + + hr = IDirect3DSurface9_LockRect(surface, &lock_rect, NULL, D3DLOCK_READONLY); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(!memcmp(lock_rect.pBits, pixels, pitch), + "Pixel data mismatch in the first row.\n"); + ok(!memcmp((BYTE *)lock_rect.pBits + lock_rect.Pitch, pixels + pitch, pitch), + "Pixel data mismatch in the second row.\n"); + IDirect3DSurface9_UnlockRect(surface); hr = D3DXSaveSurfaceToFileA("saved_surface", D3DXIFF_PFM + 1, surface, NULL, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); SetRect(&rect, 0, 0, 4, 4); hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect); - ok(hr == D3DERR_INVALIDCALL, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); SetRect(&rect, 2, 0, 1, 4); hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect); - ok(hr == D3DERR_INVALIDCALL, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); SetRect(&rect, 0, 2, 4, 1); hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect); - ok(hr == D3DERR_INVALIDCALL, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); SetRect(&rect, -1, -1, 2, 2); hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect); - ok(hr == D3DERR_INVALIDCALL, "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); SetRectEmpty(&rect); hr = D3DXSaveSurfaceToFileA("saved_surface.bmp", D3DXIFF_BMP, surface, NULL, &rect); /* fails when debug version of d3d9 is used */ - ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "D3DXSaveSurfaceToFileA returned %#x, expected %#x\n", hr, D3D_OK); + ok(hr == D3D_OK || broken(hr == D3DERR_INVALIDCALL), "Got unexpected hr %#x.\n", hr); DeleteFileA("saved_surface.bmp"); DeleteFileA("saved_surface.ppm"); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 1d7f99ec8c8..7c5682d4be6 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h, include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h, include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h} -tags: {wine: 9fb5745a7997bbfe033779650f1193d85369cef2} +tags: {wine: 378204527e1f42ed1373a0cd7356770d235e319d}
3 years, 10 months
1
0
0
0
[reactos] 111/218: [WINESYNC] d3dx9: Build with msvcrt.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=224d70bd0caae4d1b869e…
commit 224d70bd0caae4d1b869eb12b8fe90eb18917d40 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:52:25 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:03 2021 +0100 [WINESYNC] d3dx9: Build with msvcrt. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 9fb5745a7997bbfe033779650f1193d85369cef2 by Alexandre Julliard <julliard(a)winehq.org> --- dll/directx/wine/d3dx9_36/animation.c | 2 -- dll/directx/wine/d3dx9_36/core.c | 2 -- dll/directx/wine/d3dx9_36/effect.c | 2 -- dll/directx/wine/d3dx9_36/font.c | 5 +---- dll/directx/wine/d3dx9_36/line.c | 2 -- dll/directx/wine/d3dx9_36/main.c | 2 -- dll/directx/wine/d3dx9_36/math.c | 4 ++-- dll/directx/wine/d3dx9_36/mesh.c | 18 ++++++------------ dll/directx/wine/d3dx9_36/preshader.c | 7 +------ dll/directx/wine/d3dx9_36/render.c | 2 -- dll/directx/wine/d3dx9_36/shader.c | 2 -- dll/directx/wine/d3dx9_36/skin.c | 2 -- dll/directx/wine/d3dx9_36/sprite.c | 2 -- dll/directx/wine/d3dx9_36/surface.c | 2 -- dll/directx/wine/d3dx9_36/texture.c | 2 -- dll/directx/wine/d3dx9_36/util.c | 2 -- dll/directx/wine/d3dx9_36/volume.c | 2 -- dll/directx/wine/d3dx9_36/xfile.c | 2 -- modules/rostests/winetests/d3dx9_36/math.c | 4 ++-- sdk/tools/winesync/d3dx9.cfg | 2 +- 20 files changed, 13 insertions(+), 55 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/animation.c b/dll/directx/wine/d3dx9_36/animation.c index 8cdc73cd163..01cc7d44046 100644 --- a/dll/directx/wine/d3dx9_36/animation.c +++ b/dll/directx/wine/d3dx9_36/animation.c @@ -21,8 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" #include "d3dx9_private.h" #endif /* __REACTOS__ */ diff --git a/dll/directx/wine/d3dx9_36/core.c b/dll/directx/wine/d3dx9_36/core.c index 6ef05dfc61f..c08a2310346 100644 --- a/dll/directx/wine/d3dx9_36/core.c +++ b/dll/directx/wine/d3dx9_36/core.c @@ -20,8 +20,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" #include "d3dx9_private.h" #endif /* __REACTOS__ */ diff --git a/dll/directx/wine/d3dx9_36/effect.c b/dll/directx/wine/d3dx9_36/effect.c index 5f35b8299f1..0d7a79a02bc 100644 --- a/dll/directx/wine/d3dx9_36/effect.c +++ b/dll/directx/wine/d3dx9_36/effect.c @@ -20,8 +20,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" #include <stdio.h> #include <assert.h> diff --git a/dll/directx/wine/d3dx9_36/font.c b/dll/directx/wine/d3dx9_36/font.c index 13c63e11ee1..20c409c9026 100644 --- a/dll/directx/wine/d3dx9_36/font.c +++ b/dll/directx/wine/d3dx9_36/font.c @@ -20,11 +20,8 @@ * */ -#include "config.h" -#include "wine/port.h" #include "d3dx9_private.h" -#include "wine/unicode.h" #endif /* __REACTOS__ */ WINE_DEFAULT_DEBUG_CHANNEL(d3dx); @@ -270,7 +267,7 @@ HRESULT WINAPI D3DXCreateFontW(IDirect3DDevice9 *device, INT height, UINT width, desc.OutputPrecision=precision; desc.Quality=quality; desc.PitchAndFamily=pitchandfamily; - if(facename != NULL) strcpyW(desc.FaceName, facename); + if(facename != NULL) lstrcpyW(desc.FaceName, facename); else desc.FaceName[0] = '\0'; return D3DXCreateFontIndirectW(device, &desc, font); diff --git a/dll/directx/wine/d3dx9_36/line.c b/dll/directx/wine/d3dx9_36/line.c index 7f8ae320e81..5095e23ebe0 100644 --- a/dll/directx/wine/d3dx9_36/line.c +++ b/dll/directx/wine/d3dx9_36/line.c @@ -20,8 +20,6 @@ * */ -#include "config.h" -#include "wine/port.h" #include "d3dx9_private.h" #endif /* __REACTOS__ */ diff --git a/dll/directx/wine/d3dx9_36/main.c b/dll/directx/wine/d3dx9_36/main.c index b0eabebeaa8..e0fc2d50332 100644 --- a/dll/directx/wine/d3dx9_36/main.c +++ b/dll/directx/wine/d3dx9_36/main.c @@ -23,8 +23,6 @@ * */ -#include "config.h" -#include "wine/port.h" #include "initguid.h" #include "d3dx9_private.h" diff --git a/dll/directx/wine/d3dx9_36/math.c b/dll/directx/wine/d3dx9_36/math.c index 82ea788bf2f..cdc55feb64f 100644 --- a/dll/directx/wine/d3dx9_36/math.c +++ b/dll/directx/wine/d3dx9_36/math.c @@ -25,8 +25,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" + +#include <float.h> #include "d3dx9_private.h" #endif /* __REACTOS__ */ diff --git a/dll/directx/wine/d3dx9_36/mesh.c b/dll/directx/wine/d3dx9_36/mesh.c index dcdae29098a..2b664a0e51c 100644 --- a/dll/directx/wine/d3dx9_36/mesh.c +++ b/dll/directx/wine/d3dx9_36/mesh.c @@ -28,20 +28,15 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" #include <assert.h> -#ifdef HAVE_FLOAT_H -# include <float.h> -#endif +#include <float.h> #include "d3dx9_private.h" #undef MAKE_DDHRESULT #include "dxfile.h" #include "rmxfguid.h" #include "rmxftmpl.h" -#include "wine/unicode.h" #include "wine/list.h" #endif /* __REACTOS__ */ @@ -1595,10 +1590,10 @@ static void fill_attribute_table(DWORD *attrib_buffer, DWORD numfaces, void *ind attrib_table_size++; } -static int attrib_entry_compare(const DWORD **a, const DWORD **b) +static int attrib_entry_compare(const void *a, const void *b) { - const DWORD *ptr_a = *a; - const DWORD *ptr_b = *b; + const DWORD *ptr_a = *(const DWORD **)a; + const DWORD *ptr_b = *(const DWORD **)b; int delta = *ptr_a - *ptr_b; if (delta) @@ -1628,8 +1623,7 @@ static HRESULT remap_faces_for_attrsort(struct d3dx9_mesh *This, const DWORD *in for (i = 0; i < This->numfaces; i++) sorted_attrib_ptr_buffer[i] = &attrib_buffer[i]; - qsort(sorted_attrib_ptr_buffer, This->numfaces, sizeof(*sorted_attrib_ptr_buffer), - (int(*)(const void *, const void *))attrib_entry_compare); + qsort(sorted_attrib_ptr_buffer, This->numfaces, sizeof(*sorted_attrib_ptr_buffer), attrib_entry_compare); for (i = 0; i < This->numfaces; i++) { @@ -6162,7 +6156,7 @@ HRESULT WINAPI D3DXCreateTextW(struct IDirect3DDevice9 *device, HDC hdc, const W } oldfont = SelectObject(hdc, font); - textlen = strlenW(text); + textlen = lstrlenW(text); for (i = 0; i < textlen; i++) { int datasize = GetGlyphOutlineW(hdc, text[i], GGO_NATIVE, &gm, 0, NULL, &identity); diff --git a/dll/directx/wine/d3dx9_36/preshader.c b/dll/directx/wine/d3dx9_36/preshader.c index fe8a1332851..cf418b98879 100644 --- a/dll/directx/wine/d3dx9_36/preshader.c +++ b/dll/directx/wine/d3dx9_36/preshader.c @@ -19,12 +19,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" #include "d3dx9_private.h" #include <float.h> +#include <math.h> #include <assert.h> #endif /* __REACTOS__ */ @@ -135,11 +134,7 @@ static double pres_log(double *args, int n) if (v == 0.0) return 0.0; else -#ifdef HAVE_LOG2 return log2(v); -#else - return log(v) / log(2); -#endif } static double pres_asin(double *args, int n) {return to_signed_nan(asin(args[0]));} static double pres_acos(double *args, int n) {return to_signed_nan(acos(args[0]));} diff --git a/dll/directx/wine/d3dx9_36/render.c b/dll/directx/wine/d3dx9_36/render.c index 9586e2981b3..288dd859753 100644 --- a/dll/directx/wine/d3dx9_36/render.c +++ b/dll/directx/wine/d3dx9_36/render.c @@ -20,8 +20,6 @@ * */ -#include "config.h" -#include "wine/port.h" #include "d3dx9_private.h" #endif /* __REACTOS__ */ diff --git a/dll/directx/wine/d3dx9_36/shader.c b/dll/directx/wine/d3dx9_36/shader.c index b61770177d6..2d0649f3016 100644 --- a/dll/directx/wine/d3dx9_36/shader.c +++ b/dll/directx/wine/d3dx9_36/shader.c @@ -21,8 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" #include "d3dx9_private.h" #include "d3dcommon.h" diff --git a/dll/directx/wine/d3dx9_36/skin.c b/dll/directx/wine/d3dx9_36/skin.c index 1478d1ea358..70c0a6a1229 100644 --- a/dll/directx/wine/d3dx9_36/skin.c +++ b/dll/directx/wine/d3dx9_36/skin.c @@ -21,8 +21,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" #include "d3dx9_private.h" #endif /* __REACTOS__ */ diff --git a/dll/directx/wine/d3dx9_36/sprite.c b/dll/directx/wine/d3dx9_36/sprite.c index 33c926d4326..277d14502fa 100644 --- a/dll/directx/wine/d3dx9_36/sprite.c +++ b/dll/directx/wine/d3dx9_36/sprite.c @@ -20,8 +20,6 @@ * */ -#include "config.h" -#include "wine/port.h" #include "d3dx9_private.h" #endif /* __REACTOS__ */ diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index aaaef34948f..c3c19e056be 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -21,8 +21,6 @@ * */ -#include "config.h" -#include "wine/port.h" #include "d3dx9_private.h" diff --git a/dll/directx/wine/d3dx9_36/texture.c b/dll/directx/wine/d3dx9_36/texture.c index 4632e57950e..943e7fec06f 100644 --- a/dll/directx/wine/d3dx9_36/texture.c +++ b/dll/directx/wine/d3dx9_36/texture.c @@ -22,8 +22,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" #include "d3dx9_private.h" #endif /* __REACTOS__ */ diff --git a/dll/directx/wine/d3dx9_36/util.c b/dll/directx/wine/d3dx9_36/util.c index 472758205b4..d15444e5cdc 100644 --- a/dll/directx/wine/d3dx9_36/util.c +++ b/dll/directx/wine/d3dx9_36/util.c @@ -20,8 +20,6 @@ * */ -#include "config.h" -#include "wine/port.h" #include "d3dx9_private.h" #endif /* __REACTOS__ */ diff --git a/dll/directx/wine/d3dx9_36/volume.c b/dll/directx/wine/d3dx9_36/volume.c index 8d6f5434ddf..e1a6a3bc3cd 100644 --- a/dll/directx/wine/d3dx9_36/volume.c +++ b/dll/directx/wine/d3dx9_36/volume.c @@ -19,8 +19,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" -#include "wine/port.h" #include "d3dx9_private.h" #endif /* __REACTOS__ */ diff --git a/dll/directx/wine/d3dx9_36/xfile.c b/dll/directx/wine/d3dx9_36/xfile.c index f75433bb4b0..1ac1a212d51 100644 --- a/dll/directx/wine/d3dx9_36/xfile.c +++ b/dll/directx/wine/d3dx9_36/xfile.c @@ -20,8 +20,6 @@ * */ -#include "config.h" -#include "wine/port.h" #include "d3dx9_private.h" #include "d3dx9xof.h" diff --git a/modules/rostests/winetests/d3dx9_36/math.c b/modules/rostests/winetests/d3dx9_36/math.c index cd3ecfc076a..b9537b0d217 100644 --- a/modules/rostests/winetests/d3dx9_36/math.c +++ b/modules/rostests/winetests/d3dx9_36/math.c @@ -4046,7 +4046,7 @@ static void test_D3DXSHMultiply3(void) D3DXSHMultiply3(c, c, b); for (i = 0; i < ARRAY_SIZE(expected_aliased); ++i) { - equal = compare_float(c[i], expected_aliased[i], 32); + equal = compare_float(c[i], expected_aliased[i], 34); ok(equal, "Expected[%u] = %.8e, received = %.8e.\n", i, expected_aliased[i], c[i]); } } @@ -4324,7 +4324,7 @@ static void test_D3DXSHRotateZ(void) expected = ( i + 1.0f ) * ( i + 1.0f ); else expected = table[36 * (l + 3 * j) + i]; - equal = compare_float(expected, out_temp[i], 256); + equal = compare_float(expected, out_temp[i], 512); ok(equal || (fabs(expected) < 2.0e-5f && fabs(out_temp[i]) < 2.0e-5f), "angle %.8e, order %u index %u, expected %.8e, received %.8e.\n", angle[j], order, i, expected, out_temp[i]); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 421aaff1e59..1d7f99ec8c8 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h, include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h, include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h} -tags: {wine: a16ef96dc624edf2666aa125fbc1c197f5edcc1b} +tags: {wine: 9fb5745a7997bbfe033779650f1193d85369cef2}
3 years, 10 months
1
0
0
0
[reactos] 110/218: [WINESYNC] include/msvcrt: Add INFINITY and NAN definitions.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bbc438a5d59bd477434dd…
commit bbc438a5d59bd477434dd0737e41ff8b4033bae1 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 22:51:59 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:03 2021 +0100 [WINESYNC] include/msvcrt: Add INFINITY and NAN definitions. Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id a16ef96dc624edf2666aa125fbc1c197f5edcc1b by Alexandre Julliard <julliard(a)winehq.org> --- modules/rostests/winetests/d3dx9_36/effect.c | 19 ------------------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/modules/rostests/winetests/d3dx9_36/effect.c b/modules/rostests/winetests/d3dx9_36/effect.c index aedbdd10efe..e1f901fdc6d 100644 --- a/modules/rostests/winetests/d3dx9_36/effect.c +++ b/modules/rostests/winetests/d3dx9_36/effect.c @@ -22,25 +22,6 @@ #include "wine/test.h" #include "d3dx9.h" -#ifndef INFINITY -static inline float __port_infinity(void) -{ - static const unsigned __inf_bytes = 0x7f800000; - return *(const float *)&__inf_bytes; -} -#define INFINITY __port_infinity() -#endif /* INFINITY */ - -#ifndef NAN -static float get_nan(void) -{ - DWORD nan = 0x7fc00000; - - return *(float *)&nan; -} -#define NAN get_nan() -#endif - /* helper functions */ static BOOL compare_float(FLOAT f, FLOAT g, UINT ulps) { diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index daefa022c1d..421aaff1e59 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h, include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h, include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h} -tags: {wine: 7dc42119b40ad39165d881dd8d0e410d3e84fe5a} +tags: {wine: a16ef96dc624edf2666aa125fbc1c197f5edcc1b}
3 years, 10 months
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
44
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
Results per page:
10
25
50
100
200