mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
d3dx9_36-CreatePolygon: Update to latest version submitted to winehq (minor style fixes).
This commit is contained in:
parent
5eae92bf33
commit
c9da32b6b0
@ -324,6 +324,7 @@ configure-Detect_Gnutls.ok:
|
||||
d3dx9_36-CreatePolygon.ok:
|
||||
$(call APPLY_FILE,d3dx9_36-CreatePolygon/0001-d3dx9_36-Implement-D3DXCreatePolygon.patch)
|
||||
$(call APPLY_FILE,d3dx9_36-CreatePolygon/0002-d3dx9_36-tests-Add-tests-for-D3DXCreatePolygon.patch)
|
||||
$(call APPLY_FILE,d3dx9_36-CreatePolygon/0003-d3dx9_36-tests-Remove-code-to-skip-test-which-should.patch)
|
||||
@( \
|
||||
echo '+ { "d3dx9_36-CreatePolygon", "Sebastian Lackner", "Implement D3DXCreatePolygon. [rev 2]" },'; \
|
||||
) > d3dx9_36-CreatePolygon.ok
|
||||
|
@ -1,6 +1,6 @@
|
||||
From 09aaa5716d86ecab330f01957995864a683a98c9 Mon Sep 17 00:00:00 2001
|
||||
From cf5a7cd6802fead3d3ee0cdfdaed33354996f20b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 31 Oct 2014 09:43:40 +0100
|
||||
Date: Wed, 5 Nov 2014 18:47:34 +0100
|
||||
Subject: d3dx9_36: Implement D3DXCreatePolygon.
|
||||
|
||||
Based on a patch by David Adam.
|
||||
@ -24,7 +24,7 @@ index 4c72dc2..13f0d99 100644
|
||||
@ stub D3DXCreatePRTBufferTex(long long long long ptr)
|
||||
@ stub D3DXCreatePRTCompBuffer(long long long ptr ptr ptr ptr)
|
||||
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
|
||||
index aecb45d..fe2899a 100644
|
||||
index aecb45d..9aece61 100644
|
||||
--- a/dlls/d3dx9_36/mesh.c
|
||||
+++ b/dlls/d3dx9_36/mesh.c
|
||||
@@ -4555,6 +4555,94 @@ struct vertex
|
||||
@ -107,7 +107,7 @@ index aecb45d..fe2899a 100644
|
||||
+ for (i = 0; i < sides; ++i)
|
||||
+ {
|
||||
+ adjacency_buf[i][0] = i - 1;
|
||||
+ adjacency_buf[i][1] = ~0;
|
||||
+ adjacency_buf[i][1] = ~0U;
|
||||
+ adjacency_buf[i][2] = i + 1;
|
||||
+ }
|
||||
+ adjacency_buf[0][0] = sides - 1;
|
||||
|
@ -1,18 +1,18 @@
|
||||
From 093ae53bc51d4a75a510a6bf52e88d96eda486a7 Mon Sep 17 00:00:00 2001
|
||||
From 8091900e66124aa43666e063da2a09b5d5624687 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 31 Oct 2014 10:56:42 +0100
|
||||
Date: Wed, 5 Nov 2014 18:47:37 +0100
|
||||
Subject: d3dx9_36/tests: Add tests for D3DXCreatePolygon.
|
||||
|
||||
Based on a patch by David Adam.
|
||||
---
|
||||
dlls/d3dx9_36/tests/mesh.c | 163 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 163 insertions(+)
|
||||
dlls/d3dx9_36/tests/mesh.c | 155 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 155 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
|
||||
index 17c5d9c..66faf4a 100644
|
||||
index 17c5d9c..2a617f5 100644
|
||||
--- a/dlls/d3dx9_36/tests/mesh.c
|
||||
+++ b/dlls/d3dx9_36/tests/mesh.c
|
||||
@@ -2600,6 +2600,168 @@ end:
|
||||
@@ -2600,6 +2600,160 @@ end:
|
||||
DestroyWindow(wnd);
|
||||
}
|
||||
|
||||
@ -57,13 +57,13 @@ index 17c5d9c..66faf4a 100644
|
||||
+ HRESULT hr;
|
||||
+ ID3DXMesh *polygon;
|
||||
+ struct mesh mesh;
|
||||
+ char name[256];
|
||||
+ char name[64];
|
||||
+
|
||||
+ hr = D3DXCreatePolygon(device, length, sides, &polygon, NULL);
|
||||
+ ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
|
||||
+ if (hr != D3D_OK)
|
||||
+ {
|
||||
+ skip("Couldn't create box\n");
|
||||
+ skip("Couldn't create polygon\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
@ -145,12 +145,6 @@ index 17c5d9c..66faf4a 100644
|
||||
+ hr = D3DXCreatePolygon(device, 3.0f, 11, &polygon, &adjacency);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, received %#x\n", hr);
|
||||
+
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ skip("D3DXCreatePolygon failed\n");
|
||||
+ goto end;
|
||||
+ }
|
||||
+
|
||||
+ buffer_size = ID3DXBuffer_GetBufferSize(adjacency);
|
||||
+ ok(buffer_size == 33 * sizeof(DWORD), "Wrong adjacency buffer size %u\n", buffer_size);
|
||||
+
|
||||
@ -158,11 +152,12 @@ index 17c5d9c..66faf4a 100644
|
||||
+ for (i = 0; i < 11; ++i)
|
||||
+ {
|
||||
+ ok(buffer[i][0] == (i + 10) % 11, "Wrong adjacency[%d][0] = %u\n", i, buffer[i][0]);
|
||||
+ ok(buffer[i][1] == ~0, "Wrong adjacency[%d][1] = %u\n", i, buffer[i][1]);
|
||||
+ ok(buffer[i][1] == ~0U, "Wrong adjacency[%d][1] = %u\n", i, buffer[i][1]);
|
||||
+ ok(buffer[i][2] == (i + 1) % 11, "Wrong adjacency[%d][2] = %u\n", i, buffer[i][2]);
|
||||
+ }
|
||||
+
|
||||
+ polygon->lpVtbl->Release(polygon);
|
||||
+ ID3DXBuffer_Release(adjacency);
|
||||
+
|
||||
+ test_polygon(device, 2.0f, 3);
|
||||
+ test_polygon(device, 10.0f, 3);
|
||||
@ -170,18 +165,15 @@ index 17c5d9c..66faf4a 100644
|
||||
+ test_polygon(device, 10.0f, 10);
|
||||
+ test_polygon(device, 20.0f, 10);
|
||||
+
|
||||
+end:
|
||||
+ IDirect3DDevice9_Release(device);
|
||||
+ IDirect3D9_Release(d3d);
|
||||
+ if (adjacency)
|
||||
+ ID3DXBuffer_Release(adjacency);
|
||||
+ DestroyWindow(wnd);
|
||||
+}
|
||||
+
|
||||
struct sincos_table
|
||||
{
|
||||
float *sin;
|
||||
@@ -10458,6 +10620,7 @@ START_TEST(mesh)
|
||||
@@ -10458,6 +10612,7 @@ START_TEST(mesh)
|
||||
D3DXCreateMeshFVFTest();
|
||||
D3DXLoadMeshTest();
|
||||
D3DXCreateBoxTest();
|
||||
|
@ -0,0 +1,42 @@
|
||||
From 6444421b8793005293d4c8af51a6f7f287719598 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 5 Nov 2014 18:54:02 +0100
|
||||
Subject: d3dx9_36/tests: Remove code to skip test which should never fail.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/tests/mesh.c | 9 +--------
|
||||
1 file changed, 1 insertion(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
|
||||
index 2a617f5..870f62a 100644
|
||||
--- a/dlls/d3dx9_36/tests/mesh.c
|
||||
+++ b/dlls/d3dx9_36/tests/mesh.c
|
||||
@@ -2579,24 +2579,17 @@ static void D3DXCreateBoxTest(void)
|
||||
hr = D3DXCreateBox(device,10.9f,20.0f,4.9f,&box, &ppBuffer);
|
||||
ok(hr==D3D_OK, "Expected D3D_OK, received %#x\n", hr);
|
||||
|
||||
- if (FAILED(hr))
|
||||
- {
|
||||
- skip("D3DXCreateBox failed\n");
|
||||
- goto end;
|
||||
- }
|
||||
-
|
||||
buffer = ID3DXBuffer_GetBufferPointer(ppBuffer);
|
||||
for(i=0; i<36; i++)
|
||||
ok(adjacency[i]==buffer[i], "expected adjacency %d: %#x, received %#x\n",i,adjacency[i], buffer[i]);
|
||||
|
||||
box->lpVtbl->Release(box);
|
||||
+ ID3DXBuffer_Release(ppBuffer);
|
||||
|
||||
test_box(device, 10.9f, 20.0f, 4.9f);
|
||||
|
||||
-end:
|
||||
IDirect3DDevice9_Release(device);
|
||||
IDirect3D9_Release(d3d);
|
||||
- if (ppBuffer) ID3DXBuffer_Release(ppBuffer);
|
||||
DestroyWindow(wnd);
|
||||
}
|
||||
|
||||
--
|
||||
2.1.3
|
||||
|
Loading…
Reference in New Issue
Block a user