You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Compare commits
46 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9fe5cabf21 | ||
|
99c474f018 | ||
|
c942f42ee5 | ||
|
670a9e20c0 | ||
|
0c815a486b | ||
|
cdfddb170a | ||
|
c58f817de8 | ||
|
c7d0330ce8 | ||
|
c6f7b46951 | ||
|
84a644848c | ||
|
b24b3a88cc | ||
|
ced72a6a0a | ||
|
e09468ec17 | ||
|
81ac4ea01a | ||
|
053de1b617 | ||
|
47891c1826 | ||
|
dd7f7cc1ba | ||
|
649c35ff92 | ||
|
7c57b6eba4 | ||
|
c0389b0479 | ||
|
fd3b1a04e7 | ||
|
fab929969c | ||
|
ccdf3d98ff | ||
|
1e58aad446 | ||
|
8dc124ce70 | ||
|
b6054fa105 | ||
|
fe6b2652ef | ||
|
692d7d43e0 | ||
|
6bee4b6e76 | ||
|
c323ef47c7 | ||
|
9e6693ed13 | ||
|
29bdd4cd85 | ||
|
39d7dcb2c6 | ||
|
2e4d0f4727 | ||
|
fd818b1914 | ||
|
26e542b4e5 | ||
|
6ef7be2566 | ||
|
5b012f08d5 | ||
|
8390ba0d95 | ||
|
fb18deb95f | ||
|
27b33a4be9 | ||
|
a15bdaa0ba | ||
|
734918298c | ||
|
bc1aa54891 | ||
|
2da0d341f6 | ||
|
155cb0b051 |
@@ -0,0 +1,3 @@
|
||||
# Originally sent 2015 April by Qian Hong, apparently dropped off the list:
|
||||
# <https://www.winehq.org/pipermail/wine-patches/2015-April/138515.html>
|
||||
# Some of the patches were labeled as for Cygwin.
|
@@ -1,17 +1,18 @@
|
||||
From 9f36741fe5895aaf8aa5a954b78db09e32c2db3a Mon Sep 17 00:00:00 2001
|
||||
From 50dfa70735f6a0f8cf9e77c70143a91555627a5a Mon Sep 17 00:00:00 2001
|
||||
From: Kimmo Myllyvirta <kimmo.myllyvirta@gmail.com>
|
||||
Date: Sat, 24 Sep 2016 06:51:24 +0300
|
||||
Subject: [PATCH] d3d11: Add stub deferred rendering context.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 1267 +++++++++++++++++++++++++++++++++++++++++++++------
|
||||
1 file changed, 1129 insertions(+), 138 deletions(-)
|
||||
dlls/d3d11/device.c | 1267 +++++++++++++++++++++++++++++++++-----
|
||||
dlls/d3d11/tests/d3d11.c | 4 +-
|
||||
2 files changed, 1132 insertions(+), 139 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index 8f9a850..b7cdd49 100644
|
||||
index 08579164bd..dca5a88caa 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -25,6 +25,16 @@
|
||||
@@ -22,6 +22,16 @@
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d11);
|
||||
|
||||
@@ -28,7 +29,7 @@ index 8f9a850..b7cdd49 100644
|
||||
static void STDMETHODCALLTYPE d3d_null_wined3d_object_destroyed(void *parent) {}
|
||||
|
||||
static const struct wined3d_parent_ops d3d_null_wined3d_parent_ops =
|
||||
@@ -2886,218 +2896,1186 @@ static void d3d11_immediate_context_destroy(struct d3d11_immediate_context *cont
|
||||
@@ -2883,218 +2893,1186 @@ static void d3d11_immediate_context_destroy(struct d3d11_immediate_context *cont
|
||||
wined3d_private_store_cleanup(&context->private_store);
|
||||
}
|
||||
|
||||
@@ -1351,7 +1352,7 @@ index 8f9a850..b7cdd49 100644
|
||||
iface, byte_code, byte_code_length, class_linkage, shader);
|
||||
|
||||
if (class_linkage)
|
||||
@@ -3365,9 +4343,22 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device2 *iface
|
||||
@@ -3362,9 +4340,22 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateCounter(ID3D11Device2 *iface
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device2 *iface, UINT flags,
|
||||
ID3D11DeviceContext **context)
|
||||
{
|
||||
@@ -1365,7 +1366,7 @@ index 8f9a850..b7cdd49 100644
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ object->ID3D11DeviceContext_iface.lpVtbl = &d3d11_deferred_context_vtbl;
|
||||
+ object->device = iface;
|
||||
+ object->device = (ID3D11Device *)iface;
|
||||
+ object->refcount = 1;
|
||||
+
|
||||
+ ID3D11Device2_AddRef(iface);
|
||||
@@ -1376,6 +1377,28 @@ index 8f9a850..b7cdd49 100644
|
||||
}
|
||||
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_device_OpenSharedResource(ID3D11Device2 *iface, HANDLE resource, REFIID iid,
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index d58319df58..e653fb30b2 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -2231,6 +2231,8 @@ static void test_create_deferred_context(void)
|
||||
|
||||
hr = ID3D11Device_CreateDeferredContext(device, 0, &context);
|
||||
todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Failed to create deferred context, hr %#x.\n", hr);
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ ID3D11DeviceContext_Release(context);
|
||||
|
||||
refcount = ID3D11Device_Release(device);
|
||||
ok(!refcount, "Device has %u references left.\n", refcount);
|
||||
@@ -2243,7 +2245,7 @@ static void test_create_deferred_context(void)
|
||||
|
||||
expected_refcount = get_refcount(device) + 1;
|
||||
hr = ID3D11Device_CreateDeferredContext(device, 0, &context);
|
||||
- todo_wine ok(hr == S_OK, "Failed to create deferred context, hr %#x.\n", hr);
|
||||
+ ok(hr == S_OK, "Failed to create deferred context, hr %#x.\n", hr);
|
||||
if (FAILED(hr))
|
||||
goto done;
|
||||
refcount = get_refcount(device);
|
||||
--
|
||||
1.9.1
|
||||
2.21.0
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 837daae12d4c7fd40a35511d8d45299b46e91b38 Mon Sep 17 00:00:00 2001
|
||||
From 701a77256d55032b60e454279013984844dffd78 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 19 Jan 2017 16:54:42 +0100
|
||||
Subject: [PATCH] wined3d: Add wined3d_resource_map_info function.
|
||||
@@ -13,11 +13,11 @@ Subject: [PATCH] wined3d: Add wined3d_resource_map_info function.
|
||||
6 files changed, 70 insertions(+)
|
||||
|
||||
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
|
||||
index 4c90d820..8065839d 100644
|
||||
index 18a0d72117..a6117942ef 100644
|
||||
--- a/dlls/wined3d/buffer.c
|
||||
+++ b/dlls/wined3d/buffer.c
|
||||
@@ -1306,6 +1306,24 @@ static HRESULT buffer_resource_sub_resource_map(struct wined3d_resource *resourc
|
||||
return wined3d_buffer_gl_map(buffer_gl, offset, size, (BYTE **)&map_desc->data, flags);
|
||||
@@ -1104,6 +1104,24 @@ static HRESULT buffer_resource_sub_resource_map(struct wined3d_resource *resourc
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
+static HRESULT buffer_resource_sub_resource_map_info(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
@@ -40,8 +40,8 @@ index 4c90d820..8065839d 100644
|
||||
+
|
||||
static HRESULT buffer_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
{
|
||||
if (sub_resource_idx)
|
||||
@@ -1325,6 +1343,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
struct wined3d_buffer *buffer = buffer_from_resource(resource);
|
||||
@@ -1262,6 +1280,7 @@ static const struct wined3d_resource_ops buffer_resource_ops =
|
||||
buffer_resource_preload,
|
||||
buffer_unload,
|
||||
buffer_resource_sub_resource_map,
|
||||
@@ -50,10 +50,10 @@ index 4c90d820..8065839d 100644
|
||||
};
|
||||
|
||||
diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
|
||||
index a1b2cbd2..dd4ca20c 100644
|
||||
index bba940f42c..ff31c004b0 100644
|
||||
--- a/dlls/wined3d/resource.c
|
||||
+++ b/dlls/wined3d/resource.c
|
||||
@@ -361,6 +361,14 @@ HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned i
|
||||
@@ -383,6 +383,14 @@ HRESULT CDECL wined3d_resource_map(struct wined3d_resource *resource, unsigned i
|
||||
return wined3d_cs_map(resource->device->cs, resource, sub_resource_idx, map_desc, box, flags);
|
||||
}
|
||||
|
||||
@@ -69,10 +69,10 @@ index a1b2cbd2..dd4ca20c 100644
|
||||
{
|
||||
TRACE("resource %p, sub_resource_idx %u.\n", resource, sub_resource_idx);
|
||||
diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c
|
||||
index 87998d55..45ee3d3d 100644
|
||||
index ff25f64043..37054833c5 100644
|
||||
--- a/dlls/wined3d/texture.c
|
||||
+++ b/dlls/wined3d/texture.c
|
||||
@@ -2698,6 +2698,36 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
@@ -3024,6 +3024,36 @@ static HRESULT texture_resource_sub_resource_map(struct wined3d_resource *resour
|
||||
return WINED3D_OK;
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ index 87998d55..45ee3d3d 100644
|
||||
static HRESULT texture_resource_sub_resource_unmap(struct wined3d_resource *resource, unsigned int sub_resource_idx)
|
||||
{
|
||||
struct wined3d_texture_sub_resource *sub_resource;
|
||||
@@ -2749,6 +2779,7 @@ static const struct wined3d_resource_ops texture_resource_ops =
|
||||
@@ -3076,6 +3106,7 @@ static const struct wined3d_resource_ops texture_resource_ops =
|
||||
texture_resource_preload,
|
||||
wined3d_texture_gl_unload,
|
||||
texture_resource_sub_resource_map,
|
||||
@@ -118,10 +118,10 @@ index 87998d55..45ee3d3d 100644
|
||||
};
|
||||
|
||||
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
|
||||
index ee702211..f4944564 100644
|
||||
index edd4a70d97..742126c4d2 100644
|
||||
--- a/dlls/wined3d/wined3d.spec
|
||||
+++ b/dlls/wined3d/wined3d.spec
|
||||
@@ -220,6 +220,7 @@
|
||||
@@ -216,6 +216,7 @@
|
||||
@ cdecl wined3d_resource_get_parent(ptr)
|
||||
@ cdecl wined3d_resource_get_priority(ptr)
|
||||
@ cdecl wined3d_resource_map(ptr long ptr ptr long)
|
||||
@@ -130,10 +130,10 @@ index ee702211..f4944564 100644
|
||||
@ cdecl wined3d_resource_set_parent(ptr ptr)
|
||||
@ cdecl wined3d_resource_set_priority(ptr long)
|
||||
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
|
||||
index 9a01ed29..9f8f784e 100644
|
||||
index 5ce23f85f6..740e535217 100644
|
||||
--- a/dlls/wined3d/wined3d_private.h
|
||||
+++ b/dlls/wined3d/wined3d_private.h
|
||||
@@ -3096,6 +3096,8 @@ struct wined3d_resource_ops
|
||||
@@ -3414,6 +3414,8 @@ struct wined3d_resource_ops
|
||||
void (*resource_unload)(struct wined3d_resource *resource);
|
||||
HRESULT (*resource_sub_resource_map)(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
|
||||
@@ -143,10 +143,10 @@ index 9a01ed29..9f8f784e 100644
|
||||
};
|
||||
|
||||
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
|
||||
index dc491d3b..8e0cf665 100644
|
||||
index 3e46c23c14..c60597bb4c 100644
|
||||
--- a/include/wine/wined3d.h
|
||||
+++ b/include/wine/wined3d.h
|
||||
@@ -1835,6 +1835,13 @@ struct wined3d_map_desc
|
||||
@@ -1833,6 +1833,13 @@ struct wined3d_map_desc
|
||||
void *data;
|
||||
};
|
||||
|
||||
@@ -160,7 +160,7 @@ index dc491d3b..8e0cf665 100644
|
||||
struct wined3d_sub_resource_data
|
||||
{
|
||||
const void *data;
|
||||
@@ -2606,6 +2613,8 @@ void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resour
|
||||
@@ -2600,6 +2607,8 @@ void * __cdecl wined3d_resource_get_parent(const struct wined3d_resource *resour
|
||||
DWORD __cdecl wined3d_resource_get_priority(const struct wined3d_resource *resource);
|
||||
HRESULT __cdecl wined3d_resource_map(struct wined3d_resource *resource, unsigned int sub_resource_idx,
|
||||
struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags);
|
||||
@@ -170,5 +170,5 @@ index dc491d3b..8e0cf665 100644
|
||||
void __cdecl wined3d_resource_set_parent(struct wined3d_resource *resource, void *parent);
|
||||
DWORD __cdecl wined3d_resource_set_priority(struct wined3d_resource *resource, DWORD priority);
|
||||
--
|
||||
2.19.1
|
||||
2.23.0
|
||||
|
||||
|
@@ -1,14 +1,14 @@
|
||||
From 4984f8e6033facccfa7b27b4b0f83e6615abc972 Mon Sep 17 00:00:00 2001
|
||||
From c093321833140c3aadacae32c43d160e83483d17 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 19 Jan 2017 16:56:56 +0100
|
||||
Subject: [PATCH] d3d11: Initial implementation for deferred contexts.
|
||||
|
||||
---
|
||||
dlls/d3d11/device.c | 1072 +++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 1041 insertions(+), 31 deletions(-)
|
||||
dlls/d3d11/device.c | 1073 +++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 1042 insertions(+), 31 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
|
||||
index fbc875c6fee..74ae6f8f333 100644
|
||||
index dca5a88caa..738f1d19d4 100644
|
||||
--- a/dlls/d3d11/device.c
|
||||
+++ b/dlls/d3d11/device.c
|
||||
@@ -17,11 +17,181 @@
|
||||
@@ -193,7 +193,7 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
/* ID3D11DeviceContext - deferred context */
|
||||
struct d3d11_deferred_context
|
||||
{
|
||||
@@ -29,9 +199,531 @@ struct d3d11_deferred_context
|
||||
@@ -29,9 +199,532 @@ struct d3d11_deferred_context
|
||||
ID3D11Device *device;
|
||||
LONG refcount;
|
||||
|
||||
@@ -646,6 +646,7 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
+ {
|
||||
+ free_deferred_calls(&cmdlist->commands);
|
||||
+ wined3d_private_store_cleanup(&cmdlist->private_store);
|
||||
+ ID3D11Device_Release(cmdlist->device);
|
||||
+ HeapFree(GetProcessHeap(), 0, cmdlist);
|
||||
+ }
|
||||
+
|
||||
@@ -725,7 +726,7 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
static void STDMETHODCALLTYPE d3d_null_wined3d_object_destroyed(void *parent) {}
|
||||
|
||||
static const struct wined3d_parent_ops d3d_null_wined3d_parent_ops =
|
||||
@@ -1226,7 +1918,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D
|
||||
@@ -1226,7 +1919,20 @@ static void STDMETHODCALLTYPE d3d11_immediate_context_ResolveSubresource(ID3D11D
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_ExecuteCommandList(ID3D11DeviceContext1 *iface,
|
||||
ID3D11CommandList *command_list, BOOL restore_state)
|
||||
{
|
||||
@@ -747,7 +748,7 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_immediate_context_HSSetShaderResources(ID3D11DeviceContext1 *iface,
|
||||
@@ -2938,6 +3643,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
|
||||
@@ -2938,6 +3644,7 @@ static ULONG STDMETHODCALLTYPE d3d11_deferred_context_Release(ID3D11DeviceContex
|
||||
|
||||
if (!refcount)
|
||||
{
|
||||
@@ -755,7 +756,7 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
wined3d_private_store_cleanup(&context->private_store);
|
||||
ID3D11Device_Release(context->device);
|
||||
HeapFree(GetProcessHeap(), 0, context);
|
||||
@@ -2989,43 +3695,86 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(
|
||||
@@ -2989,43 +3696,86 @@ static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_SetPrivateDataInterface(
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
{
|
||||
@@ -848,7 +849,7 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *iface,
|
||||
@@ -3038,53 +3787,169 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *i
|
||||
@@ -3038,53 +3788,169 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_Draw(ID3D11DeviceContext *i
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_Map(ID3D11DeviceContext *iface, ID3D11Resource *resource,
|
||||
UINT subresource_idx, D3D11_MAP map_type, UINT map_flags, D3D11_MAPPED_SUBRESOURCE *mapped_subresource)
|
||||
{
|
||||
@@ -1027,7 +1028,7 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_DrawInstanced(ID3D11DeviceContext *iface,
|
||||
@@ -3113,7 +3978,16 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceCon
|
||||
@@ -3113,7 +3979,16 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_GSSetShader(ID3D11DeviceCon
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_IASetPrimitiveTopology(ID3D11DeviceContext *iface,
|
||||
D3D11_PRIMITIVE_TOPOLOGY topology)
|
||||
{
|
||||
@@ -1045,7 +1046,7 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_VSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
@@ -3173,8 +4047,28 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11De
|
||||
@@ -3173,8 +4048,28 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargets(ID3D11De
|
||||
UINT render_target_view_count, ID3D11RenderTargetView *const *render_target_views,
|
||||
ID3D11DepthStencilView *depth_stencil_view)
|
||||
{
|
||||
@@ -1075,7 +1076,7 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorderedAccessViews(
|
||||
@@ -3194,15 +4088,44 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
|
||||
@@ -3194,15 +4089,44 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetRenderTargetsAndUnorde
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_OMSetBlendState(ID3D11DeviceContext *iface,
|
||||
ID3D11BlendState *blend_state, const float blend_factor[4], UINT sample_mask)
|
||||
{
|
||||
@@ -1122,7 +1123,7 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_SOSetTargets(ID3D11DeviceContext *iface, UINT buffer_count,
|
||||
@@ -3244,13 +4167,34 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11Devi
|
||||
@@ -3244,13 +4168,34 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_DispatchIndirect(ID3D11Devi
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetState(ID3D11DeviceContext *iface,
|
||||
ID3D11RasterizerState *rasterizer_state)
|
||||
{
|
||||
@@ -1159,7 +1160,7 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_RSSetScissorRects(ID3D11DeviceContext *iface,
|
||||
@@ -3365,8 +4309,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11
|
||||
@@ -3365,8 +4310,18 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShaderResources(ID3D11
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetShader(ID3D11DeviceContext *iface,
|
||||
ID3D11HullShader *shader, ID3D11ClassInstance *const *class_instances, UINT class_instance_count)
|
||||
{
|
||||
@@ -1179,7 +1180,7 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceContext *iface,
|
||||
@@ -3379,36 +4333,62 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceC
|
||||
@@ -3379,36 +4334,62 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetSamplers(ID3D11DeviceC
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_HSSetConstantBuffers(ID3D11DeviceContext *iface,
|
||||
UINT start_slot, UINT buffer_count, ID3D11Buffer *const *buffers)
|
||||
{
|
||||
@@ -1247,7 +1248,7 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_CSSetShaderResources(ID3D11DeviceContext *iface,
|
||||
@@ -3709,7 +4689,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11
|
||||
@@ -3709,7 +4690,15 @@ static void STDMETHODCALLTYPE d3d11_deferred_context_CSGetConstantBuffers(ID3D11
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_ClearState(ID3D11DeviceContext *iface)
|
||||
{
|
||||
@@ -1264,7 +1265,7 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
}
|
||||
|
||||
static void STDMETHODCALLTYPE d3d11_deferred_context_Flush(ID3D11DeviceContext *iface)
|
||||
@@ -3734,9 +4722,29 @@ static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11Devic
|
||||
@@ -3734,9 +4723,29 @@ static UINT STDMETHODCALLTYPE d3d11_deferred_context_GetContextFlags(ID3D11Devic
|
||||
static HRESULT STDMETHODCALLTYPE d3d11_deferred_context_FinishCommandList(ID3D11DeviceContext *iface,
|
||||
BOOL restore, ID3D11CommandList **command_list)
|
||||
{
|
||||
@@ -1296,8 +1297,8 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
}
|
||||
|
||||
static const struct ID3D11DeviceContextVtbl d3d11_deferred_context_vtbl =
|
||||
@@ -4351,6 +5359,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
|
||||
object->device = iface;
|
||||
@@ -4351,6 +5360,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_CreateDeferredContext(ID3D11Device
|
||||
object->device = (ID3D11Device *)iface;
|
||||
object->refcount = 1;
|
||||
|
||||
+ list_init(&object->commands);
|
||||
@@ -1306,5 +1307,5 @@ index fbc875c6fee..74ae6f8f333 100644
|
||||
wined3d_private_store_init(&object->private_store);
|
||||
|
||||
--
|
||||
2.20.1
|
||||
2.21.0
|
||||
|
||||
|
@@ -0,0 +1,183 @@
|
||||
From 31a800096eb212cda55f6fbea955f05c650ea2c1 Mon Sep 17 00:00:00 2001
|
||||
From: Paul Gofman <gofmanp@gmail.com>
|
||||
Date: Fri, 27 Sep 2019 16:26:04 +0300
|
||||
Subject: [PATCH] d3d11/tests: Add a basic test for drawing with deferred
|
||||
context.
|
||||
|
||||
---
|
||||
dlls/d3d11/tests/d3d11.c | 101 +++++++++++++++++++++++++++++++--------
|
||||
1 file changed, 81 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c
|
||||
index e653fb30b2..202179174b 100644
|
||||
--- a/dlls/d3d11/tests/d3d11.c
|
||||
+++ b/dlls/d3d11/tests/d3d11.c
|
||||
@@ -1692,10 +1692,11 @@ static void release_test_context_(unsigned int line, struct d3d11_test_context *
|
||||
ok_(__FILE__, line)(!ref, "Device has %u references left.\n", ref);
|
||||
}
|
||||
|
||||
-#define draw_quad(context) draw_quad_vs_(__LINE__, context, NULL, 0)
|
||||
-#define draw_quad_vs(a, b, c) draw_quad_vs_(__LINE__, a, b, c)
|
||||
+#define draw_quad(context) draw_quad_vs_(__LINE__, context, NULL, 0, (context)->immediate_context)
|
||||
+#define draw_quad_vs(a, b, c) draw_quad_vs_(__LINE__, a, b, c, (a)->immediate_context)
|
||||
+#define draw_quad_ext(a, b, c, d) draw_quad_vs_(__LINE__, a, b, c, d)
|
||||
static void draw_quad_vs_(unsigned int line, struct d3d11_test_context *context,
|
||||
- const DWORD *vs_code, size_t vs_code_size)
|
||||
+ const DWORD *vs_code, size_t vs_code_size, ID3D11DeviceContext *draw_context)
|
||||
{
|
||||
static const D3D11_INPUT_ELEMENT_DESC default_layout_desc[] =
|
||||
{
|
||||
@@ -1764,14 +1765,14 @@ static void draw_quad_vs_(unsigned int line, struct d3d11_test_context *context,
|
||||
if (!context->vb)
|
||||
context->vb = create_buffer(device, D3D11_BIND_VERTEX_BUFFER, sizeof(quad), quad);
|
||||
|
||||
- ID3D11DeviceContext_IASetInputLayout(context->immediate_context, context->input_layout);
|
||||
- ID3D11DeviceContext_IASetPrimitiveTopology(context->immediate_context, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
|
||||
+ ID3D11DeviceContext_IASetInputLayout(draw_context, context->input_layout);
|
||||
+ ID3D11DeviceContext_IASetPrimitiveTopology(draw_context, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
|
||||
stride = sizeof(*quad);
|
||||
offset = 0;
|
||||
- ID3D11DeviceContext_IASetVertexBuffers(context->immediate_context, 0, 1, &context->vb, &stride, &offset);
|
||||
- ID3D11DeviceContext_VSSetShader(context->immediate_context, context->vs, NULL, 0);
|
||||
+ ID3D11DeviceContext_IASetVertexBuffers(draw_context, 0, 1, &context->vb, &stride, &offset);
|
||||
+ ID3D11DeviceContext_VSSetShader(draw_context, context->vs, NULL, 0);
|
||||
|
||||
- ID3D11DeviceContext_Draw(context->immediate_context, 4, 0);
|
||||
+ ID3D11DeviceContext_Draw(draw_context, 4, 0);
|
||||
}
|
||||
|
||||
#define draw_quad_z(context, z) draw_quad_z_(__LINE__, context, z)
|
||||
@@ -1807,19 +1808,27 @@ static void draw_quad_z_(unsigned int line, struct d3d11_test_context *context,
|
||||
(ID3D11Resource *)context->vs_cb, 0, NULL, &data, 0, 0);
|
||||
|
||||
ID3D11DeviceContext_VSSetConstantBuffers(context->immediate_context, 0, 1, &context->vs_cb);
|
||||
- draw_quad_vs_(__LINE__, context, vs_code, sizeof(vs_code));
|
||||
+ draw_quad_vs_(__LINE__, context, vs_code, sizeof(vs_code), context->immediate_context);
|
||||
}
|
||||
|
||||
-static void set_quad_color(struct d3d11_test_context *context, const struct vec4 *color)
|
||||
+static void set_quad_color_ext(struct d3d11_test_context *context, const struct vec4 *color,
|
||||
+ ID3D11DeviceContext *draw_context)
|
||||
{
|
||||
- ID3D11DeviceContext_UpdateSubresource(context->immediate_context,
|
||||
+ ID3D11DeviceContext_UpdateSubresource(draw_context,
|
||||
(ID3D11Resource *)context->ps_cb, 0, NULL, color, 0, 0);
|
||||
}
|
||||
|
||||
-#define draw_color_quad(a, b) draw_color_quad_(__LINE__, a, b, NULL, 0)
|
||||
-#define draw_color_quad_vs(a, b, c, d) draw_color_quad_(__LINE__, a, b, c, d)
|
||||
+static void set_quad_color(struct d3d11_test_context *context, const struct vec4 *color)
|
||||
+{
|
||||
+ set_quad_color_ext(context, color, context->immediate_context);
|
||||
+}
|
||||
+
|
||||
+#define draw_color_quad(a, b) draw_color_quad_(__LINE__, a, b, NULL, 0, (a)->immediate_context)
|
||||
+#define draw_color_quad_vs(a, b, c, d) draw_color_quad_(__LINE__, a, b, c, d, (a)->immediate_context)
|
||||
+#define draw_color_quad_ext(a, b, c, d, e) draw_color_quad_(__LINE__, a, b, c, d, e)
|
||||
static void draw_color_quad_(unsigned int line, struct d3d11_test_context *context,
|
||||
- const struct vec4 *color, const DWORD *vs_code, size_t vs_code_size)
|
||||
+ const struct vec4 *color, const DWORD *vs_code, size_t vs_code_size,
|
||||
+ ID3D11DeviceContext *draw_context)
|
||||
{
|
||||
static const DWORD ps_color_code[] =
|
||||
{
|
||||
@@ -1856,12 +1865,12 @@ static void draw_color_quad_(unsigned int line, struct d3d11_test_context *conte
|
||||
if (!context->ps_cb)
|
||||
context->ps_cb = create_buffer(device, D3D11_BIND_CONSTANT_BUFFER, sizeof(*color), NULL);
|
||||
|
||||
- ID3D11DeviceContext_PSSetShader(context->immediate_context, context->ps, NULL, 0);
|
||||
- ID3D11DeviceContext_PSSetConstantBuffers(context->immediate_context, 0, 1, &context->ps_cb);
|
||||
+ ID3D11DeviceContext_PSSetShader(draw_context, context->ps, NULL, 0);
|
||||
+ ID3D11DeviceContext_PSSetConstantBuffers(draw_context, 0, 1, &context->ps_cb);
|
||||
|
||||
- set_quad_color(context, color);
|
||||
+ set_quad_color_ext(context, color, draw_context);
|
||||
|
||||
- draw_quad_vs_(line, context, vs_code, vs_code_size);
|
||||
+ draw_quad_vs_(line, context, vs_code, vs_code_size, draw_context);
|
||||
}
|
||||
|
||||
static void test_create_device(void)
|
||||
@@ -2088,6 +2097,59 @@ static void test_create_device(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_draw_deferred_context(void)
|
||||
+{
|
||||
+ static const struct vec4 red = {1.0f, 0.0f, 0.0f, 1.0f};
|
||||
+ static const float white[] = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||
+ static const float black[] = {0.0f, 0.0f, 0.0f, 0.0f};
|
||||
+ ID3D11DeviceContext *context, *deferred_context;
|
||||
+ struct d3d11_test_context test_context;
|
||||
+ ID3D11CommandList *command_list;
|
||||
+ ID3D11Device *device;
|
||||
+ DWORD color;
|
||||
+ HRESULT hr;
|
||||
+
|
||||
+ if (!init_test_context(&test_context, NULL))
|
||||
+ return;
|
||||
+
|
||||
+ device = test_context.device;
|
||||
+ context = test_context.immediate_context;
|
||||
+
|
||||
+ hr = ID3D11Device_CreateDeferredContext(device, 0, &deferred_context);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, white);
|
||||
+ color = get_texture_color(test_context.backbuffer, 320, 240);
|
||||
+ ok(color == 0xffffffff, "Got unexpected color 0x%08x.\n", color);
|
||||
+
|
||||
+ ID3D11DeviceContext_ClearRenderTargetView(deferred_context, test_context.backbuffer_rtv, black);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_FinishCommandList(deferred_context, FALSE, &command_list);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+
|
||||
+ ID3D11DeviceContext_ExecuteCommandList(context, command_list, TRUE);
|
||||
+ color = get_texture_color(test_context.backbuffer, 320, 240);
|
||||
+ ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color);
|
||||
+ ID3D11CommandList_Release(command_list);
|
||||
+
|
||||
+ ID3D11DeviceContext_OMSetRenderTargets(deferred_context, 1, &test_context.backbuffer_rtv, NULL);
|
||||
+
|
||||
+ draw_color_quad_ext(&test_context, &red, NULL, 0, deferred_context);
|
||||
+ color = get_texture_color(test_context.backbuffer, 320, 240);
|
||||
+ ok(color == 0x00000000, "Got unexpected color 0x%08x.\n", color);
|
||||
+
|
||||
+ hr = ID3D11DeviceContext_FinishCommandList(deferred_context, TRUE, &command_list);
|
||||
+ ok(hr == S_OK, "Got unexpected hr %#x.\n", hr);
|
||||
+ ID3D11DeviceContext_ExecuteCommandList(context, command_list, TRUE);
|
||||
+
|
||||
+ color = get_texture_color(test_context.backbuffer, 320, 240);
|
||||
+ ok(color == 0xff0000ff, "Got unexpected color 0x%08x.\n", color);
|
||||
+ ID3D11CommandList_Release(command_list);
|
||||
+
|
||||
+ ID3D11DeviceContext_Release(deferred_context);
|
||||
+ release_test_context(&test_context);
|
||||
+}
|
||||
+
|
||||
static void test_device_interfaces(const D3D_FEATURE_LEVEL feature_level)
|
||||
{
|
||||
struct device_desc device_desc;
|
||||
@@ -29400,11 +29462,11 @@ START_TEST(d3d11)
|
||||
}
|
||||
|
||||
print_adapter_info();
|
||||
-
|
||||
queue_test(test_create_device);
|
||||
queue_for_each_feature_level(test_device_interfaces);
|
||||
queue_test(test_get_immediate_context);
|
||||
queue_test(test_create_deferred_context);
|
||||
+ queue_test(test_draw_deferred_context);
|
||||
queue_test(test_create_texture1d);
|
||||
queue_test(test_texture1d_interfaces);
|
||||
queue_test(test_create_texture2d);
|
||||
@@ -29538,6 +29600,5 @@ START_TEST(d3d11)
|
||||
queue_test(test_render_a8);
|
||||
queue_test(test_standard_pattern);
|
||||
queue_test(test_desktop_window);
|
||||
-
|
||||
run_queued_tests();
|
||||
}
|
||||
--
|
||||
2.21.0
|
||||
|
@@ -1,18 +1,19 @@
|
||||
From b2bae3c7d8f8b6dfc7587b7a7a3147f5650096a7 Mon Sep 17 00:00:00 2001
|
||||
From bbc93f065045b7854f4446d9199c2c22c6251d3d Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Sun, 30 Jul 2017 23:50:18 +0200
|
||||
Subject: d3dx9: Return D3DFMT_A8R8G8B8 in D3DXGetImageInfoFromFileInMemory for
|
||||
32 bpp BMP with alpha.
|
||||
Subject: [PATCH] d3dx9: Return D3DFMT_A8R8G8B8 in
|
||||
D3DXGetImageInfoFromFileInMemory for 32 bpp BMP with alpha.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/surface.c | 18 ++++++++++++++++++
|
||||
1 file changed, 18 insertions(+)
|
||||
dlls/d3dx9_36/surface.c | 18 ++++++++++++++++++
|
||||
dlls/d3dx9_36/tests/surface.c | 2 +-
|
||||
2 files changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index c82c22289..abb1c0e5c 100644
|
||||
index a2eca9cbdb..b670657125 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -954,6 +954,24 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize,
|
||||
@@ -980,6 +980,24 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,6 +38,19 @@ index c82c22289..abb1c0e5c 100644
|
||||
if (frame)
|
||||
IWICBitmapFrameDecode_Release(frame);
|
||||
|
||||
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
|
||||
index 04ce57fa4f..db0c9c7291 100644
|
||||
--- a/dlls/d3dx9_36/tests/surface.c
|
||||
+++ b/dlls/d3dx9_36/tests/surface.c
|
||||
@@ -616,7 +616,7 @@ static void test_D3DXGetImageInfo(void)
|
||||
ok(info.Format == D3DFMT_X8R8G8B8, "Got unexpected format %u.\n", info.Format);
|
||||
hr = D3DXGetImageInfoFromFileInMemory(bmp_32bpp_argb, sizeof(bmp_32bpp_argb), &info);
|
||||
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
|
||||
- todo_wine ok(info.Format == D3DFMT_A8R8G8B8, "Got unexpected format %u.\n", info.Format);
|
||||
+ ok(info.Format == D3DFMT_A8R8G8B8, "Got unexpected format %u.\n", info.Format);
|
||||
|
||||
/* Grayscale PNG */
|
||||
hr = D3DXGetImageInfoFromFileInMemory(png_grayscale, sizeof(png_grayscale), &info);
|
||||
--
|
||||
2.20.1
|
||||
2.21.0
|
||||
|
||||
|
@@ -1,17 +1,18 @@
|
||||
From a625d57a2c3d125604ec3c8fe1381ed2df3d72ac Mon Sep 17 00:00:00 2001
|
||||
From a31e5531eb8f3be5fddf9f81f48f191b1a10c2aa Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Mon, 16 Mar 2015 08:18:33 +0100
|
||||
Subject: [PATCH] d3dx9_36: Improve stub for ID3DXEffectImpl_CloneEffect.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/effect.c | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
dlls/d3dx9_36/effect.c | 4 +++-
|
||||
dlls/d3dx9_36/tests/effect.c | 16 +++++-----------
|
||||
2 files changed, 8 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c
|
||||
index 87eaf86..fd4635e 100644
|
||||
index 7d686a435d..f8d8ab9cd2 100644
|
||||
--- a/dlls/d3dx9_36/effect.c
|
||||
+++ b/dlls/d3dx9_36/effect.c
|
||||
@@ -4381,7 +4381,9 @@ static HRESULT WINAPI ID3DXEffectImpl_CloneEffect(ID3DXEffect *iface,
|
||||
@@ -4100,7 +4100,9 @@ static HRESULT WINAPI d3dx_effect_CloneEffect(ID3DXEffect *iface, IDirect3DDevic
|
||||
if (!device)
|
||||
return D3DERR_INVALIDCALL;
|
||||
|
||||
@@ -22,6 +23,45 @@ index 87eaf86..fd4635e 100644
|
||||
}
|
||||
|
||||
#if D3DX_SDK_VERSION >= 27
|
||||
diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
|
||||
index 5c4a3c5e77..ff15426938 100644
|
||||
--- a/dlls/d3dx9_36/tests/effect.c
|
||||
+++ b/dlls/d3dx9_36/tests/effect.c
|
||||
@@ -7419,29 +7419,23 @@ static void test_effect_clone(void)
|
||||
ok(hr == D3DERR_INVALIDCALL, "Got result %#x.\n", hr);
|
||||
|
||||
hr = effect->lpVtbl->CloneEffect(effect, device, &cloned);
|
||||
-todo_wine
|
||||
ok(hr == D3D_OK, "Got result %#x.\n", hr);
|
||||
-if (hr == D3D_OK)
|
||||
-{
|
||||
- ok(cloned != effect, "Expected new effect instance.\n");
|
||||
+
|
||||
+ todo_wine ok(cloned != effect, "Expected new effect instance.\n");
|
||||
cloned->lpVtbl->Release(cloned);
|
||||
-}
|
||||
/* Try with different device. */
|
||||
device2 = create_device(&window2);
|
||||
hr = effect->lpVtbl->CloneEffect(effect, device2, &cloned);
|
||||
-todo_wine
|
||||
ok(hr == D3D_OK, "Got result %#x.\n", hr);
|
||||
-if (hr == D3D_OK)
|
||||
-{
|
||||
- ok(cloned != effect, "Expected new effect instance.\n");
|
||||
+ todo_wine ok(cloned != effect, "Expected new effect instance.\n");
|
||||
|
||||
hr = cloned->lpVtbl->GetDevice(cloned, &device3);
|
||||
ok(hr == S_OK, "Failed to get effect device.\n");
|
||||
- ok(device3 == device2, "Unexpected device instance.\n");
|
||||
+ todo_wine ok(device3 == device2, "Unexpected device instance, device3 %p, device2 %p.\n", device3, device2);
|
||||
IDirect3DDevice9_Release(device3);
|
||||
|
||||
cloned->lpVtbl->Release(cloned);
|
||||
-}
|
||||
+
|
||||
IDirect3DDevice9_Release(device2);
|
||||
DestroyWindow(window2);
|
||||
effect->lpVtbl->Release(effect);
|
||||
--
|
||||
1.9.1
|
||||
2.21.0
|
||||
|
||||
|
@@ -1 +1 @@
|
||||
Fixes: Initial implementation for d3dx9_36.D3DXDisassembleShader
|
||||
Fixes: [46649] Multiple applications need D3DXDisassembleShader() implementation (Tom Clancy's Rainbow Six: Vegas 2, The Void)
|
||||
|
@@ -1 +1 @@
|
||||
Fixes: Implement semi-stub for D3DXOptimizeVertices
|
||||
Fixes: [47776] Timeshift needs D3DXOptimizeVertices()
|
||||
|
@@ -1,464 +0,0 @@
|
||||
From 3fb7038ed7f1ebbadd60465f68ed0e61ba81e730 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Fri, 30 Mar 2018 08:22:02 +0000
|
||||
Subject: [PATCH] d3dx9_36: add DXTn support
|
||||
|
||||
---
|
||||
dlls/d3dx9_24/Makefile.in | 2 +-
|
||||
dlls/d3dx9_25/Makefile.in | 2 +-
|
||||
dlls/d3dx9_26/Makefile.in | 2 +-
|
||||
dlls/d3dx9_27/Makefile.in | 2 +-
|
||||
dlls/d3dx9_28/Makefile.in | 2 +-
|
||||
dlls/d3dx9_29/Makefile.in | 2 +-
|
||||
dlls/d3dx9_30/Makefile.in | 2 +-
|
||||
dlls/d3dx9_31/Makefile.in | 2 +-
|
||||
dlls/d3dx9_32/Makefile.in | 2 +-
|
||||
dlls/d3dx9_33/Makefile.in | 2 +-
|
||||
dlls/d3dx9_34/Makefile.in | 2 +-
|
||||
dlls/d3dx9_35/Makefile.in | 2 +-
|
||||
dlls/d3dx9_36/Makefile.in | 2 +-
|
||||
dlls/d3dx9_36/surface.c | 102 +++++++++++++++++++++++++++++++---
|
||||
dlls/d3dx9_36/tests/surface.c | 8 +--
|
||||
dlls/d3dx9_37/Makefile.in | 2 +-
|
||||
dlls/d3dx9_38/Makefile.in | 2 +-
|
||||
dlls/d3dx9_39/Makefile.in | 2 +-
|
||||
dlls/d3dx9_40/Makefile.in | 2 +-
|
||||
dlls/d3dx9_41/Makefile.in | 2 +-
|
||||
dlls/d3dx9_42/Makefile.in | 2 +-
|
||||
dlls/d3dx9_43/Makefile.in | 2 +-
|
||||
22 files changed, 118 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_24/Makefile.in b/dlls/d3dx9_24/Makefile.in
|
||||
index a327292b8..b43b1be81 100644
|
||||
--- a/dlls/d3dx9_24/Makefile.in
|
||||
+++ b/dlls/d3dx9_24/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=24
|
||||
MODULE = d3dx9_24.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_25/Makefile.in b/dlls/d3dx9_25/Makefile.in
|
||||
index ccf374832..edcba8b59 100644
|
||||
--- a/dlls/d3dx9_25/Makefile.in
|
||||
+++ b/dlls/d3dx9_25/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=25
|
||||
MODULE = d3dx9_25.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_26/Makefile.in b/dlls/d3dx9_26/Makefile.in
|
||||
index 21ef9e00b..72d0e0ce1 100644
|
||||
--- a/dlls/d3dx9_26/Makefile.in
|
||||
+++ b/dlls/d3dx9_26/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=26
|
||||
MODULE = d3dx9_26.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_27/Makefile.in b/dlls/d3dx9_27/Makefile.in
|
||||
index 3adea191c..24763cb10 100644
|
||||
--- a/dlls/d3dx9_27/Makefile.in
|
||||
+++ b/dlls/d3dx9_27/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=27
|
||||
MODULE = d3dx9_27.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_28/Makefile.in b/dlls/d3dx9_28/Makefile.in
|
||||
index bd75a23d2..ce041b069 100644
|
||||
--- a/dlls/d3dx9_28/Makefile.in
|
||||
+++ b/dlls/d3dx9_28/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=28
|
||||
MODULE = d3dx9_28.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_29/Makefile.in b/dlls/d3dx9_29/Makefile.in
|
||||
index 491c105ab..99ab2ded7 100644
|
||||
--- a/dlls/d3dx9_29/Makefile.in
|
||||
+++ b/dlls/d3dx9_29/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=29
|
||||
MODULE = d3dx9_29.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_30/Makefile.in b/dlls/d3dx9_30/Makefile.in
|
||||
index 44e28b79f..bcf0b1c82 100644
|
||||
--- a/dlls/d3dx9_30/Makefile.in
|
||||
+++ b/dlls/d3dx9_30/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=30
|
||||
MODULE = d3dx9_30.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_31/Makefile.in b/dlls/d3dx9_31/Makefile.in
|
||||
index 0f16d27fd..7c980fbb8 100644
|
||||
--- a/dlls/d3dx9_31/Makefile.in
|
||||
+++ b/dlls/d3dx9_31/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=31
|
||||
MODULE = d3dx9_31.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_32/Makefile.in b/dlls/d3dx9_32/Makefile.in
|
||||
index 99357dcce..e493bd8a6 100644
|
||||
--- a/dlls/d3dx9_32/Makefile.in
|
||||
+++ b/dlls/d3dx9_32/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=32
|
||||
MODULE = d3dx9_32.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_33/Makefile.in b/dlls/d3dx9_33/Makefile.in
|
||||
index 5a92dca61..fba4106af 100644
|
||||
--- a/dlls/d3dx9_33/Makefile.in
|
||||
+++ b/dlls/d3dx9_33/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=33
|
||||
MODULE = d3dx9_33.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_34/Makefile.in b/dlls/d3dx9_34/Makefile.in
|
||||
index 84cca56ec..e03d8ebd5 100644
|
||||
--- a/dlls/d3dx9_34/Makefile.in
|
||||
+++ b/dlls/d3dx9_34/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=34
|
||||
MODULE = d3dx9_34.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_35/Makefile.in b/dlls/d3dx9_35/Makefile.in
|
||||
index 640f30620..ea19e55b2 100644
|
||||
--- a/dlls/d3dx9_35/Makefile.in
|
||||
+++ b/dlls/d3dx9_35/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=35
|
||||
MODULE = d3dx9_35.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_36/Makefile.in b/dlls/d3dx9_36/Makefile.in
|
||||
index b8a173ce0..3f96b6656 100644
|
||||
--- a/dlls/d3dx9_36/Makefile.in
|
||||
+++ b/dlls/d3dx9_36/Makefile.in
|
||||
@@ -1,7 +1,7 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=36
|
||||
MODULE = d3dx9_36.dll
|
||||
IMPORTLIB = d3dx9
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
EXTRADLLFLAGS = -mno-cygwin
|
||||
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
|
||||
index 8e9b834d8..83c30338e 100644
|
||||
--- a/dlls/d3dx9_36/surface.c
|
||||
+++ b/dlls/d3dx9_36/surface.c
|
||||
@@ -25,6 +25,8 @@
|
||||
#include "ole2.h"
|
||||
#include "wincodec.h"
|
||||
|
||||
+#include "wine/wined3d.h"
|
||||
+
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3dx);
|
||||
|
||||
HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT, IWICImagingFactory**);
|
||||
@@ -1798,6 +1800,24 @@ void point_filter_argb_pixels(const BYTE *src, UINT src_row_pitch, UINT src_slic
|
||||
}
|
||||
}
|
||||
|
||||
+typedef BOOL (__cdecl *dxtn_conversion_func)(const BYTE *src, BYTE *dst, DWORD pitch_in, DWORD pitch_out,
|
||||
+ enum wined3d_format_id format, unsigned int w, unsigned int h);
|
||||
+
|
||||
+static dxtn_conversion_func get_dxtn_conversion_func(D3DFORMAT format, BOOL encode)
|
||||
+{
|
||||
+ switch (format)
|
||||
+ {
|
||||
+ case D3DFMT_DXT1:
|
||||
+ return encode ? wined3d_dxt1_encode : wined3d_dxt1_decode;
|
||||
+ case D3DFMT_DXT3:
|
||||
+ return encode ? wined3d_dxt3_encode : wined3d_dxt3_decode;
|
||||
+ case D3DFMT_DXT5:
|
||||
+ return encode ? wined3d_dxt5_encode : wined3d_dxt5_decode;
|
||||
+ default:
|
||||
+ return NULL;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
/************************************************************
|
||||
* D3DXLoadSurfaceFromMemory
|
||||
*
|
||||
@@ -1837,10 +1857,12 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
{
|
||||
const struct pixel_format_desc *srcformatdesc, *destformatdesc;
|
||||
IDirect3DSurface9 *surface;
|
||||
+ void *tmp_src_memory = NULL, *tmp_dst_memory = NULL;
|
||||
+ dxtn_conversion_func pre_convert = NULL, post_convert = NULL;
|
||||
D3DSURFACE_DESC surfdesc;
|
||||
D3DLOCKED_RECT lockrect;
|
||||
struct volume src_size, dst_size;
|
||||
- HRESULT hr;
|
||||
+ HRESULT hr = D3D_OK;
|
||||
|
||||
TRACE("(%p, %p, %s, %p, %#x, %u, %p, %s, %#x, 0x%08x)\n",
|
||||
dst_surface, dst_palette, wine_dbgstr_rect(dst_rect), src_memory, src_format,
|
||||
@@ -1921,18 +1943,65 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
}
|
||||
else /* Stretching or format conversion. */
|
||||
{
|
||||
- if (!is_conversion_from_supported(srcformatdesc)
|
||||
- || !is_conversion_to_supported(destformatdesc))
|
||||
+ UINT tmp_src_pitch, tmp_dst_pitch;
|
||||
+
|
||||
+ pre_convert = get_dxtn_conversion_func(srcformatdesc->format, FALSE);
|
||||
+ post_convert = get_dxtn_conversion_func(destformatdesc->format, TRUE);
|
||||
+
|
||||
+ if ((!pre_convert && !is_conversion_from_supported(srcformatdesc)) ||
|
||||
+ (!post_convert && !is_conversion_to_supported(destformatdesc)))
|
||||
{
|
||||
FIXME("Unsupported format conversion %#x -> %#x.\n", src_format, surfdesc.Format);
|
||||
unlock_surface(dst_surface, dst_rect, surface, FALSE);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
+ /* handle pre-conversion */
|
||||
+ if (pre_convert)
|
||||
+ {
|
||||
+ tmp_src_memory = HeapAlloc(GetProcessHeap(), 0, src_size.width * src_size.height * sizeof(DWORD));
|
||||
+ if (!tmp_src_memory)
|
||||
+ {
|
||||
+ hr = E_OUTOFMEMORY;
|
||||
+ goto done;
|
||||
+ }
|
||||
+ tmp_src_pitch = src_size.width * sizeof(DWORD);
|
||||
+ if (!pre_convert(src_memory, tmp_src_memory, src_pitch, tmp_src_pitch,
|
||||
+ WINED3DFMT_B8G8R8A8_UNORM, src_size.width, src_size.height))
|
||||
+ {
|
||||
+ hr = E_FAIL;
|
||||
+ goto done;
|
||||
+ }
|
||||
+ srcformatdesc = get_format_info(D3DFMT_A8R8G8B8);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ tmp_src_memory = (void *)src_memory;
|
||||
+ tmp_src_pitch = src_pitch;
|
||||
+ }
|
||||
+
|
||||
+ /* handle post-conversion */
|
||||
+ if (post_convert)
|
||||
+ {
|
||||
+ tmp_dst_memory = HeapAlloc(GetProcessHeap(), 0, dst_size.width * dst_size.height * sizeof(DWORD));
|
||||
+ if (!tmp_dst_memory)
|
||||
+ {
|
||||
+ hr = E_OUTOFMEMORY;
|
||||
+ goto done;
|
||||
+ }
|
||||
+ tmp_dst_pitch = dst_size.width * sizeof(DWORD);
|
||||
+ destformatdesc = get_format_info(D3DFMT_A8R8G8B8);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ tmp_dst_memory = lockrect.pBits;
|
||||
+ tmp_dst_pitch = lockrect.Pitch;
|
||||
+ }
|
||||
+
|
||||
if ((filter & 0xf) == D3DX_FILTER_NONE)
|
||||
{
|
||||
- convert_argb_pixels(src_memory, src_pitch, 0, &src_size, srcformatdesc,
|
||||
- lockrect.pBits, lockrect.Pitch, 0, &dst_size, destformatdesc, color_key, src_palette);
|
||||
+ convert_argb_pixels(tmp_src_memory, tmp_src_pitch, 0, &src_size, srcformatdesc,
|
||||
+ tmp_dst_memory, tmp_dst_pitch, 0, &dst_size, destformatdesc, color_key, src_palette);
|
||||
}
|
||||
else /* if ((filter & 0xf) == D3DX_FILTER_POINT) */
|
||||
{
|
||||
@@ -1941,12 +2010,29 @@ HRESULT WINAPI D3DXLoadSurfaceFromMemory(IDirect3DSurface9 *dst_surface,
|
||||
|
||||
/* Always apply a point filter until D3DX_FILTER_LINEAR,
|
||||
* D3DX_FILTER_TRIANGLE and D3DX_FILTER_BOX are implemented. */
|
||||
- point_filter_argb_pixels(src_memory, src_pitch, 0, &src_size, srcformatdesc,
|
||||
- lockrect.pBits, lockrect.Pitch, 0, &dst_size, destformatdesc, color_key, src_palette);
|
||||
+ point_filter_argb_pixels(tmp_src_memory, tmp_src_pitch, 0, &src_size, srcformatdesc,
|
||||
+ tmp_dst_memory, tmp_dst_pitch, 0, &dst_size, destformatdesc, color_key, src_palette);
|
||||
+ }
|
||||
+
|
||||
+ /* handle post-conversion */
|
||||
+ if (post_convert)
|
||||
+ {
|
||||
+ if (!post_convert(tmp_dst_memory, lockrect.pBits, tmp_dst_pitch, lockrect.Pitch,
|
||||
+ WINED3DFMT_B8G8R8A8_UNORM, dst_size.width, dst_size.height))
|
||||
+ {
|
||||
+ hr = E_FAIL;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
- return unlock_surface(dst_surface, dst_rect, surface, TRUE);
|
||||
+done:
|
||||
+ if (pre_convert)
|
||||
+ HeapFree(GetProcessHeap(), 0, tmp_src_memory);
|
||||
+ if (post_convert)
|
||||
+ HeapFree(GetProcessHeap(), 0, tmp_dst_memory);
|
||||
+
|
||||
+ unlock_surface(dst_surface, dst_rect, surface, TRUE);
|
||||
+ return hr;
|
||||
}
|
||||
|
||||
/************************************************************
|
||||
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
|
||||
index 4a10492a0..d59ff028a 100644
|
||||
--- a/dlls/d3dx9_36/tests/surface.c
|
||||
+++ b/dlls/d3dx9_36/tests/surface.c
|
||||
@@ -1242,7 +1242,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
|
||||
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
|
||||
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
|
||||
- todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels to DXT3 format.\n");
|
||||
+ ok(SUCCEEDED(hr), "Failed to convert pixels to DXT3 format.\n");
|
||||
check_release((IUnknown*)newsurf, 1);
|
||||
check_release((IUnknown*)tex, 0);
|
||||
}
|
||||
@@ -1268,7 +1268,7 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
|
||||
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
|
||||
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
|
||||
- todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels to DXT5 format.\n");
|
||||
+ ok(SUCCEEDED(hr), "Failed to convert pixels to DXT5 format.\n");
|
||||
check_release((IUnknown*)newsurf, 1);
|
||||
check_release((IUnknown*)tex, 0);
|
||||
}
|
||||
@@ -1281,10 +1281,10 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
|
||||
hr = IDirect3DTexture9_GetSurfaceLevel(tex, 0, &newsurf);
|
||||
ok(SUCCEEDED(hr), "Failed to get the surface, hr %#x.\n", hr);
|
||||
hr = D3DXLoadSurfaceFromSurface(newsurf, NULL, NULL, surf, NULL, NULL, D3DX_FILTER_NONE, 0);
|
||||
- todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels to DXT1 format.\n");
|
||||
+ ok(SUCCEEDED(hr), "Failed to convert pixels to DXT1 format.\n");
|
||||
|
||||
hr = D3DXLoadSurfaceFromSurface(surf, NULL, NULL, newsurf, NULL, NULL, D3DX_FILTER_NONE, 0);
|
||||
- todo_wine ok(SUCCEEDED(hr), "Failed to convert pixels from DXT1 format.\n");
|
||||
+ ok(SUCCEEDED(hr), "Failed to convert pixels from DXT1 format.\n");
|
||||
|
||||
check_release((IUnknown*)newsurf, 1);
|
||||
check_release((IUnknown*)tex, 0);
|
||||
diff --git a/dlls/d3dx9_37/Makefile.in b/dlls/d3dx9_37/Makefile.in
|
||||
index d16a0ce05..669482dee 100644
|
||||
--- a/dlls/d3dx9_37/Makefile.in
|
||||
+++ b/dlls/d3dx9_37/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=37
|
||||
MODULE = d3dx9_37.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_38/Makefile.in b/dlls/d3dx9_38/Makefile.in
|
||||
index 4a02ab417..1f43705e7 100644
|
||||
--- a/dlls/d3dx9_38/Makefile.in
|
||||
+++ b/dlls/d3dx9_38/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=38
|
||||
MODULE = d3dx9_38.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_39/Makefile.in b/dlls/d3dx9_39/Makefile.in
|
||||
index 5a3840574..690ed7d31 100644
|
||||
--- a/dlls/d3dx9_39/Makefile.in
|
||||
+++ b/dlls/d3dx9_39/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=39
|
||||
MODULE = d3dx9_39.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_40/Makefile.in b/dlls/d3dx9_40/Makefile.in
|
||||
index 581e18dba..8e6984683 100644
|
||||
--- a/dlls/d3dx9_40/Makefile.in
|
||||
+++ b/dlls/d3dx9_40/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=40
|
||||
MODULE = d3dx9_40.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_41/Makefile.in b/dlls/d3dx9_41/Makefile.in
|
||||
index 63a0be753..37fb2f3e6 100644
|
||||
--- a/dlls/d3dx9_41/Makefile.in
|
||||
+++ b/dlls/d3dx9_41/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=41
|
||||
MODULE = d3dx9_41.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_42/Makefile.in b/dlls/d3dx9_42/Makefile.in
|
||||
index ff391a202..2d706c5f8 100644
|
||||
--- a/dlls/d3dx9_42/Makefile.in
|
||||
+++ b/dlls/d3dx9_42/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=42
|
||||
MODULE = d3dx9_42.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
diff --git a/dlls/d3dx9_43/Makefile.in b/dlls/d3dx9_43/Makefile.in
|
||||
index e009a41c5..d539f6b22 100644
|
||||
--- a/dlls/d3dx9_43/Makefile.in
|
||||
+++ b/dlls/d3dx9_43/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
EXTRADEFS = -DD3DX_SDK_VERSION=43
|
||||
MODULE = d3dx9_43.dll
|
||||
-IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase
|
||||
+IMPORTS = d3d9 d3dcompiler dxguid d3dxof ole32 gdi32 user32 ucrtbase wined3d
|
||||
PARENTSRC = ../d3dx9_36
|
||||
DELAYIMPORTS = windowscodecs
|
||||
|
||||
--
|
||||
2.22.0
|
||||
|
@@ -1,5 +0,0 @@
|
||||
Depends: wined3d-DXTn
|
||||
Fixes: [33768] Fix texture corruption in CSI: Fatal Conspiracy
|
||||
Fixes: [37391] Exception during start of fr-043 caused by missing DXTn support
|
||||
Fixes: [34692] Fix wrong colors in Wolfenstein (2009)
|
||||
Fixes: [24983] Fix crash in Space Rangers2 caused by missing DXTn support
|
@@ -1,24 +1,23 @@
|
||||
From e83a145da4b9e2c0c4b2b449aa72ce129344c5e5 Mon Sep 17 00:00:00 2001
|
||||
From 5d633f126af17add8eaefc10c08e400616ff5fc9 Mon Sep 17 00:00:00 2001
|
||||
From: Christian Costa <titan.costa@gmail.com>
|
||||
Date: Tue, 4 Nov 2014 22:22:03 +0100
|
||||
Subject: d3dx9_36: Align texture dimensions to block size for compressed
|
||||
textures in D3DXCheckTextureRequirements.
|
||||
Subject: [PATCH] d3dx9_36: Align texture dimensions to block size for
|
||||
compressed textures in D3DXCheckTextureRequirements.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/tests/texture.c | 10 ++++++++++
|
||||
dlls/d3dx9_36/texture.c | 8 ++++----
|
||||
2 files changed, 14 insertions(+), 4 deletions(-)
|
||||
dlls/d3dx9_36/tests/texture.c | 9 +++++++++
|
||||
dlls/d3dx9_36/texture.c | 8 ++++----
|
||||
2 files changed, 13 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/tests/texture.c b/dlls/d3dx9_36/tests/texture.c
|
||||
index 61132bb..11a3b92 100644
|
||||
index fc1589d25e..93a7fcd911 100644
|
||||
--- a/dlls/d3dx9_36/tests/texture.c
|
||||
+++ b/dlls/d3dx9_36/tests/texture.c
|
||||
@@ -374,6 +374,16 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
|
||||
ok(height == 4, "Returned height %d, expected %d\n", height, 4);
|
||||
ok(mipmaps == 1, "Returned mipmaps %d, expected %d\n", mipmaps, 1);
|
||||
ok(format == D3DFMT_DXT5, "Returned format %u, expected %u\n", format, D3DFMT_DXT5);
|
||||
@@ -448,6 +448,15 @@ static void test_D3DXCheckTextureRequirements(IDirect3DDevice9 *device)
|
||||
ok(width == 4, "Got unexpected width %d.\n", width);
|
||||
ok(height == 4, "Got unexpected height %d.\n", height);
|
||||
ok(format == D3DFMT_DXT5, "Got unexpected format %u.\n", format);
|
||||
+
|
||||
+ format = D3DFMT_DXT5;
|
||||
+ width = 5; height = 5;
|
||||
+ mipmaps = 1;
|
||||
+ hr = D3DXCheckTextureRequirements(device, &width, &height, &mipmaps, 0, &format, D3DPOOL_DEFAULT);
|
||||
@@ -31,10 +30,10 @@ index 61132bb..11a3b92 100644
|
||||
else
|
||||
{
|
||||
diff --git a/dlls/d3dx9_36/texture.c b/dlls/d3dx9_36/texture.c
|
||||
index 7ebe264..fa0106c 100644
|
||||
index 4ae924999e..a592b7ba1e 100644
|
||||
--- a/dlls/d3dx9_36/texture.c
|
||||
+++ b/dlls/d3dx9_36/texture.c
|
||||
@@ -333,10 +333,10 @@ HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UIN
|
||||
@@ -339,10 +339,10 @@ HRESULT WINAPI D3DXCheckTextureRequirements(struct IDirect3DDevice9 *device, UIN
|
||||
|
||||
if (fmt->block_width != 1 || fmt->block_height != 1)
|
||||
{
|
||||
@@ -50,5 +49,5 @@ index 7ebe264..fa0106c 100644
|
||||
|
||||
if ((caps.TextureCaps & D3DPTEXTURECAPS_POW2) && (!is_pow2(w)))
|
||||
--
|
||||
2.1.3
|
||||
2.21.0
|
||||
|
||||
|
@@ -1,11 +1,10 @@
|
||||
From b78cfe9c6453db477e0ba69b343e3ed128b345bd Mon Sep 17 00:00:00 2001
|
||||
From 1a21bd1a5584a1d2b54a8a6df9944d44a83b05d1 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Wed, 29 Jul 2015 17:09:50 +0200
|
||||
Subject: [PATCH] ddraw: Create rendering targets in video memory if possible.
|
||||
|
||||
Based on a patch by Henri Verbeet.
|
||||
|
||||
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
---
|
||||
dlls/ddraw/ddraw.c | 6 +++---
|
||||
dlls/ddraw/ddraw_private.h | 3 ++-
|
||||
@@ -14,10 +13,10 @@ Signed-off-by: Paul Gofman <gofmanp@gmail.com>
|
||||
4 files changed, 56 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 2f94e325db..82bf315fe7 100644
|
||||
index 68e9286590..1141739e78 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -4342,7 +4342,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
|
||||
@@ -4296,7 +4296,7 @@ static HRESULT WINAPI d3d7_CreateDevice(IDirect3D7 *iface, REFCLSID riid,
|
||||
TRACE("iface %p, riid %s, surface %p, device %p.\n", iface, debugstr_guid(riid), surface, device);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
@@ -26,7 +25,7 @@ index 2f94e325db..82bf315fe7 100644
|
||||
{
|
||||
*device = &object->IDirect3DDevice7_iface;
|
||||
}
|
||||
@@ -4371,7 +4371,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
|
||||
@@ -4325,7 +4325,7 @@ static HRESULT WINAPI d3d3_CreateDevice(IDirect3D3 *iface, REFCLSID riid,
|
||||
return CLASS_E_NOAGGREGATION;
|
||||
|
||||
wined3d_mutex_lock();
|
||||
@@ -35,7 +34,7 @@ index 2f94e325db..82bf315fe7 100644
|
||||
{
|
||||
*device = &device_impl->IDirect3DDevice3_iface;
|
||||
}
|
||||
@@ -4397,7 +4397,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
|
||||
@@ -4351,7 +4351,7 @@ static HRESULT WINAPI d3d2_CreateDevice(IDirect3D2 *iface, REFCLSID riid,
|
||||
iface, debugstr_guid(riid), surface, device);
|
||||
|
||||
wined3d_mutex_lock();
|
||||
@@ -45,10 +44,10 @@ index 2f94e325db..82bf315fe7 100644
|
||||
*device = &device_impl->IDirect3DDevice2_iface;
|
||||
}
|
||||
diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h
|
||||
index 19f21a8923..e2fe323b68 100644
|
||||
index 771b2a44d1..4bf0e46462 100644
|
||||
--- a/dlls/ddraw/ddraw_private.h
|
||||
+++ b/dlls/ddraw/ddraw_private.h
|
||||
@@ -304,6 +304,7 @@ struct d3d_device
|
||||
@@ -307,6 +307,7 @@ struct d3d_device
|
||||
IUnknown IUnknown_inner;
|
||||
LONG ref;
|
||||
UINT version;
|
||||
@@ -56,8 +55,8 @@ index 19f21a8923..e2fe323b68 100644
|
||||
|
||||
IUnknown *outer_unknown;
|
||||
struct wined3d_device *wined3d_device;
|
||||
@@ -350,7 +351,7 @@ struct d3d_device
|
||||
BOOL recording;
|
||||
@@ -354,7 +355,7 @@ struct d3d_device
|
||||
struct wined3d_stateblock *recording;
|
||||
};
|
||||
|
||||
-HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUnknown *rt_iface,
|
||||
@@ -66,10 +65,10 @@ index 19f21a8923..e2fe323b68 100644
|
||||
enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device *device) DECLSPEC_HIDDEN;
|
||||
|
||||
diff --git a/dlls/ddraw/device.c b/dlls/ddraw/device.c
|
||||
index 054e2dccc9..0170639de8 100644
|
||||
index 43e5d0aa92..5d18a129f7 100644
|
||||
--- a/dlls/ddraw/device.c
|
||||
+++ b/dlls/ddraw/device.c
|
||||
@@ -1850,7 +1850,7 @@ static HRESULT d3d_device7_SetRenderTarget(IDirect3DDevice7 *iface,
|
||||
@@ -1854,7 +1854,7 @@ static HRESULT d3d_device7_SetRenderTarget(IDirect3DDevice7 *iface,
|
||||
return DDERR_INVALIDCAPS;
|
||||
}
|
||||
|
||||
@@ -78,7 +77,7 @@ index 054e2dccc9..0170639de8 100644
|
||||
{
|
||||
WARN("Surface %p is not in video memory.\n", target_impl);
|
||||
wined3d_mutex_unlock();
|
||||
@@ -1926,7 +1926,7 @@ static HRESULT WINAPI d3d_device3_SetRenderTarget(IDirect3DDevice3 *iface,
|
||||
@@ -1930,7 +1930,7 @@ static HRESULT WINAPI d3d_device3_SetRenderTarget(IDirect3DDevice3 *iface,
|
||||
return DDERR_INVALIDPIXELFORMAT;
|
||||
}
|
||||
|
||||
@@ -87,7 +86,7 @@ index 054e2dccc9..0170639de8 100644
|
||||
{
|
||||
WARN("Surface %p is not in video memory.\n", target_impl);
|
||||
IDirectDrawSurface4_AddRef(target);
|
||||
@@ -1975,7 +1975,7 @@ static HRESULT WINAPI d3d_device2_SetRenderTarget(IDirect3DDevice2 *iface,
|
||||
@@ -1979,7 +1979,7 @@ static HRESULT WINAPI d3d_device2_SetRenderTarget(IDirect3DDevice2 *iface,
|
||||
return DDERR_INVALIDPIXELFORMAT;
|
||||
}
|
||||
|
||||
@@ -96,7 +95,7 @@ index 054e2dccc9..0170639de8 100644
|
||||
{
|
||||
WARN("Surface %p is not in video memory.\n", target_impl);
|
||||
IDirectDrawSurface_AddRef(target);
|
||||
@@ -6976,7 +6976,7 @@ enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device
|
||||
@@ -6933,7 +6933,7 @@ enum wined3d_depth_buffer_type d3d_device_update_depth_stencil(struct d3d_device
|
||||
return WINED3D_ZB_TRUE;
|
||||
}
|
||||
|
||||
@@ -105,7 +104,7 @@ index 054e2dccc9..0170639de8 100644
|
||||
struct ddraw_surface *target, IUnknown *rt_iface, UINT version, IUnknown *outer_unknown)
|
||||
{
|
||||
static const D3DMATRIX ident =
|
||||
@@ -6999,6 +6999,7 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
@@ -6956,6 +6956,7 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
device->IUnknown_inner.lpVtbl = &d3d_device_inner_vtbl;
|
||||
device->ref = 1;
|
||||
device->version = version;
|
||||
@@ -113,7 +112,7 @@ index 054e2dccc9..0170639de8 100644
|
||||
|
||||
if (outer_unknown)
|
||||
device->outer_unknown = outer_unknown;
|
||||
@@ -7049,14 +7050,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
@@ -7009,14 +7010,18 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
@@ -135,7 +134,7 @@ index 054e2dccc9..0170639de8 100644
|
||||
|
||||
if (!(target->surface_desc.ddsCaps.dwCaps & DDSCAPS_3DDEVICE)
|
||||
|| (target->surface_desc.ddsCaps.dwCaps & DDSCAPS_ZBUFFER))
|
||||
@@ -7079,7 +7084,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
@@ -7039,7 +7044,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
return DDERR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
@@ -144,7 +143,7 @@ index 054e2dccc9..0170639de8 100644
|
||||
{
|
||||
WARN("Surface %p is not in video memory.\n", target);
|
||||
return D3DERR_SURFACENOTINVIDMEM;
|
||||
@@ -7097,7 +7102,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
@@ -7057,7 +7062,7 @@ HRESULT d3d_device_create(struct ddraw *ddraw, struct ddraw_surface *target, IUn
|
||||
return DDERR_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
@@ -154,10 +153,10 @@ index 054e2dccc9..0170639de8 100644
|
||||
WARN("Failed to initialize device, hr %#x.\n", hr);
|
||||
heap_free(object);
|
||||
diff --git a/dlls/ddraw/surface.c b/dlls/ddraw/surface.c
|
||||
index cac05c39dc..1fc78eeab7 100644
|
||||
index 66e5a9e616..31ccce29b8 100644
|
||||
--- a/dlls/ddraw/surface.c
|
||||
+++ b/dlls/ddraw/surface.c
|
||||
@@ -226,7 +226,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
|
||||
@@ -223,7 +223,7 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
@@ -166,7 +165,7 @@ index cac05c39dc..1fc78eeab7 100644
|
||||
1, &This->device1, (IUnknown *)&This->IDirectDrawSurface_iface)))
|
||||
{
|
||||
This->device1 = NULL;
|
||||
@@ -6175,7 +6175,42 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
|
||||
@@ -6197,7 +6197,42 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
|
||||
|
||||
if (desc->ddsCaps.dwCaps & DDSCAPS_SYSTEMMEMORY)
|
||||
{
|
||||
@@ -211,5 +210,5 @@ index cac05c39dc..1fc78eeab7 100644
|
||||
}
|
||||
else
|
||||
--
|
||||
2.20.1
|
||||
2.21.0
|
||||
|
||||
|
@@ -0,0 +1,26 @@
|
||||
From 5d5892c9403b77bd3f17acebfee1acc7e95003a0 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 30 Jul 2019 09:30:41 +1000
|
||||
Subject: [PATCH 1/4] directmanipulation: Fake success from
|
||||
IDirectManipulationViewport2 ActivateConfiguration.
|
||||
|
||||
---
|
||||
dlls/directmanipulation/directmanipulation.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index 4f16963d42..f1e008bc7f 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -370,7 +370,7 @@ static HRESULT WINAPI viewport_ActivateConfiguration(IDirectManipulationViewport
|
||||
{
|
||||
struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
FIXME("%p, %d\n", This, configuration);
|
||||
- return E_NOTIMPL;
|
||||
+ return S_OK;
|
||||
}
|
||||
|
||||
static HRESULT WINAPI viewport_SetManualGesture(IDirectManipulationViewport2 *iface, DIRECTMANIPULATION_GESTURE_CONFIGURATION configuration)
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -0,0 +1,91 @@
|
||||
From 34c03e1857d977ef7ec913628a358092f749394b Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 31 Jul 2019 10:03:26 +1000
|
||||
Subject: [PATCH 2/4] include: Add IDirectManipulationPrimaryContent interface
|
||||
|
||||
---
|
||||
include/directmanipulation.idl | 61 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 61 insertions(+)
|
||||
|
||||
diff --git a/include/directmanipulation.idl b/include/directmanipulation.idl
|
||||
index 443b31a0ce..a49f368d11 100644
|
||||
--- a/include/directmanipulation.idl
|
||||
+++ b/include/directmanipulation.idl
|
||||
@@ -88,6 +88,39 @@ typedef enum DIRECTMANIPULATION_MOTION_TYPES
|
||||
DIRECTMANIPULATION_MOTION_CENTERY
|
||||
} DIRECTMANIPULATION_MOTION_TYPES;
|
||||
|
||||
+typedef enum DIRECTMANIPULATION_SNAPPOINT_TYPE
|
||||
+{
|
||||
+ DIRECTMANIPULATION_SNAPPOINT_MANDATORY = 0,
|
||||
+ DIRECTMANIPULATION_SNAPPOINT_OPTIONAL = 1,
|
||||
+ DIRECTMANIPULATION_SNAPPOINT_MANDATORY_SINGLE = 2,
|
||||
+ DIRECTMANIPULATION_SNAPPOINT_OPTIONAL_SINGLE = 3
|
||||
+} DIRECTMANIPULATION_SNAPPOINT_TYPE;
|
||||
+
|
||||
+typedef enum DIRECTMANIPULATION_SNAPPOINT_COORDINATE
|
||||
+{
|
||||
+ DIRECTMANIPULATION_COORDINATE_BOUNDARY = 0x00,
|
||||
+ DIRECTMANIPULATION_COORDINATE_ORIGIN = 0x01,
|
||||
+ DIRECTMANIPULATION_COORDINATE_MIRRORED = 0x10
|
||||
+} DIRECTMANIPULATION_SNAPPOINT_COORDINATE;
|
||||
+
|
||||
+typedef enum DIRECTMANIPULATION_HORIZONTALALIGNMENT
|
||||
+{
|
||||
+ DIRECTMANIPULATION_HORIZONTALALIGNMENT_NONE = 0x00,
|
||||
+ DIRECTMANIPULATION_HORIZONTALALIGNMENT_LEFT = 0x01,
|
||||
+ DIRECTMANIPULATION_HORIZONTALALIGNMENT_CENTER = 0x02,
|
||||
+ DIRECTMANIPULATION_HORIZONTALALIGNMENT_RIGHT = 0x04,
|
||||
+ DIRECTMANIPULATION_HORIZONTALALIGNMENT_UNLOCKCENTER = 0x08
|
||||
+} DIRECTMANIPULATION_HORIZONTALALIGNMENT;
|
||||
+
|
||||
+typedef enum DIRECTMANIPULATION_VERTICALALIGNMENT
|
||||
+{
|
||||
+ DIRECTMANIPULATION_VERTICALALIGNMENT_NONE = 0x00,
|
||||
+ DIRECTMANIPULATION_VERTICALALIGNMENT_TOP = 0x01,
|
||||
+ DIRECTMANIPULATION_VERTICALALIGNMENT_CENTER = 0x02,
|
||||
+ DIRECTMANIPULATION_VERTICALALIGNMENT_BOTTOM = 0x04,
|
||||
+ DIRECTMANIPULATION_VERTICALALIGNMENT_UNLOCKCENTER = 0x08
|
||||
+} DIRECTMANIPULATION_VERTICALALIGNMENT;
|
||||
+
|
||||
typedef enum DIRECTMANIPULATION_INPUT_MODE
|
||||
{
|
||||
DIRECTMANIPULATION_INPUT_MODE_AUTOMATIC = 0,
|
||||
@@ -309,6 +342,34 @@ interface IDirectManipulationManager2 : IDirectManipulationManager
|
||||
HRESULT CreateBehavior([in] REFCLSID clsid, [in] REFIID riid, [out, iid_is(riid), retval] void **obj);
|
||||
}
|
||||
|
||||
+[
|
||||
+ local,
|
||||
+ object,
|
||||
+ uuid(c12851e4-1698-4625-b9b1-7ca3ec18630b),
|
||||
+ pointer_default(unique)
|
||||
+]
|
||||
+interface IDirectManipulationPrimaryContent : IUnknown
|
||||
+{
|
||||
+ HRESULT SetSnapInterval([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] float interval, [in] float offset);
|
||||
+
|
||||
+ HRESULT SetSnapPoints([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] const float *points, [in] DWORD count);
|
||||
+
|
||||
+ HRESULT SetSnapType([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] DIRECTMANIPULATION_SNAPPOINT_TYPE type);
|
||||
+
|
||||
+ HRESULT SetSnapCoordinate([in] DIRECTMANIPULATION_MOTION_TYPES motion, [in] DIRECTMANIPULATION_SNAPPOINT_COORDINATE coordinate,
|
||||
+ [in] float origin);
|
||||
+
|
||||
+ HRESULT SetZoomBoundaries([in] float minimum, [in] float maximum);
|
||||
+
|
||||
+ HRESULT SetHorizontalAlignment([in] DIRECTMANIPULATION_HORIZONTALALIGNMENT alignment);
|
||||
+
|
||||
+ HRESULT SetVerticalAlignment([in] DIRECTMANIPULATION_VERTICALALIGNMENT alignment);
|
||||
+
|
||||
+ HRESULT GetInertiaEndTransform([out] float *matrix, [in] DWORD count);
|
||||
+
|
||||
+ HRESULT GetCenterPoint([out] float *x, [out] float *y);
|
||||
+}
|
||||
+
|
||||
[
|
||||
uuid(9fbedf98-f6d8-4e3b-b488-fa66dbf5e9f3),
|
||||
version(1.0)
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -0,0 +1,186 @@
|
||||
From 52d03476a908684bb201ae69032f39bf2a745190 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Fri, 23 Aug 2019 11:34:16 +1000
|
||||
Subject: [PATCH 3/4] directmanipulation: Implement
|
||||
IDirectManipulationViewport2 GetPrimaryContent
|
||||
|
||||
---
|
||||
dlls/directmanipulation/directmanipulation.c | 155 ++++++++++++++++++-
|
||||
1 file changed, 154 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/directmanipulation/directmanipulation.c b/dlls/directmanipulation/directmanipulation.c
|
||||
index f1e008bc7f..ca60e76db6 100644
|
||||
--- a/dlls/directmanipulation/directmanipulation.c
|
||||
+++ b/dlls/directmanipulation/directmanipulation.c
|
||||
@@ -177,6 +177,142 @@ static HRESULT create_update_manager(IDirectManipulationUpdateManager **obj)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
+
|
||||
+struct primarycontext
|
||||
+{
|
||||
+ IDirectManipulationPrimaryContent IDirectManipulationPrimaryContent_iface;
|
||||
+ LONG ref;
|
||||
+};
|
||||
+
|
||||
+static inline struct primarycontext *impl_from_IDirectManipulationPrimaryContent(IDirectManipulationPrimaryContent *iface)
|
||||
+{
|
||||
+ return CONTAINING_RECORD(iface, struct primarycontext, IDirectManipulationPrimaryContent_iface);
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_QueryInterface(IDirectManipulationPrimaryContent *iface, REFIID riid, void **ppv)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ TRACE("(%p)->(%s,%p)\n", This, debugstr_guid(riid), ppv);
|
||||
+
|
||||
+ if (IsEqualGUID(riid, &IID_IUnknown) ||
|
||||
+ IsEqualGUID(riid, &IID_IDirectManipulationPrimaryContent))
|
||||
+ {
|
||||
+ IDirectManipulationPrimaryContent_AddRef(&This->IDirectManipulationPrimaryContent_iface);
|
||||
+ *ppv = &This->IDirectManipulationPrimaryContent_iface;
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+
|
||||
+ FIXME("(%p)->(%s,%p),not found\n", This, debugstr_guid(riid), ppv);
|
||||
+ return E_NOINTERFACE;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI primary_AddRef(IDirectManipulationPrimaryContent *iface)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ ULONG ref = InterlockedIncrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static ULONG WINAPI primary_Release(IDirectManipulationPrimaryContent *iface)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ ULONG ref = InterlockedDecrement(&This->ref);
|
||||
+
|
||||
+ TRACE("(%p) ref=%u\n", This, ref);
|
||||
+
|
||||
+ if (!ref)
|
||||
+ {
|
||||
+ heap_free(This);
|
||||
+ }
|
||||
+ return ref;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetSnapInterval(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
|
||||
+ float interval, float offset)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d, %f, %f\n", This, motion, interval, offset);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetSnapPoints(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
|
||||
+ const float *points, DWORD count)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d, %p, %d\n", This, motion, points, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetSnapType(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
|
||||
+ DIRECTMANIPULATION_SNAPPOINT_TYPE type)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d, %d\n", This, motion, type);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetSnapCoordinate(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_MOTION_TYPES motion,
|
||||
+ DIRECTMANIPULATION_SNAPPOINT_COORDINATE coordinate, float origin)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d, %d, %f\n", This, motion, coordinate, origin);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetZoomBoundaries(IDirectManipulationPrimaryContent *iface, float minimum, float maximum)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %f, %f\n", This, minimum, maximum);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetHorizontalAlignment(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_HORIZONTALALIGNMENT alignment)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d\n", This, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_SetVerticalAlignment(IDirectManipulationPrimaryContent *iface, DIRECTMANIPULATION_VERTICALALIGNMENT alignment)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %d\n", This, alignment);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_GetInertiaEndTransform(IDirectManipulationPrimaryContent *iface, float *matrix, DWORD count)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %p, %d\n", This, matrix, count);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static HRESULT WINAPI primary_GetCenterPoint(IDirectManipulationPrimaryContent *iface, float *x, float *y)
|
||||
+{
|
||||
+ struct primarycontext *This = impl_from_IDirectManipulationPrimaryContent(iface);
|
||||
+ FIXME("%p, %p, %p\n", This, x, y);
|
||||
+ return E_NOTIMPL;
|
||||
+}
|
||||
+
|
||||
+static const IDirectManipulationPrimaryContentVtbl primaryVtbl =
|
||||
+{
|
||||
+ primary_QueryInterface,
|
||||
+ primary_AddRef,
|
||||
+ primary_Release,
|
||||
+ primary_SetSnapInterval,
|
||||
+ primary_SetSnapPoints,
|
||||
+ primary_SetSnapType,
|
||||
+ primary_SetSnapCoordinate,
|
||||
+ primary_SetZoomBoundaries,
|
||||
+ primary_SetHorizontalAlignment,
|
||||
+ primary_SetVerticalAlignment,
|
||||
+ primary_GetInertiaEndTransform,
|
||||
+ primary_GetCenterPoint
|
||||
+};
|
||||
+
|
||||
struct directviewport
|
||||
{
|
||||
IDirectManipulationViewport2 IDirectManipulationViewport2_iface;
|
||||
@@ -327,7 +463,24 @@ static HRESULT WINAPI viewport_SyncDisplayTransform(IDirectManipulationViewport2
|
||||
static HRESULT WINAPI viewport_GetPrimaryContent(IDirectManipulationViewport2 *iface, REFIID riid, void **object)
|
||||
{
|
||||
struct directviewport *This = impl_from_IDirectManipulationViewport2(iface);
|
||||
- FIXME("%p, %s, %p\n", This, debugstr_guid(riid), object);
|
||||
+ TRACE("%p, %s, %p\n", This, debugstr_guid(riid), object);
|
||||
+ if(IsEqualGUID(riid, &IID_IDirectManipulationPrimaryContent))
|
||||
+ {
|
||||
+ struct primarycontext *primary;
|
||||
+ TRACE("IDirectManipulationPrimaryContent\n");
|
||||
+ primary = heap_alloc( sizeof(*primary));
|
||||
+ if(!primary)
|
||||
+ return E_OUTOFMEMORY;
|
||||
+
|
||||
+ primary->IDirectManipulationPrimaryContent_iface.lpVtbl = &primaryVtbl;
|
||||
+ primary->ref = 1;
|
||||
+
|
||||
+ *object = &primary->IDirectManipulationPrimaryContent_iface;
|
||||
+
|
||||
+ return S_OK;
|
||||
+ }
|
||||
+ else
|
||||
+ FIXME("Unsupported interface %s\n", debugstr_guid(riid));
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
@@ -0,0 +1,45 @@
|
||||
From 6a4d40b86f94703f8c37264739fffc4885507ebf Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Tue, 17 Sep 2019 16:21:22 +1000
|
||||
Subject: [PATCH] dmime: Ensure Channels are in range before assignment.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=17766
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=24740
|
||||
---
|
||||
dlls/dmime/performance.c | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c
|
||||
index 6e4dae6be7..3bbbb3b853 100644
|
||||
--- a/dlls/dmime/performance.c
|
||||
+++ b/dlls/dmime/performance.c
|
||||
@@ -34,7 +34,7 @@ typedef struct IDirectMusicPerformance8Impl {
|
||||
float fMasterTempo;
|
||||
long lMasterVolume;
|
||||
/* performance channels */
|
||||
- DMUSIC_PRIVATE_PCHANNEL PChannel[32];
|
||||
+ DMUSIC_PRIVATE_PCHANNEL PChannel[256];
|
||||
/* IDirectMusicPerformance8Impl fields */
|
||||
IDirectMusicAudioPath *pDefaultPath;
|
||||
HANDLE hNotification;
|
||||
@@ -624,6 +624,9 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_AssignPChannelBlock(IDirectMu
|
||||
FIXME("(%p, %d, %p, %d): semi-stub\n", This, dwBlockNum, pPort, dwGroup-1);
|
||||
if (NULL == pPort) return E_POINTER;
|
||||
|
||||
+ if (dwBlockNum > ARRAY_SIZE(This->PChannel))
|
||||
+ return S_FALSE;
|
||||
+
|
||||
range = 16 * dwBlockNum;
|
||||
j = 0;
|
||||
for (i = range; i < range+16; i++) {
|
||||
@@ -633,7 +636,6 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_AssignPChannelBlock(IDirectMu
|
||||
This->PChannel[i].channel = j; /* FIXME: should this be assigned? */
|
||||
j++;
|
||||
}
|
||||
- /*if (dwGroup > 2) return S_FALSE;*/
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
2
patches/dmime-PChannel-range/definition
Normal file
2
patches/dmime-PChannel-range/definition
Normal file
@@ -0,0 +1,2 @@
|
||||
Fixes: [17766] Empire Earth crashes on start without native directmusic
|
||||
Fixes: [24740] Trinklet Supreme crashes on startup
|
164
patches/dsdmo-new-dll/0001-dsdmo-Added-dll.patch
Normal file
164
patches/dsdmo-new-dll/0001-dsdmo-Added-dll.patch
Normal file
@@ -0,0 +1,164 @@
|
||||
From 4df02b9d23b868cf4e481d6461715f21d1b0f7e9 Mon Sep 17 00:00:00 2001
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Date: Wed, 14 Aug 2019 12:17:08 +1000
|
||||
Subject: [PATCH 01/27] dsdmo: Added dll
|
||||
|
||||
---
|
||||
configure | 2 +
|
||||
configure.ac | 1 +
|
||||
dlls/dsdmo/Makefile.in | 6 +++
|
||||
dlls/dsdmo/dsdmo.spec | 4 ++
|
||||
dlls/dsdmo/main.c | 85 ++++++++++++++++++++++++++++++++++++++++++
|
||||
5 files changed, 98 insertions(+)
|
||||
create mode 100644 dlls/dsdmo/Makefile.in
|
||||
create mode 100644 dlls/dsdmo/dsdmo.spec
|
||||
create mode 100644 dlls/dsdmo/main.c
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 5ed6ed6c26..bea103fc37 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -1257,6 +1257,7 @@ enable_dpnlobby
|
||||
enable_dpvoice
|
||||
enable_dpwsockx
|
||||
enable_drmclien
|
||||
+enable_dsdmo
|
||||
enable_dsound
|
||||
enable_dsquery
|
||||
enable_dssenh
|
||||
@@ -20364,6 +20365,7 @@ wine_fn_config_makefile dlls/dpvoice enable_dpvoice
|
||||
wine_fn_config_makefile dlls/dpvoice/tests enable_tests
|
||||
wine_fn_config_makefile dlls/dpwsockx enable_dpwsockx
|
||||
wine_fn_config_makefile dlls/drmclien enable_drmclien
|
||||
+wine_fn_config_makefile dlls/dsdmo enable_dsdmo
|
||||
wine_fn_config_makefile dlls/dsound enable_dsound
|
||||
wine_fn_config_makefile dlls/dsound/tests enable_tests
|
||||
wine_fn_config_makefile dlls/dsquery enable_dsquery
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 1c912a30a2..27547ae3c7 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -3232,6 +3232,7 @@ WINE_CONFIG_MAKEFILE(dlls/dpvoice)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dpvoice/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dpwsockx)
|
||||
WINE_CONFIG_MAKEFILE(dlls/drmclien)
|
||||
+WINE_CONFIG_MAKEFILE(dlls/dsdmo)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dsound)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dsound/tests)
|
||||
WINE_CONFIG_MAKEFILE(dlls/dsquery)
|
||||
diff --git a/dlls/dsdmo/Makefile.in b/dlls/dsdmo/Makefile.in
|
||||
new file mode 100644
|
||||
index 0000000000..99816ae0c0
|
||||
--- /dev/null
|
||||
+++ b/dlls/dsdmo/Makefile.in
|
||||
@@ -0,0 +1,6 @@
|
||||
+MODULE = dsdmo.dll
|
||||
+
|
||||
+EXTRADLLFLAGS = -mno-cygwin
|
||||
+
|
||||
+C_SRCS = \
|
||||
+ main.c
|
||||
diff --git a/dlls/dsdmo/dsdmo.spec b/dlls/dsdmo/dsdmo.spec
|
||||
new file mode 100644
|
||||
index 0000000000..b16365d0c9
|
||||
--- /dev/null
|
||||
+++ b/dlls/dsdmo/dsdmo.spec
|
||||
@@ -0,0 +1,4 @@
|
||||
+@ stdcall -private DllCanUnloadNow()
|
||||
+@ stdcall -private DllGetClassObject(ptr ptr ptr)
|
||||
+@ stdcall -private DllRegisterServer()
|
||||
+@ stdcall -private DllUnregisterServer()
|
||||
diff --git a/dlls/dsdmo/main.c b/dlls/dsdmo/main.c
|
||||
new file mode 100644
|
||||
index 0000000000..61a67f44d8
|
||||
--- /dev/null
|
||||
+++ b/dlls/dsdmo/main.c
|
||||
@@ -0,0 +1,85 @@
|
||||
+/*
|
||||
+ * Copyright 2019 Alistair Leslie-Hughes
|
||||
+ *
|
||||
+ * This library is free software; you can redistribute it and/or
|
||||
+ * modify it under the terms of the GNU Lesser General Public
|
||||
+ * License as published by the Free Software Foundation; either
|
||||
+ * version 2.1 of the License, or (at your option) any later version.
|
||||
+ *
|
||||
+ * This library is distributed in the hope that it will be useful,
|
||||
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
+ * Lesser General Public License for more details.
|
||||
+ *
|
||||
+ * You should have received a copy of the GNU Lesser General Public
|
||||
+ * License along with this library; if not, write to the Free Software
|
||||
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
+ */
|
||||
+#define COBJMACROS
|
||||
+
|
||||
+#include "ole2.h"
|
||||
+#include "rpcproxy.h"
|
||||
+
|
||||
+#include "wine/debug.h"
|
||||
+
|
||||
+WINE_DEFAULT_DEBUG_CHANNEL(dsdmo);
|
||||
+
|
||||
+static HINSTANCE dsdmo_instance;
|
||||
+
|
||||
+/******************************************************************
|
||||
+ * DllMain
|
||||
+ */
|
||||
+BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
|
||||
+{
|
||||
+ TRACE("(%p %d %p)\n", hInstDLL, fdwReason, lpv);
|
||||
+
|
||||
+ switch(fdwReason)
|
||||
+ {
|
||||
+ case DLL_WINE_PREATTACH:
|
||||
+ return FALSE; /* prefer native version */
|
||||
+ case DLL_PROCESS_ATTACH:
|
||||
+ dsdmo_instance = hInstDLL;
|
||||
+ DisableThreadLibraryCalls(dsdmo_instance);
|
||||
+ break;
|
||||
+ case DLL_PROCESS_DETACH:
|
||||
+ if (lpv) break;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return TRUE;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * DllGetClassObject
|
||||
+ */
|
||||
+HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||
+{
|
||||
+ FIXME("%s %s %p\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
|
||||
+ return CLASS_E_CLASSNOTAVAILABLE;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * DllCanUnloadNow
|
||||
+ */
|
||||
+HRESULT WINAPI DllCanUnloadNow(void)
|
||||
+{
|
||||
+ return S_FALSE;
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * DllRegisterServer
|
||||
+ */
|
||||
+HRESULT WINAPI DllRegisterServer(void)
|
||||
+{
|
||||
+ TRACE("()\n");
|
||||
+ return __wine_register_resources(dsdmo_instance);
|
||||
+}
|
||||
+
|
||||
+/***********************************************************************
|
||||
+ * DllUnregisterServer
|
||||
+ */
|
||||
+HRESULT WINAPI DllUnregisterServer(void)
|
||||
+{
|
||||
+ TRACE("()\n");
|
||||
+ return __wine_unregister_resources(dsdmo_instance);
|
||||
+}
|
||||
--
|
||||
2.17.1
|
||||
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user