From: Andrey Gusev andrey.goosev@gmail.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51354 Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/d3d11/d3d11_private.h | 1 + dlls/d3d11/device.c | 79 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+)
diff --git a/dlls/d3d11/d3d11_private.h b/dlls/d3d11/d3d11_private.h index 41272d08da8..efe26551258 100644 --- a/dlls/d3d11/d3d11_private.h +++ b/dlls/d3d11/d3d11_private.h @@ -545,6 +545,7 @@ struct d3d11_device_context { ID3D11DeviceContext1 ID3D11DeviceContext1_iface; ID3D11Multithread ID3D11Multithread_iface; + ID3DUserDefinedAnnotation ID3DUserDefinedAnnotation_iface; LONG refcount;
D3D11_DEVICE_CONTEXT_TYPE type; diff --git a/dlls/d3d11/device.c b/dlls/d3d11/device.c index cb2969d8cf6..f0cbb1741ab 100644 --- a/dlls/d3d11/device.c +++ b/dlls/d3d11/device.c @@ -484,6 +484,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_device_context_QueryInterface(ID3D11Devic { *out = &context->ID3D11Multithread_iface; } + else if (IsEqualGUID(iid, &IID_ID3DUserDefinedAnnotation)) + { + *out = &context->ID3DUserDefinedAnnotation_iface; + } else { WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid)); @@ -3187,11 +3191,86 @@ static const struct ID3D11MultithreadVtbl d3d11_multithread_vtbl = d3d11_multithread_GetMultithreadProtected, };
+/* ID3DUserDefinedAnnotation methods */ + +static inline struct d3d11_device_context *impl_from_ID3DUserDefinedAnnotation(ID3DUserDefinedAnnotation *iface) +{ + return CONTAINING_RECORD(iface, struct d3d11_device_context, ID3DUserDefinedAnnotation_iface); +} + +static HRESULT STDMETHODCALLTYPE d3d11_user_defined_annotation_QueryInterface(ID3DUserDefinedAnnotation *iface, + REFIID iid, void **out) +{ + struct d3d11_device_context *context = impl_from_ID3DUserDefinedAnnotation(iface); + + TRACE("iface %p, iid %s, out %p.\n", iface, debugstr_guid(iid), out); + + return d3d11_device_context_QueryInterface(&context->ID3D11DeviceContext1_iface, iid, out); +} + +static ULONG STDMETHODCALLTYPE d3d11_user_defined_annotation_AddRef(ID3DUserDefinedAnnotation *iface) +{ + struct d3d11_device_context *context = impl_from_ID3DUserDefinedAnnotation(iface); + + TRACE("iface %p.\n", iface); + + return d3d11_device_context_AddRef(&context->ID3D11DeviceContext1_iface); +} + +static ULONG STDMETHODCALLTYPE d3d11_user_defined_annotation_Release(ID3DUserDefinedAnnotation *iface) +{ + struct d3d11_device_context *context = impl_from_ID3DUserDefinedAnnotation(iface); + + TRACE("iface %p.\n", iface); + + return d3d11_device_context_Release(&context->ID3D11DeviceContext1_iface); +} + +static int STDMETHODCALLTYPE d3d11_user_defined_annotation_BeginEvent(ID3DUserDefinedAnnotation *iface, + const WCHAR *name) +{ + TRACE("iface %p, name %s.\n", iface, debugstr_w(name)); + + return -1; +} + +static int STDMETHODCALLTYPE d3d11_user_defined_annotation_EndEvent(ID3DUserDefinedAnnotation *iface) +{ + TRACE("iface %p.\n", iface); + + return -1; +} + +static void STDMETHODCALLTYPE d3d11_user_defined_annotation_SetMarker(ID3DUserDefinedAnnotation *iface, + const WCHAR *name) +{ + TRACE("iface %p, name %s.\n", iface, debugstr_w(name)); +} + +static BOOL STDMETHODCALLTYPE d3d11_user_defined_annotation_GetStatus(ID3DUserDefinedAnnotation *iface) +{ + TRACE("iface %p.\n", iface); + + return FALSE; +} + +static const struct ID3DUserDefinedAnnotationVtbl d3d11_user_defined_annotation_vtbl = +{ + d3d11_user_defined_annotation_QueryInterface, + d3d11_user_defined_annotation_AddRef, + d3d11_user_defined_annotation_Release, + d3d11_user_defined_annotation_BeginEvent, + d3d11_user_defined_annotation_EndEvent, + d3d11_user_defined_annotation_SetMarker, + d3d11_user_defined_annotation_GetStatus, +}; + static void d3d11_device_context_init(struct d3d11_device_context *context, struct d3d_device *device, D3D11_DEVICE_CONTEXT_TYPE type) { context->ID3D11DeviceContext1_iface.lpVtbl = &d3d11_device_context_vtbl; context->ID3D11Multithread_iface.lpVtbl = &d3d11_multithread_vtbl; + context->ID3DUserDefinedAnnotation_iface.lpVtbl = &d3d11_user_defined_annotation_vtbl; context->refcount = 1; context->type = type;
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=105934
Your paranoid android.
=== debian11 (32 bit report) ===
d3d11: d3d11.c:28261: Test failed: Got texcoord {8.43750119e-001, 1.56249881e-001}, expected {8.43750000e-001, 1.56250000e-001} at (3, 3), offset 1.25000000e-001. d3d11.c:28261: Test failed: Got texcoord {8.71093690e-001, 1.28906310e-001}, expected {8.71093750e-001, 1.28906250e-001} at (3, 3), offset 1.56250000e-002. d3d11.c:28261: Test failed: Got texcoord {7.51953065e-001, 2.48046935e-001}, expected {7.51953125e-001, 2.48046875e-001} at (3, 3), offset 4.92187500e-001.
=== debian11 (32 bit WoW report) ===
d3d11: d3d11.c:16710: Test failed: Dim 1, Test 15: d3d11.c:16485: Test marked todo: Got 0xdeadbeef, expected 0xfff0e0d0 or 0x80808080 at 128, uvec4 0x800000d0, 0x800000e0, 0x800000f0, 0x800000ff.