Nikolay Sivov : d2d1/effect: Add CheckFeatureSupport().
Alexandre Julliard
julliard at winehq.org
Mon Jun 20 16:56:07 CDT 2022
Module: wine
Branch: master
Commit: 7eabfd477ffea9d17d5ed020cd6aa693a1f8e302
URL: https://source.winehq.org/git/wine.git/?a=commit;h=7eabfd477ffea9d17d5ed020cd6aa693a1f8e302
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Sun Jun 19 20:38:37 2022 +0300
d2d1/effect: Add CheckFeatureSupport().
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/d2d1/effect.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/dlls/d2d1/effect.c b/dlls/d2d1/effect.c
index d298985c020..78db9489be9 100644
--- a/dlls/d2d1/effect.c
+++ b/dlls/d2d1/effect.c
@@ -359,9 +359,23 @@ static HRESULT STDMETHODCALLTYPE d2d_effect_context_CreateColorContextFromWicCol
static HRESULT STDMETHODCALLTYPE d2d_effect_context_CheckFeatureSupport(ID2D1EffectContext *iface,
D2D1_FEATURE feature, void *data, UINT32 data_size)
{
- FIXME("iface %p, feature %#x, data %p, data_size %u stub!\n", iface, feature, data, data_size);
+ struct d2d_effect_context *effect_context = impl_from_ID2D1EffectContext(iface);
+ D3D11_FEATURE d3d11_feature;
- return E_NOTIMPL;
+ TRACE("iface %p, feature %#x, data %p, data_size %u.\n", iface, feature, data, data_size);
+
+ /* Data structures are compatible. */
+ switch (feature)
+ {
+ case D2D1_FEATURE_DOUBLES: d3d11_feature = D3D11_FEATURE_DOUBLES; break;
+ case D2D1_FEATURE_D3D10_X_HARDWARE_OPTIONS: d3d11_feature = D3D11_FEATURE_D3D10_X_HARDWARE_OPTIONS; break;
+ default:
+ WARN("Unexpected feature index %d.\n", feature);
+ return E_INVALIDARG;
+ }
+
+ return ID3D11Device1_CheckFeatureSupport(effect_context->device_context->d3d_device,
+ d3d11_feature, data, data_size);
}
static BOOL STDMETHODCALLTYPE d2d_effect_context_IsBufferPrecisionSupported(ID2D1EffectContext *iface,
More information about the wine-cvs
mailing list