From a99ad44fff23df25f8ba1c33543bdc7ed8255b90 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 4 Mar 2017 18:44:46 +0100 Subject: [PATCH] Added patch for semi-stub of d3d10_device_ResolveSubresource. --- ...d3d10_device_ResolveSubresource-in-t.patch | 44 +++++++++++++++++++ patches/patchinstall.sh | 2 + 2 files changed, 46 insertions(+) create mode 100644 patches/d3d11-ResolveSubresource/0002-d3d11-Implement-d3d10_device_ResolveSubresource-in-t.patch diff --git a/patches/d3d11-ResolveSubresource/0002-d3d11-Implement-d3d10_device_ResolveSubresource-in-t.patch b/patches/d3d11-ResolveSubresource/0002-d3d11-Implement-d3d10_device_ResolveSubresource-in-t.patch new file mode 100644 index 00000000..89ae2294 --- /dev/null +++ b/patches/d3d11-ResolveSubresource/0002-d3d11-Implement-d3d10_device_ResolveSubresource-in-t.patch @@ -0,0 +1,44 @@ +From 3f0721bc43cadd5b008ff7cd0fb3fe6748a3bfe7 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +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 + diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 572c51dd..bbd7c526 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -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