Added patch for semi-stub of d3d10_device_CheckFormatSupport.

This commit is contained in:
Sebastian Lackner 2017-03-04 18:55:10 +01:00
parent a99ad44fff
commit 0be12d7669
2 changed files with 62 additions and 1 deletions

View File

@ -8335,14 +8335,17 @@ fi
# Patchset wined3d-check_format_support
# |
# | Modified files:
# | * dlls/d3d11/device.c, dlls/d3d11/tests/d3d11.c, dlls/wined3d/device.c, dlls/wined3d/wined3d.spec, include/wine/wined3d.h
# | * dlls/d3d10core/tests/device.c, dlls/d3d11/device.c, dlls/d3d11/tests/d3d11.c, dlls/wined3d/device.c,
# | dlls/wined3d/wined3d.spec, include/wine/wined3d.h
# |
if test "$enable_wined3d_check_format_support" -eq 1; then
patch_apply wined3d-check_format_support/0001-wined3d-Add-wined3d_check_device_format_support.patch
patch_apply wined3d-check_format_support/0002-d3d11-Implement-ID3D11Device_CheckFormatSupport.patch
patch_apply wined3d-check_format_support/0003-d3d11-Implement-ID3D10Device_CheckFormatSupport.patch
(
printf '%s\n' '+ { "Michael Müller", "wined3d: Add wined3d_check_device_format_support.", 1 },';
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement ID3D11Device_CheckFormatSupport.", 1 },';
printf '%s\n' '+ { "Michael Müller", "d3d11: Implement ID3D10Device_CheckFormatSupport.", 1 },';
) >> "$patchlist"
fi

View File

@ -0,0 +1,58 @@
From 1ec823158412e5250d763c6b2550781a3127e59a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 28 Feb 2017 23:04:04 +0100
Subject: d3d11: Implement ID3D10Device_CheckFormatSupport.
---
dlls/d3d10core/tests/device.c | 2 +-
dlls/d3d11/device.c | 20 +++++++++++++++++---
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c
index 7b27d9f6a4c..21dd1bc8dbf 100644
--- a/dlls/d3d10core/tests/device.c
+++ b/dlls/d3d10core/tests/device.c
@@ -10076,7 +10076,7 @@ static void test_required_format_support(void)
for (format = DXGI_FORMAT_UNKNOWN; format <= DXGI_FORMAT_B4G4R4A4_UNORM; ++format)
{
hr = ID3D10Device_CheckFormatSupport(device, format, &format_support[format]);
- todo_wine ok(hr == S_OK || (hr == E_FAIL && !format_support[format]),
+ ok(hr == S_OK || (hr == E_FAIL && !format_support[format]),
"Got unexpected result for format %#x: hr %#x, format_support %#x.\n",
format, hr, format_support[format]);
}
diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c
index ef8d01696e7..5a1c28a4857 100644
--- a/dlls/d3d11/device.c
+++ b/dlls/d3d11/device.c
@@ -7274,10 +7274,24 @@ static HRESULT STDMETHODCALLTYPE d3d10_device_CreateCounter(ID3D10Device1 *iface
static HRESULT STDMETHODCALLTYPE d3d10_device_CheckFormatSupport(ID3D10Device1 *iface,
DXGI_FORMAT format, UINT *format_support)
{
- FIXME("iface %p, format %s, format_support %p stub!\n",
- iface, debug_dxgi_format(format), format_support);
+ struct d3d_device *device = impl_from_ID3D10Device(iface);
+ enum wined3d_format_id d3d_format;
- return E_NOTIMPL;
+ FIXME("iface %p, format %s, format_support %p semi-stub!\n",
+ iface, debug_dxgi_format(format), format_support);
+
+ if (!format_support)
+ return E_INVALIDARG;
+
+ d3d_format = wined3dformat_from_dxgi_format(format);
+ if (d3d_format == WINED3DFMT_UNKNOWN)
+ return E_FAIL;
+
+ wined3d_mutex_lock();
+ wined3d_check_device_format_support(device->wined3d_device, d3d_format, format_support);
+ wined3d_mutex_unlock();
+
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE d3d10_device_CheckMultisampleQualityLevels(ID3D10Device1 *iface,
--
2.11.0