Added patch for semi-stub of d3d10_device_ResolveSubresource.

This commit is contained in:
Sebastian Lackner 2017-03-04 18:44:46 +01:00
parent a644cbf827
commit a99ad44fff
2 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,44 @@
From 3f0721bc43cadd5b008ff7cd0fb3fe6748a3bfe7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 26 Feb 2017 21:16:12 +0100
Subject: d3d11: Implement d3d10_device_ResolveSubresource in the same way as
for d3d11.
---
dlls/d3d11/device.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index dbd7cd813cc..ef8d01696e7 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -6049,10 +6049,22 @@ static void STDMETHODCALLTYPE d3d10_device_ResolveSubresource(ID3D10Device1 *ifa
ID3D10Resource *dst_resource, UINT dst_subresource_idx,
ID3D10Resource *src_resource, UINT src_subresource_idx, DXGI_FORMAT format)
{
- FIXME("iface %p, dst_resource %p, dst_subresource_idx %u, "
- "src_resource %p, src_subresource_idx %u, format %s stub!\n",
- iface, dst_resource, dst_subresource_idx,
- src_resource, src_subresource_idx, debug_dxgi_format(format));
+ struct d3d_device *device = impl_from_ID3D10Device(iface);
+ struct wined3d_resource *wined3d_dst_resource, *wined3d_src_resource;
+
+ TRACE("iface %p, dst_resource %p, dst_subresource_idx %u, src_resource %p, src_subresource_idx %u, "
+ "format %s stub!\n",
+ iface, dst_resource, dst_subresource_idx, src_resource, src_subresource_idx,
+ debug_dxgi_format(format));
+
+ wined3d_dst_resource = wined3d_resource_from_d3d10_resource(dst_resource);
+ wined3d_src_resource = wined3d_resource_from_d3d10_resource(src_resource);
+
+ /* Multisampled textures are not supported yet, so simply copy the sub resource */
+ wined3d_mutex_lock();
+ wined3d_device_copy_sub_resource_region(device->wined3d_device, wined3d_dst_resource, dst_subresource_idx,
+ 0, 0, 0, wined3d_src_resource, src_subresource_idx, NULL);
+ wined3d_mutex_unlock();
}
static void STDMETHODCALLTYPE d3d10_device_VSGetConstantBuffers(ID3D10Device1 *iface,
--
2.11.0

View File

@ -3199,8 +3199,10 @@ fi
# |
if test "$enable_d3d11_ResolveSubresource" -eq 1; then
patch_apply d3d11-ResolveSubresource/0001-d3d11-Implement-ResolveSubresource-by-copying-sub-re.patch
patch_apply d3d11-ResolveSubresource/0002-d3d11-Implement-d3d10_device_ResolveSubresource-in-t.patch
(
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement ResolveSubresource by copying sub resource (there is no multisample texture support yet).", 1 },';
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement d3d10_device_ResolveSubresource in the same way as for d3d11.", 1 },';
) >> "$patchlist"
fi