My apologies, but it seems that only such a convoluted shell script seems to achieve the correct results for different remotes:
http://wiki.winehq.org/GitWine#head-3fe70b8c0310e61d94ba30fe7edf19bd0630e1ef If anyone has a simpler solution, I can definitely update. Unfortunately, the more intuitive git format-patch -k --stdout HEAD~79..HEAD~78 > /tmp/patch.old does not seem to result in patches that can be properly applied onto a different (upstream) remote (see below). Thank you Misha p.s. For the curious I have attached both the patch.old generated using the command above, as well as the patch generated by: git format-patch -k -o out --branches --not --remotes=wine-git I have also attached relevant diff at the very bottom. Output of: diff /tmp/patch.old out/0001 Thank you --- mi...@misha-d630:~/src/wine-git$ git reset --hard origin HEAD is now at 15c6057 shlwapi: Implement StrStrNIW. mi...@misha-d630:~/src/wine-git$ git am /tmp/patch.old Applying: d3dx9: Add tests for D3DXCreateSphere vertex buffer description. error: patch failed: dlls/d3dx9_36/tests/mesh.c:489 error: dlls/d3dx9_36/tests/mesh.c: patch does not apply Patch failed at 0001 d3dx9: Add tests for D3DXCreateSphere vertex buffer description. When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". mi...@misha-d630:~/src/wine-git$
>From 03180708b36aab9efd566c8971da7b60924500bf Mon Sep 17 00:00:00 2001 From: Misha Koshelev <[email protected]> Date: Wed, 7 Jul 2010 09:59:52 -0500 Subject: d3dx9: Test number of vertices for D3DXCreateSphere, retrieve vertex buffer. To: wine-patches <[email protected]> Reply-To: wine-devel <[email protected]> --- dlls/d3dx9_36/tests/mesh.c | 22 ++++++++++++++++++++++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c index f3a629d..b747761 100644 --- a/dlls/d3dx9_36/tests/mesh.c +++ b/dlls/d3dx9_36/tests/mesh.c @@ -487,6 +487,9 @@ static void D3DXCreateSphereTest(void) IDirect3DDevice9* device; D3DPRESENT_PARAMETERS d3dpp; ID3DXMesh* sphere = NULL; + DWORD number_of_vertices; + IDirect3DVertexBuffer9* vertex_buffer = NULL; + BYTE* vertex_data = NULL; hr = D3DXCreateSphere(NULL, 0.0f, 0, 0, NULL, NULL); todo_wine ok( hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL); @@ -533,7 +536,26 @@ static void D3DXCreateSphereTest(void) todo_wine ok( hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n",hr); if (sphere) + { + number_of_vertices = sphere->lpVtbl->GetNumVertices(sphere); + todo_wine ok( number_of_vertices == 4, "Got result %u, expected 4\n",number_of_vertices); + + hr = sphere->lpVtbl->GetVertexBuffer(sphere, &vertex_buffer); + todo_wine ok( hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n",hr); + + if (vertex_buffer) + { + /* Specify offset and size to avoid potential overruns */ + hr = IDirect3DVertexBuffer9_Lock(vertex_buffer, 0, number_of_vertices * sizeof(D3DXVECTOR3) * 2, (LPVOID *)&vertex_data, D3DLOCK_DISCARD); + todo_wine ok( hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n",hr); + + IDirect3DVertexBuffer9_Unlock(vertex_buffer); + + IDirect3DVertexBuffer9_Release(vertex_buffer); + } + sphere->lpVtbl->Release(sphere); + } IDirect3DDevice9_Release(device); IDirect3D9_Release(d3d); -- 1.7.1
patch.old
Description: application/trash
1c1
< From bd8d73a0e398db2f9fed27de0a657e31e18d86b1 Mon Sep 17 00:00:00 2001
---
> From 03180708b36aab9efd566c8971da7b60924500bf Mon Sep 17 00:00:00 2001
4c4
< Subject: d3dx9: Add tests for D3DXCreateSphere vertex buffer description.
---
> Subject: d3dx9: Test number of vertices for D3DXCreateSphere, retrieve vertex
> buffer.
9,10c9,10
< dlls/d3dx9_36/tests/mesh.c | 18 +++++++++++++++++-
< 1 files changed, 17 insertions(+), 1 deletions(-)
---
> dlls/d3dx9_36/tests/mesh.c | 22 ++++++++++++++++++++++
> 1 files changed, 22 insertions(+), 0 deletions(-)
13c13
< index b747761..32ad124 100644
---
> index f3a629d..b747761 100644
16c16,18
< @@ -489,7 +489,9 @@ static void D3DXCreateSphereTest(void)
---
> @@ -487,6 +487,9 @@ static void D3DXCreateSphereTest(void)
> IDirect3DDevice9* device;
> D3DPRESENT_PARAMETERS d3dpp;
18,23c20,22
< DWORD number_of_vertices;
< IDirect3DVertexBuffer9* vertex_buffer = NULL;
< - BYTE* vertex_data = NULL;
< + D3DVERTEXBUFFER_DESC vertex_buffer_description;
< + D3DXVECTOR3* vertex_data = NULL;
< + int expected;
---
> + DWORD number_of_vertices;
> + IDirect3DVertexBuffer9* vertex_buffer = NULL;
> + BYTE* vertex_data = NULL;
27c26,27
< @@ -545,6 +547,20 @@ static void D3DXCreateSphereTest(void)
---
> @@ -533,7 +536,26 @@ static void D3DXCreateSphereTest(void)
> todo_wine ok( hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n",hr);
29,31c29,40
< if (vertex_buffer)
< {
< + hr = IDirect3DVertexBuffer9_GetDesc(vertex_buffer,
&vertex_buffer_description);
---
> if (sphere)
> + {
> + number_of_vertices = sphere->lpVtbl->GetNumVertices(sphere);
> + todo_wine ok( number_of_vertices == 4, "Got result %u, expected
> 4\n",number_of_vertices);
> +
> + hr = sphere->lpVtbl->GetVertexBuffer(sphere, &vertex_buffer);
> + todo_wine ok( hr == D3D_OK, "Got result %x, expected 0
> (D3D_OK)\n",hr);
> +
> + if (vertex_buffer)
> + {
> + /* Specify offset and size to avoid potential overruns */
> + hr = IDirect3DVertexBuffer9_Lock(vertex_buffer, 0,
> number_of_vertices * sizeof(D3DXVECTOR3) * 2, (LPVOID *)&vertex_data,
> D3DLOCK_DISCARD);
34,43c43
< + if (hr == D3D_OK)
< + {
< + todo_wine ok( vertex_buffer_description.Format ==
D3DFMT_VERTEXDATA, "Got result %x, expected %x
(D3DFMT_VERTEXDATA)\n",vertex_buffer_description.Format,D3DFMT_VERTEXDATA);
< + todo_wine ok( vertex_buffer_description.Type ==
D3DRTYPE_VERTEXBUFFER, "Got result %x, expected %x
(D3DRTYPE_VERTEXBUFFER)\n",vertex_buffer_description.Type,D3DRTYPE_VERTEXBUFFER);
< + todo_wine ok( vertex_buffer_description.Usage == 0, "Got
result %x, expected %x\n",vertex_buffer_description.Usage,0);
< + todo_wine ok( vertex_buffer_description.Pool ==
D3DPOOL_MANAGED, "Got result %x, expected %x
(D3DPOOL_DEFAULT)\n",vertex_buffer_description.Pool,D3DPOOL_DEFAULT);
< + expected = number_of_vertices * sizeof(D3DXVECTOR3) * 2;
< + todo_wine ok( vertex_buffer_description.Size == expected,
"Got result %x, expected %x\n",vertex_buffer_description.Size,expected);
< + todo_wine ok( vertex_buffer_description.FVF == (D3DFVF_XYZ |
D3DFVF_NORMAL), "Got result %x, expected %x (D3DFVF_XYZ |
D3DFVF_NORMAL)\n",vertex_buffer_description.FVF,D3DFVF_XYZ | D3DFVF_NORMAL);
< + }
---
> + IDirect3DVertexBuffer9_Unlock(vertex_buffer);
45,47c45,52
< /* Specify offset and size to avoid potential overruns */
< hr = IDirect3DVertexBuffer9_Lock(vertex_buffer, 0,
number_of_vertices * sizeof(D3DXVECTOR3) * 2, (LPVOID *)&vertex_data,
D3DLOCK_DISCARD);
< todo_wine ok( hr == D3D_OK, "Got result %x, expected 0
(D3D_OK)\n",hr);
---
> + IDirect3DVertexBuffer9_Release(vertex_buffer);
> + }
> +
> sphere->lpVtbl->Release(sphere);
> + }
>
> IDirect3DDevice9_Release(device);
> IDirect3D9_Release(d3d);
