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] 199/218: [WINESYNC] d3dx9: Fully initialize the glyph position.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9567bb87bd7a536e91ca4…
commit 9567bb87bd7a536e91ca43d47963f638d8faab29 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Tue Jan 5 13:16:38 2021 +0100 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:07 2021 +0100 [WINESYNC] d3dx9: Fully initialize the glyph position. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=49376
Signed-off-by: Sven Baars <sbaars(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 2481e617bbd529a297266ad53b1afe1d96e9af89 by Sven Baars <sbaars(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/font.c | 3 ++- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/font.c b/dll/directx/wine/d3dx9_36/font.c index 2fb924d77ec..56cef145461 100644 --- a/dll/directx/wine/d3dx9_36/font.c +++ b/dll/directx/wine/d3dx9_36/font.c @@ -730,7 +730,6 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite, { unsigned int line_len, i; GCP_RESULTSW results; - D3DXVECTOR3 pos; string = read_line(font->hdc, string, &count, line, &line_len, width, format, &size); @@ -760,6 +759,7 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite, for (i = 0; i < results.nGlyphs; ++i) { IDirect3DTexture9 *texture; + D3DXVECTOR3 pos; POINT cell_inc; RECT black_box; @@ -770,6 +770,7 @@ static INT WINAPI ID3DXFontImpl_DrawTextW(ID3DXFont *iface, ID3DXSprite *sprite, pos.x = cell_inc.x + x + results.lpCaretPos[i]; pos.y = cell_inc.y + y; + pos.z = 0; ID3DXSprite_Draw(target, texture, &black_box, NULL, &pos, color); IDirect3DTexture9_Release(texture); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 8c7f985455c..47c8d9b9134 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -34,4 +34,4 @@ files: include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h tags: - wine: 9eda5c043047fd117441473651b2089b80a4ed80 + wine: 2481e617bbd529a297266ad53b1afe1d96e9af89
3 years, 10 months
1
0
0
0
[reactos] 198/218: [WINESYNC] d3dx9: Don't release textures when D3DXSPRITE_DO_NOT_ADDREF_TEXTURE is specified.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=31f063ffbfdfe7ee5e15f…
commit 31f063ffbfdfe7ee5e15f795cafeb6f78ca716e4 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Tue Jan 5 13:16:38 2021 +0100 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:07 2021 +0100 [WINESYNC] d3dx9: Don't release textures when D3DXSPRITE_DO_NOT_ADDREF_TEXTURE is specified. Signed-off-by: Sven Baars <sbaars(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 9eda5c043047fd117441473651b2089b80a4ed80 by Sven Baars <sbaars(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/sprite.c | 18 ++++++++++++------ modules/rostests/winetests/d3dx9_36/core.c | 14 ++++++++++++++ sdk/tools/winesync/d3dx9.cfg | 2 +- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/sprite.c b/dll/directx/wine/d3dx9_36/sprite.c index 277d14502fa..c47b6a12be0 100644 --- a/dll/directx/wine/d3dx9_36/sprite.c +++ b/dll/directx/wine/d3dx9_36/sprite.c @@ -116,10 +116,13 @@ static ULONG WINAPI d3dx9_sprite_Release(ID3DXSprite *iface) { int i; - for (i = 0; i < sprite->sprite_count; ++i) + if (!(sprite->flags & D3DXSPRITE_DO_NOT_ADDREF_TEXTURE)) { - if (sprite->sprites[i].texture) - IDirect3DTexture9_Release(sprite->sprites[i].texture); + for (i = 0; i < sprite->sprite_count; ++i) + { + if (sprite->sprites[i].texture) + IDirect3DTexture9_Release(sprite->sprites[i].texture); + } } HeapFree(GetProcessHeap(), 0, sprite->sprites); @@ -522,10 +525,13 @@ static HRESULT WINAPI d3dx9_sprite_OnResetDevice(ID3DXSprite *iface) TRACE("iface %p.\n", iface); - for (i = 0; i < sprite->sprite_count; ++i) + if (!(sprite->flags & D3DXSPRITE_DO_NOT_ADDREF_TEXTURE)) { - if (sprite->sprites[i].texture) - IDirect3DTexture9_Release(sprite->sprites[i].texture); + for (i = 0; i < sprite->sprite_count; ++i) + { + if (sprite->sprites[i].texture) + IDirect3DTexture9_Release(sprite->sprites[i].texture); + } } sprite->sprite_count = 0; diff --git a/modules/rostests/winetests/d3dx9_36/core.c b/modules/rostests/winetests/d3dx9_36/core.c index 020f18e622c..a8477591e87 100644 --- a/modules/rostests/winetests/d3dx9_36/core.c +++ b/modules/rostests/winetests/d3dx9_36/core.c @@ -306,6 +306,20 @@ static void test_ID3DXSprite(IDirect3DDevice9 *device) hr = ID3DXSprite_End(sprite); ok (hr == D3DERR_INVALIDCALL, "End returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL); + /* Test D3DXSPRITE_DO_NOT_ADDREF_TEXTURE */ + hr = ID3DXSprite_Begin(sprite, D3DXSPRITE_DO_NOT_ADDREF_TEXTURE); + ok (hr == D3D_OK, "Begin returned %#x, expected %#x\n", hr, D3D_OK); + hr = ID3DXSprite_Draw(sprite, tex2, &rect, ¢er, &pos, D3DCOLOR_XRGB(255, 255, 255)); + ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK); + hr = ID3DXSprite_OnResetDevice(sprite); + ok (hr == D3D_OK, "OnResetDevice returned %#x, expected %#x\n", hr, D3D_OK); + check_ref((IUnknown*)tex2, 1); + + hr = ID3DXSprite_Begin(sprite, D3DXSPRITE_DO_NOT_ADDREF_TEXTURE); + ok (hr == D3D_OK, "Begin returned %#x, expected %#x\n", hr, D3D_OK); + hr = ID3DXSprite_Draw(sprite, tex2, &rect, ¢er, &pos, D3DCOLOR_XRGB(255, 255, 255)); + ok (hr == D3D_OK, "Draw returned %#x, expected %#x\n", hr, D3D_OK); + IDirect3DDevice9_EndScene(device); check_release((IUnknown*)sprite, 0); check_release((IUnknown*)tex2, 0); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index cfedea25e50..8c7f985455c 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -34,4 +34,4 @@ files: include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h tags: - wine: bffe111672972cb26c319c029ca469520742c720 + wine: 9eda5c043047fd117441473651b2089b80a4ed80
3 years, 10 months
1
0
0
0
[reactos] 197/218: [WINESYNC] d3dx9/tests: Use wide-char string literals.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fe25fbb5fec3db8a896d5…
commit fe25fbb5fec3db8a896d53398af259cda70612fe Author: winesync <ros-dev(a)reactos.org> AuthorDate: Tue Jan 5 13:16:35 2021 +0100 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:07 2021 +0100 [WINESYNC] d3dx9/tests: Use wide-char string literals. Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id bffe111672972cb26c319c029ca469520742c720 by Michael Stefaniuc <mstefani(a)winehq.org> --- modules/rostests/winetests/d3dx9_36/asm.c | 6 ++---- modules/rostests/winetests/d3dx9_36/effect.c | 8 +++----- sdk/tools/winesync/d3dx9.cfg | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/modules/rostests/winetests/d3dx9_36/asm.c b/modules/rostests/winetests/d3dx9_36/asm.c index 4087bd89b09..9b4e82f218a 100644 --- a/modules/rostests/winetests/d3dx9_36/asm.c +++ b/modules/rostests/winetests/d3dx9_36/asm.c @@ -195,7 +195,6 @@ static void assembleshader_test(void) }; struct D3DXIncludeImpl include; char shader_vsh_path[MAX_PATH], shader3_vsh_path[MAX_PATH]; - static const WCHAR shader_filename_w[] = {'s','h','a','d','e','r','.','v','s','h',0}; /* pDefines test */ shader = NULL; @@ -356,7 +355,7 @@ static void assembleshader_test(void) shader = NULL; messages = NULL; - hr = D3DXAssembleShaderFromFileW(shader_filename_w, NULL, &include.ID3DXInclude_iface, + hr = D3DXAssembleShaderFromFileW(L"shader.vsh", NULL, &include.ID3DXInclude_iface, D3DXSHADER_SKIPVALIDATION, &shader, &messages); ok(hr == D3D_OK, "D3DXAssembleShaderFromFile + pInclude main shader test failed with error 0x%x - %d\n", hr, hr & 0x0000ffff); @@ -445,7 +444,6 @@ static void d3dxpreprocess_test(void) ID3DXBuffer *shader, *messages; char shader_vsh_path[MAX_PATH], shader3_vsh_path[MAX_PATH]; static struct D3DXIncludeImpl include = {{&D3DXInclude_Vtbl}}; - static const WCHAR shader_filename_w[] = {'s','h','a','d','e','r','.','v','s','h',0}; if (create_file("shader.vsh", testshader, sizeof(testshader) - 1, shader_vsh_path)) { @@ -520,7 +518,7 @@ static void d3dxpreprocess_test(void) shader = NULL; messages = NULL; - hr = D3DXPreprocessShaderFromFileW(shader_filename_w, NULL, &include.ID3DXInclude_iface, + hr = D3DXPreprocessShaderFromFileW(L"shader.vsh", NULL, &include.ID3DXInclude_iface, &shader, &messages); ok(hr == D3D_OK, "D3DXPreprocessShaderFromFile + pInclude main shader test failed with error 0x%x - %d\n", hr, hr & 0x0000ffff); diff --git a/modules/rostests/winetests/d3dx9_36/effect.c b/modules/rostests/winetests/d3dx9_36/effect.c index 3455071c1b2..d96f70351ec 100644 --- a/modules/rostests/winetests/d3dx9_36/effect.c +++ b/modules/rostests/winetests/d3dx9_36/effect.c @@ -7755,8 +7755,6 @@ static void test_create_effect_from_file(void) " VertexShader = compile vs_2_0 vs_main();\n" " }\n" "}\n"; - static const WCHAR effect1_filename_w[] = {'e','f','f','e','c','t','1','.','f','x',0}; - static const WCHAR effect2_filename_w[] = {'e','f','f','e','c','t','2','.','f','x',0}; WCHAR effect_path_w[MAX_PATH], filename_w[MAX_PATH]; char effect_path[MAX_PATH], filename[MAX_PATH]; D3DPRESENT_PARAMETERS present_parameters = {0}; @@ -7813,7 +7811,7 @@ static void test_create_effect_from_file(void) create_file("include1.h", include1_wrong, sizeof(include1_wrong) - 1, NULL); lstrcpyW(filename_w, effect_path_w); - lstrcatW(filename_w, effect1_filename_w); + lstrcatW(filename_w, L"effect1.fx"); effect = NULL; messages = NULL; hr = D3DXCreateEffectFromFileExW(device, filename_w, NULL, NULL, NULL, @@ -7828,7 +7826,7 @@ static void test_create_effect_from_file(void) effect->lpVtbl->Release(effect); lstrcpyW(filename_w, effect_path_w); - lstrcatW(filename_w, effect2_filename_w); + lstrcatW(filename_w, L"effect2.fx"); effect = NULL; messages = NULL; /* This is apparently broken on native, it ends up using the wrong include. */ @@ -7850,7 +7848,7 @@ static void test_create_effect_from_file(void) delete_file("include2.h"); delete_directory("include"); - lstrcpyW(filename_w, effect2_filename_w); + lstrcpyW(filename_w, L"effect2.fx"); effect = NULL; messages = NULL; include.ID3DXInclude_iface.lpVtbl = &d3dxinclude_vtbl; diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 5af2cd084a9..cfedea25e50 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -34,4 +34,4 @@ files: include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h tags: - wine: 1dcc3ab292151cd91ea4202b92107c3a91527c7a + wine: bffe111672972cb26c319c029ca469520742c720
3 years, 10 months
1
0
0
0
[reactos] 196/218: [WINESYNC] d3dx9: Simplify D3DXSphereBoundProbe() a bit.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=868f57e6b2c38071d2233…
commit 868f57e6b2c38071d2233d2fa3344ad908c666b4 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:07:40 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:07 2021 +0100 [WINESYNC] d3dx9: Simplify D3DXSphereBoundProbe() a bit. Spurred by a patch by Alex Henrie. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 18ae539c914a9b5a89f63d8cf9c2a21273eccc6c by Matteo Bruni <mbruni(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/mesh.c | 23 ++++++------- modules/rostests/winetests/d3dx9_36/mesh.c | 32 ++++++++++++++--- sdk/tools/winesync/d3dx9.cfg | 55 ++++++++++++++++++++---------- 3 files changed, 75 insertions(+), 35 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/mesh.c b/dll/directx/wine/d3dx9_36/mesh.c index 6c6628a1127..e2265ed6aed 100644 --- a/dll/directx/wine/d3dx9_36/mesh.c +++ b/dll/directx/wine/d3dx9_36/mesh.c @@ -1694,11 +1694,7 @@ static HRESULT WINAPI d3dx9_mesh_OptimizeInplace(ID3DXMesh *iface, DWORD flags, if (FAILED(hr)) goto cleanup; } else if (flags & D3DXMESHOPT_ATTRSORT) { if (!(flags & D3DXMESHOPT_IGNOREVERTS)) - { FIXME("D3DXMESHOPT_ATTRSORT vertex reordering not implemented.\n"); - hr = E_NOTIMPL; - goto cleanup; - } hr = iface->lpVtbl->LockAttributeBuffer(iface, 0, &attrib_buffer); if (FAILED(hr)) goto cleanup; @@ -2414,20 +2410,21 @@ BOOL WINAPI D3DXIntersectTri(const D3DXVECTOR3 *p0, const D3DXVECTOR3 *p1, const return FALSE; } -BOOL WINAPI D3DXSphereBoundProbe(const D3DXVECTOR3 *pcenter, float radius, - const D3DXVECTOR3 *prayposition, const D3DXVECTOR3 *praydirection) +BOOL WINAPI D3DXSphereBoundProbe(const D3DXVECTOR3 *center, float radius, + const D3DXVECTOR3 *ray_position, const D3DXVECTOR3 *ray_direction) { - D3DXVECTOR3 difference; - FLOAT a, b, c, d; + D3DXVECTOR3 difference = {0}; + float a, b, c, d; - a = D3DXVec3LengthSq(praydirection); - if (!D3DXVec3Subtract(&difference, prayposition, pcenter)) return FALSE; - b = D3DXVec3Dot(&difference, praydirection); + D3DXVec3Subtract(&difference, ray_position, center); c = D3DXVec3LengthSq(&difference) - radius * radius; + if (c < 0.0f) + return TRUE; + a = D3DXVec3LengthSq(ray_direction); + b = D3DXVec3Dot(&difference, ray_direction); d = b * b - a * c; - if ( ( d <= 0.0f ) || ( sqrt(d) <= b ) ) return FALSE; - return TRUE; + return d >= 0.0f && (b <= 0.0f || d > b * b); } /************************************************************************* diff --git a/modules/rostests/winetests/d3dx9_36/mesh.c b/modules/rostests/winetests/d3dx9_36/mesh.c index c410162da6f..aa486bc14e6 100644 --- a/modules/rostests/winetests/d3dx9_36/mesh.c +++ b/modules/rostests/winetests/d3dx9_36/mesh.c @@ -435,18 +435,42 @@ static void D3DXBoundProbeTest(void) radius = sqrt(77.0f); center.x = 1.0f; center.y = 2.0f; center.z = 3.0f; raydirection.x = 2.0f; raydirection.y = -4.0f; raydirection.z = 2.0f; - rayposition.x = 5.0f; rayposition.y = 5.0f; rayposition.z = 9.0f; result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); - ok(result == TRUE, "expected TRUE, received FALSE\n"); + ok(result == TRUE, "Got unexpected result %#x.\n", result); rayposition.x = 45.0f; rayposition.y = -75.0f; rayposition.z = 49.0f; result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); - ok(result == FALSE, "expected FALSE, received TRUE\n"); + ok(result == FALSE, "Got unexpected result %#x.\n", result); + + raydirection.x = -2.0f; raydirection.y = 4.0f; raydirection.z = -2.0f; + result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); + ok(result == TRUE, "Got unexpected result %#x.\n", result); rayposition.x = 5.0f; rayposition.y = 11.0f; rayposition.z = 9.0f; result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); - ok(result == FALSE, "expected FALSE, received TRUE\n"); + ok(result == FALSE, "Got unexpected result %#x.\n", result); + + raydirection.x = 2.0f; raydirection.y = -4.0f; raydirection.z = 2.0f; + result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); + ok(result == FALSE, "Got unexpected result %#x.\n", result); + + radius = 1.0f; + rayposition.x = 2.0f; rayposition.y = 2.0f; rayposition.z = 3.0f; + result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); + ok(result == FALSE, "Got unexpected result %#x.\n", result); + + raydirection.x = 0.0f; raydirection.y = 0.0f; raydirection.z = 1.0f; + result = D3DXSphereBoundProbe(¢er, radius, &rayposition, &raydirection); + ok(result == TRUE, "Got unexpected result %#x.\n", result); + + if (0) + { + /* All these crash on native. */ + D3DXSphereBoundProbe(¢er, radius, &rayposition, NULL); + D3DXSphereBoundProbe(¢er, radius, NULL, &raydirection); + D3DXSphereBoundProbe(NULL, radius, &rayposition, &raydirection); + } } static void D3DXComputeBoundingBoxTest(void) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index d42dffe471b..5af2cd084a9 100644 --- a/sdk/tools/winesync/d3dx9.cfg +++ b/sdk/tools/winesync/d3dx9.cfg @@ -1,18 +1,37 @@ -directories: {dlls/d3dx9_24: dll/directx/wine/d3dx9_24, dlls/d3dx9_25: dll/directx/wine/d3dx9_25, - dlls/d3dx9_26: dll/directx/wine/d3dx9_26, dlls/d3dx9_27: dll/directx/wine/d3dx9_27, - dlls/d3dx9_28: dll/directx/wine/d3dx9_28, dlls/d3dx9_29: dll/directx/wine/d3dx9_29, - dlls/d3dx9_30: dll/directx/wine/d3dx9_30, dlls/d3dx9_31: dll/directx/wine/d3dx9_31, - dlls/d3dx9_32: dll/directx/wine/d3dx9_32, dlls/d3dx9_33: dll/directx/wine/d3dx9_33, - dlls/d3dx9_34: dll/directx/wine/d3dx9_34, dlls/d3dx9_35: dll/directx/wine/d3dx9_35, - dlls/d3dx9_36: dll/directx/wine/d3dx9_36, dlls/d3dx9_36/tests: modules/rostests/winetests/d3dx9_36, - dlls/d3dx9_37: dll/directx/wine/d3dx9_37, dlls/d3dx9_38: dll/directx/wine/d3dx9_38, - dlls/d3dx9_39: dll/directx/wine/d3dx9_39, dlls/d3dx9_40: dll/directx/wine/d3dx9_40, - dlls/d3dx9_41: dll/directx/wine/d3dx9_41, dlls/d3dx9_42: dll/directx/wine/d3dx9_42, - dlls/d3dx9_43: dll/directx/wine/d3dx9_43} -files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/include/dxsdk/d3dx9anim.h, - include/d3dx9core.h: sdk/include/dxsdk/d3dx9core.h, include/d3dx9effect.h: sdk/include/dxsdk/d3dx9effect.h, - include/d3dx9math.h: sdk/include/dxsdk/d3dx9math.h, include/d3dx9math.inl: sdk/include/dxsdk/d3dx9math.inl, - 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: ea7cf679150f790d2e375d99ee226ea4881b490a} +directories: + dlls/d3dx9_24: dll/directx/wine/d3dx9_24 + dlls/d3dx9_25: dll/directx/wine/d3dx9_25 + dlls/d3dx9_26: dll/directx/wine/d3dx9_26 + dlls/d3dx9_27: dll/directx/wine/d3dx9_27 + dlls/d3dx9_28: dll/directx/wine/d3dx9_28 + dlls/d3dx9_29: dll/directx/wine/d3dx9_29 + dlls/d3dx9_30: dll/directx/wine/d3dx9_30 + dlls/d3dx9_31: dll/directx/wine/d3dx9_31 + dlls/d3dx9_32: dll/directx/wine/d3dx9_32 + dlls/d3dx9_33: dll/directx/wine/d3dx9_33 + dlls/d3dx9_34: dll/directx/wine/d3dx9_34 + dlls/d3dx9_35: dll/directx/wine/d3dx9_35 + dlls/d3dx9_36: dll/directx/wine/d3dx9_36 + dlls/d3dx9_36/tests: modules/rostests/winetests/d3dx9_36 + dlls/d3dx9_37: dll/directx/wine/d3dx9_37 + dlls/d3dx9_38: dll/directx/wine/d3dx9_38 + dlls/d3dx9_39: dll/directx/wine/d3dx9_39 + dlls/d3dx9_40: dll/directx/wine/d3dx9_40 + dlls/d3dx9_41: dll/directx/wine/d3dx9_41 + dlls/d3dx9_42: dll/directx/wine/d3dx9_42 + dlls/d3dx9_43: dll/directx/wine/d3dx9_43 +files: + include/d3dx9.h: sdk/include/dxsdk/d3dx9.h + include/d3dx9anim.h: sdk/include/dxsdk/d3dx9anim.h + include/d3dx9core.h: sdk/include/dxsdk/d3dx9core.h + include/d3dx9effect.h: sdk/include/dxsdk/d3dx9effect.h + include/d3dx9math.h: sdk/include/dxsdk/d3dx9math.h + include/d3dx9math.inl: sdk/include/dxsdk/d3dx9math.inl + 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: 1dcc3ab292151cd91ea4202b92107c3a91527c7a
3 years, 10 months
1
0
0
0
[reactos] 195/218: [WINESYNC] d3dx9/tests: Add a few D3DXLoadSurfaceFromSurface() tests with different rects.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4c48bb18fda14c8924303…
commit 4c48bb18fda14c89243034a0361ec32abf022ce8 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:07:40 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:07 2021 +0100 [WINESYNC] d3dx9/tests: Add a few D3DXLoadSurfaceFromSurface() tests with different rects. Signed-off-by: Robin Kertels <robin.kertels(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id ea7cf679150f790d2e375d99ee226ea4881b490a by Robin Kertels <robin.kertels(a)gmail.com> --- modules/rostests/winetests/d3dx9_36/surface.c | 37 +++++++++++++++++++++++++++ sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/modules/rostests/winetests/d3dx9_36/surface.c b/modules/rostests/winetests/d3dx9_36/surface.c index e9b9e041785..4590a758d78 100644 --- a/modules/rostests/winetests/d3dx9_36/surface.c +++ b/modules/rostests/winetests/d3dx9_36/surface.c @@ -1032,6 +1032,43 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device) hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL, D3DX_FILTER_LINEAR, 0); ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + /* rects */ + SetRect(&rect, 2, 2, 1, 1); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect, D3DX_FILTER_NONE, 0); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect, D3DX_DEFAULT, 0); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_DEFAULT, 0); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_POINT, 0); + ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3DERR_INVALIDCALL); + SetRect(&rect, 1, 1, 1, 1); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &rect, D3DX_DEFAULT, 0); + ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, E_FAIL); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_DEFAULT, 0); + ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, E_FAIL); + if (0) + { + /* Somehow it crashes with a STATUS_INTEGER_DIVIDE_BY_ZERO exception + * on Windows. */ + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_POINT, 0); + ok(hr == E_FAIL, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, E_FAIL); + } + SetRect(&rect, 1, 1, 2, 2); + SetRect(&destrect, 1, 1, 2, 2); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, &destrect, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, &rect, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, &destrect, D3DX_FILTER_NONE, 0); + ok(hr == D3D_OK, "D3DXLoadSurfaceFromSurface returned %#x, expected %#x.\n", hr, D3D_OK); + IDirect3DSurface9_Release(newsurf); check_release((IUnknown*)surf, 0); diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 3bc87510483..d42dffe471b 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: 625622ad4182061ee3111032ab0ae4a494b74e73} +tags: {wine: ea7cf679150f790d2e375d99ee226ea4881b490a}
3 years, 10 months
1
0
0
0
[reactos] 194/218: [WINESYNC] d3dx9: Ignore filter in D3DXLoadSurfaceFromSurface() when rects match.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a5f345390cca9992f523c…
commit a5f345390cca9992f523cfe66eac6979f9f09b64 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:07:40 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:07 2021 +0100 [WINESYNC] d3dx9: Ignore filter in D3DXLoadSurfaceFromSurface() when rects match. This allows us to use IDirect3DDevice9_StretchRect and avoid GPU synchronization. It massively improves performance in Dead Space 1 which calls LoadSurfaceFromSurface every frame before presenting. Signed-off-by: Robin Kertels <robin.kertels(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 625622ad4182061ee3111032ab0ae4a494b74e73 by Robin Kertels <robin.kertels(a)gmail.com> --- dll/directx/wine/d3dx9_36/surface.c | 105 ++++++++++++++++++++++++++++-------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 83 insertions(+), 24 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index 24b19b6b37f..0deca8c01a0 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -2146,11 +2146,14 @@ HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, const PALETTEENTRY *dst_palette, const RECT *dst_rect, IDirect3DSurface9 *src_surface, const PALETTEENTRY *src_palette, const RECT *src_rect, DWORD filter, D3DCOLOR color_key) { + const struct pixel_format_desc *src_format_desc, *dst_format_desc; + D3DSURFACE_DESC src_desc, dst_desc; + struct volume src_size, dst_size; IDirect3DSurface9 *temp_surface; D3DTEXTUREFILTERTYPE d3d_filter; IDirect3DDevice9 *device; - D3DSURFACE_DESC src_desc; D3DLOCKED_RECT lock; + RECT dst_rect_temp; HRESULT hr; RECT s; @@ -2162,28 +2165,92 @@ HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, if (!dst_surface || !src_surface) return D3DERR_INVALIDCALL; + IDirect3DSurface9_GetDesc(src_surface, &src_desc); + src_format_desc = get_format_info(src_desc.Format); + if (!src_rect) + { + SetRect(&s, 0, 0, src_desc.Width, src_desc.Height); + src_rect = &s; + } + else if (src_rect->left == src_rect->right || src_rect->top == src_rect->bottom) + { + WARN("Empty src_rect specified.\n"); + return filter == D3DX_FILTER_NONE ? D3D_OK : E_FAIL; + } + else if (src_rect->left > src_rect->right || src_rect->right > src_desc.Width + || src_rect->left < 0 || src_rect->left > src_desc.Width + || src_rect->top > src_rect->bottom || src_rect->bottom > src_desc.Height + || src_rect->top < 0 || src_rect->top > src_desc.Height) + { + WARN("Invalid src_rect specified.\n"); + return D3DERR_INVALIDCALL; + } + + src_size.width = src_rect->right - src_rect->left; + src_size.height = src_rect->bottom - src_rect->top; + src_size.depth = 1; + + IDirect3DSurface9_GetDesc(dst_surface, &dst_desc); + dst_format_desc = get_format_info(dst_desc.Format); + if (!dst_rect) + { + SetRect(&dst_rect_temp, 0, 0, dst_desc.Width, dst_desc.Height); + dst_rect = &dst_rect_temp; + } + else if (dst_rect->left == dst_rect->right || dst_rect->top == dst_rect->bottom) + { + WARN("Empty dst_rect specified.\n"); + return filter == D3DX_FILTER_NONE ? D3D_OK : E_FAIL; + } + else if (dst_rect->left > dst_rect->right || dst_rect->right > dst_desc.Width + || dst_rect->left < 0 || dst_rect->left > dst_desc.Width + || dst_rect->top > dst_rect->bottom || dst_rect->bottom > dst_desc.Height + || dst_rect->top < 0 || dst_rect->top > dst_desc.Height) + { + WARN("Invalid dst_rect specified.\n"); + return D3DERR_INVALIDCALL; + } + + dst_size.width = dst_rect->right - dst_rect->left; + dst_size.height = dst_rect->bottom - dst_rect->top; + dst_size.depth = 1; + if (!dst_palette && !src_palette && !color_key) { - switch (filter) + if (src_desc.Format == dst_desc.Format + && dst_size.width == src_size.width + && dst_size.height == src_size.height + && color_key == 0 + && !(src_rect->left & (src_format_desc->block_width - 1)) + && !(src_rect->top & (src_format_desc->block_height - 1)) + && !(dst_rect->left & (dst_format_desc->block_width - 1)) + && !(dst_rect->top & (dst_format_desc->block_height - 1))) { - case D3DX_FILTER_NONE: - d3d_filter = D3DTEXF_NONE; - break; + d3d_filter = D3DTEXF_NONE; + } + else + { + switch (filter) + { + case D3DX_FILTER_NONE: + d3d_filter = D3DTEXF_NONE; + break; - case D3DX_FILTER_POINT: - d3d_filter = D3DTEXF_POINT; - break; + case D3DX_FILTER_POINT: + d3d_filter = D3DTEXF_POINT; + break; - case D3DX_FILTER_LINEAR: - d3d_filter = D3DTEXF_LINEAR; - break; + case D3DX_FILTER_LINEAR: + d3d_filter = D3DTEXF_LINEAR; + break; - default: - d3d_filter = ~0u; - break; + default: + d3d_filter = D3DTEXF_FORCE_DWORD; + break; + } } - if (d3d_filter != ~0u) + if (d3d_filter != D3DTEXF_FORCE_DWORD) { IDirect3DSurface9_GetDevice(src_surface, &device); hr = IDirect3DDevice9_StretchRect(device, src_surface, src_rect, dst_surface, dst_rect, d3d_filter); @@ -2193,14 +2260,6 @@ HRESULT WINAPI D3DXLoadSurfaceFromSurface(IDirect3DSurface9 *dst_surface, } } - IDirect3DSurface9_GetDesc(src_surface, &src_desc); - - if (!src_rect) - { - SetRect(&s, 0, 0, src_desc.Width, src_desc.Height); - src_rect = &s; - } - if (FAILED(lock_surface(src_surface, NULL, &lock, &temp_surface, FALSE))) return D3DXERR_INVALIDDATA; diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index b8c926c44aa..3bc87510483 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: 35a4093eff75e5bf7fee0dc8d2a708d960b03768} +tags: {wine: 625622ad4182061ee3111032ab0ae4a494b74e73}
3 years, 10 months
1
0
0
0
[reactos] 193/218: [WINESYNC] d3dx9: Implement ID3DXSkinInfo_Clone().
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4d0164c0a09d2ff8abf7d…
commit 4d0164c0a09d2ff8abf7d7e9060cf14b572a6717 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:07:38 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:06 2021 +0100 [WINESYNC] d3dx9: Implement ID3DXSkinInfo_Clone(). Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48779
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 35a4093eff75e5bf7fee0dc8d2a708d960b03768 by Gijs Vermeulen <gijsvrm(a)gmail.com> --- dll/directx/wine/d3dx9_36/skin.c | 28 ++++++++++++- modules/rostests/winetests/d3dx9_36/mesh.c | 64 ++++++++++++++++++++++++++---- sdk/tools/winesync/d3dx9.cfg | 2 +- 3 files changed, 83 insertions(+), 11 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/skin.c b/dll/directx/wine/d3dx9_36/skin.c index 70c0a6a1229..ea4f45d9b4f 100644 --- a/dll/directx/wine/d3dx9_36/skin.c +++ b/dll/directx/wine/d3dx9_36/skin.c @@ -302,9 +302,33 @@ static D3DXMATRIX * WINAPI d3dx9_skin_info_GetBoneOffsetMatrix(ID3DXSkinInfo *if static HRESULT WINAPI d3dx9_skin_info_Clone(ID3DXSkinInfo *iface, ID3DXSkinInfo **skin_info) { - FIXME("iface %p, skin_info %p stub!\n", iface, skin_info); + struct d3dx9_skin_info *skin = impl_from_ID3DXSkinInfo(iface); + unsigned int i; + HRESULT hr; - return E_NOTIMPL; + TRACE("iface %p, skin_info %p.\n", iface, skin_info); + + if (FAILED(hr = D3DXCreateSkinInfo(skin->num_vertices, skin->vertex_declaration, skin->num_bones, skin_info))) + return hr; + + for (i = 0; i < skin->num_bones; ++i) + { + struct bone *current_bone = &skin->bones[i]; + + if (current_bone->name && FAILED(hr = (*skin_info)->lpVtbl->SetBoneName(*skin_info, i, current_bone->name))) + break; + if (FAILED(hr = (*skin_info)->lpVtbl->SetBoneOffsetMatrix(*skin_info, i, ¤t_bone->transform))) + break; + if (current_bone->vertices && current_bone->weights + && FAILED(hr = (*skin_info)->lpVtbl->SetBoneInfluence(*skin_info, i, current_bone->num_influences, + current_bone->vertices, current_bone->weights))) + break; + } + + if (FAILED(hr)) + (*skin_info)->lpVtbl->Release(*skin_info); + + return hr; } static HRESULT WINAPI d3dx9_skin_info_Remap(ID3DXSkinInfo *iface, DWORD num_vertices, DWORD *vertex_remap) diff --git a/modules/rostests/winetests/d3dx9_36/mesh.c b/modules/rostests/winetests/d3dx9_36/mesh.c index cc67551ed06..c410162da6f 100644 --- a/modules/rostests/winetests/d3dx9_36/mesh.c +++ b/modules/rostests/winetests/d3dx9_36/mesh.c @@ -4966,14 +4966,20 @@ cleanup: static void test_create_skin_info(void) { - HRESULT hr; - ID3DXSkinInfo *skininfo = NULL; D3DVERTEXELEMENT9 empty_declaration[] = { D3DDECL_END() }; D3DVERTEXELEMENT9 declaration_out[MAX_FVF_DECL_SIZE]; const D3DVERTEXELEMENT9 declaration_with_nonzero_stream[] = { {1, 0, D3DDECLTYPE_FLOAT3, 0, D3DDECLUSAGE_POSITION, 0}, D3DDECL_END() }; + D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE]; + DWORD exp_vertices[2], vertices[2]; + float exp_weights[2], weights[2]; + const char *exp_string, *string; + ID3DXSkinInfo *skininfo = NULL; + DWORD exp_fvf, fvf; + unsigned int i; + HRESULT hr; hr = D3DXCreateSkinInfo(0, empty_declaration, 0, &skininfo); ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); @@ -4990,6 +4996,7 @@ static void test_create_skin_info(void) ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); if (skininfo) { + ID3DXSkinInfo *clone = NULL; DWORD dword_result; float flt_result; const char *string_result; @@ -5023,6 +5030,10 @@ static void test_create_skin_info(void) transform = skininfo->lpVtbl->GetBoneOffsetMatrix(skininfo, -1); ok(transform == NULL, "Expected NULL, got %p\n", transform); + hr = skininfo->lpVtbl->Clone(skininfo, &clone); + ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); + IUnknown_Release(clone); + { /* test [GS]etBoneOffsetMatrix */ hr = skininfo->lpVtbl->SetBoneOffsetMatrix(skininfo, 1, &identity_matrix); @@ -5066,12 +5077,7 @@ static void test_create_skin_info(void) { /* test [GS]etBoneInfluence */ - DWORD vertices[2]; - FLOAT weights[2]; - int i; DWORD num_influences; - DWORD exp_vertices[2]; - FLOAT exp_weights[2]; /* vertex and weight arrays untouched when num_influences is 0 */ vertices[0] = 0xdeadbeef; @@ -5139,14 +5145,17 @@ static void test_create_skin_info(void) ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); ok(vertices[0] == 0xdeadbeef, "expected vertex 0xdeadbeef, got %u\n", vertices[0]); ok(weights[0] == FLT_MAX, "expected weight %g, got %g\n", FLT_MAX, weights[0]); + + hr = skininfo->lpVtbl->SetBoneInfluence(skininfo, 0, num_influences, exp_vertices, exp_weights); + ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); } { /* test [GS]etFVF and [GS]etDeclaration */ D3DVERTEXELEMENT9 declaration_in[MAX_FVF_DECL_SIZE]; - DWORD fvf = D3DFVF_XYZ; DWORD got_fvf; + fvf = D3DFVF_XYZ; hr = skininfo->lpVtbl->SetDeclaration(skininfo, NULL); ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, got %#x\n", hr); @@ -5182,6 +5191,45 @@ static void test_create_skin_info(void) ok(hr == D3D_OK, "Expected D3D_OK, got %#x\n", hr); compare_elements(declaration_out, declaration_in, __LINE__, 0); } + + /* Test Clone() */ + hr = skininfo->lpVtbl->Clone(skininfo, NULL); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + + clone = NULL; + hr = skininfo->lpVtbl->Clone(skininfo, &clone); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + hr = clone->lpVtbl->GetDeclaration(clone, declaration); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + compare_elements(declaration, declaration_out, __LINE__, 0); + + hr = D3DXFVFFromDeclarator(declaration_out, &exp_fvf); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + fvf = clone->lpVtbl->GetFVF(clone); + ok(fvf == exp_fvf, "Got unexpected fvf %#x.\n", fvf); + + exp_string = skininfo->lpVtbl->GetBoneName(skininfo, 0); + string = clone->lpVtbl->GetBoneName(clone, 0); + ok(!strcmp(string, exp_string), "Got unexpected bone 0 name %s.\n", debugstr_a(string)); + + transform = clone->lpVtbl->GetBoneOffsetMatrix(clone, 0); + check_matrix(transform, &identity_matrix); + + hr = skininfo->lpVtbl->GetBoneInfluence(skininfo, 0, exp_vertices, exp_weights); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + hr = clone->lpVtbl->GetBoneInfluence(clone, 0, vertices, weights); + ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + + for (i = 0; i < ARRAY_SIZE(vertices); ++i) + { + ok(vertices[i] == exp_vertices[i], "influence[%u]: got unexpected vertex %u, expected %u.\n", + i, vertices[i], exp_vertices[i]); + ok(((DWORD *)weights)[i] == ((DWORD *)exp_weights)[i], + "influence[%u]: got unexpected weight %.8e, expected %.8e.\n", i, weights[i], exp_weights[i]); + } + + IUnknown_Release(clone); } if (skininfo) IUnknown_Release(skininfo); skininfo = NULL; diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 868488fe995..b8c926c44aa 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: 22970932d014f024fcf7f0f98b1a5384b1b1eb99} +tags: {wine: 35a4093eff75e5bf7fee0dc8d2a708d960b03768}
3 years, 10 months
1
0
0
0
[reactos] 192/218: [WINESYNC] d3dx9: Use BitScanReverse in make_pow2.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=bbb79195a5f996538da26…
commit bbb79195a5f996538da26c0d56a28523055c1613 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:07:38 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:06 2021 +0100 [WINESYNC] d3dx9: Use BitScanReverse in make_pow2. Signed-off-by: Jacek Caban <jacek(a)codeweavers.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id 22970932d014f024fcf7f0f98b1a5384b1b1eb99 by Jacek Caban <jacek(a)codeweavers.com> --- dll/directx/wine/d3dx9_36/d3dx9_private.h | 15 ++++----------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/dll/directx/wine/d3dx9_36/d3dx9_private.h b/dll/directx/wine/d3dx9_36/d3dx9_private.h index 92116b163f2..66c93d26e84 100644 --- a/dll/directx/wine/d3dx9_36/d3dx9_private.h +++ b/dll/directx/wine/d3dx9_36/d3dx9_private.h @@ -229,19 +229,12 @@ static inline BOOL is_param_type_sampler(D3DXPARAMETER_TYPE type) /* Returns the smallest power of 2 which is greater than or equal to num */ static inline uint32_t make_pow2(uint32_t num) { -#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3))) - return num == 1 ? 1 : 1u << ((__builtin_clz(num - 1) ^ 0x1f) + 1); +#ifndef __REACTOS__ + uint32_t index; #else - num--; - num |= num >> 1; - num |= num >> 2; - num |= num >> 4; - num |= num >> 8; - num |= num >> 16; - num++; - - return num; + unsigned long index; #endif + return BitScanReverse(&index, num - 1) ? 1u << (index + 1) : 1; } struct d3dx_parameter; diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 385ddb20490..868488fe995 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: c1cf13a7512387885616684130b605a7640f5187} +tags: {wine: 22970932d014f024fcf7f0f98b1a5384b1b1eb99}
3 years, 10 months
1
0
0
0
[reactos] 191/218: [WINESYNC] d3dx9/tests: Remove useless '\n' within some ok() messages.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=48f365863f097171095c2…
commit 48f365863f097171095c2584d37f0f9e309dbad9 Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:07:35 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:06 2021 +0100 [WINESYNC] d3dx9/tests: Remove useless '\n' within some ok() messages. Signed-off-by: Vijay Kiran Kamuju <infyquest(a)gmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id c1cf13a7512387885616684130b605a7640f5187 by Christian Costa <titan.costa(a)gmail.com> --- modules/rostests/winetests/d3dx9_36/mesh.c | 16 ++++++---------- sdk/tools/winesync/d3dx9.cfg | 2 +- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/modules/rostests/winetests/d3dx9_36/mesh.c b/modules/rostests/winetests/d3dx9_36/mesh.c index 50b867ee483..cc67551ed06 100644 --- a/modules/rostests/winetests/d3dx9_36/mesh.c +++ b/modules/rostests/winetests/d3dx9_36/mesh.c @@ -10157,10 +10157,10 @@ static void test_clone_mesh(void) hr = mesh->lpVtbl->CloneMesh(mesh, tc[i].clone_options, tc[i].new_declaration, test_context->device, &mesh_clone); - ok(hr == D3D_OK, "CloneMesh test case %d failed. Got %x\n, expected D3D_OK\n", i, hr); + ok(hr == D3D_OK, "Test %u, got unexpected hr %#x.\n", i, hr); hr = mesh_clone->lpVtbl->GetDeclaration(mesh_clone, new_declaration); - ok(hr == D3D_OK, "GetDeclaration test case %d failed. Got %x\n, expected D3D_OK\n", i, hr); + ok(hr == D3D_OK, "Test %u, got unexpected hr %#x.\n", i, hr); /* Check declaration elements */ for (j = 0; tc[i].new_declaration[j].Stream != 0xFF; j++) { @@ -10346,8 +10346,7 @@ static void test_valid_mesh(void) } hr = D3DXValidMesh(mesh, tc[i].adjacency, &errors_and_warnings); - todo_wine ok(hr == tc[i].exp_hr, "D3DXValidMesh test case %d failed. " - "Got %x\n, expected %x\n", i, hr, tc[i].exp_hr); + todo_wine ok(hr == tc[i].exp_hr, "Test %u, got unexpected hr %#x, expected %#x.\n", i, hr, tc[i].exp_hr); /* Note errors_and_warnings is deliberately not checked because that * would require copying wast amounts of the text output. */ @@ -10490,8 +10489,7 @@ static void test_optimize_faces(void) hr = D3DXOptimizeFaces(tc[i].indices, tc[i].num_faces, tc[i].num_vertices, tc[i].indices_are_32bit, face_remap); - ok(hr == D3D_OK, "D3DXOptimizeFaces test case %d failed. " - "Got %x\n, expected D3D_OK\n", i, hr); + ok(hr == D3D_OK, "Test %u, got unexpected hr %#x.\n", i, hr); /* Compare face remap with expected face remap */ for (j = 0; j < tc[i].num_faces; j++) @@ -10508,15 +10506,13 @@ static void test_optimize_faces(void) hr = D3DXOptimizeFaces(tc[0].indices, tc[0].num_faces, tc[0].num_vertices, tc[0].indices_are_32bit, NULL); - ok(hr == D3DERR_INVALIDCALL, "D3DXOptimizeFaces passed NULL face_remap " - "pointer. Got %x\n, expected D3DERR_INVALIDCALL\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); /* Number of faces must be smaller than 2^15 */ hr = D3DXOptimizeFaces(tc[0].indices, 2 << 15, tc[0].num_vertices, FALSE, &smallest_face_remap); - ok(hr == D3DERR_INVALIDCALL, "D3DXOptimizeFaces should not accept 2^15 " - "faces when using 16-bit indices. Got %x\n, expected D3DERR_INVALIDCALL\n", hr); + ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); } static HRESULT clear_normals(ID3DXMesh *mesh) diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 1627b9f1d99..385ddb20490 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: bb222133a81581622c88c0d34534bc88a556f1f2} +tags: {wine: c1cf13a7512387885616684130b605a7640f5187}
3 years, 10 months
1
0
0
0
[reactos] 190/218: [WINESYNC] d3dx9: Add support for D3DFMT_P8 in DDS files.
by winesync
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=20ea1bf125f34258f0b93…
commit 20ea1bf125f34258f0b93058b2b56adfd5ac5b2c Author: winesync <ros-dev(a)reactos.org> AuthorDate: Mon Sep 21 23:07:34 2020 +0200 Commit: Jérôme Gardou <jerome.gardou(a)reactos.org> CommitDate: Thu Feb 4 16:37:06 2021 +0100 [WINESYNC] d3dx9: Add support for D3DFMT_P8 in DDS files. Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=48731
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> wine commit id bb222133a81581622c88c0d34534bc88a556f1f2 by Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> --- dll/directx/wine/d3dx9_36/surface.c | 12 ++++ modules/rostests/winetests/d3dx9_36/surface.c | 92 +++++++++++++++++++++++++++ sdk/tools/winesync/d3dx9.cfg | 2 +- 3 files changed, 105 insertions(+), 1 deletion(-) diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c index 0417e0e0ab6..24b19b6b37f 100644 --- a/dll/directx/wine/d3dx9_36/surface.c +++ b/dll/directx/wine/d3dx9_36/surface.c @@ -112,6 +112,7 @@ static const GUID *d3dformat_to_wic_guid(D3DFORMAT format) #define DDS_PF_ALPHA 0x1 #define DDS_PF_ALPHA_ONLY 0x2 #define DDS_PF_FOURCC 0x4 +#define DDS_PF_INDEXED 0x20 #define DDS_PF_RGB 0x40 #define DDS_PF_YUV 0x200 #define DDS_PF_LUMINANCE 0x20000 @@ -353,6 +354,15 @@ static D3DFORMAT dds_alpha_to_d3dformat(const struct dds_pixel_format *pixel_for return D3DFMT_UNKNOWN; } +static D3DFORMAT dds_indexed_to_d3dformat(const struct dds_pixel_format *pixel_format) +{ + if (pixel_format->bpp == 8) + return D3DFMT_P8; + + WARN("Unknown indexed pixel format (%u).\n", pixel_format->bpp); + return D3DFMT_UNKNOWN; +} + static D3DFORMAT dds_bump_to_d3dformat(const struct dds_pixel_format *pixel_format) { if (pixel_format->bpp == 16 && pixel_format->rmask == 0x00ff && pixel_format->gmask == 0xff00) @@ -385,6 +395,8 @@ static D3DFORMAT dds_pixel_format_to_d3dformat(const struct dds_pixel_format *pi if (pixel_format->flags & DDS_PF_FOURCC) return dds_fourcc_to_d3dformat(pixel_format->fourcc); + if (pixel_format->flags & DDS_PF_INDEXED) + return dds_indexed_to_d3dformat(pixel_format); if (pixel_format->flags & DDS_PF_RGB) return dds_rgb_to_d3dformat(pixel_format); if (pixel_format->flags & DDS_PF_LUMINANCE) diff --git a/modules/rostests/winetests/d3dx9_36/surface.c b/modules/rostests/winetests/d3dx9_36/surface.c index d5d3d6d2112..e9b9e041785 100644 --- a/modules/rostests/winetests/d3dx9_36/surface.c +++ b/modules/rostests/winetests/d3dx9_36/surface.c @@ -107,6 +107,87 @@ static const unsigned char noimage[4] = { 0x11,0x22,0x33,0x44 }; +/* 16x4 8-bit dds */ +static const unsigned char dds_8bit[] = +{ + 0x44,0x44,0x53,0x20,0x7c,0x00,0x00,0x00,0x0f,0x10,0x00,0x00,0x04,0x00,0x00,0x00, + 0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, + 0x47,0x49,0x4d,0x50,0x2d,0x44,0x44,0x53,0x5a,0x09,0x03,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, + 0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00, + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff, + 0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0xec,0x27,0x00,0xff,0x8c,0xcd,0x12,0xff, + 0x78,0x01,0x14,0xff,0x50,0xcd,0x12,0xff,0x00,0x3d,0x8c,0xff,0x02,0x00,0x00,0xff, + 0x47,0x00,0x00,0xff,0xda,0x07,0x02,0xff,0x50,0xce,0x12,0xff,0xea,0x11,0x01,0xff, + 0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x08,0x3d,0x8c,0xff,0x08,0x01,0x00,0xff, + 0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x60,0xcc,0x12,0xff, + 0xa1,0xb2,0xd4,0xff,0xda,0x07,0x02,0xff,0x47,0x00,0x00,0xff,0x00,0x00,0x00,0xff, + 0x50,0xce,0x12,0xff,0x00,0x00,0x14,0xff,0xa8,0xcc,0x12,0xff,0x3c,0xb2,0xd4,0xff, + 0xda,0x07,0x02,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x01,0xff, + 0x21,0x00,0x00,0xff,0xd8,0xcb,0x12,0xff,0x54,0xcd,0x12,0xff,0x8b,0x4f,0xd5,0xff, + 0x00,0x04,0xda,0xff,0x00,0x00,0x00,0xff,0x3d,0x04,0x91,0xff,0x70,0xce,0x18,0xff, + 0xb4,0xcc,0x12,0xff,0x6b,0x4e,0xd5,0xff,0xb0,0xcc,0x12,0xff,0x00,0x00,0x00,0xff, + 0xc8,0x05,0x91,0xff,0x98,0xc7,0xcc,0xff,0x7c,0xcd,0x12,0xff,0x51,0x05,0x91,0xff, + 0x48,0x07,0x14,0xff,0x6d,0x05,0x91,0xff,0x00,0x07,0xda,0xff,0xa0,0xc7,0xcc,0xff, + 0x00,0x07,0xda,0xff,0x3a,0x77,0xd5,0xff,0xda,0x07,0x02,0xff,0x7c,0x94,0xd4,0xff, + 0xe0,0xce,0xd6,0xff,0x0a,0x80,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff, + 0x78,0x9a,0xab,0xff,0xde,0x08,0x18,0xff,0xda,0x07,0x02,0xff,0x30,0x00,0x00,0xff, + 0x00,0x00,0x00,0xff,0x50,0xce,0x12,0xff,0x8c,0xcd,0x12,0xff,0xd0,0xb7,0xd8,0xff, + 0x00,0x00,0x00,0xff,0x60,0x32,0xd9,0xff,0x30,0xc1,0x1a,0xff,0xa8,0xcd,0x12,0xff, + 0xa4,0xcd,0x12,0xff,0xc0,0x1d,0x4b,0xff,0x46,0x71,0x0e,0xff,0xc0,0x1d,0x4b,0xff, + 0x09,0x87,0xd4,0xff,0x00,0x00,0x00,0xff,0xf6,0x22,0x00,0xff,0x64,0xcd,0x12,0xff, + 0x00,0x00,0x00,0xff,0xca,0x1d,0x4b,0xff,0x09,0x87,0xd4,0xff,0xaa,0x02,0x05,0xff, + 0x82,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0xc0,0x1d,0x4b,0xff, + 0xcd,0xab,0xba,0xff,0x00,0x00,0x00,0xff,0xa4,0xcd,0x12,0xff,0xc0,0x1d,0x4b,0xff, + 0xd4,0xcd,0x12,0xff,0xa6,0x4c,0xd5,0xff,0x00,0xf0,0xfd,0xff,0xd4,0xcd,0x12,0xff, + 0xf4,0x4c,0xd5,0xff,0x90,0xcd,0x12,0xff,0xc2,0x4c,0xd5,0xff,0x82,0x00,0x00,0xff, + 0xaa,0x02,0x05,0xff,0x88,0xd4,0xba,0xff,0x14,0x00,0x00,0xff,0x01,0x00,0x00,0xff, + 0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x10,0x00,0x00,0xff,0x00,0x00,0x00,0xff, + 0x0c,0x08,0x13,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff, + 0xd0,0xcd,0x12,0xff,0xc6,0x84,0xf1,0xff,0x7c,0x84,0xf1,0xff,0x20,0x20,0xf5,0xff, + 0x00,0x00,0x0a,0xff,0xf0,0xb0,0x94,0xff,0x64,0x6c,0xf1,0xff,0x85,0x6c,0xf1,0xff, + 0x8b,0x4f,0xd5,0xff,0x00,0x04,0xda,0xff,0x88,0xd4,0xba,0xff,0x82,0x00,0x00,0xff, + 0x39,0xde,0xd4,0xff,0x10,0x50,0xd5,0xff,0xaa,0x02,0x05,0xff,0x00,0x00,0x00,0xff, + 0x4f,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x5c,0xce,0x12,0xff,0x00,0x00,0x00,0xff, + 0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x5c,0xce,0x12,0xff, + 0xaa,0x02,0x05,0xff,0x4c,0xce,0x12,0xff,0x39,0xe6,0xd4,0xff,0x00,0x00,0x00,0xff, + 0x82,0x00,0x00,0xff,0x00,0x00,0x00,0xff,0x5b,0xe6,0xd4,0xff,0x00,0x00,0x00,0xff, + 0x00,0x00,0x00,0xff,0x68,0x50,0xcd,0xff,0x00,0x00,0x00,0xff,0x00,0x00,0x00,0xff, + 0x00,0x00,0x00,0xff,0x10,0x00,0x00,0xff,0xe3,0xea,0x90,0xff,0x5c,0xce,0x12,0xff, + 0x18,0x00,0x00,0xff,0x88,0xd4,0xba,0xff,0x82,0x00,0x00,0xff,0x00,0x00,0x00,0xff, + 0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, + 0x01,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01 +}; + /* 2x2 24-bit dds, 2 mipmaps */ static const unsigned char dds_24bit[] = { 0x44,0x44,0x53,0x20,0x7c,0x00,0x00,0x00,0x07,0x10,0x0a,0x00,0x02,0x00,0x00,0x00, @@ -650,6 +731,17 @@ static void test_D3DXGetImageInfo(void) ok(info.ImageFileFormat == D3DXIFF_DDS, "Got image file format %#x, expected %#x\n", info.ImageFileFormat, D3DXIFF_DDS); } else skip("Couldn't get image info from 16-bit DDS file in memory\n"); + memset(&info, 0, sizeof(info)); + hr = D3DXGetImageInfoFromFileInMemory(dds_8bit, sizeof(dds_8bit), &info); + ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x\n", hr); + ok(info.Width == 16, "Got width %u.\n", info.Width); + ok(info.Height == 4, "Got height %u.\n", info.Height); + ok(info.Depth == 1, "Got depth %u.\n", info.Depth); + ok(info.MipLevels == 1, "Got miplevels %u.\n", info.MipLevels); + ok(info.Format == D3DFMT_P8, "Got format %#x.\n", info.Format); + ok(info.ResourceType == D3DRTYPE_TEXTURE, "Got resource type %#x.\n", info.ResourceType); + ok(info.ImageFileFormat == D3DXIFF_DDS, "Got image file format %#x.\n", info.ImageFileFormat); + hr = D3DXGetImageInfoFromFileInMemory(dds_cube_map, sizeof(dds_cube_map), &info); ok(hr == D3D_OK, "D3DXGetImageInfoFromFileInMemory returned %#x, expected %#x\n", hr, D3D_OK); if (hr == D3D_OK) { diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg index 7dbe3ecf72f..1627b9f1d99 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: d511853d45bc3302b2a4501b1aa0097a4e78b3d9} +tags: {wine: bb222133a81581622c88c0d34534bc88a556f1f2}
3 years, 10 months
1
0
0
0
← Newer
1
...
8
9
10
11
12
13
14
...
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