Rebase against ba9f3dc198dfc81bb40159077b73b797006bb73c

This commit is contained in:
Alistair Leslie-Hughes
2018-08-15 08:07:39 +10:00
parent 39cafb1db1
commit e7bff1bb4f
102 changed files with 208 additions and 10382 deletions

View File

@@ -1,75 +0,0 @@
From d466b7735488b900ae331a5541bbe8db7d760afc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 25 Jul 2018 22:00:42 +0200
Subject: [PATCH 01/24] wined3d: Fix WINED3D_MCS_COLOR2.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Don't use it unless we have a specular color in the vertex attributes,
but allow it if there's no diffuse color.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
---
dlls/wined3d/utils.c | 37 ++++++++++++++++++++++++++++++++-----
1 file changed, 32 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c
index 937c1bc..ccf5b84 100644
--- a/dlls/wined3d/utils.c
+++ b/dlls/wined3d/utils.c
@@ -5854,6 +5854,7 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context,
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_d3d_info *d3d_info = context->d3d_info;
unsigned int coord_idx, i;
+ BOOL has_diffuse, has_specular;
memset(settings, 0, sizeof(*settings));
@@ -5911,12 +5912,38 @@ void wined3d_ffp_get_vs_settings(const struct wined3d_context *context,
settings->point_size = state->gl_primitive_type == GL_POINTS;
settings->per_vertex_point_size = !!(si->use_map & 1u << WINED3D_FFP_PSIZE);
- if (state->render_states[WINED3D_RS_COLORVERTEX] && (si->use_map & (1u << WINED3D_FFP_DIFFUSE)))
+ has_diffuse = si->use_map & (1u << WINED3D_FFP_DIFFUSE);
+ has_specular = si->use_map & (1u << WINED3D_FFP_SPECULAR);
+
+ if (state->render_states[WINED3D_RS_COLORVERTEX] && (has_diffuse || has_specular))
{
- settings->diffuse_source = state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE];
- settings->emissive_source = state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE];
- settings->ambient_source = state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE];
- settings->specular_source = state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE];
+ if (state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE] == WINED3D_MCS_COLOR1 && has_diffuse)
+ settings->diffuse_source = WINED3D_MCS_COLOR1;
+ else if (state->render_states[WINED3D_RS_DIFFUSEMATERIALSOURCE] == WINED3D_MCS_COLOR2 && has_specular)
+ settings->diffuse_source = WINED3D_MCS_COLOR2;
+ else
+ settings->diffuse_source = WINED3D_MCS_MATERIAL;
+
+ if (state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] == WINED3D_MCS_COLOR1 && has_diffuse)
+ settings->emissive_source = WINED3D_MCS_COLOR1;
+ else if (state->render_states[WINED3D_RS_EMISSIVEMATERIALSOURCE] == WINED3D_MCS_COLOR2 && has_specular)
+ settings->emissive_source = WINED3D_MCS_COLOR2;
+ else
+ settings->emissive_source = WINED3D_MCS_MATERIAL;
+
+ if (state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] == WINED3D_MCS_COLOR1 && has_diffuse)
+ settings->ambient_source = WINED3D_MCS_COLOR1;
+ else if (state->render_states[WINED3D_RS_AMBIENTMATERIALSOURCE] == WINED3D_MCS_COLOR2 && has_specular)
+ settings->ambient_source = WINED3D_MCS_COLOR2;
+ else
+ settings->ambient_source = WINED3D_MCS_MATERIAL;
+
+ if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3D_MCS_COLOR1 && has_diffuse)
+ settings->specular_source = WINED3D_MCS_COLOR1;
+ else if (state->render_states[WINED3D_RS_SPECULARMATERIALSOURCE] == WINED3D_MCS_COLOR2 && has_specular)
+ settings->specular_source = WINED3D_MCS_COLOR2;
+ else
+ settings->specular_source = WINED3D_MCS_MATERIAL;
}
else
{
--
1.9.1

View File

@@ -1,145 +0,0 @@
From 11bcbf7ddfb38cd895c6465d188fd441e364e4aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 25 Jul 2018 22:00:43 +0200
Subject: [PATCH 02/24] d3d9/tests: Add a test for D3DMCS_COLOR{1/2}.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
---
dlls/d3d9/tests/visual.c | 113 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 113 insertions(+)
diff --git a/dlls/d3d9/tests/visual.c b/dlls/d3d9/tests/visual.c
index b36c189..4be84a9 100644
--- a/dlls/d3d9/tests/visual.c
+++ b/dlls/d3d9/tests/visual.c
@@ -24027,6 +24027,118 @@ done:
DestroyWindow(window);
}
+static void test_color_vertex(void)
+{
+ IDirect3D9 *d3d;
+ IDirect3DDevice9 *device;
+ D3DCOLOR color;
+ ULONG refcount;
+ HWND window;
+ HRESULT hr;
+ D3DMATERIAL9 material;
+ unsigned int i;
+
+ /* The idea here is to set up ambient light parameters in a way that the ambient color from the
+ * material is just passed through. The emissive color is just passed through anyway. The sum of
+ * ambient + emissive should allow deduction of where the material color came from.
+ *
+ * Note that in cases without a D3DFVF_DIFFUSE flag the first color value in the struct will be
+ * fed into the specular vertex color slot. */
+ static const struct
+ {
+ DWORD fvf, color_vertex, ambient, emissive, result;
+ }
+ tests[] =
+ {
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, FALSE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x000000c0},
+
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x00ffff00},
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_MATERIAL, D3DMCS_COLOR2, 0x0000ff80},
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_MATERIAL, 0x00ff0040},
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR1, 0x00ff0000},
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR2, D3DMCS_COLOR2, 0x0000ff00},
+
+ {D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x00ff0080},
+ {D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_MATERIAL, 0x000000c0},
+ {D3DFVF_SPECULAR, TRUE, D3DMCS_MATERIAL, D3DMCS_COLOR2, 0x00ff0080},
+ {D3DFVF_DIFFUSE, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x00ff0040},
+ {D3DFVF_DIFFUSE, TRUE, D3DMCS_COLOR1, D3DMCS_MATERIAL, 0x00ff0040},
+ {D3DFVF_DIFFUSE, TRUE, D3DMCS_COLOR2, D3DMCS_MATERIAL, 0x000000c0},
+
+ {0, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x000000c0},
+ };
+
+ static const struct
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ DWORD specular;
+ }
+ quad[] =
+ {
+ {{-1.0f, -1.0f, 0.0f}, 0xffff0000, 0xff00ff00},
+ {{-1.0f, 1.0f, 0.0f}, 0xffff0000, 0xff00ff00},
+ {{ 1.0f, -1.0f, 0.0f}, 0xffff0000, 0xff00ff00},
+ {{ 1.0f, 1.0f, 0.0f}, 0xffff0000, 0xff00ff00},
+ };
+
+ window = create_window();
+ ok(!!window, "Failed to create a window.\n");
+
+ d3d = Direct3DCreate9(D3D_SDK_VERSION);
+ ok(!!d3d, "Failed to create a D3D object.\n");
+ if (!(device = create_device(d3d, window, window, TRUE)))
+ {
+ skip("Failed to create a D3D device, skipping tests.\n");
+ IDirect3D9_Release(d3d);
+ DestroyWindow(window);
+ return;
+ }
+
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_LIGHTING, TRUE);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_AMBIENT, 0xffffffff);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+
+ memset(&material, 0, sizeof(material));
+ material.Ambient.b = 0.5;
+ material.Emissive.b = 0.25;
+ hr = IDirect3DDevice9_SetMaterial(device, &material);
+ ok(SUCCEEDED(hr), "Failed to set material, hr %#x\n", hr);
+
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
+ {
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_COLORVERTEX, tests[i].color_vertex);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_AMBIENTMATERIALSOURCE, tests[i].ambient);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+ hr = IDirect3DDevice9_SetRenderState(device, D3DRS_EMISSIVEMATERIALSOURCE, tests[i].emissive);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+ hr = IDirect3DDevice9_SetFVF(device, D3DFVF_XYZ | tests[i].fvf);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice9_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x77777777, 0.0f, 0);
+ ok(SUCCEEDED(hr), "Failed to clear depth/stencil, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice9_BeginScene(device);
+ ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
+ hr = IDirect3DDevice9_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(quad[0]));
+ ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
+ hr = IDirect3DDevice9_EndScene(device);
+ ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
+
+ color = getPixelColor(device, 320, 240);
+ ok(color_match(color, tests[i].result, 1),
+ "Expected color 0x%08x for test %u, got 0x%08x.\n",
+ tests[i].result, i, color);
+ }
+
+ refcount = IDirect3DDevice9_Release(device);
+ ok(!refcount, "Device has %u references left.\n", refcount);
+ IDirect3D9_Release(d3d);
+ DestroyWindow(window);
+}
+
START_TEST(visual)
{
D3DADAPTER_IDENTIFIER9 identifier;
@@ -24164,4 +24276,5 @@ START_TEST(visual)
test_mvp_software_vertex_shaders();
test_null_format();
test_map_synchronisation();
+ test_color_vertex();
}
--
1.9.1

View File

@@ -1,144 +0,0 @@
From 57b372d60b79f1bd08253181e15078f101055c7d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 25 Jul 2018 22:00:44 +0200
Subject: [PATCH 03/24] d3d8/tests: Add a test for D3DMCS_COLOR{1/2}.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
---
dlls/d3d8/tests/visual.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 112 insertions(+)
diff --git a/dlls/d3d8/tests/visual.c b/dlls/d3d8/tests/visual.c
index bed70d8..c60af69 100644
--- a/dlls/d3d8/tests/visual.c
+++ b/dlls/d3d8/tests/visual.c
@@ -10279,6 +10279,117 @@ done:
DestroyWindow(window);
}
+static void test_color_vertex(void)
+{
+ IDirect3D8 *d3d;
+ IDirect3DDevice8 *device;
+ D3DCOLOR color;
+ ULONG refcount;
+ HWND window;
+ HRESULT hr;
+ D3DMATERIAL8 material;
+ unsigned int i;
+
+ /* The idea here is to set up ambient light parameters in a way that the ambient color from the
+ * material is just passed through. The emissive color is just passed through anyway. The sum of
+ * ambient + emissive should allow deduction of where the material color came from.
+ *
+ * Note that in cases without a D3DFVF_DIFFUSE flag the first color value in the struct will be
+ * fed into the specular vertex color slot. */
+ static const struct
+ {
+ DWORD fvf, color_vertex, ambient, emissive, result;
+ }
+ tests[] =
+ {
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, FALSE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x000000c0},
+
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x00ffff00},
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_MATERIAL, D3DMCS_COLOR2, 0x0000ff80},
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_MATERIAL, 0x00ff0040},
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR1, 0x00ff0000},
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR2, D3DMCS_COLOR2, 0x0000ff00},
+
+ {D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x00ff0080},
+ {D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_MATERIAL, 0x000000c0},
+ {D3DFVF_SPECULAR, TRUE, D3DMCS_MATERIAL, D3DMCS_COLOR2, 0x00ff0080},
+ {D3DFVF_DIFFUSE, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x00ff0040},
+ {D3DFVF_DIFFUSE, TRUE, D3DMCS_COLOR1, D3DMCS_MATERIAL, 0x00ff0040},
+ {D3DFVF_DIFFUSE, TRUE, D3DMCS_COLOR2, D3DMCS_MATERIAL, 0x000000c0},
+
+ {0, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x000000c0},
+ };
+ static const struct
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ DWORD specular;
+ }
+ quad[] =
+ {
+ {{-1.0f, -1.0f, 0.0f}, 0xffff0000, 0xff00ff00},
+ {{-1.0f, 1.0f, 0.0f}, 0xffff0000, 0xff00ff00},
+ {{ 1.0f, -1.0f, 0.0f}, 0xffff0000, 0xff00ff00},
+ {{ 1.0f, 1.0f, 0.0f}, 0xffff0000, 0xff00ff00},
+ };
+
+ window = create_window();
+ ok(!!window, "Failed to create a window.\n");
+
+ d3d = Direct3DCreate8(D3D_SDK_VERSION);
+ ok(!!d3d, "Failed to create a D3D object.\n");
+ if (!(device = create_device(d3d, window, window, TRUE)))
+ {
+ skip("Failed to create a D3D device, skipping tests.\n");
+ IDirect3D8_Release(d3d);
+ DestroyWindow(window);
+ return;
+ }
+
+ hr = IDirect3DDevice8_SetRenderState(device, D3DRS_LIGHTING, TRUE);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_SetRenderState(device, D3DRS_AMBIENT, 0xffffffff);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+
+ memset(&material, 0, sizeof(material));
+ material.Ambient.b = 0.5;
+ material.Emissive.b = 0.25;
+ hr = IDirect3DDevice8_SetMaterial(device, &material);
+ ok(SUCCEEDED(hr), "Failed to set material, hr %#x\n", hr);
+
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
+ {
+ hr = IDirect3DDevice8_SetRenderState(device, D3DRS_COLORVERTEX, tests[i].color_vertex);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_SetRenderState(device, D3DRS_AMBIENTMATERIALSOURCE, tests[i].ambient);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_SetRenderState(device, D3DRS_EMISSIVEMATERIALSOURCE, tests[i].emissive);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_SetVertexShader(device, D3DFVF_XYZ | tests[i].fvf);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice8_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x77777777, 0.0f, 0);
+ ok(SUCCEEDED(hr), "Failed to clear depth/stencil, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice8_BeginScene(device);
+ ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_DrawPrimitiveUP(device, D3DPT_TRIANGLESTRIP, 2, quad, sizeof(quad[0]));
+ ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
+ hr = IDirect3DDevice8_EndScene(device);
+ ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
+
+ color = getPixelColor(device, 320, 240);
+ ok(color_match(color, tests[i].result, 1),
+ "Expected color 0x%08x for test %u, got 0x%08x.\n",
+ tests[i].result, i, color);
+ }
+
+ refcount = IDirect3DDevice8_Release(device);
+ ok(!refcount, "Device has %u references left.\n", refcount);
+ IDirect3D8_Release(d3d);
+ DestroyWindow(window);
+}
+
START_TEST(visual)
{
D3DADAPTER_IDENTIFIER8 identifier;
@@ -10352,4 +10463,5 @@ START_TEST(visual)
test_drawindexedprimitiveup();
test_map_synchronisation();
test_viewport();
+ test_color_vertex();
}
--
1.9.1

View File

@@ -1,172 +0,0 @@
From 32b2c4ee0b87bcfabccb5d84090c964094a29ed0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Wed, 25 Jul 2018 22:00:45 +0200
Subject: [PATCH 04/24] ddraw/tests: Add a test for D3DMCS_COLOR{1/2}.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
A ddraw4 version is on my TODO list. ddraw1 and ddraw2 cannot use
lighting and per-vertex color at the same time due to the predefined
D3D*VERTEX structs. ddraw4 can, and it has D3DLIGHTSTATE_COLORVERTEX,
but the material source states are missing. I assume that one or more of
the material properties then track the vertex color, but I have to find
out which.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
---
dlls/ddraw/tests/ddraw7.c | 133 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 133 insertions(+)
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index 35a45c0..bf34962 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -14267,6 +14267,138 @@ static void test_viewport(void)
DestroyWindow(window);
}
+static void test_color_vertex(void)
+{
+ IDirectDrawSurface7 *rt;
+ IDirect3DDevice7 *device;
+ unsigned int i;
+ ULONG refcount;
+ HWND window;
+ HRESULT hr;
+ D3DMATERIAL7 material;
+ D3DCOLOR color;
+
+ static struct
+ {
+ struct vec3 position;
+ DWORD diffuse;
+ DWORD specular;
+ }
+ quad_2c[] =
+ {
+ {{-1.0f, -1.0f, 0.0f}, 0xffff0000, 0xff00ff00},
+ {{-1.0f, 1.0f, 0.0f}, 0xffff0000, 0xff00ff00},
+ {{ 1.0f, -1.0f, 0.0f}, 0xffff0000, 0xff00ff00},
+ {{ 1.0f, 1.0f, 0.0f}, 0xffff0000, 0xff00ff00},
+ };
+ static struct
+ {
+ struct vec3 position;
+ DWORD color;
+ }
+ quad_1c[] =
+ {
+ {{-1.0f, -1.0f, 0.0f}, 0xffff0000},
+ {{-1.0f, 1.0f, 0.0f}, 0xffff0000},
+ {{ 1.0f, -1.0f, 0.0f}, 0xffff0000},
+ {{ 1.0f, 1.0f, 0.0f}, 0xffff0000},
+ };
+ static struct
+ {
+ struct vec3 position;
+ }
+ quad_0c[] =
+ {
+ {{-1.0f, -1.0f, 0.0f}},
+ {{-1.0f, 1.0f, 0.0f}},
+ {{ 1.0f, -1.0f, 0.0f}},
+ {{ 1.0f, 1.0f, 0.0f}},
+ };
+
+ /* The idea here is to set up ambient light parameters in a way that the ambient color from the
+ * material is just passed through. The emissive color is just passed through anyway. The sum of
+ * ambient + emissive should allow deduction of where the material color came from. */
+ static const struct
+ {
+ DWORD fvf, color_vertex, ambient, emissive, result;
+ void *vtx;
+ }
+ tests[] =
+ {
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, FALSE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x000000c0, quad_2c},
+
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x00ffff00, quad_2c},
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_MATERIAL, D3DMCS_COLOR2, 0x0000ff80, quad_2c},
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_MATERIAL, 0x00ff0040, quad_2c},
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR1, 0x00ff0000, quad_2c},
+ {D3DFVF_DIFFUSE | D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR2, D3DMCS_COLOR2, 0x0000ff00, quad_2c},
+
+ {D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x00ff0080, quad_1c},
+ {D3DFVF_SPECULAR, TRUE, D3DMCS_COLOR1, D3DMCS_MATERIAL, 0x000000c0, quad_1c},
+ {D3DFVF_SPECULAR, TRUE, D3DMCS_MATERIAL, D3DMCS_COLOR2, 0x00ff0080, quad_1c},
+ {D3DFVF_DIFFUSE, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x00ff0040, quad_1c},
+ {D3DFVF_DIFFUSE, TRUE, D3DMCS_COLOR1, D3DMCS_MATERIAL, 0x00ff0040, quad_1c},
+ {D3DFVF_DIFFUSE, TRUE, D3DMCS_COLOR2, D3DMCS_MATERIAL, 0x000000c0, quad_1c},
+
+ {0, TRUE, D3DMCS_COLOR1, D3DMCS_COLOR2, 0x000000c0, quad_0c},
+ };
+
+ window = CreateWindowA("static", "d3d7_test", WS_OVERLAPPEDWINDOW,
+ 0, 0, 640, 480, 0, 0, 0, 0);
+ if (!(device = create_device(window, DDSCL_NORMAL)))
+ {
+ skip("Failed to create a 3D device, skipping test.\n");
+ DestroyWindow(window);
+ return;
+ }
+ hr = IDirect3DDevice7_GetRenderTarget(device, &rt);
+ ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_LIGHTING, TRUE);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_AMBIENT, 0xffffffff);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+
+ memset(&material, 0, sizeof(material));
+ U3(U1(material).ambient).b = 0.5;
+ U3(U3(material).emissive).b = 0.25f;
+ hr = IDirect3DDevice7_SetMaterial(device, &material);
+ ok(SUCCEEDED(hr), "Failed to set material, hr %#x\n", hr);
+
+ for (i = 0; i < ARRAY_SIZE(tests); ++i)
+ {
+ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_COLORVERTEX, tests[i].color_vertex);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_AMBIENTMATERIALSOURCE, tests[i].ambient);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_EMISSIVEMATERIALSOURCE, tests[i].emissive);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+ hr = IDirect3DDevice7_SetRenderState(device, D3DRENDERSTATE_ZENABLE, D3DZB_FALSE);
+ ok(SUCCEEDED(hr), "Failed to set render state, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice7_Clear(device, 0, NULL, D3DCLEAR_TARGET, 0x77777777, 0.0f, 0);
+ ok(SUCCEEDED(hr), "Failed to clear depth/stencil, hr %#x.\n", hr);
+
+ hr = IDirect3DDevice7_BeginScene(device);
+ ok(SUCCEEDED(hr), "Failed to begin scene, hr %#x.\n", hr);
+ hr = IDirect3DDevice7_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DFVF_XYZ | tests[i].fvf,
+ tests[i].vtx, 4, 0);
+ ok(SUCCEEDED(hr), "Failed to draw, hr %#x.\n", hr);
+ hr = IDirect3DDevice7_EndScene(device);
+ ok(SUCCEEDED(hr), "Failed to end scene, hr %#x.\n", hr);
+
+ color = get_surface_color(rt, 320, 240);
+ ok(compare_color(color, tests[i].result, 1),
+ "Expected color 0x%08x for test %u, got 0x%08x.\n",
+ tests[i].result, i, color);
+ }
+
+ IDirectDrawSurface7_Release(rt);
+ refcount = IDirect3DDevice7_Release(device);
+ ok(!refcount, "Device has %u references left.\n", refcount);
+ DestroyWindow(window);
+}
+
START_TEST(ddraw7)
{
DDDEVICEIDENTIFIER2 identifier;
@@ -14402,4 +14534,5 @@ START_TEST(ddraw7)
test_clear();
test_enum_surfaces();
test_viewport();
+ test_color_vertex();
}
--
1.9.1

View File

@@ -1,33 +0,0 @@
From 0eeb6d6b57cb8e1c50c65915799fbd4a7b2b6c43 Mon Sep 17 00:00:00 2001
From: Andrew Eikum <aeikum@codeweavers.com>
Date: Tue, 24 Jul 2018 11:05:06 -0500
Subject: [PATCH 05/24] dsound: Correctly calculate angle between vectors with
equal and opposite directions
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
---
dlls/dsound/sound3d.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/dsound/sound3d.c b/dlls/dsound/sound3d.c
index 03fd3d4..118bb60 100644
--- a/dlls/dsound/sound3d.c
+++ b/dlls/dsound/sound3d.c
@@ -111,7 +111,13 @@ static inline D3DVALUE AngleBetweenVectorsRad (const D3DVECTOR *a, const D3DVECT
return 0;
cos = product/(la*lb);
- angle = acos(cos);
+ if(cos > 1.f){
+ angle = 0;
+ }else if(cos < -1.f){
+ angle = M_PI;
+ }else{
+ angle = acos(cos);
+ }
TRACE("angle between (%f,%f,%f) and (%f,%f,%f) = %f radians (%f degrees)\n", a->x, a->y, a->z, b->x,
b->y, b->z, angle, RadToDeg(angle));
return angle;
--
1.9.1

View File

@@ -1,26 +0,0 @@
From 45cf0122c89190fe8264be3e9b5e4ab65814fa87 Mon Sep 17 00:00:00 2001
From: Gijs Vermeulen <gijsvrm@gmail.com>
Date: Wed, 25 Jul 2018 01:52:06 +0200
Subject: [PATCH 07/24] wine.inf: Add "Sources" key.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44981
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com>
---
loader/wine.inf.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/loader/wine.inf.in b/loader/wine.inf.in
index 9a76509..7774289 100644
--- a/loader/wine.inf.in
+++ b/loader/wine.inf.in
@@ -3416,6 +3416,7 @@ HKLM,%CurrentVersionNT%\SvcHost,"netsvcs",0x00010008,"Schedule"
HKLM,%CurrentVersion%\RunServices,"winemenubuilder",2,"%11%\winemenubuilder.exe -a -r"
HKLM,"System\CurrentControlSet\Services\Eventlog\Application",,16
HKLM,"System\CurrentControlSet\Services\Eventlog\System",,16
+HKLM,"System\CurrentControlSet\Services\Eventlog\System","Sources",0x10000,""
HKLM,"System\CurrentControlSet\Services\Tcpip\Parameters",,16
HKLM,"System\CurrentControlSet\Services\VxD\MSTCP",,16
HKLM,"System\CurrentControlSet\Services\Winsock\Parameters",,16
--
1.9.1

View File

@@ -1,114 +0,0 @@
From c5f3c80ec9c35af958a232a9deb8f98f2225b992 Mon Sep 17 00:00:00 2001
From: Andrey Gusev <andrey.goosev@gmail.com>
Date: Mon, 23 Jul 2018 15:07:39 +0300
Subject: [PATCH 09/24] api-ms-win-devices-config-l1-1-0: Add dll.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
---
configure | 2 ++
configure.ac | 1 +
dlls/api-ms-win-devices-config-l1-1-0/Makefile.in | 1 +
.../api-ms-win-devices-config-l1-1-0.spec | 38 ++++++++++++++++++++++
tools/make_specfiles | 1 +
5 files changed, 43 insertions(+)
create mode 100644 dlls/api-ms-win-devices-config-l1-1-0/Makefile.in
create mode 100644 dlls/api-ms-win-devices-config-l1-1-0/api-ms-win-devices-config-l1-1-0.spec
diff --git a/configure b/configure
index 337ce91..fd58e15 100755
--- a/configure
+++ b/configure
@@ -1045,6 +1045,7 @@ enable_api_ms_win_crt_stdio_l1_1_0
enable_api_ms_win_crt_string_l1_1_0
enable_api_ms_win_crt_time_l1_1_0
enable_api_ms_win_crt_utility_l1_1_0
+enable_api_ms_win_devices_config_l1_1_0
enable_api_ms_win_devices_config_l1_1_1
enable_api_ms_win_devices_query_l1_1_1
enable_api_ms_win_downlevel_advapi32_l1_1_0
@@ -19137,6 +19138,7 @@ wine_fn_config_makefile dlls/api-ms-win-crt-stdio-l1-1-0 enable_api_ms_win_crt_s
wine_fn_config_makefile dlls/api-ms-win-crt-string-l1-1-0 enable_api_ms_win_crt_string_l1_1_0
wine_fn_config_makefile dlls/api-ms-win-crt-time-l1-1-0 enable_api_ms_win_crt_time_l1_1_0
wine_fn_config_makefile dlls/api-ms-win-crt-utility-l1-1-0 enable_api_ms_win_crt_utility_l1_1_0
+wine_fn_config_makefile dlls/api-ms-win-devices-config-l1-1-0 enable_api_ms_win_devices_config_l1_1_0
wine_fn_config_makefile dlls/api-ms-win-devices-config-l1-1-1 enable_api_ms_win_devices_config_l1_1_1
wine_fn_config_makefile dlls/api-ms-win-devices-query-l1-1-1 enable_api_ms_win_devices_query_l1_1_1
wine_fn_config_makefile dlls/api-ms-win-downlevel-advapi32-l1-1-0 enable_api_ms_win_downlevel_advapi32_l1_1_0
diff --git a/configure.ac b/configure.ac
index be247ea..ddf7ee3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2998,6 +2998,7 @@ WINE_CONFIG_MAKEFILE(dlls/api-ms-win-crt-stdio-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-crt-string-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-crt-time-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-crt-utility-l1-1-0)
+WINE_CONFIG_MAKEFILE(dlls/api-ms-win-devices-config-l1-1-0)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-devices-config-l1-1-1)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-devices-query-l1-1-1)
WINE_CONFIG_MAKEFILE(dlls/api-ms-win-downlevel-advapi32-l1-1-0)
diff --git a/dlls/api-ms-win-devices-config-l1-1-0/Makefile.in b/dlls/api-ms-win-devices-config-l1-1-0/Makefile.in
new file mode 100644
index 0000000..1e11946
--- /dev/null
+++ b/dlls/api-ms-win-devices-config-l1-1-0/Makefile.in
@@ -0,0 +1 @@
+MODULE = api-ms-win-devices-config-l1-1-0.dll
diff --git a/dlls/api-ms-win-devices-config-l1-1-0/api-ms-win-devices-config-l1-1-0.spec b/dlls/api-ms-win-devices-config-l1-1-0/api-ms-win-devices-config-l1-1-0.spec
new file mode 100644
index 0000000..fcd3aaa
--- /dev/null
+++ b/dlls/api-ms-win-devices-config-l1-1-0/api-ms-win-devices-config-l1-1-0.spec
@@ -0,0 +1,38 @@
+@ stub CM_Delete_Class_Key
+@ stub CM_Delete_DevNode_Key
+@ stub CM_Delete_Device_Interface_KeyW
+@ stub CM_Disable_DevNode
+@ stub CM_Enable_DevNode
+@ stdcall CM_Get_Child(ptr long long) setupapi.CM_Get_Child
+@ stub CM_Get_Class_PropertyW
+@ stub CM_Get_Class_Property_Keys
+@ stdcall CM_Get_Class_Registry_PropertyW(ptr long ptr ptr long long ptr) setupapi.CM_Get_Class_Registry_PropertyW
+@ stub CM_Get_Depth
+@ stub CM_Get_DevNode_PropertyW
+@ stub CM_Get_DevNode_Property_Keys
+@ stdcall CM_Get_DevNode_Registry_PropertyW(long long ptr ptr ptr long) setupapi.CM_Get_DevNode_Registry_PropertyW
+@ stdcall CM_Get_DevNode_Status(ptr ptr long long) setupapi.CM_Get_DevNode_Status
+@ stdcall CM_Get_Device_IDW(ptr ptr long long) setupapi.CM_Get_Device_IDW
+@ stdcall CM_Get_Device_ID_ListW(wstr ptr long long) setupapi.CM_Get_Device_ID_ListW
+@ stdcall CM_Get_Device_ID_List_SizeW(ptr wstr long) setupapi.CM_Get_Device_ID_List_SizeW
+@ stdcall CM_Get_Device_ID_Size(ptr ptr long) setupapi.CM_Get_Device_ID_Size
+@ stub CM_Get_Device_Interface_ListW
+@ stdcall CM_Get_Device_Interface_List_SizeW(ptr ptr wstr long) setupapi.CM_Get_Device_Interface_List_SizeW
+@ stub CM_Get_Device_Interface_PropertyW
+@ stub CM_Get_Device_Interface_Property_KeysW
+@ stdcall CM_Get_Parent(ptr long long) setupapi.CM_Get_Parent
+@ stub CM_Get_Sibling
+@ stdcall CM_Locate_DevNodeW(ptr wstr long) setupapi.CM_Locate_DevNodeW
+@ stub CM_Open_Class_KeyW
+@ stdcall CM_Open_DevNode_Key(long long long long ptr long) setupapi.CM_Open_DevNode_Key
+@ stub CM_Open_Device_Interface_KeyW
+@ stub CM_Query_And_Remove_SubTreeW
+@ stub CM_Register_Notification
+@ stub CM_Set_Class_PropertyW
+@ stdcall CM_Set_Class_Registry_PropertyW(ptr long ptr long long ptr) setupapi.CM_Set_Class_Registry_PropertyW
+@ stub CM_Set_DevNode_PropertyW
+@ stub CM_Set_DevNode_Registry_PropertyW
+@ stub CM_Set_Device_Interface_PropertyW
+@ stub CM_Setup_DevNode
+@ stub CM_Uninstall_DevNode
+@ stub CM_Unregister_Notification
diff --git a/tools/make_specfiles b/tools/make_specfiles
index 4faf665..cd3af87 100755
--- a/tools/make_specfiles
+++ b/tools/make_specfiles
@@ -105,6 +105,7 @@ my @dll_groups =
[
"setupapi",
"cfgmgr32",
+ "api-ms-win-devices-config-l1-1-0",
"api-ms-win-devices-config-l1-1-1",
"api-ms-win-devices-query-l1-1-1",
],
--
1.9.1

View File

@@ -1,50 +0,0 @@
From 569cd096daa90aa4d4fb8602453843f73feb7fe6 Mon Sep 17 00:00:00 2001
From: Fabian Maurer <dark.shadow4@web.de>
Date: Fri, 20 Jul 2018 21:05:05 +0200
Subject: [PATCH 10/24] wnet: Make WNetGetUniversalNameW return required size
when buffer is too small and add test
The pointer is set to the required size not only when the input size
is 0, but generally when it is too small.
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
---
dlls/mpr/tests/mpr.c | 5 ++++-
dlls/mpr/wnet.c | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/mpr/tests/mpr.c b/dlls/mpr/tests/mpr.c
index fc067d9..3e5ca09 100644
--- a/dlls/mpr/tests/mpr.c
+++ b/dlls/mpr/tests/mpr.c
@@ -51,11 +51,14 @@ static void test_WNetGetUniversalName(void)
ok(info_size == sizeof(buffer), "Got wrong size: %u\n", info_size);
- fail_size = 0;
+ fail_size = 1;
ret = WNetGetUniversalNameA(driveA, UNIVERSAL_NAME_INFO_LEVEL,
buffer, &fail_size);
if(drive_type == DRIVE_REMOTE)
+ {
todo_wine ok(ret == WN_BAD_VALUE || ret == WN_MORE_DATA, "WNetGetUniversalNameA failed: %08x\n", ret);
+ ok(fail_size > 1, "Got %d\n", fail_size);
+ }
else
ok(ret == WN_NOT_CONNECTED || ret == WN_NO_NET_OR_BAD_PATH,
"(%s) WNetGetUniversalNameW gave wrong error: %u\n", driveA, ret);
diff --git a/dlls/mpr/wnet.c b/dlls/mpr/wnet.c
index ad4f1dd..a2f8a04 100644
--- a/dlls/mpr/wnet.c
+++ b/dlls/mpr/wnet.c
@@ -2385,6 +2385,7 @@ DWORD WINAPI WNetGetUniversalNameW ( LPCWSTR lpLocalPath, DWORD dwInfoLevel,
size = sizeof(*info) + (lstrlenW(lpLocalPath) + 1) * sizeof(WCHAR);
if (*lpBufferSize < size)
{
+ *lpBufferSize = size;
err = WN_MORE_DATA;
break;
}
--
1.9.1

View File

@@ -1,43 +0,0 @@
From 98b0a706020f3728e01cc7d38a6bba8ed8dd91f5 Mon Sep 17 00:00:00 2001
From: Piotr Caban <piotr@codeweavers.com>
Date: Thu, 26 Jul 2018 14:40:21 +0200
Subject: [PATCH 11/24] msvcp90: Fix EOF delimiter handling in
basic_istream<char>::ignore.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45495
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
---
dlls/msvcp60/ios.c | 2 +-
dlls/msvcp90/ios.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcp60/ios.c b/dlls/msvcp60/ios.c
index 8a5813e..518c8da 100644
--- a/dlls/msvcp60/ios.c
+++ b/dlls/msvcp60/ios.c
@@ -8101,7 +8101,7 @@ basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *thi
break;
}
- if(ch==(unsigned char)delim)
+ if(ch==delim)
break;
this->count++;
diff --git a/dlls/msvcp90/ios.c b/dlls/msvcp90/ios.c
index 6a82db6..e71d30f 100644
--- a/dlls/msvcp90/ios.c
+++ b/dlls/msvcp90/ios.c
@@ -8583,7 +8583,7 @@ basic_istream_char* __thiscall basic_istream_char_ignore(basic_istream_char *thi
break;
}
- if(ch==(unsigned char)delim)
+ if(ch==delim)
break;
this->count++;
--
1.9.1

View File

@@ -1,33 +0,0 @@
From 7a654e3796602a21c0e8cd93f12e16446ea26678 Mon Sep 17 00:00:00 2001
From: Fabian Maurer <dark.shadow4@web.de>
Date: Sat, 28 Jul 2018 16:31:46 +0200
Subject: [PATCH 12/24] ntoskrnl: Emulate sti/cli instructions on x86_64
Fixes bug 45521.
Thanks to Anastasius Focht for the clear bug report.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45521
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
---
dlls/ntoskrnl.exe/instr.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/ntoskrnl.exe/instr.c b/dlls/ntoskrnl.exe/instr.c
index b2dac58..67cdd32 100644
--- a/dlls/ntoskrnl.exe/instr.c
+++ b/dlls/ntoskrnl.exe/instr.c
@@ -815,6 +815,11 @@ static DWORD emulate_instruction( EXCEPTION_RECORD *rec, CONTEXT *context )
}
break; /* Unable to emulate it */
}
+
+ case 0xfa: /* cli */
+ case 0xfb: /* sti */
+ context->Rip += prefixlen + 1;
+ return ExceptionContinueExecution;
}
return ExceptionContinueSearch; /* Unable to emulate it */
}
--
1.9.1

View File

@@ -1,68 +0,0 @@
From 65af7470de21a5d3b99ed8bc96f57d3f93012b56 Mon Sep 17 00:00:00 2001
From: Fabian Maurer <dark.shadow4@web.de>
Date: Fri, 3 Aug 2018 07:55:03 -0500
Subject: [PATCH] winmm: Don't crash in waveOutOpen when nSamplesPerSec is 0
and add tests
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45530
Signed-off-by: Fabian Maurer <dark.shadow4@web.de>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
---
dlls/winmm/tests/wave.c | 22 ++++++++++++++++++++++
dlls/winmm/waveform.c | 7 +++++++
2 files changed, 29 insertions(+)
diff --git a/dlls/winmm/tests/wave.c b/dlls/winmm/tests/wave.c
index b402e21917..c106594b3f 100644
--- a/dlls/winmm/tests/wave.c
+++ b/dlls/winmm/tests/wave.c
@@ -1415,6 +1415,28 @@ static void wave_out_test_device(UINT_PTR device)
} else
trace("waveOutOpen(%s): 32 bit float samples not supported\n",
dev_name(device));
+
+ /* Test invalid parameters */
+
+ format.wFormatTag = WAVE_FORMAT_PCM;
+ format.nChannels = 1;
+ format.nSamplesPerSec = 11025;
+ format.nBlockAlign = 1;
+ format.nAvgBytesPerSec = 11025 * 1;
+ format.wBitsPerSample = 8;
+ format.cbSize = 0;
+
+ format.nAvgBytesPerSec = 0;
+ rc = waveOutOpen(&wout, device, &format, 0, 0, 0);
+ ok(rc == MMSYSERR_NOERROR,
+ "waveOutOpen(%s): returned %s\n",dev_name(device),wave_out_error(rc));
+ waveOutClose(wout);
+ format.nAvgBytesPerSec = 11025 * 1;
+
+ format.nSamplesPerSec = 0;
+ rc = waveOutOpen(&wout, device, &format, 0, 0, 0);
+ ok(rc == MMSYSERR_INVALPARAM || rc == WAVERR_BADFORMAT, /* XP and lower return WAVERR_BADFORMAT */
+ "waveOutOpen(%s): returned %s\n",dev_name(device),wave_out_error(rc));
}
static void wave_out_tests(void)
diff --git a/dlls/winmm/waveform.c b/dlls/winmm/waveform.c
index 045bf4ac20..0a259c0f74 100644
--- a/dlls/winmm/waveform.c
+++ b/dlls/winmm/waveform.c
@@ -1088,6 +1088,13 @@ static LRESULT WINMM_OpenDevice(WINMM_Device *device, WINMM_OpenInfo *info,
}
if(info->format->wFormatTag == WAVE_FORMAT_PCM){
+
+ if (info->format->nSamplesPerSec == 0)
+ {
+ ret = MMSYSERR_INVALPARAM;
+ goto error;
+ }
+
/* we aren't guaranteed that the struct in lpFormat is a full
* WAVEFORMATEX struct, which IAC::IsFormatSupported requires */
device->orig_fmt = HeapAlloc(GetProcessHeap(), 0, sizeof(WAVEFORMATEX));
--
2.18.0

View File

@@ -1,63 +0,0 @@
From 47e5c48c7eadb3dd96d5fa3eb130f75f6c371c4b Mon Sep 17 00:00:00 2001
From: Zebediah Figura <zfigura@codeweavers.com>
Date: Mon, 30 Jul 2018 14:11:11 -0500
Subject: [PATCH 16/24] msi: Generate unique names for 32- and 64-bit custom
action server pipes.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
---
dlls/msi/custom.c | 6 ++++--
programs/msiexec/msiexec.c | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/msi/custom.c b/dlls/msi/custom.c
index 1a8a982..51755f2 100644
--- a/dlls/msi/custom.c
+++ b/dlls/msi/custom.c
@@ -590,7 +590,7 @@ UINT CDECL __wine_msi_call_dll_function(const GUID *guid)
static DWORD custom_start_server(MSIPACKAGE *package, DWORD arch)
{
- static const WCHAR pipe_name[] = {'\\','\\','.','\\','p','i','p','e','\\','m','s','i','c','a','_','%','x',0};
+ static const WCHAR pipe_name[] = {'\\','\\','.','\\','p','i','p','e','\\','m','s','i','c','a','_','%','x','_','%','d',0};
static const WCHAR msiexecW[] = {'\\','m','s','i','e','x','e','c','.','e','x','e',0};
static const WCHAR argsW[] = {'%','s',' ','-','E','m','b','e','d','d','i','n','g',' ','%','d',0};
@@ -606,9 +606,11 @@ static DWORD custom_start_server(MSIPACKAGE *package, DWORD arch)
(arch == SCS_64BIT_BINARY && package->custom_server_64_process))
return ERROR_SUCCESS;
- sprintfW(buffer, pipe_name, GetCurrentProcessId());
+ sprintfW(buffer, pipe_name, GetCurrentProcessId(), arch == SCS_32BIT_BINARY ? 32 : 64);
pipe = CreateNamedPipeW(buffer, PIPE_ACCESS_DUPLEX, 0, 1, sizeof(DWORD64),
sizeof(GUID), 0, NULL);
+ if (pipe == INVALID_HANDLE_VALUE)
+ ERR("Failed to create custom action client pipe: %u\n", GetLastError());
if (sizeof(void *) == 8 && arch == SCS_32BIT_BINARY)
GetSystemWow64DirectoryW(path, MAX_PATH - sizeof(msiexecW)/sizeof(WCHAR));
diff --git a/programs/msiexec/msiexec.c b/programs/msiexec/msiexec.c
index 47cef7e..ead3bfb 100644
--- a/programs/msiexec/msiexec.c
+++ b/programs/msiexec/msiexec.c
@@ -406,7 +406,7 @@ static DWORD CALLBACK custom_action_thread(void *arg)
static int custom_action_server(const WCHAR *arg)
{
- static const WCHAR pipe_name[] = {'\\','\\','.','\\','p','i','p','e','\\','m','s','i','c','a','_','%','x',0};
+ static const WCHAR pipe_name[] = {'\\','\\','.','\\','p','i','p','e','\\','m','s','i','c','a','_','%','x','_','%','d',0};
DWORD client_pid = atoiW(arg);
DWORD64 thread64;
WCHAR buffer[24];
@@ -423,7 +423,7 @@ static int custom_action_server(const WCHAR *arg)
return 1;
}
- sprintfW(buffer, pipe_name, client_pid);
+ sprintfW(buffer, pipe_name, client_pid, sizeof(void *) * 8);
pipe = CreateFileW(buffer, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL);
if (pipe == INVALID_HANDLE_VALUE)
{
--
1.9.1

View File

@@ -1,62 +0,0 @@
From 29c5d550d65f9d03be8319eeec75904ecdc88ce9 Mon Sep 17 00:00:00 2001
From: Jacek Caban <jacek@codeweavers.com>
Date: Fri, 27 Jul 2018 15:30:49 +0200
Subject: [PATCH 17/24] winevulkan: Expose driver vkGetInstanceProcAddr via
winevulkan exports.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
---
dlls/winevulkan/make_vulkan | 1 +
dlls/winevulkan/vulkan.c | 10 ++++++++++
dlls/winevulkan/winevulkan.spec | 1 +
3 files changed, 12 insertions(+)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index fe742b7..fae6ab0 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -2282,6 +2282,7 @@ class VkGenerator(object):
self._generate_copyright(f, spec_file=True)
f.write("@ stdcall vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr\n")
f.write("@ stdcall vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion\n")
+ f.write("@ cdecl -norelay native_vkGetInstanceProcAddrWINE(ptr str)\n")
# Export symbols for all Vulkan Core functions.
for func in self.registry.funcs.values():
diff --git a/dlls/winevulkan/vulkan.c b/dlls/winevulkan/vulkan.c
index 0bb68c2..bd652a5 100644
--- a/dlls/winevulkan/vulkan.c
+++ b/dlls/winevulkan/vulkan.c
@@ -1163,3 +1163,13 @@ static void *wine_vk_get_global_proc_addr(const char *name)
}
return NULL;
}
+
+/*
+ * Wrapper around driver vkGetInstanceProcAddr implementation.
+ * Allows winelib applications to access Vulkan functions with Wine
+ * additions and native ABI.
+ */
+void *native_vkGetInstanceProcAddrWINE(VkInstance instance, const char *name)
+{
+ return vk_funcs->p_vkGetInstanceProcAddr(instance, name);
+}
diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec
index 8aab0fe..f979458 100644
--- a/dlls/winevulkan/winevulkan.spec
+++ b/dlls/winevulkan/winevulkan.spec
@@ -36,6 +36,7 @@
@ stdcall vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr
@ stdcall vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion
+@ cdecl -norelay native_vkGetInstanceProcAddrWINE(ptr str)
@ stdcall wine_vkAcquireNextImage2KHR(ptr ptr ptr)
@ stdcall wine_vkAcquireNextImageKHR(ptr int64 int64 int64 int64 ptr)
@ stdcall wine_vkAllocateCommandBuffers(ptr ptr ptr)
--
1.9.1

View File

@@ -1,425 +0,0 @@
From cef9ec3da9c0861b03a6b98fe318b21add0f6f16 Mon Sep 17 00:00:00 2001
From: Jacek Caban <jacek@codeweavers.com>
Date: Fri, 27 Jul 2018 15:31:01 +0200
Subject: [PATCH 18/24] winevulkan: Mark ICD and thunking functions as private.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We don't need them in importlib. We use them only for vulkan-1
forwarding, which doesn't need an importlib.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
---
dlls/winevulkan/make_vulkan | 6 +-
dlls/winevulkan/winevulkan.spec | 360 ++++++++++++++++++++--------------------
2 files changed, 183 insertions(+), 183 deletions(-)
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan
index fae6ab0..73bba78 100755
--- a/dlls/winevulkan/make_vulkan
+++ b/dlls/winevulkan/make_vulkan
@@ -647,7 +647,7 @@ class VkFunction(object):
spec = ""
params = " ".join([p.spec() for p in self.params])
if prefix is not None:
- spec += "@ stdcall {0}{1}({2})".format(prefix, self.name, params)
+ spec += "@ stdcall -private {0}{1}({2})".format(prefix, self.name, params)
else:
spec += "@ stdcall {0}({1})".format(self.name, params)
@@ -2280,8 +2280,8 @@ class VkGenerator(object):
def generate_vulkan_spec(self, f):
self._generate_copyright(f, spec_file=True)
- f.write("@ stdcall vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr\n")
- f.write("@ stdcall vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion\n")
+ f.write("@ stdcall -private vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr\n")
+ f.write("@ stdcall -private vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion\n")
f.write("@ cdecl -norelay native_vkGetInstanceProcAddrWINE(ptr str)\n")
# Export symbols for all Vulkan Core functions.
diff --git a/dlls/winevulkan/winevulkan.spec b/dlls/winevulkan/winevulkan.spec
index f979458..b075e9f 100644
--- a/dlls/winevulkan/winevulkan.spec
+++ b/dlls/winevulkan/winevulkan.spec
@@ -34,195 +34,195 @@
# but only in their entirety and only with respect to the Combined Software.
#
-@ stdcall vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr
-@ stdcall vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion
+@ stdcall -private vk_icdGetInstanceProcAddr(ptr str) wine_vk_icdGetInstanceProcAddr
+@ stdcall -private vk_icdNegotiateLoaderICDInterfaceVersion(ptr) wine_vk_icdNegotiateLoaderICDInterfaceVersion
@ cdecl -norelay native_vkGetInstanceProcAddrWINE(ptr str)
-@ stdcall wine_vkAcquireNextImage2KHR(ptr ptr ptr)
-@ stdcall wine_vkAcquireNextImageKHR(ptr int64 int64 int64 int64 ptr)
-@ stdcall wine_vkAllocateCommandBuffers(ptr ptr ptr)
-@ stdcall wine_vkAllocateDescriptorSets(ptr ptr ptr)
-@ stdcall wine_vkAllocateMemory(ptr ptr ptr ptr)
-@ stdcall wine_vkBeginCommandBuffer(ptr ptr)
-@ stdcall wine_vkBindBufferMemory(ptr int64 int64 int64)
-@ stdcall wine_vkBindBufferMemory2(ptr long ptr)
-@ stdcall wine_vkBindImageMemory(ptr int64 int64 int64)
-@ stdcall wine_vkBindImageMemory2(ptr long ptr)
-@ stdcall wine_vkCmdBeginQuery(ptr int64 long long)
-@ stdcall wine_vkCmdBeginRenderPass(ptr ptr long)
-@ stdcall wine_vkCmdBindDescriptorSets(ptr long int64 long long ptr long ptr)
-@ stdcall wine_vkCmdBindIndexBuffer(ptr int64 int64 long)
-@ stdcall wine_vkCmdBindPipeline(ptr long int64)
-@ stdcall wine_vkCmdBindVertexBuffers(ptr long long ptr ptr)
-@ stdcall wine_vkCmdBlitImage(ptr int64 long int64 long long ptr long)
-@ stdcall wine_vkCmdClearAttachments(ptr long ptr long ptr)
-@ stdcall wine_vkCmdClearColorImage(ptr int64 long ptr long ptr)
-@ stdcall wine_vkCmdClearDepthStencilImage(ptr int64 long ptr long ptr)
-@ stdcall wine_vkCmdCopyBuffer(ptr int64 int64 long ptr)
-@ stdcall wine_vkCmdCopyBufferToImage(ptr int64 int64 long long ptr)
-@ stdcall wine_vkCmdCopyImage(ptr int64 long int64 long long ptr)
-@ stdcall wine_vkCmdCopyImageToBuffer(ptr int64 long int64 long ptr)
-@ stdcall wine_vkCmdCopyQueryPoolResults(ptr int64 long long int64 int64 int64 long)
-@ stdcall wine_vkCmdDispatch(ptr long long long)
-@ stdcall wine_vkCmdDispatchBase(ptr long long long long long long)
-@ stdcall wine_vkCmdDispatchIndirect(ptr int64 int64)
-@ stdcall wine_vkCmdDraw(ptr long long long long)
-@ stdcall wine_vkCmdDrawIndexed(ptr long long long long long)
-@ stdcall wine_vkCmdDrawIndexedIndirect(ptr int64 int64 long long)
-@ stdcall wine_vkCmdDrawIndirect(ptr int64 int64 long long)
-@ stdcall wine_vkCmdEndQuery(ptr int64 long)
-@ stdcall wine_vkCmdEndRenderPass(ptr)
-@ stdcall wine_vkCmdExecuteCommands(ptr long ptr)
-@ stdcall wine_vkCmdFillBuffer(ptr int64 int64 int64 long)
-@ stdcall wine_vkCmdNextSubpass(ptr long)
-@ stdcall wine_vkCmdPipelineBarrier(ptr long long long long ptr long ptr long ptr)
-@ stdcall wine_vkCmdPushConstants(ptr int64 long long long ptr)
-@ stdcall wine_vkCmdResetEvent(ptr int64 long)
-@ stdcall wine_vkCmdResetQueryPool(ptr int64 long long)
-@ stdcall wine_vkCmdResolveImage(ptr int64 long int64 long long ptr)
-@ stdcall wine_vkCmdSetBlendConstants(ptr ptr)
-@ stdcall wine_vkCmdSetDepthBias(ptr float float float)
-@ stdcall wine_vkCmdSetDepthBounds(ptr float float)
-@ stdcall wine_vkCmdSetDeviceMask(ptr long)
-@ stdcall wine_vkCmdSetEvent(ptr int64 long)
-@ stdcall wine_vkCmdSetLineWidth(ptr float)
-@ stdcall wine_vkCmdSetScissor(ptr long long ptr)
-@ stdcall wine_vkCmdSetStencilCompareMask(ptr long long)
-@ stdcall wine_vkCmdSetStencilReference(ptr long long)
-@ stdcall wine_vkCmdSetStencilWriteMask(ptr long long)
-@ stdcall wine_vkCmdSetViewport(ptr long long ptr)
-@ stdcall wine_vkCmdUpdateBuffer(ptr int64 int64 int64 ptr)
-@ stdcall wine_vkCmdWaitEvents(ptr long ptr long long long ptr long ptr long ptr)
-@ stdcall wine_vkCmdWriteTimestamp(ptr long int64 long)
-@ stdcall wine_vkCreateBuffer(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateBufferView(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateCommandPool(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateComputePipelines(ptr int64 long ptr ptr ptr)
-@ stdcall wine_vkCreateDescriptorPool(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateDescriptorSetLayout(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateDescriptorUpdateTemplate(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateDevice(ptr ptr ptr ptr)
+@ stdcall -private wine_vkAcquireNextImage2KHR(ptr ptr ptr)
+@ stdcall -private wine_vkAcquireNextImageKHR(ptr int64 int64 int64 int64 ptr)
+@ stdcall -private wine_vkAllocateCommandBuffers(ptr ptr ptr)
+@ stdcall -private wine_vkAllocateDescriptorSets(ptr ptr ptr)
+@ stdcall -private wine_vkAllocateMemory(ptr ptr ptr ptr)
+@ stdcall -private wine_vkBeginCommandBuffer(ptr ptr)
+@ stdcall -private wine_vkBindBufferMemory(ptr int64 int64 int64)
+@ stdcall -private wine_vkBindBufferMemory2(ptr long ptr)
+@ stdcall -private wine_vkBindImageMemory(ptr int64 int64 int64)
+@ stdcall -private wine_vkBindImageMemory2(ptr long ptr)
+@ stdcall -private wine_vkCmdBeginQuery(ptr int64 long long)
+@ stdcall -private wine_vkCmdBeginRenderPass(ptr ptr long)
+@ stdcall -private wine_vkCmdBindDescriptorSets(ptr long int64 long long ptr long ptr)
+@ stdcall -private wine_vkCmdBindIndexBuffer(ptr int64 int64 long)
+@ stdcall -private wine_vkCmdBindPipeline(ptr long int64)
+@ stdcall -private wine_vkCmdBindVertexBuffers(ptr long long ptr ptr)
+@ stdcall -private wine_vkCmdBlitImage(ptr int64 long int64 long long ptr long)
+@ stdcall -private wine_vkCmdClearAttachments(ptr long ptr long ptr)
+@ stdcall -private wine_vkCmdClearColorImage(ptr int64 long ptr long ptr)
+@ stdcall -private wine_vkCmdClearDepthStencilImage(ptr int64 long ptr long ptr)
+@ stdcall -private wine_vkCmdCopyBuffer(ptr int64 int64 long ptr)
+@ stdcall -private wine_vkCmdCopyBufferToImage(ptr int64 int64 long long ptr)
+@ stdcall -private wine_vkCmdCopyImage(ptr int64 long int64 long long ptr)
+@ stdcall -private wine_vkCmdCopyImageToBuffer(ptr int64 long int64 long ptr)
+@ stdcall -private wine_vkCmdCopyQueryPoolResults(ptr int64 long long int64 int64 int64 long)
+@ stdcall -private wine_vkCmdDispatch(ptr long long long)
+@ stdcall -private wine_vkCmdDispatchBase(ptr long long long long long long)
+@ stdcall -private wine_vkCmdDispatchIndirect(ptr int64 int64)
+@ stdcall -private wine_vkCmdDraw(ptr long long long long)
+@ stdcall -private wine_vkCmdDrawIndexed(ptr long long long long long)
+@ stdcall -private wine_vkCmdDrawIndexedIndirect(ptr int64 int64 long long)
+@ stdcall -private wine_vkCmdDrawIndirect(ptr int64 int64 long long)
+@ stdcall -private wine_vkCmdEndQuery(ptr int64 long)
+@ stdcall -private wine_vkCmdEndRenderPass(ptr)
+@ stdcall -private wine_vkCmdExecuteCommands(ptr long ptr)
+@ stdcall -private wine_vkCmdFillBuffer(ptr int64 int64 int64 long)
+@ stdcall -private wine_vkCmdNextSubpass(ptr long)
+@ stdcall -private wine_vkCmdPipelineBarrier(ptr long long long long ptr long ptr long ptr)
+@ stdcall -private wine_vkCmdPushConstants(ptr int64 long long long ptr)
+@ stdcall -private wine_vkCmdResetEvent(ptr int64 long)
+@ stdcall -private wine_vkCmdResetQueryPool(ptr int64 long long)
+@ stdcall -private wine_vkCmdResolveImage(ptr int64 long int64 long long ptr)
+@ stdcall -private wine_vkCmdSetBlendConstants(ptr ptr)
+@ stdcall -private wine_vkCmdSetDepthBias(ptr float float float)
+@ stdcall -private wine_vkCmdSetDepthBounds(ptr float float)
+@ stdcall -private wine_vkCmdSetDeviceMask(ptr long)
+@ stdcall -private wine_vkCmdSetEvent(ptr int64 long)
+@ stdcall -private wine_vkCmdSetLineWidth(ptr float)
+@ stdcall -private wine_vkCmdSetScissor(ptr long long ptr)
+@ stdcall -private wine_vkCmdSetStencilCompareMask(ptr long long)
+@ stdcall -private wine_vkCmdSetStencilReference(ptr long long)
+@ stdcall -private wine_vkCmdSetStencilWriteMask(ptr long long)
+@ stdcall -private wine_vkCmdSetViewport(ptr long long ptr)
+@ stdcall -private wine_vkCmdUpdateBuffer(ptr int64 int64 int64 ptr)
+@ stdcall -private wine_vkCmdWaitEvents(ptr long ptr long long long ptr long ptr long ptr)
+@ stdcall -private wine_vkCmdWriteTimestamp(ptr long int64 long)
+@ stdcall -private wine_vkCreateBuffer(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateBufferView(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateCommandPool(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateComputePipelines(ptr int64 long ptr ptr ptr)
+@ stdcall -private wine_vkCreateDescriptorPool(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateDescriptorSetLayout(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateDescriptorUpdateTemplate(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateDevice(ptr ptr ptr ptr)
@ stub vkCreateDisplayModeKHR
@ stub vkCreateDisplayPlaneSurfaceKHR
-@ stdcall wine_vkCreateEvent(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateFence(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateFramebuffer(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateGraphicsPipelines(ptr int64 long ptr ptr ptr)
-@ stdcall wine_vkCreateImage(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateImageView(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateInstance(ptr ptr ptr)
-@ stdcall wine_vkCreatePipelineCache(ptr ptr ptr ptr)
-@ stdcall wine_vkCreatePipelineLayout(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateQueryPool(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateRenderPass(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateSampler(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateSamplerYcbcrConversion(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateSemaphore(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateShaderModule(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateEvent(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateFence(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateFramebuffer(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateGraphicsPipelines(ptr int64 long ptr ptr ptr)
+@ stdcall -private wine_vkCreateImage(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateImageView(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateInstance(ptr ptr ptr)
+@ stdcall -private wine_vkCreatePipelineCache(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreatePipelineLayout(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateQueryPool(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateRenderPass(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateSampler(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateSamplerYcbcrConversion(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateSemaphore(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateShaderModule(ptr ptr ptr ptr)
@ stub vkCreateSharedSwapchainsKHR
-@ stdcall wine_vkCreateSwapchainKHR(ptr ptr ptr ptr)
-@ stdcall wine_vkCreateWin32SurfaceKHR(ptr ptr ptr ptr)
-@ stdcall wine_vkDestroyBuffer(ptr int64 ptr)
-@ stdcall wine_vkDestroyBufferView(ptr int64 ptr)
-@ stdcall wine_vkDestroyCommandPool(ptr int64 ptr)
-@ stdcall wine_vkDestroyDescriptorPool(ptr int64 ptr)
-@ stdcall wine_vkDestroyDescriptorSetLayout(ptr int64 ptr)
-@ stdcall wine_vkDestroyDescriptorUpdateTemplate(ptr int64 ptr)
-@ stdcall wine_vkDestroyDevice(ptr ptr)
-@ stdcall wine_vkDestroyEvent(ptr int64 ptr)
-@ stdcall wine_vkDestroyFence(ptr int64 ptr)
-@ stdcall wine_vkDestroyFramebuffer(ptr int64 ptr)
-@ stdcall wine_vkDestroyImage(ptr int64 ptr)
-@ stdcall wine_vkDestroyImageView(ptr int64 ptr)
-@ stdcall wine_vkDestroyInstance(ptr ptr)
-@ stdcall wine_vkDestroyPipeline(ptr int64 ptr)
-@ stdcall wine_vkDestroyPipelineCache(ptr int64 ptr)
-@ stdcall wine_vkDestroyPipelineLayout(ptr int64 ptr)
-@ stdcall wine_vkDestroyQueryPool(ptr int64 ptr)
-@ stdcall wine_vkDestroyRenderPass(ptr int64 ptr)
-@ stdcall wine_vkDestroySampler(ptr int64 ptr)
-@ stdcall wine_vkDestroySamplerYcbcrConversion(ptr int64 ptr)
-@ stdcall wine_vkDestroySemaphore(ptr int64 ptr)
-@ stdcall wine_vkDestroyShaderModule(ptr int64 ptr)
-@ stdcall wine_vkDestroySurfaceKHR(ptr int64 ptr)
-@ stdcall wine_vkDestroySwapchainKHR(ptr int64 ptr)
-@ stdcall wine_vkDeviceWaitIdle(ptr)
-@ stdcall wine_vkEndCommandBuffer(ptr)
-@ stdcall wine_vkEnumerateDeviceExtensionProperties(ptr str ptr ptr)
-@ stdcall wine_vkEnumerateDeviceLayerProperties(ptr ptr ptr)
-@ stdcall wine_vkEnumerateInstanceExtensionProperties(str ptr ptr)
-@ stdcall wine_vkEnumerateInstanceLayerProperties(ptr ptr)
-@ stdcall wine_vkEnumerateInstanceVersion(ptr)
-@ stdcall wine_vkEnumeratePhysicalDeviceGroups(ptr ptr ptr)
-@ stdcall wine_vkEnumeratePhysicalDevices(ptr ptr ptr)
-@ stdcall wine_vkFlushMappedMemoryRanges(ptr long ptr)
-@ stdcall wine_vkFreeCommandBuffers(ptr int64 long ptr)
-@ stdcall wine_vkFreeDescriptorSets(ptr int64 long ptr)
-@ stdcall wine_vkFreeMemory(ptr int64 ptr)
-@ stdcall wine_vkGetBufferMemoryRequirements(ptr int64 ptr)
-@ stdcall wine_vkGetBufferMemoryRequirements2(ptr ptr ptr)
-@ stdcall wine_vkGetDescriptorSetLayoutSupport(ptr ptr ptr)
-@ stdcall wine_vkGetDeviceGroupPeerMemoryFeatures(ptr long long long long)
-@ stdcall wine_vkGetDeviceGroupPresentCapabilitiesKHR(ptr ptr)
-@ stdcall wine_vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 long)
-@ stdcall wine_vkGetDeviceMemoryCommitment(ptr int64 ptr)
-@ stdcall wine_vkGetDeviceProcAddr(ptr str)
-@ stdcall wine_vkGetDeviceQueue(ptr long long ptr)
-@ stdcall wine_vkGetDeviceQueue2(ptr ptr ptr)
+@ stdcall -private wine_vkCreateSwapchainKHR(ptr ptr ptr ptr)
+@ stdcall -private wine_vkCreateWin32SurfaceKHR(ptr ptr ptr ptr)
+@ stdcall -private wine_vkDestroyBuffer(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyBufferView(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyCommandPool(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyDescriptorPool(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyDescriptorSetLayout(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyDescriptorUpdateTemplate(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyDevice(ptr ptr)
+@ stdcall -private wine_vkDestroyEvent(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyFence(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyFramebuffer(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyImage(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyImageView(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyInstance(ptr ptr)
+@ stdcall -private wine_vkDestroyPipeline(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyPipelineCache(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyPipelineLayout(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyQueryPool(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyRenderPass(ptr int64 ptr)
+@ stdcall -private wine_vkDestroySampler(ptr int64 ptr)
+@ stdcall -private wine_vkDestroySamplerYcbcrConversion(ptr int64 ptr)
+@ stdcall -private wine_vkDestroySemaphore(ptr int64 ptr)
+@ stdcall -private wine_vkDestroyShaderModule(ptr int64 ptr)
+@ stdcall -private wine_vkDestroySurfaceKHR(ptr int64 ptr)
+@ stdcall -private wine_vkDestroySwapchainKHR(ptr int64 ptr)
+@ stdcall -private wine_vkDeviceWaitIdle(ptr)
+@ stdcall -private wine_vkEndCommandBuffer(ptr)
+@ stdcall -private wine_vkEnumerateDeviceExtensionProperties(ptr str ptr ptr)
+@ stdcall -private wine_vkEnumerateDeviceLayerProperties(ptr ptr ptr)
+@ stdcall -private wine_vkEnumerateInstanceExtensionProperties(str ptr ptr)
+@ stdcall -private wine_vkEnumerateInstanceLayerProperties(ptr ptr)
+@ stdcall -private wine_vkEnumerateInstanceVersion(ptr)
+@ stdcall -private wine_vkEnumeratePhysicalDeviceGroups(ptr ptr ptr)
+@ stdcall -private wine_vkEnumeratePhysicalDevices(ptr ptr ptr)
+@ stdcall -private wine_vkFlushMappedMemoryRanges(ptr long ptr)
+@ stdcall -private wine_vkFreeCommandBuffers(ptr int64 long ptr)
+@ stdcall -private wine_vkFreeDescriptorSets(ptr int64 long ptr)
+@ stdcall -private wine_vkFreeMemory(ptr int64 ptr)
+@ stdcall -private wine_vkGetBufferMemoryRequirements(ptr int64 ptr)
+@ stdcall -private wine_vkGetBufferMemoryRequirements2(ptr ptr ptr)
+@ stdcall -private wine_vkGetDescriptorSetLayoutSupport(ptr ptr ptr)
+@ stdcall -private wine_vkGetDeviceGroupPeerMemoryFeatures(ptr long long long long)
+@ stdcall -private wine_vkGetDeviceGroupPresentCapabilitiesKHR(ptr ptr)
+@ stdcall -private wine_vkGetDeviceGroupSurfacePresentModesKHR(ptr int64 long)
+@ stdcall -private wine_vkGetDeviceMemoryCommitment(ptr int64 ptr)
+@ stdcall -private wine_vkGetDeviceProcAddr(ptr str)
+@ stdcall -private wine_vkGetDeviceQueue(ptr long long ptr)
+@ stdcall -private wine_vkGetDeviceQueue2(ptr ptr ptr)
@ stub vkGetDisplayModePropertiesKHR
@ stub vkGetDisplayPlaneCapabilitiesKHR
@ stub vkGetDisplayPlaneSupportedDisplaysKHR
-@ stdcall wine_vkGetEventStatus(ptr int64)
-@ stdcall wine_vkGetFenceStatus(ptr int64)
-@ stdcall wine_vkGetImageMemoryRequirements(ptr int64 ptr)
-@ stdcall wine_vkGetImageMemoryRequirements2(ptr ptr ptr)
-@ stdcall wine_vkGetImageSparseMemoryRequirements(ptr int64 ptr ptr)
-@ stdcall wine_vkGetImageSparseMemoryRequirements2(ptr ptr ptr ptr)
-@ stdcall wine_vkGetImageSubresourceLayout(ptr int64 ptr ptr)
-@ stdcall wine_vkGetInstanceProcAddr(ptr str)
+@ stdcall -private wine_vkGetEventStatus(ptr int64)
+@ stdcall -private wine_vkGetFenceStatus(ptr int64)
+@ stdcall -private wine_vkGetImageMemoryRequirements(ptr int64 ptr)
+@ stdcall -private wine_vkGetImageMemoryRequirements2(ptr ptr ptr)
+@ stdcall -private wine_vkGetImageSparseMemoryRequirements(ptr int64 ptr ptr)
+@ stdcall -private wine_vkGetImageSparseMemoryRequirements2(ptr ptr ptr ptr)
+@ stdcall -private wine_vkGetImageSubresourceLayout(ptr int64 ptr ptr)
+@ stdcall -private wine_vkGetInstanceProcAddr(ptr str)
@ stub vkGetPhysicalDeviceDisplayPlanePropertiesKHR
@ stub vkGetPhysicalDeviceDisplayPropertiesKHR
@ stub vkGetPhysicalDeviceExternalBufferProperties
@ stub vkGetPhysicalDeviceExternalFenceProperties
@ stub vkGetPhysicalDeviceExternalSemaphoreProperties
-@ stdcall wine_vkGetPhysicalDeviceFeatures(ptr ptr)
-@ stdcall wine_vkGetPhysicalDeviceFeatures2(ptr ptr)
-@ stdcall wine_vkGetPhysicalDeviceFormatProperties(ptr long ptr)
-@ stdcall wine_vkGetPhysicalDeviceFormatProperties2(ptr long ptr)
-@ stdcall wine_vkGetPhysicalDeviceImageFormatProperties(ptr long long long long long ptr)
-@ stdcall wine_vkGetPhysicalDeviceImageFormatProperties2(ptr ptr ptr)
-@ stdcall wine_vkGetPhysicalDeviceMemoryProperties(ptr ptr)
-@ stdcall wine_vkGetPhysicalDeviceMemoryProperties2(ptr ptr)
-@ stdcall wine_vkGetPhysicalDevicePresentRectanglesKHR(ptr int64 ptr ptr)
-@ stdcall wine_vkGetPhysicalDeviceProperties(ptr ptr)
-@ stdcall wine_vkGetPhysicalDeviceProperties2(ptr ptr)
-@ stdcall wine_vkGetPhysicalDeviceQueueFamilyProperties(ptr ptr ptr)
-@ stdcall wine_vkGetPhysicalDeviceQueueFamilyProperties2(ptr ptr ptr)
-@ stdcall wine_vkGetPhysicalDeviceSparseImageFormatProperties(ptr long long long long long ptr ptr)
-@ stdcall wine_vkGetPhysicalDeviceSparseImageFormatProperties2(ptr ptr ptr ptr)
-@ stdcall wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr int64 ptr)
-@ stdcall wine_vkGetPhysicalDeviceSurfaceFormatsKHR(ptr int64 ptr ptr)
-@ stdcall wine_vkGetPhysicalDeviceSurfacePresentModesKHR(ptr int64 ptr long)
-@ stdcall wine_vkGetPhysicalDeviceSurfaceSupportKHR(ptr long int64 ptr)
-@ stdcall wine_vkGetPhysicalDeviceWin32PresentationSupportKHR(ptr long)
-@ stdcall wine_vkGetPipelineCacheData(ptr int64 ptr ptr)
-@ stdcall wine_vkGetQueryPoolResults(ptr int64 long long long ptr int64 long)
-@ stdcall wine_vkGetRenderAreaGranularity(ptr int64 ptr)
-@ stdcall wine_vkGetSwapchainImagesKHR(ptr int64 ptr ptr)
-@ stdcall wine_vkInvalidateMappedMemoryRanges(ptr long ptr)
-@ stdcall wine_vkMapMemory(ptr int64 int64 int64 long ptr)
-@ stdcall wine_vkMergePipelineCaches(ptr int64 long ptr)
-@ stdcall wine_vkQueueBindSparse(ptr long ptr int64)
-@ stdcall wine_vkQueuePresentKHR(ptr ptr)
-@ stdcall wine_vkQueueSubmit(ptr long ptr int64)
-@ stdcall wine_vkQueueWaitIdle(ptr)
-@ stdcall wine_vkResetCommandBuffer(ptr long)
-@ stdcall wine_vkResetCommandPool(ptr int64 long)
-@ stdcall wine_vkResetDescriptorPool(ptr int64 long)
-@ stdcall wine_vkResetEvent(ptr int64)
-@ stdcall wine_vkResetFences(ptr long ptr)
-@ stdcall wine_vkSetEvent(ptr int64)
-@ stdcall wine_vkTrimCommandPool(ptr int64 long)
-@ stdcall wine_vkUnmapMemory(ptr int64)
-@ stdcall wine_vkUpdateDescriptorSetWithTemplate(ptr int64 int64 ptr)
-@ stdcall wine_vkUpdateDescriptorSets(ptr long ptr long ptr)
-@ stdcall wine_vkWaitForFences(ptr long ptr long int64)
+@ stdcall -private wine_vkGetPhysicalDeviceFeatures(ptr ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceFeatures2(ptr ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceFormatProperties(ptr long ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceFormatProperties2(ptr long ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceImageFormatProperties(ptr long long long long long ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceImageFormatProperties2(ptr ptr ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceMemoryProperties(ptr ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceMemoryProperties2(ptr ptr)
+@ stdcall -private wine_vkGetPhysicalDevicePresentRectanglesKHR(ptr int64 ptr ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceProperties(ptr ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceProperties2(ptr ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceQueueFamilyProperties(ptr ptr ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceQueueFamilyProperties2(ptr ptr ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceSparseImageFormatProperties(ptr long long long long long ptr ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceSparseImageFormatProperties2(ptr ptr ptr ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(ptr int64 ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceSurfaceFormatsKHR(ptr int64 ptr ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceSurfacePresentModesKHR(ptr int64 ptr long)
+@ stdcall -private wine_vkGetPhysicalDeviceSurfaceSupportKHR(ptr long int64 ptr)
+@ stdcall -private wine_vkGetPhysicalDeviceWin32PresentationSupportKHR(ptr long)
+@ stdcall -private wine_vkGetPipelineCacheData(ptr int64 ptr ptr)
+@ stdcall -private wine_vkGetQueryPoolResults(ptr int64 long long long ptr int64 long)
+@ stdcall -private wine_vkGetRenderAreaGranularity(ptr int64 ptr)
+@ stdcall -private wine_vkGetSwapchainImagesKHR(ptr int64 ptr ptr)
+@ stdcall -private wine_vkInvalidateMappedMemoryRanges(ptr long ptr)
+@ stdcall -private wine_vkMapMemory(ptr int64 int64 int64 long ptr)
+@ stdcall -private wine_vkMergePipelineCaches(ptr int64 long ptr)
+@ stdcall -private wine_vkQueueBindSparse(ptr long ptr int64)
+@ stdcall -private wine_vkQueuePresentKHR(ptr ptr)
+@ stdcall -private wine_vkQueueSubmit(ptr long ptr int64)
+@ stdcall -private wine_vkQueueWaitIdle(ptr)
+@ stdcall -private wine_vkResetCommandBuffer(ptr long)
+@ stdcall -private wine_vkResetCommandPool(ptr int64 long)
+@ stdcall -private wine_vkResetDescriptorPool(ptr int64 long)
+@ stdcall -private wine_vkResetEvent(ptr int64)
+@ stdcall -private wine_vkResetFences(ptr long ptr)
+@ stdcall -private wine_vkSetEvent(ptr int64)
+@ stdcall -private wine_vkTrimCommandPool(ptr int64 long)
+@ stdcall -private wine_vkUnmapMemory(ptr int64)
+@ stdcall -private wine_vkUpdateDescriptorSetWithTemplate(ptr int64 int64 ptr)
+@ stdcall -private wine_vkUpdateDescriptorSets(ptr long ptr long ptr)
+@ stdcall -private wine_vkWaitForFences(ptr long ptr long int64)
--
1.9.1

View File

@@ -1,67 +0,0 @@
From 0c8b27474062d1908a821c4887fb49d8f5711406 Mon Sep 17 00:00:00 2001
From: Nikolay Sivov <nsivov@codeweavers.com>
Date: Tue, 31 Jul 2018 15:40:08 +0300
Subject: [PATCH 19/24] wmp: Make it possible to query IUnknown from
IWMPControls.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
---
dlls/wmp/player.c | 4 +++-
dlls/wmp/tests/oleobj.c | 10 ++++++++--
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/dlls/wmp/player.c b/dlls/wmp/player.c
index 97fd66b..56b408f 100644
--- a/dlls/wmp/player.c
+++ b/dlls/wmp/player.c
@@ -1365,7 +1365,9 @@ static const IWMPNetworkVtbl WMPNetworkVtbl = {
static HRESULT WINAPI WMPControls_QueryInterface(IWMPControls *iface, REFIID riid, void **ppv)
{
- if(IsEqualGUID(riid, &IID_IDispatch)) {
+ if(IsEqualGUID(riid, &IID_IUnknown)) {
+ *ppv = iface;
+ }else if(IsEqualGUID(riid, &IID_IDispatch)) {
*ppv = iface;
}else if(IsEqualGUID(riid, &IID_IWMPControls)) {
*ppv = iface;
diff --git a/dlls/wmp/tests/oleobj.c b/dlls/wmp/tests/oleobj.c
index 6dfaa1c..472b985 100644
--- a/dlls/wmp/tests/oleobj.c
+++ b/dlls/wmp/tests/oleobj.c
@@ -889,7 +889,6 @@ static void test_ConnectionPoint(IOleObject *unk)
IConnectionPoint_Release(point);
}
-
static void test_wmp_ifaces(IOleObject *oleobj)
{
IWMPSettings *settings, *settings_qi;
@@ -899,6 +898,7 @@ static void test_wmp_ifaces(IOleObject *oleobj)
IWMPControls *controls;
VARIANT_BOOL vbool;
IWMPNetwork *network;
+ IUnknown *unk;
HRESULT hres;
BSTR filename;
BSTR url;
@@ -913,9 +913,15 @@ static void test_wmp_ifaces(IOleObject *oleobj)
player = NULL;
hres = IWMPControls_QueryInterface(controls, &IID_IWMPPlayer, (void**)&player);
- ok(hres != S_OK, "Getting IWMPPlayer from IWMPControls SUCCEEDED\n");
+ ok(hres == E_NOINTERFACE, "Getting IWMPPlayer from IWMPControls SUCCEEDED\n");
ok(player == NULL, "player != NULL\n");
+ unk = NULL;
+ hres = IWMPControls_QueryInterface(controls, &IID_IUnknown, (void **)&unk);
+ ok(hres == S_OK, "Failed to get IUnknown, hr %#x.\n", hres);
+ ok(unk != NULL, "Unexpected interface pointer.\n");
+ IUnknown_Release(unk);
+
IWMPControls_Release(controls);
/* IWPNetwork */
--
1.9.1

View File

@@ -1,26 +0,0 @@
From bc1d6f652f351e3b418d321af20df3a205e6cb09 Mon Sep 17 00:00:00 2001
From: Matteo Bruni <mbruni@codeweavers.com>
Date: Tue, 31 Jul 2018 15:04:53 +0200
Subject: [PATCH 21/24] d3dcompiler: Make types array static const.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
---
dlls/d3dcompiler_43/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c
index b0232f3..748501f 100644
--- a/dlls/d3dcompiler_43/utils.c
+++ b/dlls/d3dcompiler_43/utils.c
@@ -1154,7 +1154,7 @@ static BOOL expr_compatible_data_types(struct hlsl_type *t1, struct hlsl_type *t
static enum hlsl_base_type expr_common_base_type(enum hlsl_base_type t1, enum hlsl_base_type t2)
{
- enum hlsl_base_type types[] =
+ static const enum hlsl_base_type types[] =
{
HLSL_TYPE_BOOL,
HLSL_TYPE_INT,
--
1.9.1

View File

@@ -1,90 +0,0 @@
From 99ff0c4871819ad0eef719e22ce8bd61c90ff1b6 Mon Sep 17 00:00:00 2001
From: Piotr Caban <piotr@codeweavers.com>
Date: Wed, 1 Aug 2018 17:23:23 +0200
Subject: [PATCH 23/24] wbemprox: Add
Win32_NetworkAdapterConfiguration::IPAddress property.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
---
dlls/wbemprox/builtin.c | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index 73f4192..532ee88 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -255,6 +255,8 @@ static const WCHAR prop_interfacetypeW[] =
{'I','n','t','e','r','f','a','c','e','T','y','p','e',0};
static const WCHAR prop_intvalueW[] =
{'I','n','t','e','g','e','r','V','a','l','u','e',0};
+static const WCHAR prop_ipaddressW[] =
+ {'I','P','A','d','d','r','e','s','s',0};
static const WCHAR prop_ipconnectionmetricW[] =
{'I','P','C','o','n','n','e','c','t','i','o','n','M','e','t','r','i','c',0};
static const WCHAR prop_ipenabledW[] =
@@ -553,6 +555,7 @@ static const struct column col_networkadapterconfig[] =
{ prop_dnshostnameW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_dnsserversearchorderW, CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
{ prop_indexW, CIM_UINT32|COL_FLAG_KEY, VT_I4 },
+ { prop_ipaddressW, CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
{ prop_ipconnectionmetricW, CIM_UINT32, VT_I4 },
{ prop_ipenabledW, CIM_BOOLEAN },
{ prop_macaddressW, CIM_STRING|COL_FLAG_DYNAMIC },
@@ -970,6 +973,7 @@ struct record_networkadapterconfig
const WCHAR *dnshostname;
const struct array *dnsserversearchorder;
UINT32 index;
+ const struct array *ipaddress;
UINT32 ipconnectionmetric;
int ipenabled;
const WCHAR *mac_address;
@@ -2426,6 +2430,38 @@ static struct array *get_dnsserversearchorder( IP_ADAPTER_DNS_SERVER_ADDRESS *li
ret->ptr = ptr;
return ret;
}
+static struct array *get_ipaddress( IP_ADAPTER_UNICAST_ADDRESS_LH *list )
+{
+ IP_ADAPTER_UNICAST_ADDRESS_LH *address;
+ struct array *ret;
+ ULONG buflen, i = 0, count = 0;
+ WCHAR **ptr, buf[54]; /* max IPv6 address length */
+
+ if (!list) return NULL;
+ for (address = list; address; address = address->Next) count++;
+
+ if (!(ret = heap_alloc( sizeof(*ret) ))) return NULL;
+ if (!(ptr = heap_alloc( sizeof(*ptr) * count )))
+ {
+ heap_free( ret );
+ return NULL;
+ }
+ for (address = list; address; address = address->Next)
+ {
+ buflen = sizeof(buf)/sizeof(buf[0]);
+ if (WSAAddressToStringW( address->Address.lpSockaddr, address->Address.iSockaddrLength,
+ NULL, buf, &buflen) || !(ptr[i++] = heap_strdupW( buf )))
+ {
+ for (; i > 0; i--) heap_free( ptr[i - 1] );
+ heap_free( ptr );
+ heap_free( ret );
+ return NULL;
+ }
+ }
+ ret->count = count;
+ ret->ptr = ptr;
+ return ret;
+}
static WCHAR *get_settingid( UINT32 index )
{
GUID guid;
@@ -2475,6 +2511,7 @@ static enum fill_status fill_networkadapterconfig( struct table *table, const st
rec->dnshostname = get_dnshostname( aa->FirstUnicastAddress );
rec->dnsserversearchorder = get_dnsserversearchorder( aa->FirstDnsServerAddress );
rec->index = aa->u.s.IfIndex;
+ rec->ipaddress = get_ipaddress( aa->FirstUnicastAddress );
rec->ipconnectionmetric = 20;
rec->ipenabled = -1;
rec->mac_address = get_mac_address( aa->PhysicalAddress, aa->PhysicalAddressLength );
--
1.9.1

View File

@@ -1,118 +0,0 @@
From 9a8c43ec5ce2155b66de3623bf2af036f959a964 Mon Sep 17 00:00:00 2001
From: Piotr Caban <piotr@codeweavers.com>
Date: Wed, 1 Aug 2018 17:23:29 +0200
Subject: [PATCH 24/24] wbemprox: Add
Win32_NetworkAdapterConfiguration::IPSubnet property.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
---
dlls/wbemprox/builtin.c | 58 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index 532ee88..190f710 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -49,6 +49,7 @@
#include "wbemcli.h"
#include "wbemprov.h"
#include "iphlpapi.h"
+#include "netioapi.h"
#include "tlhelp32.h"
#include "d3d10.h"
#include "winternl.h"
@@ -261,6 +262,8 @@ static const WCHAR prop_ipconnectionmetricW[] =
{'I','P','C','o','n','n','e','c','t','i','o','n','M','e','t','r','i','c',0};
static const WCHAR prop_ipenabledW[] =
{'I','P','E','n','a','b','l','e','d',0};
+static const WCHAR prop_ipsubnet[] =
+ {'I','P','S','u','b','n','e','t',0};
static const WCHAR prop_lastbootuptimeW[] =
{'L','a','s','t','B','o','o','t','U','p','T','i','m','e',0};
static const WCHAR prop_levelW[] =
@@ -558,6 +561,7 @@ static const struct column col_networkadapterconfig[] =
{ prop_ipaddressW, CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
{ prop_ipconnectionmetricW, CIM_UINT32, VT_I4 },
{ prop_ipenabledW, CIM_BOOLEAN },
+ { prop_ipsubnet, CIM_STRING|CIM_FLAG_ARRAY|COL_FLAG_DYNAMIC },
{ prop_macaddressW, CIM_STRING|COL_FLAG_DYNAMIC },
{ prop_settingidW, CIM_STRING|COL_FLAG_DYNAMIC }
};
@@ -976,6 +980,7 @@ struct record_networkadapterconfig
const struct array *ipaddress;
UINT32 ipconnectionmetric;
int ipenabled;
+ const struct array *ipsubnet;
const WCHAR *mac_address;
const WCHAR *settingid;
};
@@ -2462,6 +2467,58 @@ static struct array *get_ipaddress( IP_ADAPTER_UNICAST_ADDRESS_LH *list )
ret->ptr = ptr;
return ret;
}
+static struct array *get_ipsubnet( IP_ADAPTER_UNICAST_ADDRESS_LH *list )
+{
+ IP_ADAPTER_UNICAST_ADDRESS_LH *address;
+ struct array *ret;
+ ULONG i = 0, count = 0;
+ WCHAR **ptr;
+
+ if (!list) return NULL;
+ for (address = list; address; address = address->Next) count++;
+
+ if (!(ret = heap_alloc( sizeof(*ret) ))) return NULL;
+ if (!(ptr = heap_alloc( sizeof(*ptr) * count )))
+ {
+ heap_free( ret );
+ return NULL;
+ }
+ for (address = list; address; address = address->Next)
+ {
+ if (address->Address.lpSockaddr->sa_family == AF_INET)
+ {
+ WCHAR buf[INET_ADDRSTRLEN];
+ SOCKADDR_IN addr;
+ ULONG buflen = sizeof(buf)/sizeof(buf[0]);
+
+ memset( &addr, 0, sizeof(addr) );
+ addr.sin_family = AF_INET;
+ if (ConvertLengthToIpv4Mask( address->OnLinkPrefixLength, &addr.sin_addr.S_un.S_addr ) != NO_ERROR
+ || WSAAddressToStringW( (SOCKADDR*)&addr, sizeof(addr), NULL, buf, &buflen))
+ ptr[i] = NULL;
+ else
+ ptr[i] = heap_strdupW( buf );
+ }
+ else
+ {
+ static const WCHAR fmtW[] = {'%','u',0};
+ WCHAR buf[11];
+
+ sprintfW(buf, fmtW, address->OnLinkPrefixLength);
+ ptr[i] = heap_strdupW( buf );
+ }
+ if (!ptr[i++])
+ {
+ for (; i > 0; i--) heap_free( ptr[i - 1] );
+ heap_free( ptr );
+ heap_free( ret );
+ return NULL;
+ }
+ }
+ ret->count = count;
+ ret->ptr = ptr;
+ return ret;
+}
static WCHAR *get_settingid( UINT32 index )
{
GUID guid;
@@ -2514,6 +2571,7 @@ static enum fill_status fill_networkadapterconfig( struct table *table, const st
rec->ipaddress = get_ipaddress( aa->FirstUnicastAddress );
rec->ipconnectionmetric = 20;
rec->ipenabled = -1;
+ rec->ipsubnet = get_ipsubnet( aa->FirstUnicastAddress );
rec->mac_address = get_mac_address( aa->PhysicalAddress, aa->PhysicalAddressLength );
rec->settingid = get_settingid( rec->index );
if (!match_row( table, row, cond, &status ))
--
1.9.1