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
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 -----
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] 139/218: [WINESYNC] d3dx9: Use check_texture_requirements() in D3DXCheckCubeTextureRequirements() with correct resource type.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=849074f0c69820494c71d…
commit 849074f0c69820494c71dba6c670b076c56c975f Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:01:48 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9: Use check_texture_requirements() in D3DXCheckCubeTextureRequirements() with correct resource type. 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 e50873f504b4693c9efcf7113afcb633155babbc by Paul Gofman <gofmanp(a)gmail.com> --- dll/directx/wine/d3dx9_36/texture.c | 2 +- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/texture.c b/dll/directx/wine/d3dx9_36/texture.c index ab59f7db9c9..a47d2380403 100644 --- a/dll/directx/wine/d3dx9_36/texture.c +++ b/dll/directx/wine/d3dx9_36/texture.c @@ -454,7 +454,7 @@ HRESULT WINAPI D3DXCheckCubeTextureRequirements(struct IDirect3DDevice9 *device, if ((caps.TextureCaps & D3DPTEXTURECAPS_CUBEMAP_POW2) && (!is_pow2(s))) s = make_pow2(s); - hr = D3DXCheckTextureRequirements(device, &s, &s, miplevels, usage, format, pool); + hr = check_texture_requirements(device, &s, &s, miplevels, usage, format, pool, D3DRTYPE_CUBETEXTURE); if (!(caps.TextureCaps & D3DPTEXTURECAPS_MIPCUBEMAP)) { diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 7dc33a8c42d..76197d5aabf 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: 92c8c0fc7fb95209fa9dec25234d16b1dbddcf2a} +tags: {wine: e50873f504b4693c9efcf7113afcb633155babbc}
3 years, 7 months
1
0
0
0
[reactos] 138/218: [WINESYNC] d3dx9: Factor our check_texture_requirements() function.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=be011791e1e3297fd7f22…
commit be011791e1e3297fd7f223f1876a6251cc38787e Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:01:48 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9: Factor our check_texture_requirements() function. 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 92c8c0fc7fb95209fa9dec25234d16b1dbddcf2a by Paul Gofman <gofmanp(a)gmail.com> --- dll/directx/wine/d3dx9_36/texture.c | 19 +++++++++++++------ sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/texture.c b/dll/directx/wine/d3dx9_36/texture.c index cdbf3712079..ab59f7db9c9 100644 --- a/dll/directx/wine/d3dx9_36/texture.c +++ b/dll/directx/wine/d3dx9_36/texture.c @@ -214,8 +214,8 @@ static D3DFORMAT get_replacement_format(D3DFORMAT format) return format; } -HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height, - UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool) +static HRESULT check_texture_requirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height, + UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool, D3DRESOURCETYPE resource_type) { UINT w = (width && *width) ? *width : 1; UINT h = (height && *height) ? *height : 1; @@ -227,8 +227,6 @@ HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UIN D3DFORMAT usedformat = D3DFMT_UNKNOWN; const struct pixel_format_desc *fmt; - TRACE("(%p, %p, %p, %p, %u, %p, %u)\n", device, width, height, miplevels, usage, format, pool); - if (!device) return D3DERR_INVALIDCALL; @@ -270,7 +268,7 @@ HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UIN fmt = get_format_info(usedformat); hr = IDirect3D9_CheckDeviceFormat(d3d, params.AdapterOrdinal, params.DeviceType, mode.Format, - usage, D3DRTYPE_TEXTURE, usedformat); + usage, resource_type, usedformat); if (FAILED(hr)) { BOOL allow_24bits; @@ -305,7 +303,7 @@ HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UIN continue; hr = IDirect3D9_CheckDeviceFormat(d3d, params.AdapterOrdinal, params.DeviceType, - mode.Format, usage, D3DRTYPE_TEXTURE, curfmt->format); + mode.Format, usage, resource_type, curfmt->format); if (FAILED(hr)) continue; @@ -426,6 +424,15 @@ cleanup: return D3D_OK; } +HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UINT *width, UINT *height, + UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool) +{ + TRACE("device %p, width %p, height %p, miplevels %p, usage %u, format %p, pool %u.\n", + device, width, height, miplevels, usage, format, pool); + + return check_texture_requirements(device, width, height, miplevels, usage, format, pool, D3DRTYPE_TEXTURE); +} + HRESULT WINAPI D3DXCheckCubeTextureRequirements(struct IDirect3DDevice9 *device, UINT *size, UINT *miplevels, DWORD usage, D3DFORMAT *format, D3DPOOL pool) { diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 095ac63f2c1..7dc33a8c42d 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: fcdcd5d3cbb58a40894f661fd8a9285b81a55789} +tags: {wine: 92c8c0fc7fb95209fa9dec25234d16b1dbddcf2a}
3 years, 7 months
1
0
0
0
[reactos] 137/218: [WINESYNC] d3dx9: Return an error if no fallback format is found.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=28df0e9ba85ad086232f9…
commit 28df0e9ba85ad086232f9197668f0162726b4f1d Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:01:48 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9: Return an error if no fallback format is found. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id fcdcd5d3cbb58a40894f661fd8a9285b81a55789 by Matteo Bruni <mbruni(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/texture.c | 5 +++++ sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dll/directx/wine/d3dx9_36/texture.c b/dll/directx/wine/d3dx9_36/texture.c index bdba12d5a62..cdbf3712079 100644 --- a/dll/directx/wine/d3dx9_36/texture.c +++ b/dll/directx/wine/d3dx9_36/texture.c @@ -327,6 +327,11 @@ HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UIN bestfmt = curfmt; } } + if (!bestfmt) + { + hr = D3DERR_NOTAVAILABLE; + goto cleanup; + } fmt = bestfmt; hr = D3D_OK; } diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 8b675b5e764..095ac63f2c1 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: a0840773f7ee00dc9373b4db825fec68d08ee53b} +tags: {wine: fcdcd5d3cbb58a40894f661fd8a9285b81a55789}
3 years, 7 months
1
0
0
0
[reactos] 136/218: [WINESYNC] d3dx9: Don't pass usage flags for staging texture in D3DXCreateCubeTextureFromFileInMemoryEx().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4053a5ada3fe613aba40e…
commit 4053a5ada3fe613aba40e2f48d568b44f1cf8fc7 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:01:48 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9: Don't pass usage flags for staging texture in D3DXCreateCubeTextureFromFileInMemoryEx(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47974
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 a0840773f7ee00dc9373b4db825fec68d08ee53b by Paul Gofman <gofmanp(a)gmail.com> --- dll/directx/wine/d3dx9_36/texture.c | 2 +- modules/rostests/winetests/d3dx9_36/texture.c | 17 ++++++++++++----- sdk/tools/winesync/d3dx9.cfg | 2 +- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/texture.c b/dll/directx/wine/d3dx9_36/texture.c index 07d5dbabca8..bdba12d5a62 100644 --- a/dll/directx/wine/d3dx9_36/texture.c +++ b/dll/directx/wine/d3dx9_36/texture.c @@ -1485,7 +1485,7 @@ HRESULT WINAPI D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device, dynamic_texture = (caps.Caps2 & D3DCAPS2_DYNAMICTEXTURES) && (usage & D3DUSAGE_DYNAMIC); if (pool == D3DPOOL_DEFAULT && !dynamic_texture) { - hr = D3DXCreateCubeTexture(device, size, mip_levels, usage, format, D3DPOOL_SYSTEMMEM, &buftex); + hr = D3DXCreateCubeTexture(device, size, mip_levels, 0, format, D3DPOOL_SYSTEMMEM, &buftex); tex = buftex; } else diff --git a/modules/rostests/winetests/d3dx9_36/texture.c b/modules/rostests/winetests/d3dx9_36/texture.c index 3416a3318b2..3e4d5e5df9c 100644 --- a/modules/rostests/winetests/d3dx9_36/texture.c +++ b/modules/rostests/winetests/d3dx9_36/texture.c @@ -2061,8 +2061,14 @@ static void test_D3DXCreateCubeTextureFromFileInMemory(IDirect3DDevice9 *device) static void test_D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *device) { - HRESULT hr; IDirect3DCubeTexture9 *cube_texture; + HRESULT hr; + + hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, dds_cube_map, sizeof(dds_cube_map), D3DX_DEFAULT, + D3DX_DEFAULT, D3DUSAGE_RENDERTARGET, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, + D3DX_DEFAULT, 0, NULL, NULL, &cube_texture); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + IDirect3DCubeTexture9_Release(cube_texture); if (!is_autogenmipmap_supported(device, D3DRTYPE_CUBETEXTURE)) { @@ -2070,10 +2076,11 @@ static void test_D3DXCreateCubeTextureFromFileInMemoryEx(IDirect3DDevice9 *devic return; } - hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, dds_cube_map, sizeof(dds_cube_map), D3DX_DEFAULT, D3DX_DEFAULT, - D3DUSAGE_DYNAMIC | D3DUSAGE_AUTOGENMIPMAP, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &cube_texture); - ok(hr == D3D_OK, "D3DXCreateCubeTextureFromFileInMemoryEx returned %#x, expected %#x.\n", hr, D3D_OK); - if (SUCCEEDED(hr)) IDirect3DCubeTexture9_Release(cube_texture); + hr = D3DXCreateCubeTextureFromFileInMemoryEx(device, dds_cube_map, sizeof(dds_cube_map), D3DX_DEFAULT, + D3DX_DEFAULT, D3DUSAGE_DYNAMIC | D3DUSAGE_AUTOGENMIPMAP, D3DFMT_UNKNOWN, D3DPOOL_DEFAULT, + D3DX_DEFAULT, D3DX_DEFAULT, 0, NULL, NULL, &cube_texture); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + IDirect3DCubeTexture9_Release(cube_texture); } static void test_D3DXCreateVolumeTextureFromFileInMemory(IDirect3DDevice9 *device) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 35f8e8fc7e2..8b675b5e764 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: f6f90daa3117cf493e0815c42bb0fa1740d31308} +tags: {wine: a0840773f7ee00dc9373b4db825fec68d08ee53b}
3 years, 7 months
1
0
0
0
[reactos] 135/218: [WINESYNC] d3dx9: Correctly align texture dimensions to block size in D3DXCheckTextureRequirements().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=03f8174d97a60faa02f25…
commit 03f8174d97a60faa02f25629e3e25edecc61bb4a Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:00:51 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9: Correctly align texture dimensions to block size in D3DXCheckTextureRequirements(). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id f6f90daa3117cf493e0815c42bb0fa1740d31308 by Christian Costa <titan.costa(a)gmail.com> --- dll/directx/wine/d3dx9_36/texture.c | 15 +++++++-------- modules/rostests/winetests/d3dx9_36/texture.c | 9 +++++++++ sdk/tools/winesync/d3dx9.cfg | 2 +- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/texture.c b/dll/directx/wine/d3dx9_36/texture.c index c42ae7eb1c1..07d5dbabca8 100644 --- a/dll/directx/wine/d3dx9_36/texture.c +++ b/dll/directx/wine/d3dx9_36/texture.c @@ -22,7 +22,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ - +#include <assert.h> #include "d3dx9_private.h" #endif /* __REACTOS__ */ @@ -341,13 +341,12 @@ HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UIN else if (h == D3DX_DEFAULT) h = (width ? w : 256); - if (fmt->block_width != 1 || fmt->block_height != 1) - { - if (w < fmt->block_width) - w = fmt->block_width; - if (h < fmt->block_height) - h = fmt->block_height; - } + assert(!(fmt->block_width & (fmt->block_width - 1))); + assert(!(fmt->block_height & (fmt->block_height - 1))); + if (w & (fmt->block_width - 1)) + w = (w + fmt->block_width) & ~(fmt->block_width - 1); + if (h & (fmt->block_height - 1)) + h = (h + fmt->block_height) & ~(fmt->block_height - 1); if ((caps.TextureCaps & D3DPTEXTURECAPS_POW2) && (!is_pow2(w))) w = make_pow2(w); diff --git a/modules/rostests/winetests/d3dx9_36/texture.c b/modules/rostests/winetests/d3dx9_36/texture.c index 229c857ac2e..3416a3318b2 100644 --- a/modules/rostests/winetests/d3dx9_36/texture.c +++ b/modules/rostests/winetests/d3dx9_36/texture.c @@ -448,6 +448,15 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device) ok(width == 4, "Got unexpected width %d.\n", width); ok(height == 4, "Got unexpected height %d.\n", height); ok(format == D3DFMT_DXT5, "Got unexpected format %u.\n", format); + + width = 9; + height = 9; + hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, &format, D3DPOOL_DEFAULT); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(width == 12, "Got unexpected width %u.\n", width); + ok(height == 12, "Got unexpected height %u.\n", height); + ok(mipmaps == 1, "Got unexpected level count %u.\n", mipmaps); + ok(format == D3DFMT_DXT5, "Got unexpected format %u.\n", format); } else { diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index e3f20fc947c..35f8e8fc7e2 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: 9069913dbba0914b80544ce4afb9e7285efad2a5} +tags: {wine: f6f90daa3117cf493e0815c42bb0fa1740d31308}
3 years, 7 months
1
0
0
0
[reactos] 134/218: [WINESYNC] d3dx9: Fix pitch passed to DXTn [de]compression functions.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d2eac4cdbf8342eea0f0c…
commit d2eac4cdbf8342eea0f0c1770fbbdd56d0dc7ada Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:00:51 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9: Fix pitch passed to DXTn [de]compression functions. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=47862
Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 9069913dbba0914b80544ce4afb9e7285efad2a5 by Matteo Bruni <mbruni(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/surface.c | 8 +++++--- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index df4c5a725bb..eaaca8ca252 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -1976,6 +1976,8 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, int i, int j, void *texel); unsigned int x, y; + src_pitch = src_pitch * srcformatdesc->block_width / srcformatdesc->block_byte_count; + src_uncompressed = heap_alloc(src_size.width * src_size.height * sizeof(DWORD)); if (!src_uncompressed) { @@ -2007,8 +2009,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, DWORD *ptr = &src_uncompressed[y * src_size.width]; for (x = 0; x < src_size.width; ++x) { - fetch_dxt_texel(src_pitch / sizeof(DWORD), src_memory, - x + src_rect->left, y + src_rect->top, ptr); + fetch_dxt_texel(src_pitch, src_memory, x + src_rect->left, y + src_rect->top, ptr); ++ptr; } } @@ -2084,7 +2085,8 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface, ERR("Unexpected destination compressed format %u.\n", surfdesc.Format); } tx_compress_dxtn(4, dst_size_aligned.width, dst_size_aligned.height, - dst_uncompressed, gl_format, lockrect.pBits, lockrect.Pitch); + dst_uncompressed, gl_format, lockrect.pBits, + lockrect.Pitch * destformatdesc->block_width / destformatdesc->block_byte_count); heap_free(dst_uncompressed); } } diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index cd12df31d7f..e3f20fc947c 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: a172aead8d542b92709545d8bcd992f03ee19d82} +tags: {wine: 9069913dbba0914b80544ce4afb9e7285efad2a5}
3 years, 7 months
1
0
0
0
[reactos] 133/218: [WINESYNC] d3dx9: Add a trace to D3DXCreateBuffer.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=62751bc14ed66ecb18e1a…
commit 62751bc14ed66ecb18e1ad84c97c1d2578cd4a21 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:00:51 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9: Add a trace to D3DXCreateBuffer. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id a172aead8d542b92709545d8bcd992f03ee19d82 by Matteo Bruni <mbruni(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/core.c | 2 ++ sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/dll/directx/wine/d3dx9_36/core.c b/dll/directx/wine/d3dx9_36/core.c index c08a2310346..43dd58b9939 100644 --- a/dll/directx/wine/d3dx9_36/core.c +++ b/dll/directx/wine/d3dx9_36/core.c @@ -133,6 +133,8 @@ HRESULT WINAPI D3DXCreateBuffer(DWORD size, ID3DXBuffer **buffer) struct ID3DXBufferImpl *object; HRESULT hr; + TRACE("size %u, buffer %p.\n", size, buffer); + if (!buffer) { WARN("Invalid buffer specified.\n"); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 24ab0d03546..cd12df31d7f 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: 81ababa864229a7e81abca76ef7e6a12fe5b256f} +tags: {wine: a172aead8d542b92709545d8bcd992f03ee19d82}
3 years, 7 months
1
0
0
0
[reactos] 132/218: [WINESYNC] d3dx9: WARN when the file doesn't exist in D3DXCreateTextureFromFileExW().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f2c536f5cc2f437407dea…
commit f2c536f5cc2f437407dea0e3016822b74335bccf Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:00:51 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9: WARN when the file doesn't exist in D3DXCreateTextureFromFileExW(). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 81ababa864229a7e81abca76ef7e6a12fe5b256f by Matteo Bruni <mbruni(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/texture.c | 3 +++ sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dll/directx/wine/d3dx9_36/texture.c b/dll/directx/wine/d3dx9_36/texture.c index 7773d2ad33b..c42ae7eb1c1 100644 --- a/dll/directx/wine/d3dx9_36/texture.c +++ b/dll/directx/wine/d3dx9_36/texture.c @@ -777,7 +777,10 @@ HRESULT WINAPI D3DXCreateTextureFromFileExW(struct IDirect3DDevice9 *device, con hr = map_view_of_file(srcfile, &buffer, &size); if (FAILED(hr)) + { + WARN("Failed to open file.\n"); return D3DXERR_INVALIDDATA; + } hr = D3DXCreateTextureFromFileInMemoryEx(device, buffer, size, width, height, miplevels, usage, format, pool, filter, mipfilter, colorkey, srcinfo, palette, texture); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index baaa7d70120..24ab0d03546 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: f934ef1a14108aa535e76900b29cba0dd8253f80} +tags: {wine: 81ababa864229a7e81abca76ef7e6a12fe5b256f}
3 years, 7 months
1
0
0
0
[reactos] 131/218: [WINESYNC] d3dx9: Compute the correct source rect in D3DXLoadSurfaceFromFileInMemory().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4198c58dcae25192cc60f…
commit 4198c58dcae25192cc60fd8551bad6550f6f026c Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:00:51 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9: Compute the correct source rect in D3DXLoadSurfaceFromFileInMemory(). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id f934ef1a14108aa535e76900b29cba0dd8253f80 by Matteo Bruni <mbruni(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/surface.c | 2 +- modules/rostests/winetests/d3dx9_36/texture.c | 22 ++++++++++++++++++++++ sdk/tools/winesync/d3dx9.cfg | 2 +- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index 04cdc254f69..df4c5a725bb 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -1172,7 +1172,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileInMemory(IDirect3DSurface9 *pDestSurface, wicrect.Height = imginfo.Height; } - SetRect(&rect, 0, 0, wicrect.Width, wicrect.Height); + SetRect(&rect, wicrect.X, wicrect.Y, wicrect.X + wicrect.Width, wicrect.Y + wicrect.Height); if (imginfo.ImageFileFormat == D3DXIFF_DDS) { diff --git a/modules/rostests/winetests/d3dx9_36/texture.c b/modules/rostests/winetests/d3dx9_36/texture.c index 6d39bf72b92..229c857ac2e 100644 --- a/modules/rostests/winetests/d3dx9_36/texture.c +++ b/modules/rostests/winetests/d3dx9_36/texture.c @@ -1824,6 +1824,28 @@ static void test_D3DXCreateTextureFromFileInMemory(IDirect3DDevice9 *device) hr = IDirect3DSurface9_UnlockRect(uncompressed_surface); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = D3DXLoadSurfaceFromFileInMemory(surface, NULL, &rect, dds_dxt5_8_8, + sizeof(dds_dxt5_8_8), &rect, D3DX_FILTER_POINT, 0, NULL); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = D3DXLoadSurfaceFromSurface(uncompressed_surface, NULL, NULL, surface, NULL, NULL, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = IDirect3DSurface9_LockRect(uncompressed_surface, &lock_rect, NULL, D3DLOCK_READONLY); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + for (y = 0; y < 8; ++y) + { + for (x = 0; x < 8; ++x) + { + ok(compare_color(((DWORD *)lock_rect.pBits)[lock_rect.Pitch / 4 * y + x], + dds_dxt5_8_8_expected_misaligned_3[y * 8 + x], 0), + "Color at position %u, %u is 0x%08x, expected 0x%08x.\n", + x, y, ((DWORD *)lock_rect.pBits)[lock_rect.Pitch / 4 * y + x], + dds_dxt5_8_8_expected_misaligned_3[y * 8 + x]); + } + } + hr = IDirect3DSurface9_UnlockRect(uncompressed_surface); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + IDirect3DSurface9_Release(uncompressed_surface); IDirect3DSurface9_Release(surface); IDirect3DTexture9_Release(texture); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index a974d2afe68..baaa7d70120 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: 536fce7f3b887fcc087d4c00106ceb2f0ff93c01} +tags: {wine: f934ef1a14108aa535e76900b29cba0dd8253f80}
3 years, 7 months
1
0
0
0
[reactos] 130/218: [WINESYNC] d3dx9: Don't pass the D3DLOCK_DISCARD flag when mapping a texture.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=497d1c4360f0f7a5f7ae1…
commit 497d1c4360f0f7a5f7ae12115f5982a4d226d215 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:00:51 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:04 2021 +0100 [WINESYNC] d3dx9: Don't pass the D3DLOCK_DISCARD flag when mapping a texture. We aren't necessarily rewriting the whole surface (e.g. rect smaller than the whole surface, color key). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 536fce7f3b887fcc087d4c00106ceb2f0ff93c01 by Matteo Bruni <mbruni(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/surface.c | 2 +- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index 4a0c84990aa..04cdc254f69 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -213,7 +213,7 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO DWORD lock_flag; HRESULT hr; - lock_flag = write ? D3DLOCK_DISCARD : D3DLOCK_READONLY; + lock_flag = write ? 0 : D3DLOCK_READONLY; *temp_surface = NULL; if (FAILED(hr = IDirect3DSurface9_LockRect(surface, lock, surface_rect, lock_flag))) { diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 9a7e317d0c1..a974d2afe68 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: a838e144dcaa55e227d7e99566a59f7a31d97227} +tags: {wine: 536fce7f3b887fcc087d4c00106ceb2f0ff93c01}
3 years, 7 months
1
0
0
0
← Newer
1
...
14
15
16
17
18
19
20
...
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