wined3d-GenerateMips: Added patch to implement d3d10_device_GenerateMips.

This commit is contained in:
Sebastian Lackner 2017-09-27 23:49:17 +02:00
parent 13a6f6a44d
commit 34a26b4e9e
2 changed files with 37 additions and 0 deletions

View File

@ -9645,9 +9645,11 @@ fi
if test "$enable_wined3d_GenerateMips" -eq 1; then
patch_apply wined3d-GenerateMips/0001-d3d11-tests-Add-basic-test-for-mipmap-level-generati.patch
patch_apply wined3d-GenerateMips/0002-wined3d-Implement-generation-of-mip-maps-for-shader-.patch
patch_apply wined3d-GenerateMips/0003-d3d11-Implement-d3d10_device_GenerateMips.patch
(
printf '%s\n' '+ { "Michael Müller", "d3d11/tests: Add basic test for mipmap level generation.", 1 },';
printf '%s\n' '+ { "Michael Müller", "wined3d: Implement generation of mip maps for shader resource views.", 1 },';
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement d3d10_device_GenerateMips.", 1 },';
) >> "$patchlist"
fi

View File

@ -0,0 +1,35 @@
From 2f249a6a8c5906813d05470df61928d43eb289c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Wed, 20 Sep 2017 21:33:30 +0200
Subject: d3d11: Implement d3d10_device_GenerateMips.
---
dlls/d3d11/device.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index 22adf361feb..d389c2625a0 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -7305,7 +7305,17 @@ static void STDMETHODCALLTYPE d3d10_device_ClearDepthStencilView(ID3D10Device1 *
static void STDMETHODCALLTYPE d3d10_device_GenerateMips(ID3D10Device1 *iface,
ID3D10ShaderResourceView *shader_resource_view)
{
- FIXME("iface %p, shader_resource_view %p stub!\n", iface, shader_resource_view);
+ struct d3d_device *device = impl_from_ID3D10Device(iface);
+ struct d3d_shader_resource_view *view = unsafe_impl_from_ID3D10ShaderResourceView(shader_resource_view);
+
+ TRACE("iface %p, shader_resource_view %p.\n", iface, shader_resource_view);
+
+ if (!view)
+ return;
+
+ wined3d_mutex_lock();
+ wined3d_device_generate_mips_view(device->wined3d_device, view->wined3d_view);
+ wined3d_mutex_unlock();
}
static void STDMETHODCALLTYPE d3d10_device_ResolveSubresource(ID3D10Device1 *iface,
--
2.14.1