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
March 2018
----- 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
785 discussions
Start a n
N
ew thread
Matteo Bruni : d3dx9: Cleanup D3DXVec3Unproject() implementation a bit.
by Alexandre Julliard
14 Mar '18
14 Mar '18
Module: wine Branch: master Commit: 6dc78d5c27b46c15bccc105f906ab6329ab38467 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=6dc78d5c27b46c15bccc105f…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Mar 14 19:53:19 2018 +0100 d3dx9: Cleanup D3DXVec3Unproject() implementation a bit. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/math.c | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/dlls/d3dx9_36/math.c b/dlls/d3dx9_36/math.c index 856e987..8909c3c 100644 --- a/dlls/d3dx9_36/math.c +++ b/dlls/d3dx9_36/math.c @@ -1987,27 +1987,33 @@ D3DXVECTOR3* WINAPI D3DXVec3TransformNormalArray(D3DXVECTOR3* out, UINT outstrid return out; } -D3DXVECTOR3* WINAPI D3DXVec3Unproject(D3DXVECTOR3 *pout, const D3DXVECTOR3 *pv, const D3DVIEWPORT9 *pviewport, const D3DXMATRIX *pprojection, const D3DXMATRIX *pview, const D3DXMATRIX *pworld) +D3DXVECTOR3 * WINAPI D3DXVec3Unproject(D3DXVECTOR3 *out, const D3DXVECTOR3 *v, + const D3DVIEWPORT9 *viewport, const D3DXMATRIX *projection, const D3DXMATRIX *view, + const D3DXMATRIX *world) { D3DXMATRIX m; - TRACE("pout %p, pv %p, pviewport %p, pprojection %p, pview %p, pworlds %p\n", pout, pv, pviewport, pprojection, pview, pworld); + TRACE("out %p, v %p, viewport %p, projection %p, view %p, world %p.\n", + out, v, viewport, projection, view, world); D3DXMatrixIdentity(&m); - if (pworld) D3DXMatrixMultiply(&m, &m, pworld); - if (pview) D3DXMatrixMultiply(&m, &m, pview); - if (pprojection) D3DXMatrixMultiply(&m, &m, pprojection); + if (world) + D3DXMatrixMultiply(&m, &m, world); + if (view) + D3DXMatrixMultiply(&m, &m, view); + if (projection) + D3DXMatrixMultiply(&m, &m, projection); D3DXMatrixInverse(&m, NULL, &m); - *pout = *pv; - if (pviewport) + *out = *v; + if (viewport) { - pout->x = 2.0f * ( pout->x - pviewport->X ) / pviewport->Width - 1.0f; - pout->y = 1.0f - 2.0f * ( pout->y - pviewport->Y ) / pviewport->Height; - pout->z = ( pout->z - pviewport->MinZ) / ( pviewport->MaxZ - pviewport->MinZ ); + out->x = 2.0f * (out->x - viewport->X) / viewport->Width - 1.0f; + out->y = 1.0f - 2.0f * (out->y - viewport->Y) / viewport->Height; + out->z = (out->z - viewport->MinZ) / (viewport->MaxZ - viewport->MinZ); } - D3DXVec3TransformCoord(pout, pout, &m); - return pout; + D3DXVec3TransformCoord(out, out, &m); + return out; } D3DXVECTOR3* WINAPI D3DXVec3UnprojectArray(D3DXVECTOR3* out, UINT outstride, const D3DXVECTOR3* in, UINT instride, const D3DVIEWPORT9* viewport, const D3DXMATRIX* projection, const D3DXMATRIX* view, const D3DXMATRIX* world, UINT elements)
1
0
0
0
Matteo Bruni : d3dx9: Skip AddRef + Release if SetValue is called with the old texture.
by Alexandre Julliard
14 Mar '18
14 Mar '18
Module: wine Branch: master Commit: 972dc565edaf7cff3173b146f340ffd817d0a018 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=972dc565edaf7cff3173b146…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Mar 14 19:53:18 2018 +0100 d3dx9: Skip AddRef + Release if SetValue is called with the old texture. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/effect.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index a98495e..7f54e25 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -1555,13 +1555,16 @@ static HRESULT d3dx9_base_effect_set_value(struct d3dx9_base_effect *base, case D3DXPT_TEXTURECUBE: for (i = 0; i < (param->element_count ? param->element_count : 1); ++i) { - IUnknown *unk = ((IUnknown **)data)[i]; - if (unk) - IUnknown_AddRef(unk); + IUnknown *old_texture = ((IUnknown **)param->data)[i]; + IUnknown *new_texture = ((IUnknown **)data)[i]; - unk = ((IUnknown **)param->data)[i]; - if (unk) - IUnknown_Release(unk); + if (new_texture == old_texture) + continue; + + if (new_texture) + IUnknown_AddRef(new_texture); + if (old_texture) + IUnknown_Release(old_texture); } /* fallthrough */ case D3DXPT_VOID:
1
0
0
0
David Adam : d3dx9: Improve vertices computation in D3DXCreatePolygon().
by Alexandre Julliard
14 Mar '18
14 Mar '18
Module: wine Branch: master Commit: 32ffef33339206195919023bcff112465478ad74 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=32ffef33339206195919023b…
Author: David Adam <david.adam.cnrs(a)gmail.com> Date: Wed Mar 14 19:53:17 2018 +0100 d3dx9: Improve vertices computation in D3DXCreatePolygon(). Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx9_36/mesh.c | 10 ++++++---- dlls/d3dx9_36/tests/mesh.c | 11 +++++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index fc23745..62acd21 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -4565,7 +4565,7 @@ HRESULT WINAPI D3DXCreatePolygon(struct IDirect3DDevice9 *device, float length, struct vertex *vertices; WORD (*faces)[3]; DWORD (*adjacency_buf)[3]; - float scale; + float angle, scale; unsigned int i; TRACE("device %p, length %f, sides %u, mesh %p, adjacency %p.\n", @@ -4593,7 +4593,9 @@ HRESULT WINAPI D3DXCreatePolygon(struct IDirect3DDevice9 *device, float length, return hr; } - scale = 0.5f * length / sinf(D3DX_PI / sides); + angle = D3DX_PI / sides; + scale = 0.5f * length / sinf(angle); + angle *= 2.0f; vertices[0].position.x = 0.0f; vertices[0].position.y = 0.0f; @@ -4604,8 +4606,8 @@ HRESULT WINAPI D3DXCreatePolygon(struct IDirect3DDevice9 *device, float length, for (i = 0; i < sides; ++i) { - vertices[i + 1].position.x = cosf(2.0f * D3DX_PI * i / sides) * scale; - vertices[i + 1].position.y = sinf(2.0f * D3DX_PI * i / sides) * scale; + vertices[i + 1].position.x = cosf(angle * i) * scale; + vertices[i + 1].position.y = sinf(angle * i) * scale; vertices[i + 1].position.z = 0.0f; vertices[i + 1].normal.x = 0.0f; vertices[i + 1].normal.y = 0.0f; diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index 82ae90e..8fd5938 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -2683,12 +2683,14 @@ static void D3DXCreateBoxTest(void) static BOOL compute_polygon(struct mesh *mesh, float length, unsigned int sides) { unsigned int i; - float scale; + float angle, scale; if (!new_mesh(mesh, sides + 1, sides)) return FALSE; - scale = 0.5f * length / sinf(D3DX_PI / sides); + angle = D3DX_PI / sides; + scale = 0.5f * length / sinf(angle); + angle *= 2.0f; mesh->vertices[0].position.x = 0.0f; mesh->vertices[0].position.y = 0.0f; @@ -2699,8 +2701,8 @@ static BOOL compute_polygon(struct mesh *mesh, float length, unsigned int sides) for (i = 0; i < sides; ++i) { - mesh->vertices[i + 1].position.x = cosf(2.0f * D3DX_PI * i / sides) * scale; - mesh->vertices[i + 1].position.y = sinf(2.0f * D3DX_PI * i / sides) * scale; + mesh->vertices[i + 1].position.x = cosf(angle * i) * scale; + mesh->vertices[i + 1].position.y = sinf(angle * i) * scale; mesh->vertices[i + 1].position.z = 0.0f; mesh->vertices[i + 1].normal.x = 0.0f; mesh->vertices[i + 1].normal.y = 0.0f; @@ -2807,6 +2809,7 @@ static void D3DXCreatePolygonTest(void) test_polygon(device, 10.0f, 5); test_polygon(device, 10.0f, 10); test_polygon(device, 20.0f, 10); + test_polygon(device, 20.0f, 32000); free_test_context(test_context); }
1
0
0
0
Matteo Bruni : d3dx11_42: Update spec file.
by Alexandre Julliard
14 Mar '18
14 Mar '18
Module: wine Branch: master Commit: 5865f87c3b51187369b2925770441bd3daf1938b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=5865f87c3b51187369b29257…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Wed Mar 14 19:53:16 2018 +0100 d3dx11_42: Update spec file. Signed-off-by: Matteo Bruni <mbruni(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/d3dx11_42/d3dx11_42.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/d3dx11_42/d3dx11_42.spec b/dlls/d3dx11_42/d3dx11_42.spec index eaec2fc..f05e02c 100644 --- a/dlls/d3dx11_42/d3dx11_42.spec +++ b/dlls/d3dx11_42/d3dx11_42.spec @@ -6,18 +6,18 @@ @ stub D3DX11CompileFromResourceW @ stub D3DX11ComputeNormalMap @ stub D3DX11CreateAsyncCompilerProcessor -@ stub D3DX11CreateAsyncFileLoaderA -@ stub D3DX11CreateAsyncFileLoaderW -@ stub D3DX11CreateAsyncMemoryLoader -@ stub D3DX11CreateAsyncResourceLoaderA -@ stub D3DX11CreateAsyncResourceLoaderW +@ stdcall D3DX11CreateAsyncFileLoaderA(str ptr) d3dx11_43.D3DX11CreateAsyncFileLoaderA +@ stdcall D3DX11CreateAsyncFileLoaderW(wstr ptr) d3dx11_43.D3DX11CreateAsyncFileLoaderW +@ stdcall D3DX11CreateAsyncMemoryLoader(ptr long ptr) d3dx11_43.D3DX11CreateAsyncMemoryLoader +@ stdcall D3DX11CreateAsyncResourceLoaderA(long str ptr) d3dx11_43.D3DX11CreateAsyncResourceLoaderA +@ stdcall D3DX11CreateAsyncResourceLoaderW(long wstr ptr) d3dx11_43.D3DX11CreateAsyncResourceLoaderW @ stub D3DX11CreateAsyncShaderPreprocessProcessor @ stub D3DX11CreateAsyncShaderResourceViewProcessor @ stub D3DX11CreateAsyncTextureInfoProcessor @ stub D3DX11CreateAsyncTextureProcessor @ stub D3DX11CreateShaderResourceViewFromFileA @ stub D3DX11CreateShaderResourceViewFromFileW -@ stub D3DX11CreateShaderResourceViewFromMemory(ptr ptr long ptr ptr ptr ptr) +@ stdcall D3DX11CreateShaderResourceViewFromMemory(ptr ptr long ptr ptr ptr ptr) d3dx11_43.D3DX11CreateShaderResourceViewFromMemory @ stub D3DX11CreateShaderResourceViewFromResourceA @ stub D3DX11CreateShaderResourceViewFromResourceW @ stub D3DX11CreateTextureFromFileA
1
0
0
0
Piotr Caban : ntdll: Change module load order so it matches InLoadOrderModuleList.
by Alexandre Julliard
14 Mar '18
14 Mar '18
Module: wine Branch: master Commit: 47da086af9d41ed96aa917c90f5cde5d7a3a2e36 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=47da086af9d41ed96aa917c9…
Author: Piotr Caban <piotr(a)codeweavers.com> Date: Wed Mar 14 14:47:25 2018 +0100 ntdll: Change module load order so it matches InLoadOrderModuleList. Signed-off-by: Piotr Caban <piotr(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ntdll/loader.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c index 7140645..fe5ce9d 100644 --- a/dlls/ntdll/loader.c +++ b/dlls/ntdll/loader.c @@ -89,6 +89,7 @@ typedef struct _wine_modref LDR_MODULE ldr; dev_t dev; ino_t ino; + int alloc_deps; int nDeps; struct _wine_modref **deps; } WINE_MODREF; @@ -483,15 +484,16 @@ static FARPROC find_forwarded_export( HMODULE module, const char *forward, LPCWS if (!imports_fixup_done && current_modref) { WINE_MODREF **deps; - if (current_modref->nDeps) + if (current_modref->alloc_deps) deps = RtlReAllocateHeap( GetProcessHeap(), 0, current_modref->deps, - (current_modref->nDeps + 1) * sizeof(*deps) ); + (current_modref->alloc_deps + 1) * sizeof(*deps) ); else deps = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(*deps) ); if (deps) { deps[current_modref->nDeps++] = wm; current_modref->deps = deps; + current_modref->alloc_deps++; } } else if (process_attach( wm, NULL ) != STATUS_SUCCESS) @@ -936,6 +938,7 @@ static NTSTATUS fixup_imports_ilonly( WINE_MODREF *wm, LPCWSTR load_path, void * wm->ldr.Flags &= ~LDR_DONT_RESOLVE_REFS; wm->nDeps = 1; + wm->alloc_deps = 1; wm->deps = RtlAllocateHeap( GetProcessHeap(), 0, sizeof(WINE_MODREF *) ); prev = current_modref; @@ -968,7 +971,7 @@ static NTSTATUS fixup_imports_ilonly( WINE_MODREF *wm, LPCWSTR load_path, void * */ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path ) { - int i, nb_imports; + int i, dep, nb_imports; const IMAGE_IMPORT_DESCRIPTOR *imports; WINE_MODREF *prev, *imp; DWORD size; @@ -993,7 +996,7 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path ) RtlActivateActivationContext( 0, wm->ldr.ActivationContext, &cookie ); /* Allocate module dependency list */ - wm->nDeps = nb_imports; + wm->alloc_deps = nb_imports; wm->deps = RtlAllocateHeap( GetProcessHeap(), 0, nb_imports*sizeof(WINE_MODREF *) ); /* load the imported modules. They are automatically @@ -1004,12 +1007,14 @@ static NTSTATUS fixup_imports( WINE_MODREF *wm, LPCWSTR load_path ) status = STATUS_SUCCESS; for (i = 0; i < nb_imports; i++) { + dep = wm->nDeps++; + if (!import_dll( wm->ldr.BaseAddress, &imports[i], load_path, &imp )) { imp = NULL; status = STATUS_DLL_NOT_FOUND; } - wm->deps[i] = imp; + wm->deps[dep] = imp; } current_modref = prev; if (wm->ldr.ActivationContext) RtlDeactivateActivationContext( 0, cookie );
1
0
0
0
Roderick Colenbrander : winevulkan: Implement remaining vkCommandBuffer functions.
by Alexandre Julliard
14 Mar '18
14 Mar '18
Module: wine Branch: master Commit: 77d9c1755427183b2275a55deb45ba01b674bcc1 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=77d9c1755427183b2275a55d…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Wed Mar 14 13:11:56 2018 +0100 winevulkan: Implement remaining vkCommandBuffer functions. Signed-off-by: Roderick Colenbrander <thunderbird2k(a)gmail.com> Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/make_vulkan | 2 +- dlls/winevulkan/vulkan_thunks.c | 392 +++++++++++++++++++++++++++++++++++----- dlls/winevulkan/vulkan_thunks.h | 103 +++++++++++ 3 files changed, 447 insertions(+), 50 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=77d9c1755427183b2275…
1
0
0
0
Roderick Colenbrander : winevulkan: Implement vkCmdExecuteCommands.
by Alexandre Julliard
14 Mar '18
14 Mar '18
Module: wine Branch: master Commit: 42b01b013398692b0d80146ffba16ff6cf547f0b URL:
https://source.winehq.org/git/wine.git/?a=commit;h=42b01b013398692b0d80146f…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Wed Mar 14 13:11:55 2018 +0100 winevulkan: Implement vkCmdExecuteCommands. Signed-off-by: Roderick Colenbrander <thunderbird2k(a)gmail.com> Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/make_vulkan | 1 + dlls/winevulkan/vulkan.c | 30 ++++++++++++++++++++++++++++++ dlls/winevulkan/vulkan_thunks.c | 5 ----- dlls/winevulkan/vulkan_thunks.h | 1 + 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 56b7778..cdcbfd6 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -112,6 +112,7 @@ FUNCTION_OVERRIDES = { # Device functions "vkAllocateCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : False}, + "vkCmdExecuteCommands" : {"dispatch" : True, "driver" : False, "thunk" : False}, "vkDestroyDevice" : {"dispatch" : True, "driver" : False, "thunk" : False}, "vkFreeCommandBuffers" : {"dispatch" : True, "driver" : False, "thunk" : False}, "vkGetDeviceProcAddr" : {"dispatch" : True, "driver" : True, "thunk" : False}, diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 94f302d..0a5a77d 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -435,6 +435,36 @@ VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device, return VK_SUCCESS; } +void WINAPI wine_vkCmdExecuteCommands(VkCommandBuffer buffer, uint32_t count, + const VkCommandBuffer *buffers) +{ + VkCommandBuffer *tmp_buffers; + unsigned int i; + + TRACE("%p %u %p\n", buffer, count, buffers); + + if (!buffers || !count) + return; + + /* Unfortunately we need a temporary buffer as our command buffers are wrapped. + * This call is called often and if a performance concern, we may want to use + * alloca as we shouldn't need much memory and it needs to be cleaned up after + * the call anyway. + */ + if (!(tmp_buffers = heap_alloc(count * sizeof(*tmp_buffers)))) + { + ERR("Failed to allocate memory for temporary command buffers\n"); + return; + } + + for (i = 0; i < count; i++) + tmp_buffers[i] = buffers[i]->command_buffer; + + buffer->device->funcs.p_vkCmdExecuteCommands(buffer->command_buffer, count, tmp_buffers); + + heap_free(tmp_buffers); +} + VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice phys_dev, const VkDeviceCreateInfo *create_info, const VkAllocationCallbacks *allocator, VkDevice *device) diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index 9c50612..43b4c33 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -715,11 +715,6 @@ static void WINAPI wine_vkCmdEndRenderPass(VkCommandBuffer commandBuffer) FIXME("stub: %p\n", commandBuffer); } -static void WINAPI wine_vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) -{ - FIXME("stub: %p, %u, %p\n", commandBuffer, commandBufferCount, pCommandBuffers); -} - static void WINAPI wine_vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) { FIXME("stub: %p, 0x%s, 0x%s, 0x%s, %u\n", commandBuffer, wine_dbgstr_longlong(dstBuffer), wine_dbgstr_longlong(dstOffset), wine_dbgstr_longlong(size), data); diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h index 188598b..187969e 100644 --- a/dlls/winevulkan/vulkan_thunks.h +++ b/dlls/winevulkan/vulkan_thunks.h @@ -17,6 +17,7 @@ BOOL wine_vk_device_extension_supported(const char *name) DECLSPEC_HIDDEN; /* Functions for which we have custom implementations outside of the thunks. */ VkResult WINAPI wine_vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t *pImageIndex) DECLSPEC_HIDDEN; VkResult WINAPI wine_vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo *pAllocateInfo, VkCommandBuffer *pCommandBuffers) DECLSPEC_HIDDEN; +void WINAPI wine_vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer *pCommandBuffers) DECLSPEC_HIDDEN; VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkDevice *pDevice) DECLSPEC_HIDDEN; VkResult WINAPI wine_vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSwapchainKHR *pSwapchain) DECLSPEC_HIDDEN; VkResult WINAPI wine_vkCreateWin32SurfaceKHR(VkInstance instance, const VkWin32SurfaceCreateInfoKHR *pCreateInfo, const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) DECLSPEC_HIDDEN;
1
0
0
0
Roderick Colenbrander : winevulkan: Implement vkAllocate/ FreeCommandBuffers.
by Alexandre Julliard
14 Mar '18
14 Mar '18
Module: wine Branch: master Commit: 9b22b6aa96b85ac1eb003d67a774cbf3eedef4f0 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9b22b6aa96b85ac1eb003d67…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Wed Mar 14 13:11:54 2018 +0100 winevulkan: Implement vkAllocate/FreeCommandBuffers. Signed-off-by: Roderick Colenbrander <thunderbird2k(a)gmail.com> Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/make_vulkan | 9 +---- dlls/winevulkan/vulkan.c | 79 ++++++++++++++++++++++++++++++++++++++++ dlls/winevulkan/vulkan_private.h | 7 ++++ dlls/winevulkan/vulkan_thunks.c | 22 +++++------ dlls/winevulkan/vulkan_thunks.h | 15 ++++++++ 5 files changed, 114 insertions(+), 18 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=9b22b6aa96b85ac1eb00…
1
0
0
0
Roderick Colenbrander : winevulkan: Implement various device functions.
by Alexandre Julliard
14 Mar '18
14 Mar '18
Module: wine Branch: master Commit: 2657bffeabd6ce62acfbe5b65a5e3dcd34f9f719 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=2657bffeabd6ce62acfbe5b6…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Wed Mar 14 13:11:53 2018 +0100 winevulkan: Implement various device functions. Signed-off-by: Roderick Colenbrander <thunderbird2k(a)gmail.com> Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/make_vulkan | 20 +- dlls/winevulkan/vulkan_thunks.c | 753 ++++++++++++++++++++++++++++++++++------ dlls/winevulkan/vulkan_thunks.h | 232 +++++++++++++ 3 files changed, 896 insertions(+), 109 deletions(-) Diff:
https://source.winehq.org/git/wine.git/?a=commitdiff;h=2657bffeabd6ce62acfb…
1
0
0
0
Roderick Colenbrander : winevulkan: Implement vkGetDeviceQueue.
by Alexandre Julliard
14 Mar '18
14 Mar '18
Module: wine Branch: master Commit: 9721ec92b9b7a764ce140e26560d7254ed3065b3 URL:
https://source.winehq.org/git/wine.git/?a=commit;h=9721ec92b9b7a764ce140e26…
Author: Roderick Colenbrander <thunderbird2k(a)gmail.com> Date: Wed Mar 14 13:11:52 2018 +0100 winevulkan: Implement vkGetDeviceQueue. Signed-off-by: Roderick Colenbrander <thunderbird2k(a)gmail.com> Signed-off-by: Józef Kucia <jkucia(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winevulkan/make_vulkan | 4 +- dlls/winevulkan/vulkan.c | 84 +++++++++++++++++++++++++++++++++++++++- dlls/winevulkan/vulkan_private.h | 11 ++++++ dlls/winevulkan/vulkan_thunks.c | 5 --- dlls/winevulkan/vulkan_thunks.h | 1 + 5 files changed, 95 insertions(+), 10 deletions(-) diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index b53203b..abcd425 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -113,6 +113,7 @@ FUNCTION_OVERRIDES = { # Device functions "vkDestroyDevice" : {"dispatch" : True, "driver" : False, "thunk" : False}, "vkGetDeviceProcAddr" : {"dispatch" : True, "driver" : True, "thunk" : False}, + "vkGetDeviceQueue" : {"dispatch": True, "driver" : False, "thunk" : False}, # VK_KHR_surface "vkDestroySurfaceKHR" : {"dispatch" : True, "driver" : True, "thunk" : False}, @@ -396,9 +397,6 @@ class VkFunction(object): if self.name == "vkCreateSwapchainKHR": return False - if self.params[0].type != "VkPhysicalDevice": - return True - if self.is_device_func(): return True diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c index 7b0fb37..e6873e8 100644 --- a/dlls/winevulkan/vulkan.c +++ b/dlls/winevulkan/vulkan.c @@ -52,6 +52,36 @@ static void wine_vk_physical_device_free(struct VkPhysicalDevice_T *phys_dev); static const struct vulkan_funcs *vk_funcs = NULL; +/* Helper function to create queues for a given family index. */ +static struct VkQueue_T *wine_vk_device_alloc_queues(struct VkDevice_T *device, + uint32_t family_index, uint32_t queue_count) +{ + struct VkQueue_T *queues; + unsigned int i; + + if (!(queues = heap_calloc(queue_count, sizeof(*queues)))) + { + ERR("Failed to allocate memory for queues\n"); + return NULL; + } + + for (i = 0; i < queue_count; i++) + { + struct VkQueue_T *queue = &queues[i]; + queue->device = device; + + /* The native device was already allocated with the required number of queues, + * so just fetch them from there. + */ + device->funcs.p_vkGetDeviceQueue(device->device, family_index, i, &queue->queue); + + /* Set special header for ICD loader. */ + ((struct wine_vk_base *)queue)->loader_magic = VULKAN_ICD_MAGIC_VALUE; + } + + return queues; +} + /* Helper function used for freeing a device structure. This function supports full * and partial object cleanups and can thus be used for vkCreateDevice failures. */ @@ -60,6 +90,17 @@ static void wine_vk_device_free(struct VkDevice_T *device) if (!device) return; + if (device->queues) + { + unsigned int i; + for (i = 0; i < device->max_queue_families; i++) + { + heap_free(device->queues[i]); + } + heap_free(device->queues); + device->queues = NULL; + } + if (device->device && device->funcs.p_vkDestroyDevice) { device->funcs.p_vkDestroyDevice(device->device, NULL /* pAllocator */); @@ -328,14 +369,14 @@ VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice phys_dev, const VkAllocationCallbacks *allocator, VkDevice *device) { struct VkDevice_T *object = NULL; + uint32_t max_queue_families; VkResult res; + unsigned int i; TRACE("%p %p %p %p\n", phys_dev, create_info, allocator, device); if (allocator) - { FIXME("Support for allocation callbacks not implemented yet\n"); - } object = heap_alloc_zero(sizeof(*object)); if (!object) @@ -367,6 +408,37 @@ VkResult WINAPI wine_vkCreateDevice(VkPhysicalDevice phys_dev, ALL_VK_DEVICE_FUNCS() #undef USE_VK_FUNC + /* We need to cache all queues within the device as each requires wrapping since queues are + * dispatchable objects. + */ + phys_dev->instance->funcs.p_vkGetPhysicalDeviceQueueFamilyProperties(phys_dev->phys_dev, + &max_queue_families, NULL); + object->max_queue_families = max_queue_families; + TRACE("Max queue families: %d\n", object->max_queue_families); + + object->queues = heap_calloc(max_queue_families, sizeof(*object->queues)); + if (!object->queues) + { + res = VK_ERROR_OUT_OF_HOST_MEMORY; + goto err; + } + + for (i = 0; i < create_info->queueCreateInfoCount; i++) + { + uint32_t family_index = create_info->pQueueCreateInfos[i].queueFamilyIndex; + uint32_t queue_count = create_info->pQueueCreateInfos[i].queueCount; + + TRACE("queueFamilyIndex %u, queueCount %u\n", family_index, queue_count); + + object->queues[family_index] = wine_vk_device_alloc_queues(object, family_index, queue_count); + if (!object->queues[family_index]) + { + res = VK_ERROR_OUT_OF_HOST_MEMORY; + ERR("Failed to allocate memory for queues\n"); + goto err; + } + } + *device = object; return VK_SUCCESS; @@ -660,6 +732,14 @@ PFN_vkVoidFunction WINAPI wine_vkGetDeviceProcAddr(VkDevice device, const char * return NULL; } +void WINAPI wine_vkGetDeviceQueue(VkDevice device, uint32_t family_index, + uint32_t queue_index, VkQueue *queue) +{ + TRACE("%p %u %u %p\n", device, family_index, queue_index, queue); + + *queue = &device->queues[family_index][queue_index]; +} + static PFN_vkVoidFunction WINAPI wine_vkGetInstanceProcAddr(VkInstance instance, const char *name) { void *func; diff --git a/dlls/winevulkan/vulkan_private.h b/dlls/winevulkan/vulkan_private.h index d49366f..203ad12 100644 --- a/dlls/winevulkan/vulkan_private.h +++ b/dlls/winevulkan/vulkan_private.h @@ -53,6 +53,10 @@ struct VkDevice_T struct wine_vk_base base; struct vulkan_device_funcs funcs; struct VkPhysicalDevice_T *phys_dev; /* parent */ + + uint32_t max_queue_families; + struct VkQueue_T **queues; + VkDevice device; /* native device */ }; @@ -81,4 +85,11 @@ struct VkPhysicalDevice_T VkPhysicalDevice phys_dev; /* native physical device */ }; +struct VkQueue_T +{ + struct wine_vk_base base; + VkDevice device; /* parent */ + VkQueue queue; /* native queue */ +}; + #endif /* __WINE_VULKAN_PRIVATE_H */ diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index dfda842..ba8b689 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -685,11 +685,6 @@ static void WINAPI wine_vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMem FIXME("stub: %p, 0x%s, %p\n", device, wine_dbgstr_longlong(memory), pCommittedMemoryInBytes); } -static void WINAPI wine_vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue) -{ - FIXME("stub: %p, %u, %u, %p\n", device, queueFamilyIndex, queueIndex, pQueue); -} - static VkResult WINAPI wine_vkGetEventStatus(VkDevice device, VkEvent event) { FIXME("stub: %p, 0x%s\n", device, wine_dbgstr_longlong(event)); diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h index 13c1228..7be86bf 100644 --- a/dlls/winevulkan/vulkan_thunks.h +++ b/dlls/winevulkan/vulkan_thunks.h @@ -26,6 +26,7 @@ void WINAPI wine_vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain VkResult WINAPI wine_vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char *pLayerName, uint32_t *pPropertyCount, VkExtensionProperties *pProperties) DECLSPEC_HIDDEN; VkResult WINAPI wine_vkEnumeratePhysicalDevices(VkInstance instance, uint32_t *pPhysicalDeviceCount, VkPhysicalDevice *pPhysicalDevices) DECLSPEC_HIDDEN; PFN_vkVoidFunction WINAPI wine_vkGetDeviceProcAddr(VkDevice device, const char *pName) DECLSPEC_HIDDEN; +void WINAPI wine_vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue) DECLSPEC_HIDDEN; VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities) DECLSPEC_HIDDEN; VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pSurfaceFormatCount, VkSurfaceFormatKHR *pSurfaceFormats) DECLSPEC_HIDDEN; VkResult WINAPI wine_vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pPresentModeCount, VkPresentModeKHR *pPresentModes) DECLSPEC_HIDDEN;
1
0
0
0
← Newer
1
...
42
43
44
45
46
47
48
...
79
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Results per page:
10
25
50
100
200