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
August 2014
----- 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
304 discussions
Start a n
N
ew thread
Matteo Bruni : d3dx9: Correctly handle out of memory conditions while reallocating children array.
by Alexandre Julliard
26 Aug '14
26 Aug '14
Module: wine Branch: master Commit: 78e02675abfcf1dc71344f16f8bb88990139de2d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=78e02675abfcf1dc71344f16f…
Author: Matteo Bruni <matteo.mystral(a)gmail.com> Date: Tue Aug 26 18:07:17 2014 +0200 d3dx9: Correctly handle out of memory conditions while reallocating children array. --- dlls/d3dx9_36/xfile.c | 75 ++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 60 insertions(+), 15 deletions(-) diff --git a/dlls/d3dx9_36/xfile.c b/dlls/d3dx9_36/xfile.c index f5f3bae..7386ec9 100644 --- a/dlls/d3dx9_36/xfile.c +++ b/dlls/d3dx9_36/xfile.c @@ -298,6 +298,7 @@ static HRESULT d3dx9_file_data_create(IDirectXFileObject *dxfile_object, ID3DXFi { struct d3dx9_file_data *object; IDirectXFileObject *data_object; + unsigned int children_array_size = 0; HRESULT ret; TRACE("dxfile_object %p, ret_iface %p.\n", dxfile_object, ret_iface); @@ -338,14 +339,27 @@ static HRESULT d3dx9_file_data_create(IDirectXFileObject *dxfile_object, ID3DXFi while (SUCCEEDED(ret = IDirectXFileData_GetNextObject(object->dxfile_data, &data_object))) { - if (object->children) - object->children = HeapReAlloc(GetProcessHeap(), 0, object->children, sizeof(ID3DXFileData*) * (object->nb_children + 1)); - else - object->children = HeapAlloc(GetProcessHeap(), 0, sizeof(ID3DXFileData*)); - if (!object->children) + if (object->nb_children >= children_array_size) { - ret = E_OUTOFMEMORY; - break; + ID3DXFileData **new_children; + + if (object->children) + { + children_array_size *= 2; + new_children = HeapReAlloc(GetProcessHeap(), 0, object->children, + sizeof(*object->children) * children_array_size); + } + else + { + children_array_size = 4; + new_children = HeapAlloc(GetProcessHeap(), 0, sizeof(*object->children) * children_array_size); + } + if (!new_children) + { + ret = E_OUTOFMEMORY; + break; + } + object->children = new_children; } ret = d3dx9_file_data_create(data_object, &object->children[object->nb_children]); IUnknown_Release(data_object); @@ -353,12 +367,20 @@ static HRESULT d3dx9_file_data_create(IDirectXFileObject *dxfile_object, ID3DXFi break; object->nb_children++; } - if (ret != DXFILEERR_NOMOREOBJECTS) { (&object->ID3DXFileData_iface)->lpVtbl->Release(&object->ID3DXFileData_iface); return ret; } + if (object->children) + { + ID3DXFileData **new_children; + + new_children = HeapReAlloc(GetProcessHeap(), 0, object->children, + sizeof(*object->children) * object->nb_children); + if (new_children) + object->children = new_children; + } TRACE("Found %u children\n", object->nb_children); @@ -537,6 +559,7 @@ static HRESULT WINAPI d3dx9_file_CreateEnumObject(ID3DXFile *iface, const void * DXFILELOADRESOURCE dxfile_resource; DXFILELOADMEMORY dxfile_memory; IDirectXFileData *data_object; + unsigned children_array_size = 0; HRESULT ret; TRACE("iface %p, source %p, options %#x, enum_object %p.\n", iface, source, options, enum_object); @@ -594,14 +617,27 @@ static HRESULT WINAPI d3dx9_file_CreateEnumObject(ID3DXFile *iface, const void * /* Fill enum object with top level data objects */ while (SUCCEEDED(ret = IDirectXFileEnumObject_GetNextDataObject(dxfile_enum_object, &data_object))) { - if (object->children) - object->children = HeapReAlloc(GetProcessHeap(), 0, object->children, sizeof(*object->children) * (object->nb_children + 1)); - else - object->children = HeapAlloc(GetProcessHeap(), 0, sizeof(*object->children)); - if (!object->children) + if (object->nb_children >= children_array_size) { - ret = E_OUTOFMEMORY; - break; + ID3DXFileData **new_children; + + if (object->children) + { + children_array_size *= 2; + new_children = HeapReAlloc(GetProcessHeap(), 0, object->children, + sizeof(*object->children) * children_array_size); + } + else + { + children_array_size = 4; + new_children = HeapAlloc(GetProcessHeap(), 0, sizeof(*object->children) * children_array_size); + } + if (!new_children) + { + ret = E_OUTOFMEMORY; + break; + } + object->children = new_children; } ret = d3dx9_file_data_create((IDirectXFileObject*)data_object, &object->children[object->nb_children]); @@ -610,6 +646,15 @@ static HRESULT WINAPI d3dx9_file_CreateEnumObject(ID3DXFile *iface, const void * break; object->nb_children++; } + if (object->children) + { + ID3DXFileData **new_children; + + new_children = HeapReAlloc(GetProcessHeap(), 0, object->children, + sizeof(*object->children) * object->nb_children); + if (new_children) + object->children = new_children; + } IDirectXFileEnumObject_Release(dxfile_enum_object);
1
0
0
0
Matteo Bruni : d3dx9: Remove stray hunk.
by Alexandre Julliard
26 Aug '14
26 Aug '14
Module: wine Branch: master Commit: bd4fcdbde542506e2172997172ddbd0529041570 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bd4fcdbde542506e217299717…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Aug 26 16:13:08 2014 +0200 d3dx9: Remove stray hunk. --- dlls/d3dx9_36/mesh.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index 1046ff9..aecb45d 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -3294,9 +3294,6 @@ static HRESULT parse_mesh(ID3DXFileData *filedata, struct mesh_data *mesh_data, hr = parse_vertex_colors(child, mesh_data); } else if (IsEqualGUID(&type, &TID_D3DRMMeshTextureCoords)) { hr = parse_texture_coords(child, mesh_data); - hr = filedata->lpVtbl->GetChild(filedata, i, &child); - if (FAILED(hr)) - goto end; } else if (IsEqualGUID(&type, &TID_D3DRMMeshMaterialList) && (provide_flags & PROVIDE_MATERIALS)) {
1
0
0
0
Matteo Bruni : d3dx9: Release child mesh objects (Valgrind).
by Alexandre Julliard
26 Aug '14
26 Aug '14
Module: wine Branch: master Commit: 7c2c242b2eccd49df09eddb12e23b77f01034ff1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7c2c242b2eccd49df09eddb12…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Aug 26 16:13:07 2014 +0200 d3dx9: Release child mesh objects (Valgrind). --- dlls/d3dx9_36/mesh.c | 51 +++++++++++++++++++++++++++++++++++++++------------ dlls/d3dx9_36/xfile.c | 12 +++++++++--- 2 files changed, 48 insertions(+), 15 deletions(-) diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c index dfaf722..1046ff9 100644 --- a/dlls/d3dx9_36/mesh.c +++ b/dlls/d3dx9_36/mesh.c @@ -2751,16 +2751,20 @@ static HRESULT parse_material(ID3DXFileData *filedata, D3DXMATERIAL *material) return hr; hr = child->lpVtbl->GetType(child, &type); if (FAILED(hr)) - return hr; + goto err; if (IsEqualGUID(&type, &TID_D3DRMTextureFilename)) { hr = parse_texture_filename(child, &material->pTextureFilename); if (FAILED(hr)) - return hr; + goto err; } + IUnknown_Release(child); } - return D3D_OK; + +err: + IUnknown_Release(child); + return hr; } static void destroy_materials(struct mesh_data *mesh) @@ -2781,7 +2785,7 @@ static HRESULT parse_material_list(ID3DXFileData *filedata, struct mesh_data *me SIZE_T data_size; const DWORD *data, *in_ptr; GUID type; - ID3DXFileData *child; + ID3DXFileData *child = NULL; DWORD num_materials; DWORD i; SIZE_T nb_children; @@ -2864,6 +2868,9 @@ static HRESULT parse_material_list(ID3DXFileData *filedata, struct mesh_data *me if (FAILED(hr)) goto end; } + + IUnknown_Release(child); + child = NULL; } if (num_materials != mesh->num_materials) { WARN("only %u of %u materials defined\n", num_materials, mesh->num_materials); @@ -2871,6 +2878,8 @@ static HRESULT parse_material_list(ID3DXFileData *filedata, struct mesh_data *me } end: + if (child) + IUnknown_Release(child); filedata->lpVtbl->Unlock(filedata); return hr; } @@ -3168,7 +3177,7 @@ static HRESULT parse_mesh(ID3DXFileData *filedata, struct mesh_data *mesh_data, const BYTE *data, *in_ptr; DWORD *index_out_ptr; GUID type; - ID3DXFileData *child; + ID3DXFileData *child = NULL; DWORD i; SIZE_T nb_children; DWORD nb_skin_weigths_info = 0; @@ -3316,6 +3325,9 @@ static HRESULT parse_mesh(ID3DXFileData *filedata, struct mesh_data *mesh_data, } if (FAILED(hr)) goto end; + + IUnknown_Release(child); + child = NULL; } if (mesh_data->skin_info && (nb_skin_weigths_info != mesh_data->nb_bones)) { @@ -3328,6 +3340,8 @@ static HRESULT parse_mesh(ID3DXFileData *filedata, struct mesh_data *mesh_data, hr = D3D_OK; end: + if (child) + IUnknown_Release(child); filedata->lpVtbl->Unlock(filedata); return hr; } @@ -3856,7 +3870,7 @@ static HRESULT load_frame(struct ID3DXFileData *filedata, DWORD options, struct return hr; hr = child->lpVtbl->GetType(child, &type); if (FAILED(hr)) - return hr; + goto err; if (IsEqualGUID(&type, &TID_D3DRMMesh)) { hr = load_mesh_container(child, options, device, alloc_hier, next_container); @@ -3870,10 +3884,15 @@ static HRESULT load_frame(struct ID3DXFileData *filedata, DWORD options, struct next_child = &(*next_child)->pFrameSibling; } if (FAILED(hr)) - return hr; - } + goto err; + IUnknown_Release(child); + } return D3D_OK; + +err: + IUnknown_Release(child); + return hr; } HRESULT WINAPI D3DXLoadMeshHierarchyFromXInMemory(const void *memory, DWORD memory_size, DWORD options, @@ -4139,12 +4158,15 @@ static HRESULT parse_frame(struct ID3DXFileData *filedata, DWORD options, struct return hr; hr = child->lpVtbl->GetType(child, &type); if (FAILED(hr)) - return hr; + goto err; if (IsEqualGUID(&type, &TID_D3DRMMesh)) { struct mesh_container *container = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*container)); if (!container) - return E_OUTOFMEMORY; + { + hr = E_OUTOFMEMORY; + goto err; + } list_add_tail(container_list, &container->entry); container->transform = transform; @@ -4160,10 +4182,15 @@ static HRESULT parse_frame(struct ID3DXFileData *filedata, DWORD options, struct hr = parse_frame(child, options, device, &transform, container_list, provide_flags); } if (FAILED(hr)) - return hr; - } + goto err; + IUnknown_Release(child); + } return D3D_OK; + +err: + IUnknown_Release(child); + return hr; } HRESULT WINAPI D3DXLoadMeshFromXInMemory(const void *memory, DWORD memory_size, DWORD options, diff --git a/dlls/d3dx9_36/xfile.c b/dlls/d3dx9_36/xfile.c index 84e480c..f5f3bae 100644 --- a/dlls/d3dx9_36/xfile.c +++ b/dlls/d3dx9_36/xfile.c @@ -19,6 +19,7 @@ #include "wine/debug.h" +#define COBJMACROS #include "d3dx9.h" #include "d3dx9xof.h" #undef MAKE_DDHRESULT @@ -319,6 +320,7 @@ static HRESULT d3dx9_file_data_create(IDirectXFileObject *dxfile_object, ID3DXFi if (SUCCEEDED(ret)) { ret = IDirectXFileDataReference_Resolve(reference, &object->dxfile_data); + IUnknown_Release(reference); if (FAILED(ret)) { HeapFree(GetProcessHeap(), 0, object); @@ -345,7 +347,9 @@ static HRESULT d3dx9_file_data_create(IDirectXFileObject *dxfile_object, ID3DXFi ret = E_OUTOFMEMORY; break; } - if (FAILED(ret = d3dx9_file_data_create(data_object, &object->children[object->nb_children]))) + ret = d3dx9_file_data_create(data_object, &object->children[object->nb_children]); + IUnknown_Release(data_object); + if (FAILED(ret)) break; object->nb_children++; } @@ -599,8 +603,10 @@ static HRESULT WINAPI d3dx9_file_CreateEnumObject(ID3DXFile *iface, const void * ret = E_OUTOFMEMORY; break; } - if (FAILED(ret = d3dx9_file_data_create((IDirectXFileObject*)data_object, - &object->children[object->nb_children]))) + ret = d3dx9_file_data_create((IDirectXFileObject*)data_object, + &object->children[object->nb_children]); + IUnknown_Release(data_object); + if (FAILED(ret)) break; object->nb_children++; }
1
0
0
0
Matteo Bruni : d3dcompiler: Free the relative addressing data of destination registers (Valgrind).
by Alexandre Julliard
26 Aug '14
26 Aug '14
Module: wine Branch: master Commit: aa167f92d7b1204e8ffda07b21cddc59ddb2e095 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=aa167f92d7b1204e8ffda07b2…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Aug 26 16:13:06 2014 +0200 d3dcompiler: Free the relative addressing data of destination registers (Valgrind). --- dlls/d3dcompiler_43/bytecodewriter.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/d3dcompiler_43/bytecodewriter.c b/dlls/d3dcompiler_43/bytecodewriter.c index 17289d2..46187f9 100644 --- a/dlls/d3dcompiler_43/bytecodewriter.c +++ b/dlls/d3dcompiler_43/bytecodewriter.c @@ -2622,6 +2622,7 @@ void SlDeleteShader(struct bwriter_shader *shader) { d3dcompiler_free(shader->instr[i]->src[j].rel_reg); } d3dcompiler_free(shader->instr[i]->src); + d3dcompiler_free(shader->instr[i]->dst.rel_reg); d3dcompiler_free(shader->instr[i]); } d3dcompiler_free(shader->instr);
1
0
0
0
Matteo Bruni : d3dcompiler/tests: Free the Direct3D9 object (Valgrind).
by Alexandre Julliard
26 Aug '14
26 Aug '14
Module: wine Branch: master Commit: e404d1ed86530302fd350ff7d6302e798b75505d URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e404d1ed86530302fd350ff7d…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Tue Aug 26 16:13:05 2014 +0200 d3dcompiler/tests: Free the Direct3D9 object (Valgrind). --- dlls/d3dcompiler_43/tests/hlsl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dlls/d3dcompiler_43/tests/hlsl.c b/dlls/d3dcompiler_43/tests/hlsl.c index 7a04762..856a09c 100644 --- a/dlls/d3dcompiler_43/tests/hlsl.c +++ b/dlls/d3dcompiler_43/tests/hlsl.c @@ -97,6 +97,7 @@ static IDirect3DDevice9 *init_d3d9(IDirect3DVertexDeclaration9 **vdeclaration, if (FAILED(hr)) { skip("A32B32G32R32F format not available on this device\n"); + IDirect3D9_Release(d3d9_ptr); return NULL; } @@ -107,6 +108,7 @@ static IDirect3DDevice9 *init_d3d9(IDirect3DVertexDeclaration9 **vdeclaration, hr = IDirect3D9_CreateDevice(d3d9_ptr, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, NULL, D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device_ptr); + IDirect3D9_Release(d3d9_ptr); if (FAILED(hr)) { skip("could not create Direct3D9 device\n");
1
0
0
0
Stefan Dösinger : wined3d: Initialize the map binding in resource_init.
by Alexandre Julliard
26 Aug '14
26 Aug '14
Module: wine Branch: master Commit: ee0ac3663bdfd1c59a6fbec4b604509fade55b11 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=ee0ac3663bdfd1c59a6fbec4b…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Tue Aug 26 10:35:48 2014 +0200 wined3d: Initialize the map binding in resource_init. --- dlls/wined3d/resource.c | 1 + dlls/wined3d/surface.c | 1 - dlls/wined3d/volume.c | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c index 4247cd7..772ce10 100644 --- a/dlls/wined3d/resource.c +++ b/dlls/wined3d/resource.c @@ -110,6 +110,7 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device * resource->parent = parent; resource->parent_ops = parent_ops; resource->resource_ops = resource_ops; + resource->map_binding = WINED3D_LOCATION_SYSMEM; if (size) { diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c index 69ec1a1..04ef3f0 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c @@ -6006,7 +6006,6 @@ static HRESULT surface_init(struct wined3d_surface *surface, struct wined3d_text if (lockable || desc->format == WINED3DFMT_D16_LOCKABLE) surface->resource.access_flags |= WINED3D_RESOURCE_ACCESS_CPU; - surface->resource.map_binding = WINED3D_LOCATION_SYSMEM; surface->texture_target = target; surface->texture_level = level; surface->texture_layer = layer; diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index f98ea68..17ac554 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -824,7 +824,6 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture volume->texture_level = level; volume->locations = WINED3D_LOCATION_DISCARDED; - volume->resource.map_binding = WINED3D_LOCATION_SYSMEM; if (desc->pool == WINED3D_POOL_DEFAULT && desc->usage & WINED3DUSAGE_DYNAMIC && gl_info->supported[ARB_PIXEL_BUFFER_OBJECT]
1
0
0
0
Stefan Dösinger : wined3d: Move volume flags to volume.c.
by Alexandre Julliard
26 Aug '14
26 Aug '14
Module: wine Branch: master Commit: b52214a2888a7e4b9372dfae55387b70ab8575cd URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b52214a2888a7e4b9372dfae5…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Tue Aug 26 10:35:47 2014 +0200 wined3d: Move volume flags to volume.c. --- dlls/wined3d/volume.c | 4 ++++ dlls/wined3d/wined3d_private.h | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index 4618b7b..f98ea68 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -27,6 +27,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d_surface); WINE_DECLARE_DEBUG_CHANNEL(d3d_perf); +#define WINED3D_VFLAG_ALLOCATED 0x00000001 +#define WINED3D_VFLAG_SRGB_ALLOCATED 0x00000002 +#define WINED3D_VFLAG_CLIENT_STORAGE 0x00000004 + static BOOL volume_prepare_system_memory(struct wined3d_volume *volume) { if (volume->resource.heap_memory) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 77f7b13..e99a7b4 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2170,10 +2170,6 @@ void wined3d_texture_set_dirty(struct wined3d_texture *texture) DECLSPEC_HIDDEN; void wined3d_texture_set_swapchain(struct wined3d_texture *texture, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; -#define WINED3D_VFLAG_ALLOCATED 0x00000001 -#define WINED3D_VFLAG_SRGB_ALLOCATED 0x00000002 -#define WINED3D_VFLAG_CLIENT_STORAGE 0x00000004 - #define WINED3D_LOCATION_DISCARDED 0x00000001 #define WINED3D_LOCATION_SYSMEM 0x00000002 #define WINED3D_LOCATION_USER_MEMORY 0x00000004
1
0
0
0
Stefan Dösinger : wined3d: Replace VFLAG_PBO with resource->map_binding.
by Alexandre Julliard
26 Aug '14
26 Aug '14
Module: wine Branch: master Commit: 7a1533a41cd1ab94e1a60574543d9c8910a8de93 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=7a1533a41cd1ab94e1a605745…
Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Tue Aug 26 10:35:46 2014 +0200 wined3d: Replace VFLAG_PBO with resource->map_binding. --- dlls/wined3d/volume.c | 15 ++++++--------- dlls/wined3d/wined3d_private.h | 3 +-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c index b8dab3e..4618b7b 100644 --- a/dlls/wined3d/volume.c +++ b/dlls/wined3d/volume.c @@ -364,7 +364,7 @@ static void wined3d_volume_load_location(struct wined3d_volume *volume, break; case WINED3D_LOCATION_BUFFER: - if (!volume->pbo || !(volume->flags & WINED3D_VFLAG_PBO)) + if (!volume->pbo) ERR("Trying to load WINED3D_LOCATION_BUFFER without setting it up first.\n"); if (volume->locations & WINED3D_LOCATION_DISCARDED) @@ -627,7 +627,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, flags = wined3d_resource_sanitize_map_flags(&volume->resource, flags); - if (volume->flags & WINED3D_VFLAG_PBO) + if (volume->resource.map_binding == WINED3D_LOCATION_BUFFER) { context = context_acquire(device, NULL); gl_info = context->gl_info; @@ -723,11 +723,7 @@ HRESULT CDECL wined3d_volume_map(struct wined3d_volume *volume, if (!(flags & (WINED3D_MAP_NO_DIRTY_UPDATE | WINED3D_MAP_READONLY))) { wined3d_texture_set_dirty(volume->container); - - if (volume->flags & WINED3D_VFLAG_PBO) - wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_BUFFER); - else - wined3d_volume_invalidate_location(volume, ~WINED3D_LOCATION_SYSMEM); + wined3d_volume_invalidate_location(volume, ~volume->resource.map_binding); } volume->resource.map_count++; @@ -753,7 +749,7 @@ HRESULT CDECL wined3d_volume_unmap(struct wined3d_volume *volume) return WINED3DERR_INVALIDCALL; } - if (volume->flags & WINED3D_VFLAG_PBO) + if (volume->resource.map_binding == WINED3D_LOCATION_BUFFER) { struct wined3d_device *device = volume->resource.device; struct wined3d_context *context = context_acquire(device, NULL); @@ -824,13 +820,14 @@ static HRESULT volume_init(struct wined3d_volume *volume, struct wined3d_texture volume->texture_level = level; volume->locations = WINED3D_LOCATION_DISCARDED; + volume->resource.map_binding = WINED3D_LOCATION_SYSMEM; if (desc->pool == WINED3D_POOL_DEFAULT && desc->usage & WINED3DUSAGE_DYNAMIC && gl_info->supported[ARB_PIXEL_BUFFER_OBJECT] && !format->convert) { wined3d_resource_free_sysmem(&volume->resource); - volume->flags |= WINED3D_VFLAG_PBO; + volume->resource.map_binding = WINED3D_LOCATION_BUFFER; } volume->container = container; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index c87aa1d..77f7b13 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -2172,8 +2172,7 @@ void wined3d_texture_set_swapchain(struct wined3d_texture *texture, #define WINED3D_VFLAG_ALLOCATED 0x00000001 #define WINED3D_VFLAG_SRGB_ALLOCATED 0x00000002 -#define WINED3D_VFLAG_PBO 0x00000004 -#define WINED3D_VFLAG_CLIENT_STORAGE 0x00000008 +#define WINED3D_VFLAG_CLIENT_STORAGE 0x00000004 #define WINED3D_LOCATION_DISCARDED 0x00000001 #define WINED3D_LOCATION_SYSMEM 0x00000002
1
0
0
0
Jeremy Newman : update google analytics api
by Jeremy Newman
26 Aug '14
26 Aug '14
Module: website Branch: master Commit: 53a170b86c4568b40db3a5e23e2ac788964977bf URL:
http://source.winehq.org/git/website.git/?a=commit;h=53a170b86c4568b40db3a5…
Author: Jeremy Newman <jnewman(a)codeweavers.com> Date: Tue Aug 26 13:50:43 2014 -0500 update google analytics api --- templates/en/global/google_analytics.template | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/templates/en/global/google_analytics.template b/templates/en/global/google_analytics.template index bd6624a..9b55ba3 100644 --- a/templates/en/global/google_analytics.template +++ b/templates/en/global/google_analytics.template @@ -1,10 +1,8 @@ - <script type="text/javascript"> - var _gaq = _gaq || []; - _gaq.push(['_setAccount', '{$gcode}']); - _gaq.push(['_trackPageview']); - (function(){ - var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; - ga.src = ('https:' == document.location.protocol ? '
https://ssl
' : '
http://www
') + '.google-analytics.com/ga.js'; - var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); - })(); + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + ga('create', '{$gcode}', 'auto'); + ga('send', 'pageview'); </script>
1
0
0
0
Matteo Bruni : d3dx9/tests: Create the asm shader test files under the temporary files directory.
by Alexandre Julliard
25 Aug '14
25 Aug '14
Module: wine Branch: master Commit: c87901d3f8cebfb7d28b42718c1c78035730d6ce URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c87901d3f8cebfb7d28b42718…
Author: Matteo Bruni <mbruni(a)codeweavers.com> Date: Mon Aug 25 20:36:54 2014 +0200 d3dx9/tests: Create the asm shader test files under the temporary files directory. --- dlls/d3dx9_36/tests/asm.c | 127 ++++++++++++++++++++++++++++++---------------- 1 file changed, 84 insertions(+), 43 deletions(-) diff --git a/dlls/d3dx9_36/tests/asm.c b/dlls/d3dx9_36/tests/asm.c index 3ee501e..4087bd8 100644 --- a/dlls/d3dx9_36/tests/asm.c +++ b/dlls/d3dx9_36/tests/asm.c @@ -24,22 +24,61 @@ #include "resources.h" -static HRESULT create_file(const char *filename, const char *data, const unsigned int size) +static char temp_path[MAX_PATH]; + +static BOOL create_file(const char *filename, const char *data, const unsigned int size, char *out_path) { - DWORD received; + DWORD written; HANDLE hfile; + char path[MAX_PATH]; + + if (!*temp_path) + GetTempPathA(sizeof(temp_path), temp_path); - hfile = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); - if(hfile == INVALID_HANDLE_VALUE) return HRESULT_FROM_WIN32(GetLastError()); + strcpy(path, temp_path); + strcat(path, filename); + hfile = CreateFileA(path, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); + if (hfile == INVALID_HANDLE_VALUE) + return FALSE; - if(WriteFile(hfile, data, size, &received, NULL)) + if (WriteFile(hfile, data, size, &written, NULL)) { CloseHandle(hfile); - return D3D_OK; + + if (out_path) + strcpy(out_path, path); + return TRUE; } CloseHandle(hfile); - return D3DERR_INVALIDCALL; + return FALSE; +} + +static void delete_file(const char *filename) +{ + char path[MAX_PATH]; + + strcpy(path, temp_path); + strcat(path, filename); + DeleteFileA(path); +} + +static BOOL create_directory(const char *name) +{ + char path[MAX_PATH]; + + strcpy(path, temp_path); + strcat(path, name); + return CreateDirectoryA(path, NULL); +} + +static void delete_directory(const char *name) +{ + char path[MAX_PATH]; + + strcpy(path, temp_path); + strcat(path, name); + RemoveDirectoryA(path); } static HRESULT WINAPI testD3DXInclude_open(ID3DXInclude *iface, D3DXINCLUDE_TYPE include_type, @@ -155,7 +194,7 @@ static void assembleshader_test(void) } }; struct D3DXIncludeImpl include; - HRESULT shader_vsh_res; + 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 */ @@ -242,14 +281,14 @@ static void assembleshader_test(void) if (shader) ID3DXBuffer_Release(shader); - shader_vsh_res = create_file("shader.vsh", testshader, sizeof(testshader) - 1); - if(SUCCEEDED(shader_vsh_res)) { - create_file("incl.vsh", testincl, sizeof(testincl) - 1); + if (create_file("shader.vsh", testshader, sizeof(testshader) - 1, shader_vsh_path)) + { + create_file("incl.vsh", testincl, sizeof(testincl) - 1, NULL); /* D3DXAssembleShaderFromFile + #include test */ shader = NULL; messages = NULL; - hr = D3DXAssembleShaderFromFileA("shader.vsh", + hr = D3DXAssembleShaderFromFileA(shader_vsh_path, NULL, NULL, D3DXSHADER_SKIPVALIDATION, &shader, &messages); ok(hr == D3D_OK, "D3DXAssembleShaderFromFile test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); @@ -271,16 +310,17 @@ static void assembleshader_test(void) } if(shader) ID3DXBuffer_Release(shader); - create_file("shader3.vsh", testshader3, sizeof(testshader3) - 1); - create_file("incl4.vsh", testincl4_wrong, sizeof(testincl4_wrong) - 1); - if(CreateDirectoryA("include", NULL)) { - create_file("include/incl3.vsh", testincl3, sizeof(testincl3) - 1); - create_file("include/incl4.vsh", testincl4_ok, sizeof(testincl4_ok) - 1); + create_file("shader3.vsh", testshader3, sizeof(testshader3) - 1, shader3_vsh_path); + create_file("incl4.vsh", testincl4_wrong, sizeof(testincl4_wrong) - 1, NULL); + if (create_directory("include")) + { + create_file("include\\incl3.vsh", testincl3, sizeof(testincl3) - 1, NULL); + create_file("include\\incl4.vsh", testincl4_ok, sizeof(testincl4_ok) - 1, NULL); /* path search #include test */ shader = NULL; messages = NULL; - hr = D3DXAssembleShaderFromFileA("shader3.vsh", NULL, NULL, + hr = D3DXAssembleShaderFromFileA(shader3_vsh_path, NULL, NULL, D3DXSHADER_SKIPVALIDATION, &shader, &messages); ok(hr == D3D_OK, "D3DXAssembleShaderFromFile path search test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); @@ -291,13 +331,13 @@ static void assembleshader_test(void) if(shader) ID3DXBuffer_Release(shader); } else skip("Couldn't create \"include\" directory\n"); - DeleteFileA("shader.vsh"); - DeleteFileA("incl.vsh"); - DeleteFileA("shader3.vsh"); - DeleteFileA("incl4.vsh"); - DeleteFileA("include/incl3.vsh"); - DeleteFileA("include/incl4.vsh"); - RemoveDirectoryA("include"); + delete_file("shader.vsh"); + delete_file("incl.vsh"); + delete_file("shader3.vsh"); + delete_file("incl4.vsh"); + delete_file("include\\incl3.vsh"); + delete_file("include\\incl4.vsh"); + delete_directory("include"); /* The main shader is also to be loaded through the ID3DXInclude object. */ shader = NULL; @@ -403,23 +443,24 @@ static void d3dxpreprocess_test(void) "#error \"wrong include\"\n"; HRESULT hr; ID3DXBuffer *shader, *messages; - HRESULT shader_vsh_res; + 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}; - shader_vsh_res = create_file("shader.vsh", testshader, sizeof(testshader) - 1); - if(SUCCEEDED(shader_vsh_res)) { - create_file("incl.vsh", testincl, sizeof(testincl) - 1); - create_file("shader3.vsh", testshader3, sizeof(testshader3) - 1); - create_file("incl4.vsh", testincl4_wrong, sizeof(testincl4_wrong) - 1); - if(CreateDirectoryA("include", NULL)) { - create_file("include/incl3.vsh", testincl3, sizeof(testincl3) - 1); - create_file("include/incl4.vsh", testincl4_ok, sizeof(testincl4_ok) - 1); + if (create_file("shader.vsh", testshader, sizeof(testshader) - 1, shader_vsh_path)) + { + create_file("incl.vsh", testincl, sizeof(testincl) - 1, NULL); + create_file("shader3.vsh", testshader3, sizeof(testshader3) - 1, shader3_vsh_path); + create_file("incl4.vsh", testincl4_wrong, sizeof(testincl4_wrong) - 1, NULL); + if (create_directory("include")) + { + create_file("include\\incl3.vsh", testincl3, sizeof(testincl3) - 1, NULL); + create_file("include\\incl4.vsh", testincl4_ok, sizeof(testincl4_ok) - 1, NULL); /* path search #include test */ shader = NULL; messages = NULL; - hr = D3DXPreprocessShaderFromFileA("shader3.vsh", NULL, NULL, + hr = D3DXPreprocessShaderFromFileA(shader3_vsh_path, NULL, NULL, &shader, &messages); ok(hr == D3D_OK, "D3DXPreprocessShaderFromFile path search test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); if(messages) { @@ -432,7 +473,7 @@ static void d3dxpreprocess_test(void) /* D3DXPreprocessShaderFromFile + #include test */ shader = NULL; messages = NULL; - hr = D3DXPreprocessShaderFromFileA("shader.vsh", + hr = D3DXPreprocessShaderFromFileA(shader_vsh_path, NULL, NULL, &shader, &messages); ok(hr == D3D_OK, "D3DXPreprocessShaderFromFile test failed with error 0x%x - %d\n", hr, hr & 0x0000FFFF); @@ -454,13 +495,13 @@ static void d3dxpreprocess_test(void) } if(shader) ID3DXBuffer_Release(shader); - DeleteFileA("shader.vsh"); - DeleteFileA("incl.vsh"); - DeleteFileA("shader3.vsh"); - DeleteFileA("incl4.vsh"); - DeleteFileA("include/incl3.vsh"); - DeleteFileA("include/incl4.vsh"); - RemoveDirectoryA("include"); + delete_file("shader.vsh"); + delete_file("incl.vsh"); + delete_file("shader3.vsh"); + delete_file("incl4.vsh"); + delete_file("include\\incl3.vsh"); + delete_file("include\\incl4.vsh"); + delete_directory("include"); /* The main shader is also to be loaded through the ID3DXInclude object. */ shader = NULL;
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
31
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
Results per page:
10
25
50
100
200