mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Removed patches for D3DXCreatePolygon (accepted upstream), rebased imm32-Cross_Thread_Access patches.
This commit is contained in:
parent
4b062e3f22
commit
7641fa58b9
@ -107,7 +107,7 @@ Included bug fixes and improvements
|
||||
* Send WM_PAINT event during dialog creation ([Wine Bug #35652](https://bugs.winehq.org/show_bug.cgi?id=35652))
|
||||
* Support for AllocateAndGetTcpExTableFromStack ([Wine Bug #34372](https://bugs.winehq.org/show_bug.cgi?id=34372))
|
||||
* Support for BindImageEx ([Wine Bug #3591](https://bugs.winehq.org/show_bug.cgi?id=3591))
|
||||
* Support for D3DXCreatePolygon ([Wine Bug #13632](https://bugs.winehq.org/show_bug.cgi?id=13632))
|
||||
* ~~Support for D3DXCreatePolygon~~ ([Wine Bug #13632](https://bugs.winehq.org/show_bug.cgi?id=13632))
|
||||
* Support for D3DXGetShaderInputSemantics ([Wine Bug #22682](https://bugs.winehq.org/show_bug.cgi?id=22682))
|
||||
* Support for DOS hidden/system file attributes ([Wine Bug #9158](https://bugs.winehq.org/show_bug.cgi?id=9158))
|
||||
* Support for Dynamic DST (daylight saving time) information in registry
|
||||
|
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -26,6 +26,7 @@ wine-compholio (1.7.31) UNRELEASED; urgency=low
|
||||
* Removed patch to update properties when applying MSI transforms (fixed upstream).
|
||||
* Removed patch to silence repeated GSUB_apply_ChainContext[Subst|Pos] FIXMEs (accepted upstream).
|
||||
* Removed patch with additional tests for MsgWaitForMultipleObjectsEx (accepted upstream).
|
||||
* Removed patches for D3DXCreatePolygon (accepted upstream).
|
||||
* Partially removed patches for UTF-7 tests (accepted upstream).
|
||||
-- Sebastian Lackner <sebastian@fds-team.de> Mon, 03 Nov 2014 20:10:04 +0100
|
||||
|
||||
|
@ -27,7 +27,6 @@ PATCHLIST := \
|
||||
comctl32-LoadIconMetric.ok \
|
||||
configure-Absolute_RPATH.ok \
|
||||
configure-Detect_Gnutls.ok \
|
||||
d3dx9_36-CreatePolygon.ok \
|
||||
d3dx9_36-DXTn.ok \
|
||||
d3dx9_36-Filter_Warnings.ok \
|
||||
d3dx9_36-GetShaderSemantics.ok \
|
||||
@ -327,26 +326,6 @@ configure-Detect_Gnutls.ok:
|
||||
echo '+ { "configure-Detect_Gnutls", "Sebastian Lackner", "Fix detection of gnutls on Ubuntu 14.10. [rev 3]" },'; \
|
||||
) > configure-Detect_Gnutls.ok
|
||||
|
||||
# Patchset d3dx9_36-CreatePolygon
|
||||
# |
|
||||
# | Included patches:
|
||||
# | * Implement D3DXCreatePolygon. [rev 2, by Sebastian Lackner]
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#13632] Support for D3DXCreatePolygon
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3dx9_36/d3dx9_36.spec, dlls/d3dx9_36/mesh.c, dlls/d3dx9_36/tests/mesh.c, include/d3dx9shape.h
|
||||
# |
|
||||
.INTERMEDIATE: d3dx9_36-CreatePolygon.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
|
||||
|
||||
# Patchset d3dx9_36-DXTn
|
||||
# |
|
||||
# | Included patches:
|
||||
|
@ -1,140 +0,0 @@
|
||||
From cf5a7cd6802fead3d3ee0cdfdaed33354996f20b Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Wed, 5 Nov 2014 18:47:34 +0100
|
||||
Subject: d3dx9_36: Implement D3DXCreatePolygon.
|
||||
|
||||
Based on a patch by David Adam.
|
||||
---
|
||||
dlls/d3dx9_36/d3dx9_36.spec | 2 +-
|
||||
dlls/d3dx9_36/mesh.c | 88 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
include/d3dx9shape.h | 2 ++
|
||||
3 files changed, 91 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/d3dx9_36.spec b/dlls/d3dx9_36/d3dx9_36.spec
|
||||
index 4c72dc2..13f0d99 100644
|
||||
--- a/dlls/d3dx9_36/d3dx9_36.spec
|
||||
+++ b/dlls/d3dx9_36/d3dx9_36.spec
|
||||
@@ -76,7 +76,7 @@
|
||||
@ stub D3DXCreateNPatchMesh(ptr ptr)
|
||||
@ stub D3DXCreatePMeshFromStream(ptr long ptr ptr ptr ptr ptr)
|
||||
@ stub D3DXCreatePatchMesh(ptr long long long ptr ptr ptr)
|
||||
-@ stub D3DXCreatePolygon(ptr long long ptr ptr)
|
||||
+@ stdcall D3DXCreatePolygon(ptr float long ptr ptr)
|
||||
@ stub D3DXCreatePRTBuffer(long long long ptr)
|
||||
@ 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..9aece61 100644
|
||||
--- a/dlls/d3dx9_36/mesh.c
|
||||
+++ b/dlls/d3dx9_36/mesh.c
|
||||
@@ -4555,6 +4555,94 @@ struct vertex
|
||||
D3DXVECTOR3 normal;
|
||||
};
|
||||
|
||||
+HRESULT WINAPI D3DXCreatePolygon(struct IDirect3DDevice9 *device, float length, UINT sides,
|
||||
+ struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ ID3DXMesh *polygon;
|
||||
+ struct vertex *vertices;
|
||||
+ WORD (*faces)[3];
|
||||
+ DWORD (*adjacency_buf)[3];
|
||||
+ float scale;
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ TRACE("device %p, length %f, sides %u, mesh %p, adjacency %p.\n",
|
||||
+ device, length, sides, mesh, adjacency);
|
||||
+
|
||||
+ if (!device || length < 0.0f || sides < 3 || !mesh)
|
||||
+ return D3DERR_INVALIDCALL;
|
||||
+
|
||||
+ if (FAILED(hr = D3DXCreateMeshFVF(sides, sides + 1, D3DXMESH_MANAGED,
|
||||
+ D3DFVF_XYZ | D3DFVF_NORMAL, device, &polygon)))
|
||||
+ {
|
||||
+ return hr;
|
||||
+ }
|
||||
+
|
||||
+ if (FAILED(hr = polygon->lpVtbl->LockVertexBuffer(polygon, 0, (void **)&vertices)))
|
||||
+ {
|
||||
+ polygon->lpVtbl->Release(polygon);
|
||||
+ return hr;
|
||||
+ }
|
||||
+
|
||||
+ if (FAILED(hr = polygon->lpVtbl->LockIndexBuffer(polygon, 0, (void **)&faces)))
|
||||
+ {
|
||||
+ polygon->lpVtbl->UnlockVertexBuffer(polygon);
|
||||
+ polygon->lpVtbl->Release(polygon);
|
||||
+ return hr;
|
||||
+ }
|
||||
+
|
||||
+ scale = 0.5f * length / sinf(D3DX_PI / sides);
|
||||
+
|
||||
+ vertices[0].position.x = 0.0f;
|
||||
+ vertices[0].position.y = 0.0f;
|
||||
+ vertices[0].position.z = 0.0f;
|
||||
+ vertices[0].normal.x = 0.0f;
|
||||
+ vertices[0].normal.y = 0.0f;
|
||||
+ vertices[0].normal.z = 1.0f;
|
||||
+
|
||||
+ 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.z = 0.0f;
|
||||
+ vertices[i + 1].normal.x = 0.0f;
|
||||
+ vertices[i + 1].normal.y = 0.0f;
|
||||
+ vertices[i + 1].normal.z = 1.0f;
|
||||
+
|
||||
+ faces[i][0] = 0;
|
||||
+ faces[i][1] = i + 1;
|
||||
+ faces[i][2] = i + 2;
|
||||
+ }
|
||||
+
|
||||
+ faces[sides - 1][2] = 1;
|
||||
+
|
||||
+ polygon->lpVtbl->UnlockVertexBuffer(polygon);
|
||||
+ polygon->lpVtbl->UnlockIndexBuffer(polygon);
|
||||
+
|
||||
+ if (adjacency)
|
||||
+ {
|
||||
+ if (FAILED(hr = D3DXCreateBuffer(sides * sizeof(DWORD) * 3, adjacency)))
|
||||
+ {
|
||||
+ polygon->lpVtbl->Release(polygon);
|
||||
+ return hr;
|
||||
+ }
|
||||
+
|
||||
+ adjacency_buf = ID3DXBuffer_GetBufferPointer(*adjacency);
|
||||
+ for (i = 0; i < sides; ++i)
|
||||
+ {
|
||||
+ adjacency_buf[i][0] = i - 1;
|
||||
+ adjacency_buf[i][1] = ~0U;
|
||||
+ adjacency_buf[i][2] = i + 1;
|
||||
+ }
|
||||
+ adjacency_buf[0][0] = sides - 1;
|
||||
+ adjacency_buf[sides - 1][2] = 0;
|
||||
+ }
|
||||
+
|
||||
+ *mesh = polygon;
|
||||
+
|
||||
+ return D3D_OK;
|
||||
+}
|
||||
+
|
||||
HRESULT WINAPI D3DXCreateBox(struct IDirect3DDevice9 *device, float width, float height,
|
||||
float depth, struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency)
|
||||
{
|
||||
diff --git a/include/d3dx9shape.h b/include/d3dx9shape.h
|
||||
index 0d24032..af49bb4 100644
|
||||
--- a/include/d3dx9shape.h
|
||||
+++ b/include/d3dx9shape.h
|
||||
@@ -29,6 +29,8 @@ HRESULT WINAPI D3DXCreateBox(struct IDirect3DDevice9 *device, float width, float
|
||||
float depth, struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency);
|
||||
HRESULT WINAPI D3DXCreateCylinder(struct IDirect3DDevice9 *device, float radius1, float radius2,
|
||||
float length, UINT slices, UINT stacks, struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency);
|
||||
+HRESULT WINAPI D3DXCreatePolygon(struct IDirect3DDevice9 *device, float length, UINT sides, struct ID3DXMesh **mesh,
|
||||
+ ID3DXBuffer **adjacency);
|
||||
HRESULT WINAPI D3DXCreateSphere(struct IDirect3DDevice9 *device, float radius, UINT slices,
|
||||
UINT stacks, struct ID3DXMesh **mesh, struct ID3DXBuffer **adjacency);
|
||||
HRESULT WINAPI D3DXCreateTeapot(struct IDirect3DDevice9 *device,
|
||||
--
|
||||
2.1.3
|
||||
|
@ -1,186 +0,0 @@
|
||||
From 8091900e66124aa43666e063da2a09b5d5624687 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
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 | 155 +++++++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 155 insertions(+)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
|
||||
index 17c5d9c..2a617f5 100644
|
||||
--- a/dlls/d3dx9_36/tests/mesh.c
|
||||
+++ b/dlls/d3dx9_36/tests/mesh.c
|
||||
@@ -2600,6 +2600,160 @@ end:
|
||||
DestroyWindow(wnd);
|
||||
}
|
||||
|
||||
+static BOOL compute_polygon(struct mesh *mesh, float length, unsigned int sides)
|
||||
+{
|
||||
+ unsigned int i;
|
||||
+ float scale;
|
||||
+
|
||||
+ if (!new_mesh(mesh, sides + 1, sides))
|
||||
+ return FALSE;
|
||||
+
|
||||
+ scale = 0.5f * length / sinf(D3DX_PI / sides);
|
||||
+
|
||||
+ mesh->vertices[0].position.x = 0.0f;
|
||||
+ mesh->vertices[0].position.y = 0.0f;
|
||||
+ mesh->vertices[0].position.z = 0.0f;
|
||||
+ mesh->vertices[0].normal.x = 0.0f;
|
||||
+ mesh->vertices[0].normal.y = 0.0f;
|
||||
+ mesh->vertices[0].normal.z = 1.0f;
|
||||
+
|
||||
+ 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.z = 0.0f;
|
||||
+ mesh->vertices[i + 1].normal.x = 0.0f;
|
||||
+ mesh->vertices[i + 1].normal.y = 0.0f;
|
||||
+ mesh->vertices[i + 1].normal.z = 1.0f;
|
||||
+
|
||||
+ mesh->faces[i][0] = 0;
|
||||
+ mesh->faces[i][1] = i + 1;
|
||||
+ mesh->faces[i][2] = i + 2;
|
||||
+ }
|
||||
+
|
||||
+ mesh->faces[sides - 1][2] = 1;
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+static void test_polygon(IDirect3DDevice9 *device, float length, unsigned int sides)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ ID3DXMesh *polygon;
|
||||
+ struct mesh mesh;
|
||||
+ 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 polygon\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (!compute_polygon(&mesh, length, sides))
|
||||
+ {
|
||||
+ skip("Couldn't create mesh\n");
|
||||
+ polygon->lpVtbl->Release(polygon);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ mesh.fvf = D3DFVF_XYZ | D3DFVF_NORMAL;
|
||||
+
|
||||
+ sprintf(name, "polygon (%g, %d)", length, sides);
|
||||
+ compare_mesh(name, polygon, &mesh);
|
||||
+
|
||||
+ free_mesh(&mesh);
|
||||
+
|
||||
+ polygon->lpVtbl->Release(polygon);
|
||||
+}
|
||||
+
|
||||
+static void D3DXCreatePolygonTest(void)
|
||||
+{
|
||||
+ HRESULT hr;
|
||||
+ HWND wnd;
|
||||
+ IDirect3D9 *d3d;
|
||||
+ IDirect3DDevice9 *device;
|
||||
+ D3DPRESENT_PARAMETERS d3dpp;
|
||||
+ ID3DXMesh *polygon;
|
||||
+ ID3DXBuffer *adjacency;
|
||||
+ DWORD (*buffer)[3], buffer_size;
|
||||
+ unsigned int i;
|
||||
+
|
||||
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_OVERLAPPEDWINDOW, 0, 0,
|
||||
+ 640, 480, NULL, NULL, NULL, NULL)))
|
||||
+ {
|
||||
+ skip("Couldn't create application window\n");
|
||||
+ return;
|
||||
+ }
|
||||
+ if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
|
||||
+ {
|
||||
+ skip("Couldn't create IDirect3D9 object\n");
|
||||
+ DestroyWindow(wnd);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ memset(&d3dpp, 0, sizeof(d3dpp));
|
||||
+ d3dpp.Windowed = TRUE;
|
||||
+ d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
|
||||
+ hr = IDirect3D9_CreateDevice(d3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, wnd,
|
||||
+ D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &device);
|
||||
+ if (FAILED(hr))
|
||||
+ {
|
||||
+ skip("Failed to create IDirect3DDevice9 object %#x\n", hr);
|
||||
+ IDirect3D9_Release(d3d);
|
||||
+ DestroyWindow(wnd);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ hr = D3DXCreatePolygon(device, 2.0f, 11, NULL, &adjacency);
|
||||
+ ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr);
|
||||
+
|
||||
+ hr = D3DXCreatePolygon(NULL, 2.0f, 11, &polygon, &adjacency);
|
||||
+ ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr);
|
||||
+
|
||||
+ hr = D3DXCreatePolygon(device, -2.0f, 11, &polygon, &adjacency);
|
||||
+ ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr);
|
||||
+
|
||||
+ polygon = (void *)0xdeadbeef;
|
||||
+ adjacency = (void *)0xdeadbeef;
|
||||
+ hr = D3DXCreatePolygon(device, 2.0f, 0, &polygon, &adjacency);
|
||||
+ ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr);
|
||||
+ ok(polygon == (void *)0xdeadbeef, "Polygon was changed to %p\n", polygon);
|
||||
+ ok(adjacency == (void *)0xdeadbeef, "Adjacency was changed to %p\n", adjacency);
|
||||
+
|
||||
+ hr = D3DXCreatePolygon(device, 2.0f, 2, &polygon, &adjacency);
|
||||
+ ok(hr == D3DERR_INVALIDCALL, "Expected D3DERR_INVALIDCALL, received %#x\n", hr);
|
||||
+
|
||||
+ adjacency = NULL;
|
||||
+ hr = D3DXCreatePolygon(device, 3.0f, 11, &polygon, &adjacency);
|
||||
+ ok(hr == D3D_OK, "Expected D3D_OK, received %#x\n", hr);
|
||||
+
|
||||
+ buffer_size = ID3DXBuffer_GetBufferSize(adjacency);
|
||||
+ ok(buffer_size == 33 * sizeof(DWORD), "Wrong adjacency buffer size %u\n", buffer_size);
|
||||
+
|
||||
+ buffer = ID3DXBuffer_GetBufferPointer(adjacency);
|
||||
+ 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] == ~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);
|
||||
+ test_polygon(device, 10.0f, 5);
|
||||
+ test_polygon(device, 10.0f, 10);
|
||||
+ test_polygon(device, 20.0f, 10);
|
||||
+
|
||||
+ IDirect3DDevice9_Release(device);
|
||||
+ IDirect3D9_Release(d3d);
|
||||
+ DestroyWindow(wnd);
|
||||
+}
|
||||
+
|
||||
struct sincos_table
|
||||
{
|
||||
float *sin;
|
||||
@@ -10458,6 +10612,7 @@ START_TEST(mesh)
|
||||
D3DXCreateMeshFVFTest();
|
||||
D3DXLoadMeshTest();
|
||||
D3DXCreateBoxTest();
|
||||
+ D3DXCreatePolygonTest();
|
||||
D3DXCreateSphereTest();
|
||||
D3DXCreateCylinderTest();
|
||||
D3DXCreateTextTest();
|
||||
--
|
||||
2.1.3
|
||||
|
@ -1,42 +0,0 @@
|
||||
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
|
||||
|
@ -1,4 +0,0 @@
|
||||
Author: Sebastian Lackner
|
||||
Subject: Implement D3DXCreatePolygon.
|
||||
Revision: 2
|
||||
Fixes: [13632] Support for D3DXCreatePolygon
|
@ -1,4 +1,4 @@
|
||||
From d6e9673ae62469399560736a43368ce7f4ff5a8e Mon Sep 17 00:00:00 2001
|
||||
From 6da899c91d3b1080fa4398f74f9fd58c6dce8484 Mon Sep 17 00:00:00 2001
|
||||
From: Aric Stewart <aric@codeweavers.com>
|
||||
Date: Mon, 8 Sep 2014 21:05:31 -0500
|
||||
Subject: imm32: Move thread data from TLSEntry to an internal list.
|
||||
@ -8,14 +8,14 @@ Changes by Sebastian Lackner <sebastian@fds-team.de>:
|
||||
* IMM_GetInitializedThreadData shouldn't hold the CS while destroying the context in case of a race-condition
|
||||
* ImmGetDefaultIMEWnd shouldn't hold the CS while creating a window
|
||||
---
|
||||
dlls/imm32/imm.c | 160 ++++++++++++++++++++++++++++++++++++++++++-------------
|
||||
1 file changed, 124 insertions(+), 36 deletions(-)
|
||||
dlls/imm32/imm.c | 163 ++++++++++++++++++++++++++++++++++++++++++-------------
|
||||
1 file changed, 124 insertions(+), 39 deletions(-)
|
||||
|
||||
diff --git a/dlls/imm32/imm.c b/dlls/imm32/imm.c
|
||||
index 2fa31ac..b617f5a 100644
|
||||
index f09b132..cf38bf6 100644
|
||||
--- a/dlls/imm32/imm.c
|
||||
+++ b/dlls/imm32/imm.c
|
||||
@@ -86,12 +86,14 @@ typedef struct _tagTRANSMSG {
|
||||
@@ -89,12 +89,14 @@ typedef struct _tagTRANSMSG {
|
||||
} TRANSMSG, *LPTRANSMSG;
|
||||
|
||||
typedef struct _tagIMMThreadData {
|
||||
@ -29,9 +29,9 @@ index 2fa31ac..b617f5a 100644
|
||||
static struct list ImmHklList = LIST_INIT(ImmHklList);
|
||||
+static struct list ImmThreadDataList = LIST_INIT(ImmThreadDataList);
|
||||
|
||||
/* MSIME messages */
|
||||
static UINT WM_MSIME_SERVICE;
|
||||
@@ -110,6 +112,15 @@ static const WCHAR szImeRegFmt[] = {'S','y','s','t','e','m','\\','C','u','r','r'
|
||||
static const WCHAR szwWineIMCProperty[] = {'W','i','n','e','I','m','m','H','I','M','C','P','r','o','p','e','r','t','y',0};
|
||||
|
||||
@@ -104,6 +106,15 @@ static const WCHAR szImeRegFmt[] = {'S','y','s','t','e','m','\\','C','u','r','r'
|
||||
|
||||
static const WCHAR szwIME[] = {'I','M','E',0};
|
||||
|
||||
@ -44,10 +44,10 @@ index 2fa31ac..b617f5a 100644
|
||||
+};
|
||||
+static CRITICAL_SECTION threaddata_cs = { &critsect_debug, -1, 0, 0, 0, 0 };
|
||||
+
|
||||
static LRESULT WINAPI DefIME_WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam,
|
||||
LPARAM lParam);
|
||||
#define is_himc_ime_unicode(p) (p->immKbd->imeInfo.fdwProperty & IME_PROP_UNICODE)
|
||||
#define is_kbd_ime_unicode(p) (p->imeInfo.fdwProperty & IME_PROP_UNICODE)
|
||||
|
||||
@@ -220,29 +231,50 @@ static DWORD convert_candidatelist_AtoW(
|
||||
@@ -211,29 +222,50 @@ static DWORD convert_candidatelist_AtoW(
|
||||
return ret;
|
||||
}
|
||||
|
||||
@ -111,25 +111,30 @@ index 2fa31ac..b617f5a 100644
|
||||
}
|
||||
|
||||
static HMODULE load_graphics_driver(void)
|
||||
@@ -398,9 +430,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)
|
||||
@@ -368,14 +400,8 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)
|
||||
switch (fdwReason)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
IMM_RegisterMessages();
|
||||
- tlsIndex = TlsAlloc();
|
||||
- if (tlsIndex == TLS_OUT_OF_INDEXES)
|
||||
- return FALSE;
|
||||
IMM_RegisterIMEClass();
|
||||
if (!User32InitializeImmEntryTable(IMM_INIT_MAGIC))
|
||||
- {
|
||||
- TlsFree(tlsIndex);
|
||||
return FALSE;
|
||||
- }
|
||||
break;
|
||||
case DLL_THREAD_ATTACH:
|
||||
@@ -412,7 +441,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)
|
||||
break;
|
||||
@@ -386,7 +412,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)
|
||||
if (lpReserved) break;
|
||||
IMM_FreeThreadData();
|
||||
IMM_FreeAllImmHkl();
|
||||
- TlsFree(tlsIndex);
|
||||
UnregisterClassW(szwIME, NULL);
|
||||
break;
|
||||
}
|
||||
@@ -469,6 +497,34 @@ static InputContextData* get_imc_data(HIMC hIMC)
|
||||
return TRUE;
|
||||
@@ -442,6 +467,34 @@ static InputContextData* get_imc_data(HIMC hIMC)
|
||||
return data;
|
||||
}
|
||||
|
||||
@ -164,7 +169,7 @@ index 2fa31ac..b617f5a 100644
|
||||
/***********************************************************************
|
||||
* ImmAssociateContext (IMM32.@)
|
||||
*/
|
||||
@@ -476,31 +532,30 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC)
|
||||
@@ -449,31 +502,30 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC)
|
||||
{
|
||||
HIMC old = NULL;
|
||||
InputContextData *data = get_imc_data(hIMC);
|
||||
@ -200,7 +205,7 @@ index 2fa31ac..b617f5a 100644
|
||||
{
|
||||
if (hIMC == NULL) /* Meaning disable imm for that window*/
|
||||
SetPropW(hWnd,szwWineIMCProperty,(HANDLE)-1);
|
||||
@@ -515,6 +570,7 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC)
|
||||
@@ -488,6 +540,7 @@ HIMC WINAPI ImmAssociateContext(HWND hWnd, HIMC hIMC)
|
||||
old_data->IMC.hWnd = NULL;
|
||||
}
|
||||
}
|
||||
@ -208,7 +213,7 @@ index 2fa31ac..b617f5a 100644
|
||||
|
||||
if (!hIMC)
|
||||
return old;
|
||||
@@ -556,12 +612,17 @@ static BOOL CALLBACK _ImmAssociateContextExEnumProc(HWND hwnd, LPARAM lParam)
|
||||
@@ -529,12 +582,17 @@ static BOOL CALLBACK _ImmAssociateContextExEnumProc(HWND hwnd, LPARAM lParam)
|
||||
*/
|
||||
BOOL WINAPI ImmAssociateContextEx(HWND hWnd, HIMC hIMC, DWORD dwFlags)
|
||||
{
|
||||
@ -229,7 +234,7 @@ index 2fa31ac..b617f5a 100644
|
||||
|
||||
switch (dwFlags)
|
||||
{
|
||||
@@ -569,7 +630,7 @@ BOOL WINAPI ImmAssociateContextEx(HWND hWnd, HIMC hIMC, DWORD dwFlags)
|
||||
@@ -542,7 +600,7 @@ BOOL WINAPI ImmAssociateContextEx(HWND hWnd, HIMC hIMC, DWORD dwFlags)
|
||||
ImmAssociateContext(hWnd,hIMC);
|
||||
return TRUE;
|
||||
case IACE_DEFAULT:
|
||||
@ -238,7 +243,7 @@ index 2fa31ac..b617f5a 100644
|
||||
return TRUE;
|
||||
case IACE_IGNORENOCONTEXT:
|
||||
if (GetPropW(hWnd,szwWineIMCProperty))
|
||||
@@ -744,7 +805,11 @@ static BOOL IMM_DestroyContext(HIMC hIMC)
|
||||
@@ -717,7 +775,11 @@ static BOOL IMM_DestroyContext(HIMC hIMC)
|
||||
*/
|
||||
BOOL WINAPI ImmDestroyContext(HIMC hIMC)
|
||||
{
|
||||
@ -251,7 +256,7 @@ index 2fa31ac..b617f5a 100644
|
||||
return IMM_DestroyContext(hIMC);
|
||||
else
|
||||
return FALSE;
|
||||
@@ -1410,6 +1475,7 @@ BOOL WINAPI ImmGetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm)
|
||||
@@ -1383,6 +1445,7 @@ BOOL WINAPI ImmGetCompositionWindow(HIMC hIMC, LPCOMPOSITIONFORM lpCompForm)
|
||||
HIMC WINAPI ImmGetContext(HWND hWnd)
|
||||
{
|
||||
HIMC rc;
|
||||
@ -259,7 +264,7 @@ index 2fa31ac..b617f5a 100644
|
||||
|
||||
TRACE("%p\n", hWnd);
|
||||
|
||||
@@ -1418,20 +1484,21 @@ HIMC WINAPI ImmGetContext(HWND hWnd)
|
||||
@@ -1391,20 +1454,21 @@ HIMC WINAPI ImmGetContext(HWND hWnd)
|
||||
SetLastError(ERROR_INVALID_WINDOW_HANDLE);
|
||||
return NULL;
|
||||
}
|
||||
@ -284,7 +289,7 @@ index 2fa31ac..b617f5a 100644
|
||||
TRACE("returning %p\n", rc);
|
||||
|
||||
return rc;
|
||||
@@ -1539,11 +1606,32 @@ BOOL WINAPI ImmGetConversionStatus(
|
||||
@@ -1512,11 +1576,32 @@ BOOL WINAPI ImmGetConversionStatus(
|
||||
*/
|
||||
HWND WINAPI ImmGetDefaultIMEWnd(HWND hWnd)
|
||||
{
|
||||
@ -323,5 +328,5 @@ index 2fa31ac..b617f5a 100644
|
||||
|
||||
/***********************************************************************
|
||||
--
|
||||
2.1.1
|
||||
2.1.3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user