winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
July 2015
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
567 discussions
Start a n
N
ew thread
Andrew Eikum : xaudio2_8: Add DLL and implement XAudio2Create.
by Alexandre Julliard
31 Jul '15
31 Jul '15
Module: wine Branch: master Commit: 929ab3e527b25bcfea375e4373230748868d8714 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=929ab3e527b25bcfea375e437…
Author: Andrew Eikum <aeikum(a)codeweavers.com> Date: Thu Jul 30 10:58:54 2015 -0500 xaudio2_8: Add DLL and implement XAudio2Create. --- configure | 2 ++ configure.ac | 1 + dlls/xaudio2_8/Makefile.in | 5 +++ dlls/xaudio2_8/xaudio2_8.spec | 1 + dlls/xaudio2_8/xaudio_dll.c | 73 +++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 82 insertions(+) diff --git a/configure b/configure index da4c15a..dff3e10 100755 --- a/configure +++ b/configure @@ -1355,6 +1355,7 @@ enable_xapofx1_3 enable_xapofx1_4 enable_xapofx1_5 enable_xaudio2_7 +enable_xaudio2_8 enable_xinput1_1 enable_xinput1_2 enable_xinput1_3 @@ -17821,6 +17822,7 @@ wine_fn_config_dll xapofx1_3 enable_xapofx1_3 wine_fn_config_dll xapofx1_4 enable_xapofx1_4 wine_fn_config_dll xapofx1_5 enable_xapofx1_5 wine_fn_config_dll xaudio2_7 enable_xaudio2_7 clean +wine_fn_config_dll xaudio2_8 enable_xaudio2_8 wine_fn_config_dll xinput1_1 enable_xinput1_1 wine_fn_config_dll xinput1_2 enable_xinput1_2 wine_fn_config_dll xinput1_3 enable_xinput1_3 implib xinput diff --git a/configure.ac b/configure.ac index 45b8fdb..0489739 100644 --- a/configure.ac +++ b/configure.ac @@ -3424,6 +3424,7 @@ WINE_CONFIG_DLL(xapofx1_3) WINE_CONFIG_DLL(xapofx1_4) WINE_CONFIG_DLL(xapofx1_5) WINE_CONFIG_DLL(xaudio2_7,,[clean]) +WINE_CONFIG_DLL(xaudio2_8) WINE_CONFIG_DLL(xinput1_1) WINE_CONFIG_DLL(xinput1_2) WINE_CONFIG_DLL(xinput1_3,,[implib],[xinput]) diff --git a/dlls/xaudio2_8/Makefile.in b/dlls/xaudio2_8/Makefile.in new file mode 100644 index 0000000..d5fb624 --- /dev/null +++ b/dlls/xaudio2_8/Makefile.in @@ -0,0 +1,5 @@ +MODULE = xaudio2_8.dll +IMPORTS = ole32 + +C_SRCS = \ + xaudio_dll.c diff --git a/dlls/xaudio2_8/xaudio2_8.spec b/dlls/xaudio2_8/xaudio2_8.spec new file mode 100644 index 0000000..dd4fee1 --- /dev/null +++ b/dlls/xaudio2_8/xaudio2_8.spec @@ -0,0 +1 @@ +@ stdcall XAudio2Create(ptr long long) diff --git a/dlls/xaudio2_8/xaudio_dll.c b/dlls/xaudio2_8/xaudio_dll.c new file mode 100644 index 0000000..e5dfb9d --- /dev/null +++ b/dlls/xaudio2_8/xaudio_dll.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2015 Andrew Eikum for CodeWeavers + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#include <stdarg.h> + +#define COBJMACROS + +#include "windef.h" +#include "winbase.h" +#include "winuser.h" + +#include "initguid.h" +#include "xaudio2.h" + +BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) +{ + switch (fdwReason) + { + case DLL_WINE_PREATTACH: + return FALSE; /* prefer native version */ + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls( hinstDLL ); + break; + } + return TRUE; +} + +HRESULT WINAPI XAudio2Create(IXAudio2 **ppxa2, UINT32 flags, XAUDIO2_PROCESSOR proc) +{ + HRESULT hr; + IXAudio2 *xa2; + IXAudio27 *xa27; + + /* create XAudio2 2.8 instance */ + hr = CoCreateInstance(&CLSID_XAudio2, NULL, CLSCTX_INPROC_SERVER, + &IID_IXAudio2, (void**)&xa2); + if(FAILED(hr)) + return hr; + + hr = IXAudio2_QueryInterface(xa2, &IID_IXAudio27, (void**)&xa27); + if(FAILED(hr)){ + IXAudio2_Release(xa2); + return hr; + } + + hr = IXAudio27_Initialize(xa27, flags, proc); + if(FAILED(hr)){ + IXAudio27_Release(xa27); + IXAudio2_Release(xa2); + return hr; + } + + IXAudio27_Release(xa27); + + *ppxa2 = xa2; + + return S_OK; +}
1
0
0
0
Józef Kucia : d3dx9/tests: Add tests for normals computation.
by Alexandre Julliard
31 Jul '15
31 Jul '15
Module: wine Branch: master Commit: 93618328634f1423abdecf1763aadc865ee1067b URL:
http://source.winehq.org/git/wine.git/?a=commit;h=93618328634f1423abdecf176…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Wed Jul 29 22:17:00 2015 +0200 d3dx9/tests: Add tests for normals computation. --- dlls/d3dx9_36/tests/mesh.c | 573 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 573 insertions(+) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=93618328634f1423abdec…
1
0
0
0
Józef Kucia : d3dx9: Implement D3DXComputeNormals().
by Alexandre Julliard
31 Jul '15
31 Jul '15
Module: wine Branch: master Commit: 8eca2df900b3aad7dad62abdf63eb972a23faae3 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=8eca2df900b3aad7dad62abdf…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Wed Jul 29 22:16:59 2015 +0200 d3dx9: Implement D3DXComputeNormals(). --- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/mesh.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index 7e95e35..f79b6fa 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -23,7 +23,7 @@ @ stub D3DXComputeIMTFromSignal(ptr long long long long ptr ptr ptr ptr ptr) @ stub D3DXComputeIMTFromTexture(ptr ptr long long ptr ptr ptr) @ stub D3DXComputeNormalMap(ptr ptr ptr long long long) -@ stub D3DXComputeNormals(ptr ptr) +@ stdcall D3DXComputeNormals(ptr ptr) @ stub D3DXComputeTangent(ptr long long long long ptr) @ stub D3DXComputeTangentFrame(ptr long) @ stdcall D3DXComputeTangentFrameEx(ptr long long long long long long long long long ptr float float float ptr ptr) diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index 7c76f3b..d0459da 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -7494,6 +7494,25 @@ done: } /************************************************************************* + * D3DXComputeNormals (D3DX9_36.@) + */ +HRESULT WINAPI D3DXComputeNormals(struct ID3DXBaseMesh *mesh, const DWORD *adjacency) +{ + TRACE("mesh %p, adjacency %p\n", mesh, adjacency); + + if (mesh && (ID3DXMeshVtbl *)mesh->lpVtbl != &D3DXMesh_Vtbl) + { + ERR("Invalid virtual table\n"); + return D3DERR_INVALIDCALL; + } + + return D3DXComputeTangentFrameEx((ID3DXMesh *)mesh, D3DX_DEFAULT, 0, + D3DX_DEFAULT, 0, D3DX_DEFAULT, 0, D3DDECLUSAGE_NORMAL, 0, + D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS, + adjacency, -1.01f, -0.01f, -1.01f, NULL, NULL); +} + +/************************************************************************* * D3DXIntersect (D3DX9_36.@) */ HRESULT WINAPI D3DXIntersect(ID3DXBaseMesh *mesh, const D3DXVECTOR3 *ray_pos, const D3DXVECTOR3 *ray_dir,
1
0
0
0
Józef Kucia : d3dx9: Partially implement D3DXComputeTangentFrameEx().
by Alexandre Julliard
31 Jul '15
31 Jul '15
Module: wine Branch: master Commit: 4346b79c2fafccd4e39336fc86d66bf7c091284d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=4346b79c2fafccd4e39336fc8…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Wed Jul 29 22:16:58 2015 +0200 d3dx9: Partially implement D3DXComputeTangentFrameEx(). --- dlls/d3dx9_36/mesh.c | 244 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 241 insertions(+), 3 deletions(-) diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index f1fe4ef..7c76f3b 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -7235,6 +7235,39 @@ error: return hr; } +static D3DXVECTOR3 *vertex_element_vec3(BYTE *vertices, const D3DVERTEXELEMENT9 *declaration, + DWORD vertex_stride, DWORD index) +{ + return (D3DXVECTOR3 *)(vertices + declaration->Offset + index * vertex_stride); +} + +static D3DXVECTOR3 read_vec3(BYTE *vertices, const D3DVERTEXELEMENT9 *declaration, + DWORD vertex_stride, DWORD index) +{ + D3DXVECTOR3 vec3 = {0}; + const D3DXVECTOR3 *src = vertex_element_vec3(vertices, declaration, vertex_stride, index); + + switch (declaration->Type) + { + case D3DDECLTYPE_FLOAT1: + vec3.x = src->x; + break; + case D3DDECLTYPE_FLOAT2: + vec3.x = src->x; + vec3.y = src->y; + break; + case D3DDECLTYPE_FLOAT3: + case D3DDECLTYPE_FLOAT4: + vec3 = *src; + break; + default: + ERR("Cannot read vec3\n"); + break; + } + + return vec3; +} + /************************************************************************* * D3DXComputeTangentFrameEx (D3DX9_36.@) */ @@ -7244,15 +7277,220 @@ HRESULT WINAPI D3DXComputeTangentFrameEx(ID3DXMesh *mesh, DWORD texture_in_seman const DWORD *adjacency, float partial_edge_threshold, float singular_point_threshold, float normal_edge_threshold, ID3DXMesh **mesh_out, ID3DXBuffer **vertex_mapping) { - FIXME("mesh %p, texture_in_semantic %u, texture_in_index %u, u_partial_out_semantic %u, u_partial_out_index %u, " + HRESULT hr; + void *indices = NULL; + BYTE *vertices = NULL; + DWORD *point_reps = NULL; + size_t normal_size; + BOOL indices_are_32bit; + DWORD i, j, num_faces, num_vertices, vertex_stride; + D3DVERTEXELEMENT9 declaration[MAX_FVF_DECL_SIZE] = {D3DDECL_END()}; + D3DVERTEXELEMENT9 *position_declaration = NULL, *normal_declaration = NULL; + DWORD weighting_method = options & (D3DXTANGENT_WEIGHT_EQUAL | D3DXTANGENT_WEIGHT_BY_AREA); + + TRACE("mesh %p, texture_in_semantic %u, texture_in_index %u, u_partial_out_semantic %u, u_partial_out_index %u, " "v_partial_out_semantic %u, v_partial_out_index %u, normal_out_semantic %u, normal_out_index %u, " "options %#x, adjacency %p, partial_edge_threshold %f, singular_point_threshold %f, " - "normal_edge_threshold %f, mesh_out %p, vertex_mapping %p stub!\n", + "normal_edge_threshold %f, mesh_out %p, vertex_mapping %p\n", mesh, texture_in_semantic, texture_in_index, u_partial_out_semantic, u_partial_out_index, v_partial_out_semantic, v_partial_out_index, normal_out_semantic, normal_out_index, options, adjacency, partial_edge_threshold, singular_point_threshold, normal_edge_threshold, mesh_out, vertex_mapping); - return E_NOTIMPL; + if (!mesh) + { + WARN("mesh is NULL\n"); + return D3DERR_INVALIDCALL; + } + + if (weighting_method == (D3DXTANGENT_WEIGHT_EQUAL | D3DXTANGENT_WEIGHT_BY_AREA)) + { + WARN("D3DXTANGENT_WEIGHT_BY_AREA and D3DXTANGENT_WEIGHT_EQUAL are mutally exclusive\n"); + return D3DERR_INVALIDCALL; + } + + if (u_partial_out_semantic != D3DX_DEFAULT) + { + FIXME("tangent vectors computation is not supported\n"); + return E_NOTIMPL; + } + + if (v_partial_out_semantic != D3DX_DEFAULT) + { + FIXME("binormal vectors computation is not supported\n"); + return E_NOTIMPL; + } + + if (options & ~(D3DXTANGENT_GENERATE_IN_PLACE | D3DXTANGENT_CALCULATE_NORMALS | D3DXTANGENT_WEIGHT_EQUAL | D3DXTANGENT_WEIGHT_BY_AREA)) + { + FIXME("unsupported options %#x\n", options); + return E_NOTIMPL; + } + + if (!(options & D3DXTANGENT_CALCULATE_NORMALS)) + { + FIXME("only normals computation is supported\n"); + return E_NOTIMPL; + } + + if (!(options & D3DXTANGENT_GENERATE_IN_PLACE) || mesh_out || vertex_mapping) + { + FIXME("only D3DXTANGENT_GENERATE_IN_PLACE is supported\n"); + return E_NOTIMPL; + } + + if (FAILED(hr = mesh->lpVtbl->GetDeclaration(mesh, declaration))) + return hr; + + for (i = 0; declaration[i].Stream != 0xff; i++) + { + if (declaration[i].Usage == D3DDECLUSAGE_POSITION && !declaration[i].UsageIndex) + position_declaration = &declaration[i]; + if (declaration[i].Usage == normal_out_semantic && declaration[i].UsageIndex == normal_out_index) + normal_declaration = &declaration[i]; + } + + if (!position_declaration || !normal_declaration) + return D3DERR_INVALIDCALL; + + if (normal_declaration->Type == D3DDECLTYPE_FLOAT3) + { + normal_size = sizeof(D3DXVECTOR3); + } + else if (normal_declaration->Type == D3DDECLTYPE_FLOAT4) + { + normal_size = sizeof(D3DXVECTOR4); + } + else + { + WARN("unsupported normals type %u\n", normal_declaration->Type); + return D3DERR_INVALIDCALL; + } + + num_faces = mesh->lpVtbl->GetNumFaces(mesh); + num_vertices = mesh->lpVtbl->GetNumVertices(mesh); + vertex_stride = mesh->lpVtbl->GetNumBytesPerVertex(mesh); + indices_are_32bit = mesh->lpVtbl->GetOptions(mesh) & D3DXMESH_32BIT; + + point_reps = HeapAlloc(GetProcessHeap(), 0, num_vertices * sizeof(*point_reps)); + if (!point_reps) + { + hr = E_OUTOFMEMORY; + goto done; + } + + if (adjacency) + { + if (FAILED(hr = mesh->lpVtbl->ConvertAdjacencyToPointReps(mesh, adjacency, point_reps))) + goto done; + } + else + { + for (i = 0; i < num_vertices; i++) + point_reps[i] = i; + } + + if (FAILED(hr = mesh->lpVtbl->LockIndexBuffer(mesh, 0, &indices))) + goto done; + + if (FAILED(hr = mesh->lpVtbl->LockVertexBuffer(mesh, 0, (void **)&vertices))) + goto done; + + for (i = 0; i < num_vertices; i++) + { + static const D3DXVECTOR4 default_vector = {0.0f, 0.0f, 0.0f, 1.0f}; + void *normal = vertices + normal_declaration->Offset + i * vertex_stride; + + memcpy(normal, &default_vector, normal_size); + } + + for (i = 0; i < num_faces; i++) + { + float denominator, weights[3]; + D3DXVECTOR3 a, b, cross, face_normal; + const DWORD face_indices[3] = + { + read_ib(indices, indices_are_32bit, 3 * i + 0), + read_ib(indices, indices_are_32bit, 3 * i + 1), + read_ib(indices, indices_are_32bit, 3 * i + 2) + }; + const D3DXVECTOR3 v0 = read_vec3(vertices, position_declaration, vertex_stride, face_indices[0]); + const D3DXVECTOR3 v1 = read_vec3(vertices, position_declaration, vertex_stride, face_indices[1]); + const D3DXVECTOR3 v2 = read_vec3(vertices, position_declaration, vertex_stride, face_indices[2]); + + D3DXVec3Cross(&cross, D3DXVec3Subtract(&a, &v0, &v1), D3DXVec3Subtract(&b, &v0, &v2)); + + switch (weighting_method) + { + case D3DXTANGENT_WEIGHT_EQUAL: + weights[0] = weights[1] = weights[2] = 1.0f; + break; + case D3DXTANGENT_WEIGHT_BY_AREA: + weights[0] = weights[1] = weights[2] = D3DXVec3Length(&cross); + break; + default: + /* weight by angle */ + denominator = D3DXVec3Length(&a) * D3DXVec3Length(&b); + if (!denominator) + weights[0] = 0.0f; + else + weights[0] = acosf(D3DXVec3Dot(&a, &b) / denominator); + + D3DXVec3Subtract(&a, &v1, &v0); + D3DXVec3Subtract(&b, &v1, &v2); + denominator = D3DXVec3Length(&a) * D3DXVec3Length(&b); + if (!denominator) + weights[1] = 0.0f; + else + weights[1] = acosf(D3DXVec3Dot(&a, &b) / denominator); + + D3DXVec3Subtract(&a, &v2, &v0); + D3DXVec3Subtract(&b, &v2, &v1); + denominator = D3DXVec3Length(&a) * D3DXVec3Length(&b); + if (!denominator) + weights[2] = 0.0f; + else + weights[2] = acosf(D3DXVec3Dot(&a, &b) / denominator); + + break; + } + + D3DXVec3Normalize(&face_normal, &cross); + + for (j = 0; j < 3; j++) + { + D3DXVECTOR3 normal; + DWORD rep_index = point_reps[face_indices[j]]; + D3DXVECTOR3 *rep_normal = vertex_element_vec3(vertices, normal_declaration, vertex_stride, rep_index); + + D3DXVec3Scale(&normal, &face_normal, weights[j]); + D3DXVec3Add(rep_normal, rep_normal, &normal); + } + } + + for (i = 0; i < num_vertices; i++) + { + DWORD rep_index = point_reps[i]; + D3DXVECTOR3 *normal = vertex_element_vec3(vertices, normal_declaration, vertex_stride, i); + D3DXVECTOR3 *rep_normal = vertex_element_vec3(vertices, normal_declaration, vertex_stride, rep_index); + + if (i == rep_index) + D3DXVec3Normalize(rep_normal, rep_normal); + else + *normal = *rep_normal; + } + + hr = D3D_OK; + +done: + if (vertices) + mesh->lpVtbl->UnlockVertexBuffer(mesh); + + if (indices) + mesh->lpVtbl->UnlockIndexBuffer(mesh); + + HeapFree(GetProcessHeap(), 0, point_reps); + + return hr; } /*************************************************************************
1
0
0
0
Józef Kucia : d3dx9/tests: Use new_test_context() to create device in mesh tests.
by Alexandre Julliard
31 Jul '15
31 Jul '15
Module: wine Branch: master Commit: 55ef5afbda121c9e3f9b6c4b47b3d88b3ef3701d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=55ef5afbda121c9e3f9b6c4b4…
Author: Józef Kucia <joseph.kucia(a)gmail.com> Date: Wed Jul 29 22:16:57 2015 +0200 d3dx9/tests: Use new_test_context() to create device in mesh tests. --- dlls/d3dx9_36/tests/mesh.c | 336 +++++++-------------------------------------- 1 file changed, 53 insertions(+), 283 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=55ef5afbda121c9e3f9b6…
1
0
0
0
Alistair Leslie-Hughes : d3dx9_36: Add D3DXCreateFragmentLinker, D3DXCreateFragmentLinkerEx stubs.
by Alexandre Julliard
31 Jul '15
31 Jul '15
Module: wine Branch: master Commit: d55fe1f9ce700af5b13712b7283b6f3356be8c20 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d55fe1f9ce700af5b13712b72…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Jul 29 16:23:10 2015 +1000 d3dx9_36: Add D3DXCreateFragmentLinker, D3DXCreateFragmentLinkerEx stubs. --- dlls/d3dx9_36/d3dx9_36.spec | 4 ++-- dlls/d3dx9_36/shader.c | 21 +++++++++++++++++++++ dlls/d3dx9_42/d3dx9_42.spec | 2 -- include/d3dx9shader.h | 3 +++ 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec index aa99dd2..7e95e35 100644 --- a/dlls/d3dx9_36/d3dx9_36.spec +++ b/dlls/d3dx9_36/d3dx9_36.spec @@ -66,8 +66,8 @@ @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) @ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) -@ stub D3DXCreateFragmentLinker(ptr long ptr) -@ stub D3DXCreateFragmentLinkerEx(ptr long long ptr) +@ stdcall D3DXCreateFragmentLinker(ptr long ptr) +@ stdcall D3DXCreateFragmentLinkerEx(ptr long long ptr) @ stub D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) @ stdcall D3DXCreateLine(ptr ptr) @ stdcall D3DXCreateMatrixStack(long ptr) diff --git a/dlls/d3dx9_36/shader.c b/dlls/d3dx9_36/shader.c index cdc470b..12d0bcb 100644 --- a/dlls/d3dx9_36/shader.c +++ b/dlls/d3dx9_36/shader.c @@ -2077,6 +2077,27 @@ HRESULT WINAPI D3DXGetShaderConstantTable(const DWORD *byte_code, ID3DXConstantT return D3DXGetShaderConstantTableEx(byte_code, 0, constant_table); } +HRESULT WINAPI D3DXCreateFragmentLinker(IDirect3DDevice9 *device, UINT size, ID3DXFragmentLinker **linker) +{ + FIXME("device %p, size %u, linker %p: stub.\n", device, size, linker); + + if (linker) + *linker = NULL; + + + return E_NOTIMPL; +} + +HRESULT WINAPI D3DXCreateFragmentLinkerEx(IDirect3DDevice9 *device, UINT size, DWORD flags, ID3DXFragmentLinker **linker) +{ + FIXME("device %p, size %u, flags %#x, linker %p: stub.\n", device, size, flags, linker); + + if (linker) + *linker = NULL; + + return E_NOTIMPL; +} + HRESULT WINAPI D3DXGetShaderSamplers(const DWORD *byte_code, const char **samplers, UINT *count) { UINT i, sampler_count = 0; diff --git a/dlls/d3dx9_42/d3dx9_42.spec b/dlls/d3dx9_42/d3dx9_42.spec index d58faba..efe673d 100644 --- a/dlls/d3dx9_42/d3dx9_42.spec +++ b/dlls/d3dx9_42/d3dx9_42.spec @@ -66,8 +66,6 @@ @ stdcall D3DXCreateFontIndirectA(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectA @ stdcall D3DXCreateFontIndirectW(ptr ptr ptr) d3dx9_36.D3DXCreateFontIndirectW @ stdcall D3DXCreateFontW(ptr long long long long long long long long long wstr ptr) d3dx9_36.D3DXCreateFontW -@ stdcall D3DXCreateFragmentLinker(ptr long ptr) d3dx9_36.D3DXCreateFragmentLinker -@ stdcall D3DXCreateFragmentLinkerEx(ptr long long ptr) d3dx9_36.D3DXCreateFragmentLinkerEx @ stdcall D3DXCreateKeyframedAnimationSet(ptr long long long long ptr ptr) d3dx9_36.D3DXCreateKeyframedAnimationSet @ stdcall D3DXCreateLine(ptr ptr) d3dx9_36.D3DXCreateLine @ stdcall D3DXCreateMatrixStack(long ptr) d3dx9_36.D3DXCreateMatrixStack diff --git a/include/d3dx9shader.h b/include/d3dx9shader.h index 99519cb..a3f68f2 100644 --- a/include/d3dx9shader.h +++ b/include/d3dx9shader.h @@ -414,6 +414,9 @@ HRESULT WINAPI D3DXGetShaderOutputSemantics(const DWORD *pFunction, D3DXSEMANTIC HRESULT WINAPI D3DXCreateTextureShader(const DWORD *pFunction, ID3DXTextureShader **ppTextureShader); +HRESULT WINAPI D3DXCreateFragmentLinker(IDirect3DDevice9 *device, UINT size, ID3DXFragmentLinker **linker); +HRESULT WINAPI D3DXCreateFragmentLinkerEx(IDirect3DDevice9 *device, UINT size, DWORD flags, ID3DXFragmentLinker **linker); + #ifdef __cplusplus } #endif
1
0
0
0
Alistair Leslie-Hughes : include: Add ID3DXFragmentLinker interface.
by Alexandre Julliard
31 Jul '15
31 Jul '15
Module: wine Branch: master Commit: 67840595d5a58f43b753a8cd2cb43fa59e01969c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=67840595d5a58f43b753a8cd2…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Wed Jul 22 16:28:34 2015 +1000 include: Add ID3DXFragmentLinker interface. --- include/d3dx9shader.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/include/d3dx9shader.h b/include/d3dx9shader.h index d665f72..99519cb 100644 --- a/include/d3dx9shader.h +++ b/include/d3dx9shader.h @@ -305,6 +305,43 @@ DECLARE_INTERFACE(ID3DXInclude) typedef struct ID3DXInclude *LPD3DXINCLUDE; +typedef struct _D3DXFRAGMENT_DESC +{ + const char *Name; + DWORD Target; + +} D3DXFRAGMENT_DESC, *LPD3DXFRAGMENT_DESC; + + +DEFINE_GUID(IID_ID3DXFragmentLinker, 0x1a2c0cc2, 0xe5b6, 0x4ebc, 0x9e, 0x8d, 0x39, 0xe, 0x5, 0x78, 0x11, 0xb6); + +#define INTERFACE ID3DXFragmentLinker +DECLARE_INTERFACE_(ID3DXFragmentLinker, IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID iid, void **ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + STDMETHOD(GetDevice)(THIS_ struct IDirect3DDevice9 **device) PURE; + STDMETHOD_(UINT, GetNumberOfFragments)(THIS) PURE; + + STDMETHOD_(D3DXHANDLE, GetFragmentHandleByIndex)(THIS_ UINT index) PURE; + STDMETHOD_(D3DXHANDLE, GetFragmentHandleByName)(THIS_ const char *name) PURE; + STDMETHOD(GetFragmentDesc)(THIS_ D3DXHANDLE name, D3DXFRAGMENT_DESC *frag_desc) PURE; + + STDMETHOD(AddFragments)(THIS_ const DWORD *fragments) PURE; + + STDMETHOD(GetAllFragments)(THIS_ ID3DXBuffer **buffer) PURE; + STDMETHOD(GetFragment)(THIS_ D3DXHANDLE name, ID3DXBuffer **buffer) PURE; + + STDMETHOD(LinkShader)(THIS_ const char *profile, DWORD flags, const D3DXHANDLE *fragmenthandles, UINT fragments, ID3DXBuffer **buffer, ID3DXBuffer **errors) PURE; + STDMETHOD(LinkVertexShader)(THIS_ const char *profile, DWORD flags, const D3DXHANDLE *fragment_handles, UINT fragments, IDirect3DVertexShader9 **shader, ID3DXBuffer **errors) PURE; + STDMETHOD(LinkPixelShader)(THIS_ const char *profile, DWORD flags, const D3DXHANDLE *fragment_handles, UINT fragments, IDirect3DPixelShader9 **shader, ID3DXBuffer **errors) PURE; + + STDMETHOD(ClearCache)(THIS) PURE; +}; +#undef INTERFACE + #ifdef __cplusplus extern "C" { #endif
1
0
0
0
Alistair Leslie-Hughes : d3dx9_36: Add D3DXTessellateNPatches stub ( try 2 ).
by Alexandre Julliard
31 Jul '15
31 Jul '15
Module: wine Branch: master Commit: 0bd896f0f8076e77ea80571be8f1e42d75df3f42 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0bd896f0f8076e77ea80571be…
Author: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com> Date: Tue Jul 21 08:52:01 2015 +1000 d3dx9_36: Add D3DXTessellateNPatches stub ( try 2). --- dlls/d3dx9_24/d3dx9_24.spec | 2 +- dlls/d3dx9_25/d3dx9_25.spec | 2 +- dlls/d3dx9_26/d3dx9_26.spec | 2 +- dlls/d3dx9_27/d3dx9_27.spec | 2 +- dlls/d3dx9_28/d3dx9_28.spec | 2 +- dlls/d3dx9_29/d3dx9_29.spec | 2 +- dlls/d3dx9_30/d3dx9_30.spec | 2 +- dlls/d3dx9_31/d3dx9_31.spec | 2 +- dlls/d3dx9_32/d3dx9_32.spec | 2 +- dlls/d3dx9_33/d3dx9_33.spec | 2 +- dlls/d3dx9_34/d3dx9_34.spec | 2 +- dlls/d3dx9_35/d3dx9_35.spec | 2 +- dlls/d3dx9_36/d3dx9_36.spec | 2 +- dlls/d3dx9_36/mesh.c | 9 +++++++++ dlls/d3dx9_37/d3dx9_37.spec | 2 +- dlls/d3dx9_38/d3dx9_38.spec | 2 +- dlls/d3dx9_39/d3dx9_39.spec | 2 +- dlls/d3dx9_40/d3dx9_40.spec | 2 +- dlls/d3dx9_41/d3dx9_41.spec | 2 +- dlls/d3dx9_42/d3dx9_42.spec | 2 +- dlls/d3dx9_43/d3dx9_43.spec | 2 +- 21 files changed, 29 insertions(+), 20 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=0bd896f0f8076e77ea805…
1
0
0
0
André Hentschel : Add WWN 396
by Jeremy Newman
31 Jul '15
31 Jul '15
Module: website Branch: master Commit: 26e757b0a6764ad4275baf196b6e0f7fe655acee URL:
http://source.winehq.org/git/website.git/?a=commit;h=26e757b0a6764ad4275baf…
Author: André Hentschel <nerv(a)dawncrow.de> Date: Fri Jul 31 21:15:43 2015 +0200 Add WWN 396 --- news/de/2015073101.xml | 10 ++ news/en/2015073101.xml | 10 ++ wwn/en/wn20150731_396.xml | 436 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 456 insertions(+) Diff:
http://source.winehq.org/git/website.git/?a=commitdiff;h=26e757b0a6764ad427…
1
0
0
0
Stefan Dösinger : d3d9/tests: Add a depth bias test.
by Alexandre Julliard
30 Jul '15
30 Jul '15
Module: wine Branch: master Commit: 571462c633edbcc5dd6f2f8e56470470f27b0b07 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=571462c633edbcc5dd6f2f8e5…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Thu Jul 30 18:50:16 2015 +0200 d3d9/tests: Add a depth bias test. --- dlls/d3d9/tests/visual.c | 164 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 164 insertions(+) diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c index 13cc27c..275ee8f 100644 --- a/dlls/d3d9/tests/visual.c +++ b/dlls/d3d9/tests/visual.c @@ -19624,6 +19624,169 @@ static void test_updatetexture(void) DestroyWindow(window); } +static void test_depthbias(void) +{ + IDirect3DDevice9 *device; + IDirect3D9 *d3d; + IDirect3DSurface9 *ds; + D3DCAPS9 caps; + D3DCOLOR color; + ULONG refcount; + HWND window; + HRESULT hr; + unsigned int i; + static const D3DFORMAT formats[] = + { + D3DFMT_D16, D3DFMT_D24X8, D3DFMT_D32, D3DFMT_D24S8, MAKEFOURCC('I','N','T','Z'), + + /* The scaling factor detection function detects the wrong factor for + * float formats on Nvidia, therefore the following tests are disabled. + * The wined3d function detects 2^23 like for fixed point formats but + * the test needs 2^22 to pass. + * + * AMD GPUs need a different scaling factor for float depth buffers + * (2^24) than fixed point (2^23), but the wined3d detection function + * works there, producing the right result in the test. + * + * D3DFMT_D32F_LOCKABLE, D3DFMT_D24FS8, + */ + }; + + static const struct + { + struct vec3 position; + } + quad[] = + { + {{-1.0f, -1.0f, 0.0f}}, + {{-1.0f, 1.0f, 0.0f}}, + {{ 1.0f, -1.0f, 1.0f}}, + {{ 1.0f, 1.0f, 1.0f}}, + }; + union + { + float f; + DWORD d; + } conv; + + window = CreateWindowA("static", "d3d9_test", WS_OVERLAPPEDWINDOW | WS_VISIBLE, + 0, 0, 640, 480, NULL, NULL, NULL, NULL); + d3d = Direct3DCreate9(D3D_SDK_VERSION); + ok(!!d3d, "Failed to create a D3D object.\n"); + if (!(device = create_device(d3d, window, window, TRUE))) + { + skip("Failed to create a D3D device, skipping tests.\n"); + goto done; + } + + hr = IDirect3DDevice9_GetDeviceCaps(device, &caps); + ok(SUCCEEDED(hr), "Failed to get device caps, hr %#x.\n", hr); + if (!(caps.RasterCaps & D3DPRASTERCAPS_DEPTHBIAS)) + { + IDirect3DDevice9_Release(device); + skip("D3DPRASTERCAPS_DEPTHBIAS not supported.\n"); + goto done; + } + + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, FALSE); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_ZWRITEENABLE, FALSE); + ok(hr == D3D_OK, "IDirect3DDevice9_SetRenderState returned %08x\n", hr); + hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLOROP,D3DTOP_SELECTARG1); + ok(SUCCEEDED(hr), "Failed to set color op, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetTextureStageState(device, 0, D3DTSS_COLORARG1, D3DTA_TFACTOR); + ok(SUCCEEDED(hr), "Failed to set color arg, hr %#x.\n", hr); + hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ); + ok(SUCCEEDED(hr), "Failed to set FVF, hr %#x.\n", hr); + + for (i = 0; i < sizeof(formats) / sizeof(*formats); ++i) + { + if (FAILED(IDirect3D9_CheckDeviceFormat(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, + D3DFMT_X8R8G8B8, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, formats[i]))) + { + skip("Depth format %u not supported, skipping.\n", formats[i]); + continue; + } + + hr = IDirect3DDevice9_CreateDepthStencilSurface(device, 640, 480, formats[i], + D3DMULTISAMPLE_NONE, 0, FALSE, &ds, NULL); + hr = IDirect3DDevice9_SetDepthStencilSurface(device, ds); + ok(SUCCEEDED(hr), "Failed to set depth stencil surface, hr %#x.\n", hr); + hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0x00000000, 0.5f, 0); + ok(SUCCEEDED(hr), "Failed to clear %08x\n", hr); + + hr = IDirect3DDevice9_BeginScene(device); + ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr); + + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_TEXTUREFACTOR, 0x00ff0000); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + conv.f = -0.2f; + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_DEPTHBIAS, conv.d); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad)); + ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_TEXTUREFACTOR, 0x0000ff00); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + conv.f = 0.0f; + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_DEPTHBIAS, conv.d); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad)); + ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_TEXTUREFACTOR, 0x000000ff); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + conv.f = 0.2f; + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_DEPTHBIAS, conv.d); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad)); + ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_TEXTUREFACTOR, 0x00ffffff); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + conv.f = 0.4f; + hr = IDirect3DDevice9_SetRenderState(device, D3DRS_DEPTHBIAS, conv.d); + ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr); + hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(*quad)); + ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr); + + color = getPixelColor(device, 61, 240); + ok(color_match(color, 0x00ffffff, 1), "Got unexpected color %08x at x=62, format %u.\n", color, formats[i]); + color = getPixelColor(device, 65, 240); + + ok(color_match(color, 0x000000ff, 1), "Got unexpected color %08x at x=64, format %u.\n", color, formats[i]); + color = getPixelColor(device, 190, 240); + ok(color_match(color, 0x000000ff, 1), "Got unexpected color %08x at x=190, format %u.\n", color, formats[i]); + + color = getPixelColor(device, 194, 240); + ok(color_match(color, 0x0000ff00, 1), "Got unexpected color %08x at x=194, format %u.\n", color, formats[i]); + color = getPixelColor(device, 318, 240); + ok(color_match(color, 0x0000ff00, 1), "Got unexpected color %08x at x=318, format %u.\n", color, formats[i]); + + color = getPixelColor(device, 322, 240); + ok(color_match(color, 0x00ff0000, 1), "Got unexpected color %08x at x=322, format %u.\n", color, formats[i]); + color = getPixelColor(device, 446, 240); + ok(color_match(color, 0x00ff0000, 1), "Got unexpected color %08x at x=446, format %u.\n", color, formats[i]); + + color = getPixelColor(device, 450, 240); + ok(color_match(color, 0x00000000, 1), "Got unexpected color %08x at x=446, format %u.\n", color, formats[i]); + + hr = IDirect3DDevice9_EndScene(device); + ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr); + + hr = IDirect3DDevice9_Present(device, NULL, NULL, NULL, NULL); + ok(hr == D3D_OK, "IDirect3DDevice9_Present failed with %08x\n", hr); + IDirect3DSurface9_Release(ds); + } + + refcount = IDirect3DDevice9_Release(device); + ok(!refcount, "Device has %u references left.\n", refcount); + +done: + IDirect3D9_Release(d3d); + DestroyWindow(window); +} + START_TEST(visual) { D3DADAPTER_IDENTIFIER9 identifier; @@ -19741,4 +19904,5 @@ START_TEST(visual) test_texcoordindex(); test_vertex_blending(); test_updatetexture(); + test_depthbias(); }
1
0
0
0
← Newer
1
2
3
4
5
6
...
57
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Results per page:
10
25
50
100
200