Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dxgi/adapter.c | 2 +- dlls/dxgi/dxgi_private.h | 2 +- dlls/dxgi/output.c | 166 ++++++++++++++++++++++++++++----------- 3 files changed, 123 insertions(+), 47 deletions(-)
diff --git a/dlls/dxgi/adapter.c b/dlls/dxgi/adapter.c index ad4e4b13057..72f1a2df6b1 100644 --- a/dlls/dxgi/adapter.c +++ b/dlls/dxgi/adapter.c @@ -145,7 +145,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_EnumOutputs(IWineDXGIAdapter *ifac return hr; }
- *output = (IDXGIOutput *)&output_object->IDXGIOutput4_iface; + *output = (IDXGIOutput *)&output_object->IDXGIOutput6_iface;
TRACE("Returning output %p.\n", *output);
diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h index a125a7667d9..e43ee59461c 100644 --- a/dlls/dxgi/dxgi_private.h +++ b/dlls/dxgi/dxgi_private.h @@ -144,7 +144,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l /* IDXGIOutput */ struct dxgi_output { - IDXGIOutput4 IDXGIOutput4_iface; + IDXGIOutput6 IDXGIOutput6_iface; LONG refcount; struct wined3d_output *wined3d_output; struct wined3d_private_store private_store; diff --git a/dlls/dxgi/output.c b/dlls/dxgi/output.c index 5d31a0093cb..03b5384f326 100644 --- a/dlls/dxgi/output.c +++ b/dlls/dxgi/output.c @@ -181,18 +181,20 @@ static HRESULT dxgi_output_get_display_mode_list(struct dxgi_output *output, return S_OK; }
-static inline struct dxgi_output *impl_from_IDXGIOutput4(IDXGIOutput4 *iface) +static inline struct dxgi_output *impl_from_IDXGIOutput6(IDXGIOutput6 *iface) { - return CONTAINING_RECORD(iface, struct dxgi_output, IDXGIOutput4_iface); + return CONTAINING_RECORD(iface, struct dxgi_output, IDXGIOutput6_iface); }
/* IUnknown methods */
-static HRESULT STDMETHODCALLTYPE dxgi_output_QueryInterface(IDXGIOutput4 *iface, REFIID iid, void **object) +static HRESULT STDMETHODCALLTYPE dxgi_output_QueryInterface(IDXGIOutput6 *iface, REFIID iid, void **object) { TRACE("iface %p, iid %s, object %p.\n", iface, debugstr_guid(iid), object);
- if (IsEqualGUID(iid, &IID_IDXGIOutput4) + if (IsEqualGUID(iid, &IID_IDXGIOutput6) + || IsEqualGUID(iid, &IID_IDXGIOutput5) + || IsEqualGUID(iid, &IID_IDXGIOutput4) || IsEqualGUID(iid, &IID_IDXGIOutput3) || IsEqualGUID(iid, &IID_IDXGIOutput2) || IsEqualGUID(iid, &IID_IDXGIOutput1) @@ -211,9 +213,9 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_QueryInterface(IDXGIOutput4 *iface, return E_NOINTERFACE; }
-static ULONG STDMETHODCALLTYPE dxgi_output_AddRef(IDXGIOutput4 *iface) +static ULONG STDMETHODCALLTYPE dxgi_output_AddRef(IDXGIOutput6 *iface) { - struct dxgi_output *output = impl_from_IDXGIOutput4(iface); + struct dxgi_output *output = impl_from_IDXGIOutput6(iface); ULONG refcount = InterlockedIncrement(&output->refcount);
TRACE("%p increasing refcount to %u.\n", output, refcount); @@ -221,9 +223,9 @@ static ULONG STDMETHODCALLTYPE dxgi_output_AddRef(IDXGIOutput4 *iface) return refcount; }
-static ULONG STDMETHODCALLTYPE dxgi_output_Release(IDXGIOutput4 *iface) +static ULONG STDMETHODCALLTYPE dxgi_output_Release(IDXGIOutput6 *iface) { - struct dxgi_output *output = impl_from_IDXGIOutput4(iface); + struct dxgi_output *output = impl_from_IDXGIOutput6(iface); ULONG refcount = InterlockedDecrement(&output->refcount);
TRACE("%p decreasing refcount to %u.\n", output, refcount); @@ -240,40 +242,40 @@ static ULONG STDMETHODCALLTYPE dxgi_output_Release(IDXGIOutput4 *iface)
/* IDXGIObject methods */
-static HRESULT STDMETHODCALLTYPE dxgi_output_SetPrivateData(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_SetPrivateData(IDXGIOutput6 *iface, REFGUID guid, UINT data_size, const void *data) { - struct dxgi_output *output = impl_from_IDXGIOutput4(iface); + struct dxgi_output *output = impl_from_IDXGIOutput6(iface);
TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return dxgi_set_private_data(&output->private_store, guid, data_size, data); }
-static HRESULT STDMETHODCALLTYPE dxgi_output_SetPrivateDataInterface(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_SetPrivateDataInterface(IDXGIOutput6 *iface, REFGUID guid, const IUnknown *object) { - struct dxgi_output *output = impl_from_IDXGIOutput4(iface); + struct dxgi_output *output = impl_from_IDXGIOutput6(iface);
TRACE("iface %p, guid %s, object %p.\n", iface, debugstr_guid(guid), object);
return dxgi_set_private_data_interface(&output->private_store, guid, object); }
-static HRESULT STDMETHODCALLTYPE dxgi_output_GetPrivateData(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_GetPrivateData(IDXGIOutput6 *iface, REFGUID guid, UINT *data_size, void *data) { - struct dxgi_output *output = impl_from_IDXGIOutput4(iface); + struct dxgi_output *output = impl_from_IDXGIOutput6(iface);
TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return dxgi_get_private_data(&output->private_store, guid, data_size, data); }
-static HRESULT STDMETHODCALLTYPE dxgi_output_GetParent(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_GetParent(IDXGIOutput6 *iface, REFIID riid, void **parent) { - struct dxgi_output *output = impl_from_IDXGIOutput4(iface); + struct dxgi_output *output = impl_from_IDXGIOutput6(iface);
TRACE("iface %p, riid %s, parent %p.\n", iface, debugstr_guid(riid), parent);
@@ -282,9 +284,9 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetParent(IDXGIOutput4 *iface,
/* IDXGIOutput methods */
-static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc(IDXGIOutput4 *iface, DXGI_OUTPUT_DESC *desc) +static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc(IDXGIOutput6 *iface, DXGI_OUTPUT_DESC *desc) { - struct dxgi_output *output = impl_from_IDXGIOutput4(iface); + struct dxgi_output *output = impl_from_IDXGIOutput6(iface); struct wined3d_output_desc wined3d_desc; HRESULT hr;
@@ -312,10 +314,10 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc(IDXGIOutput4 *iface, DXGI_O return S_OK; }
-static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput6 *iface, DXGI_FORMAT format, UINT flags, UINT *mode_count, DXGI_MODE_DESC *modes) { - struct dxgi_output *output = impl_from_IDXGIOutput4(iface); + struct dxgi_output *output = impl_from_IDXGIOutput6(iface);
FIXME("iface %p, format %s, flags %#x, mode_count %p, modes %p partial stub!\n", iface, debug_dxgi_format(format), flags, mode_count, modes); @@ -324,10 +326,10 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList(IDXGIOutput4 *if format, mode_count, modes, DXGI_MODE_STRUCT_VERSION_0); }
-static HRESULT STDMETHODCALLTYPE dxgi_output_FindClosestMatchingMode(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_FindClosestMatchingMode(IDXGIOutput6 *iface, const DXGI_MODE_DESC *mode, DXGI_MODE_DESC *closest_match, IUnknown *device) { - struct dxgi_output *output = impl_from_IDXGIOutput4(iface); + struct dxgi_output *output = impl_from_IDXGIOutput6(iface); struct wined3d_display_mode wined3d_mode; HRESULT hr;
@@ -347,7 +349,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_FindClosestMatchingMode(IDXGIOutput return hr; }
-static HRESULT STDMETHODCALLTYPE dxgi_output_WaitForVBlank(IDXGIOutput4 *iface) +static HRESULT STDMETHODCALLTYPE dxgi_output_WaitForVBlank(IDXGIOutput6 *iface) { static BOOL once = FALSE;
@@ -359,9 +361,9 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_WaitForVBlank(IDXGIOutput4 *iface) return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE dxgi_output_TakeOwnership(IDXGIOutput4 *iface, IUnknown *device, BOOL exclusive) +static HRESULT STDMETHODCALLTYPE dxgi_output_TakeOwnership(IDXGIOutput6 *iface, IUnknown *device, BOOL exclusive) { - struct dxgi_output *output = impl_from_IDXGIOutput4(iface); + struct dxgi_output *output = impl_from_IDXGIOutput6(iface); HRESULT hr;
TRACE("iface %p, device %p, exclusive %d.\n", iface, device, exclusive); @@ -376,9 +378,9 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_TakeOwnership(IDXGIOutput4 *iface, return hr; }
-static void STDMETHODCALLTYPE dxgi_output_ReleaseOwnership(IDXGIOutput4 *iface) +static void STDMETHODCALLTYPE dxgi_output_ReleaseOwnership(IDXGIOutput6 *iface) { - struct dxgi_output *output = impl_from_IDXGIOutput4(iface); + struct dxgi_output *output = impl_from_IDXGIOutput6(iface);
TRACE("iface %p.\n", iface);
@@ -387,7 +389,7 @@ static void STDMETHODCALLTYPE dxgi_output_ReleaseOwnership(IDXGIOutput4 *iface) wined3d_mutex_unlock(); }
-static HRESULT STDMETHODCALLTYPE dxgi_output_GetGammaControlCapabilities(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_GetGammaControlCapabilities(IDXGIOutput6 *iface, DXGI_GAMMA_CONTROL_CAPABILITIES *gamma_caps) { unsigned int i; @@ -408,7 +410,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetGammaControlCapabilities(IDXGIOu return S_OK; }
-static HRESULT STDMETHODCALLTYPE dxgi_output_SetGammaControl(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_SetGammaControl(IDXGIOutput6 *iface, const DXGI_GAMMA_CONTROL *gamma_control) { FIXME("iface %p, gamma_control %p stub!\n", iface, gamma_control); @@ -416,7 +418,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_SetGammaControl(IDXGIOutput4 *iface return S_OK; }
-static HRESULT STDMETHODCALLTYPE dxgi_output_GetGammaControl(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_GetGammaControl(IDXGIOutput6 *iface, DXGI_GAMMA_CONTROL *gamma_control) { FIXME("iface %p, gamma_control %p stub!\n", iface, gamma_control); @@ -424,21 +426,21 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetGammaControl(IDXGIOutput4 *iface return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE dxgi_output_SetDisplaySurface(IDXGIOutput4 *iface, IDXGISurface *surface) +static HRESULT STDMETHODCALLTYPE dxgi_output_SetDisplaySurface(IDXGIOutput6 *iface, IDXGISurface *surface) { FIXME("iface %p, surface %p stub!\n", iface, surface);
return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplaySurfaceData(IDXGIOutput4 *iface, IDXGISurface *surface) +static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplaySurfaceData(IDXGIOutput6 *iface, IDXGISurface *surface) { FIXME("iface %p, surface %p stub!\n", iface, surface);
return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE dxgi_output_GetFrameStatistics(IDXGIOutput4 *iface, DXGI_FRAME_STATISTICS *stats) +static HRESULT STDMETHODCALLTYPE dxgi_output_GetFrameStatistics(IDXGIOutput6 *iface, DXGI_FRAME_STATISTICS *stats) { FIXME("iface %p, stats %p stub!\n", iface, stats);
@@ -447,10 +449,10 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetFrameStatistics(IDXGIOutput4 *if
/* IDXGIOutput1 methods */
-static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList1(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList1(IDXGIOutput6 *iface, DXGI_FORMAT format, UINT flags, UINT *mode_count, DXGI_MODE_DESC1 *modes) { - struct dxgi_output *output = impl_from_IDXGIOutput4(iface); + struct dxgi_output *output = impl_from_IDXGIOutput6(iface);
FIXME("iface %p, format %s, flags %#x, mode_count %p, modes %p partial stub!\n", iface, debug_dxgi_format(format), flags, mode_count, modes); @@ -459,10 +461,10 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplayModeList1(IDXGIOutput4 *i format, mode_count, modes, DXGI_MODE_STRUCT_VERSION_1); }
-static HRESULT STDMETHODCALLTYPE dxgi_output_FindClosestMatchingMode1(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_FindClosestMatchingMode1(IDXGIOutput6 *iface, const DXGI_MODE_DESC1 *mode, DXGI_MODE_DESC1 *closest_match, IUnknown *device) { - struct dxgi_output *output = impl_from_IDXGIOutput4(iface); + struct dxgi_output *output = impl_from_IDXGIOutput6(iface); struct wined3d_display_mode wined3d_mode; HRESULT hr;
@@ -482,7 +484,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_FindClosestMatchingMode1(IDXGIOutpu return hr; }
-static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplaySurfaceData1(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplaySurfaceData1(IDXGIOutput6 *iface, IDXGIResource *resource) { FIXME("iface %p, resource %p stub!\n", iface, resource); @@ -490,7 +492,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDisplaySurfaceData1(IDXGIOutput4 return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE dxgi_output_DuplicateOutput(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_DuplicateOutput(IDXGIOutput6 *iface, IUnknown *device, IDXGIOutputDuplication **output_duplication) { FIXME("iface %p, device %p, output_duplication %p stub!\n", iface, device, output_duplication); @@ -500,7 +502,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_DuplicateOutput(IDXGIOutput4 *iface
/* IDXGIOutput2 methods */
-static BOOL STDMETHODCALLTYPE dxgi_output_SupportsOverlays(IDXGIOutput4 *iface) +static BOOL STDMETHODCALLTYPE dxgi_output_SupportsOverlays(IDXGIOutput6 *iface) { FIXME("iface %p stub!\n", iface);
@@ -509,7 +511,7 @@ static BOOL STDMETHODCALLTYPE dxgi_output_SupportsOverlays(IDXGIOutput4 *iface)
/* IDXGIOutput3 methods */
-static HRESULT STDMETHODCALLTYPE dxgi_output_CheckOverlaySupport(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_CheckOverlaySupport(IDXGIOutput6 *iface, DXGI_FORMAT format, IUnknown *device, UINT *flags) { FIXME("iface %p, format %#x, device %p, flags %p stub!\n", iface, format, device, flags); @@ -519,7 +521,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_CheckOverlaySupport(IDXGIOutput4 *i
/* IDXGIOutput4 methods */
-static HRESULT STDMETHODCALLTYPE dxgi_output_CheckOverlayColorSpaceSupport(IDXGIOutput4 *iface, +static HRESULT STDMETHODCALLTYPE dxgi_output_CheckOverlayColorSpaceSupport(IDXGIOutput6 *iface, DXGI_FORMAT format, DXGI_COLOR_SPACE_TYPE color_space, IUnknown *device, UINT *flags) { FIXME("iface %p, format %#x, color_space %#x, device %p, flags %p stub!\n", @@ -528,7 +530,76 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_CheckOverlayColorSpaceSupport(IDXGI return E_NOTIMPL; }
-static const struct IDXGIOutput4Vtbl dxgi_output_vtbl = +/* IDXGIOutput5 methods */ + +static HRESULT STDMETHODCALLTYPE dxgi_output_DuplicateOutput1(IDXGIOutput6 *iface, + IUnknown *device, UINT flags, UINT format_count, const DXGI_FORMAT *formats, + IDXGIOutputDuplication **output_duplication) +{ + FIXME("iface %p, device %p, flags %#x, format_count %u, formats %p, " + "output_duplication %p stub!\n", iface, device, flags, format_count, + formats, output_duplication); + + return E_NOTIMPL; +} + +/* IDXGIOutput6 methods */ + +static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc1(IDXGIOutput6 *iface, + DXGI_OUTPUT_DESC1 *desc) +{ + struct dxgi_output *output = impl_from_IDXGIOutput6(iface); + struct wined3d_output_desc wined3d_desc; + HRESULT hr; + + FIXME("iface %p, desc %p semi-stub!\n", iface, desc); + + if (!desc) + return E_INVALIDARG; + + wined3d_mutex_lock(); + hr = wined3d_output_get_desc(output->wined3d_output, &wined3d_desc); + wined3d_mutex_unlock(); + + if (FAILED(hr)) + { + WARN("Failed to get output desc, hr %#x.\n", hr); + return hr; + } + + memcpy(desc->DeviceName, wined3d_desc.device_name, sizeof(desc->DeviceName)); + desc->DesktopCoordinates = wined3d_desc.desktop_rect; + desc->AttachedToDesktop = wined3d_desc.attached_to_desktop; + desc->Rotation = wined3d_desc.rotation; + desc->Monitor = wined3d_desc.monitor; + + /* FIXME: fill this from monitor EDID */ + desc->BitsPerColor = 0; + desc->ColorSpace = DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709; + desc->RedPrimary[0] = 0.f; + desc->RedPrimary[1] = 0.f; + desc->GreenPrimary[0] = 0.f; + desc->GreenPrimary[1] = 0.f; + desc->BluePrimary[0] = 0.f; + desc->BluePrimary[1] = 0.f; + desc->WhitePoint[0] = 0.f; + desc->WhitePoint[1] = 0.f; + desc->MinLuminance = 0.f; + desc->MaxLuminance = 0.f; + desc->MaxFullFrameLuminance = 0.f; + + return S_OK; +} + +static HRESULT STDMETHODCALLTYPE dxgi_output_CheckHardwareCompositionSupport(IDXGIOutput6 *iface, + UINT *flags) +{ + FIXME("iface %p, flags %p stub!\n", iface, flags); + + return E_NOTIMPL; +} + +static const struct IDXGIOutput6Vtbl dxgi_output_vtbl = { dxgi_output_QueryInterface, dxgi_output_AddRef, @@ -562,6 +633,11 @@ static const struct IDXGIOutput4Vtbl dxgi_output_vtbl = dxgi_output_CheckOverlaySupport, /* IDXGIOutput4 methods */ dxgi_output_CheckOverlayColorSpaceSupport, + /* IDXGIOutput5 methods */ + dxgi_output_DuplicateOutput1, + /* IDXGIOutput6 methods */ + dxgi_output_GetDesc1, + dxgi_output_CheckHardwareCompositionSupport, };
struct dxgi_output *unsafe_impl_from_IDXGIOutput(IDXGIOutput *iface) @@ -569,13 +645,13 @@ struct dxgi_output *unsafe_impl_from_IDXGIOutput(IDXGIOutput *iface) if (!iface) return NULL; assert(iface->lpVtbl == (IDXGIOutputVtbl *)&dxgi_output_vtbl); - return CONTAINING_RECORD(iface, struct dxgi_output, IDXGIOutput4_iface); + return CONTAINING_RECORD(iface, struct dxgi_output, IDXGIOutput6_iface); }
static void dxgi_output_init(struct dxgi_output *output, unsigned int output_idx, struct dxgi_adapter *adapter) { - output->IDXGIOutput4_iface.lpVtbl = &dxgi_output_vtbl; + output->IDXGIOutput6_iface.lpVtbl = &dxgi_output_vtbl; output->refcount = 1; output->wined3d_output = wined3d_adapter_get_output(adapter->wined3d_adapter, output_idx); wined3d_private_store_init(&output->private_store);
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dxgi/swapchain.c | 157 +++++++++++++++++++++++------------------- 1 file changed, 85 insertions(+), 72 deletions(-)
diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index f37aee933ec..c8f1502a13a 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -1032,7 +1032,7 @@ static HRESULT hresult_from_vk_result(VkResult vr)
struct d3d12_swapchain { - IDXGISwapChain3 IDXGISwapChain3_iface; + IDXGISwapChain4 IDXGISwapChain4_iface; LONG refcount; struct wined3d_private_store private_store;
@@ -1820,14 +1820,14 @@ static HRESULT d3d12_swapchain_recreate_vulkan_swapchain(struct d3d12_swapchain return hr; }
-static inline struct d3d12_swapchain *d3d12_swapchain_from_IDXGISwapChain3(IDXGISwapChain3 *iface) +static inline struct d3d12_swapchain *d3d12_swapchain_from_IDXGISwapChain4(IDXGISwapChain4 *iface) { - return CONTAINING_RECORD(iface, struct d3d12_swapchain, IDXGISwapChain3_iface); + return CONTAINING_RECORD(iface, struct d3d12_swapchain, IDXGISwapChain4_iface); }
/* IUnknown methods */
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_QueryInterface(IDXGISwapChain3 *iface, REFIID iid, void **object) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_QueryInterface(IDXGISwapChain4 *iface, REFIID iid, void **object) { TRACE("iface %p, iid %s, object %p.\n", iface, debugstr_guid(iid), object);
@@ -1837,7 +1837,8 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_QueryInterface(IDXGISwapChain3 || IsEqualGUID(iid, &IID_IDXGISwapChain) || IsEqualGUID(iid, &IID_IDXGISwapChain1) || IsEqualGUID(iid, &IID_IDXGISwapChain2) - || IsEqualGUID(iid, &IID_IDXGISwapChain3)) + || IsEqualGUID(iid, &IID_IDXGISwapChain3) + || IsEqualGUID(iid, &IID_IDXGISwapChain4)) { IUnknown_AddRef(iface); *object = iface; @@ -1850,9 +1851,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_QueryInterface(IDXGISwapChain3 return E_NOINTERFACE; }
-static ULONG STDMETHODCALLTYPE d3d12_swapchain_AddRef(IDXGISwapChain3 *iface) +static ULONG STDMETHODCALLTYPE d3d12_swapchain_AddRef(IDXGISwapChain4 *iface) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface); ULONG refcount = InterlockedIncrement(&swapchain->refcount);
TRACE("%p increasing refcount to %u.\n", swapchain, refcount); @@ -1904,9 +1905,9 @@ static void d3d12_swapchain_destroy(struct d3d12_swapchain *swapchain) wined3d_swapchain_state_destroy(swapchain->state); }
-static ULONG STDMETHODCALLTYPE d3d12_swapchain_Release(IDXGISwapChain3 *iface) +static ULONG STDMETHODCALLTYPE d3d12_swapchain_Release(IDXGISwapChain4 *iface) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface); ULONG refcount = InterlockedDecrement(&swapchain->refcount);
TRACE("%p decreasing refcount to %u.\n", swapchain, refcount); @@ -1922,39 +1923,39 @@ static ULONG STDMETHODCALLTYPE d3d12_swapchain_Release(IDXGISwapChain3 *iface)
/* IDXGIObject methods */
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetPrivateData(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetPrivateData(IDXGISwapChain4 *iface, REFGUID guid, UINT data_size, const void *data) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, guid %s, data_size %u, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return dxgi_set_private_data(&swapchain->private_store, guid, data_size, data); }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetPrivateDataInterface(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetPrivateDataInterface(IDXGISwapChain4 *iface, REFGUID guid, const IUnknown *object) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, guid %s, object %p.\n", iface, debugstr_guid(guid), object);
return dxgi_set_private_data_interface(&swapchain->private_store, guid, object); }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetPrivateData(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetPrivateData(IDXGISwapChain4 *iface, REFGUID guid, UINT *data_size, void *data) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, guid %s, data_size %p, data %p.\n", iface, debugstr_guid(guid), data_size, data);
return dxgi_get_private_data(&swapchain->private_store, guid, data_size, data); }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetParent(IDXGISwapChain3 *iface, REFIID iid, void **parent) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetParent(IDXGISwapChain4 *iface, REFIID iid, void **parent) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, iid %s, parent %p.\n", iface, debugstr_guid(iid), parent);
@@ -1963,9 +1964,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetParent(IDXGISwapChain3 *ifac
/* IDXGIDeviceSubObject methods */
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDevice(IDXGISwapChain3 *iface, REFIID iid, void **device) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDevice(IDXGISwapChain4 *iface, REFIID iid, void **device) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, iid %s, device %p.\n", iface, debugstr_guid(iid), device);
@@ -2183,19 +2184,19 @@ static HRESULT d3d12_swapchain_present(struct d3d12_swapchain *swapchain, return hresult_from_vk_result(vr); }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_Present(IDXGISwapChain3 *iface, UINT sync_interval, UINT flags) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_Present(IDXGISwapChain4 *iface, UINT sync_interval, UINT flags) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, sync_interval %u, flags %#x.\n", iface, sync_interval, flags);
return d3d12_swapchain_present(swapchain, sync_interval, flags); }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetBuffer(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetBuffer(IDXGISwapChain4 *iface, UINT buffer_idx, REFIID iid, void **surface) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, buffer_idx %u, iid %s, surface %p.\n", iface, buffer_idx, debugstr_guid(iid), surface); @@ -2210,10 +2211,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetBuffer(IDXGISwapChain3 *ifac return ID3D12Resource_QueryInterface(swapchain->buffers[buffer_idx], iid, surface); }
-static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d12_swapchain_SetFullscreenState(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d12_swapchain_SetFullscreenState(IDXGISwapChain4 *iface, BOOL fullscreen, IDXGIOutput *target) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface); DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc = &swapchain->fullscreen_desc; const DXGI_SWAP_CHAIN_DESC1 *swapchain_desc = &swapchain->desc; struct wined3d_swapchain_desc wined3d_desc; @@ -2232,7 +2233,7 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d12_swapchain_SetFullscreen { IDXGIOutput_AddRef(target); } - else if (FAILED(hr = IDXGISwapChain3_GetContainingOutput(iface, &target))) + else if (FAILED(hr = IDXGISwapChain4_GetContainingOutput(iface, &target))) { WARN("Failed to get target output for swapchain, hr %#x.\n", hr); return hr; @@ -2267,10 +2268,10 @@ fail: return DXGI_ERROR_NOT_CURRENTLY_AVAILABLE; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFullscreenState(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFullscreenState(IDXGISwapChain4 *iface, BOOL *fullscreen, IDXGIOutput **target) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, fullscreen %p, target %p.\n", iface, fullscreen, target);
@@ -2283,9 +2284,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFullscreenState(IDXGISwapCha return S_OK; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDesc(IDXGISwapChain3 *iface, DXGI_SWAP_CHAIN_DESC *desc) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDesc(IDXGISwapChain4 *iface, DXGI_SWAP_CHAIN_DESC *desc) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface); const DXGI_SWAP_CHAIN_FULLSCREEN_DESC *fullscreen_desc = &swapchain->fullscreen_desc; const DXGI_SWAP_CHAIN_DESC1 *swapchain_desc = &swapchain->desc;
@@ -2372,10 +2373,10 @@ static HRESULT d3d12_swapchain_resize_buffers(struct d3d12_swapchain *swapchain, return d3d12_swapchain_recreate_vulkan_swapchain(swapchain); }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_ResizeBuffers(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_ResizeBuffers(IDXGISwapChain4 *iface, UINT buffer_count, UINT width, UINT height, DXGI_FORMAT format, UINT flags) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, buffer_count %u, width %u, height %u, format %s, flags %#x.\n", iface, buffer_count, width, height, debug_dxgi_format(format), flags); @@ -2383,20 +2384,20 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_ResizeBuffers(IDXGISwapChain3 * return d3d12_swapchain_resize_buffers(swapchain, buffer_count, width, height, format, flags); }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_ResizeTarget(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_ResizeTarget(IDXGISwapChain4 *iface, const DXGI_MODE_DESC *target_mode_desc) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, target_mode_desc %p.\n", iface, target_mode_desc);
return dxgi_swapchain_resize_target(swapchain->state, target_mode_desc); }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetContainingOutput(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetContainingOutput(IDXGISwapChain4 *iface, IDXGIOutput **output) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface); IUnknown *device_parent; IDXGIFactory *factory; IDXGIAdapter *adapter; @@ -2431,7 +2432,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetContainingOutput(IDXGISwapCh return hr; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFrameStatistics(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFrameStatistics(IDXGISwapChain4 *iface, DXGI_FRAME_STATISTICS *stats) { FIXME("iface %p, stats %p stub!\n", iface, stats); @@ -2439,7 +2440,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFrameStatistics(IDXGISwapCha return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetLastPresentCount(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetLastPresentCount(IDXGISwapChain4 *iface, UINT *last_present_count) { FIXME("iface %p, last_present_count %p stub!\n", iface, last_present_count); @@ -2449,9 +2450,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetLastPresentCount(IDXGISwapCh
/* IDXGISwapChain1 methods */
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDesc1(IDXGISwapChain3 *iface, DXGI_SWAP_CHAIN_DESC1 *desc) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDesc1(IDXGISwapChain4 *iface, DXGI_SWAP_CHAIN_DESC1 *desc) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, desc %p.\n", iface, desc);
@@ -2465,10 +2466,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDesc1(IDXGISwapChain3 *iface return S_OK; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFullscreenDesc(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFullscreenDesc(IDXGISwapChain4 *iface, DXGI_SWAP_CHAIN_FULLSCREEN_DESC *desc) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, desc %p.\n", iface, desc);
@@ -2482,9 +2483,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFullscreenDesc(IDXGISwapChai return S_OK; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetHwnd(IDXGISwapChain3 *iface, HWND *hwnd) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetHwnd(IDXGISwapChain4 *iface, HWND *hwnd) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, hwnd %p.\n", iface, hwnd);
@@ -2498,7 +2499,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetHwnd(IDXGISwapChain3 *iface, return S_OK; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetCoreWindow(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetCoreWindow(IDXGISwapChain4 *iface, REFIID iid, void **core_window) { FIXME("iface %p, iid %s, core_window %p stub!\n", iface, debugstr_guid(iid), core_window); @@ -2509,10 +2510,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetCoreWindow(IDXGISwapChain3 * return DXGI_ERROR_INVALID_CALL; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_Present1(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_Present1(IDXGISwapChain4 *iface, UINT sync_interval, UINT flags, const DXGI_PRESENT_PARAMETERS *present_parameters) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, sync_interval %u, flags %#x, present_parameters %p.\n", iface, sync_interval, flags, present_parameters); @@ -2523,14 +2524,14 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_Present1(IDXGISwapChain3 *iface return d3d12_swapchain_present(swapchain, sync_interval, flags); }
-static BOOL STDMETHODCALLTYPE d3d12_swapchain_IsTemporaryMonoSupported(IDXGISwapChain3 *iface) +static BOOL STDMETHODCALLTYPE d3d12_swapchain_IsTemporaryMonoSupported(IDXGISwapChain4 *iface) { FIXME("iface %p stub!\n", iface);
return FALSE; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetRestrictToOutput(IDXGISwapChain3 *iface, IDXGIOutput **output) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetRestrictToOutput(IDXGISwapChain4 *iface, IDXGIOutput **output) { FIXME("iface %p, output %p stub!\n", iface, output);
@@ -2544,28 +2545,28 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetRestrictToOutput(IDXGISwapCh return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetBackgroundColor(IDXGISwapChain3 *iface, const DXGI_RGBA *color) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetBackgroundColor(IDXGISwapChain4 *iface, const DXGI_RGBA *color) { FIXME("iface %p, color %p stub!\n", iface, color);
return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetBackgroundColor(IDXGISwapChain3 *iface, DXGI_RGBA *color) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetBackgroundColor(IDXGISwapChain4 *iface, DXGI_RGBA *color) { FIXME("iface %p, color %p stub!\n", iface, color);
return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetRotation(IDXGISwapChain3 *iface, DXGI_MODE_ROTATION rotation) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetRotation(IDXGISwapChain4 *iface, DXGI_MODE_ROTATION rotation) { FIXME("iface %p, rotation %#x stub!\n", iface, rotation);
return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetRotation(IDXGISwapChain3 *iface, DXGI_MODE_ROTATION *rotation) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetRotation(IDXGISwapChain4 *iface, DXGI_MODE_ROTATION *rotation) { FIXME("iface %p, rotation %p stub!\n", iface, rotation);
@@ -2574,23 +2575,23 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetRotation(IDXGISwapChain3 *if
/* IDXGISwapChain2 methods */
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetSourceSize(IDXGISwapChain3 *iface, UINT width, UINT height) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetSourceSize(IDXGISwapChain4 *iface, UINT width, UINT height) { FIXME("iface %p, width %u, height %u stub!\n", iface, width, height);
return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetSourceSize(IDXGISwapChain3 *iface, UINT *width, UINT *height) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetSourceSize(IDXGISwapChain4 *iface, UINT *width, UINT *height) { FIXME("iface %p, width %p, height %p stub!\n", iface, width, height);
return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetMaximumFrameLatency(IDXGISwapChain3 *iface, UINT max_latency) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetMaximumFrameLatency(IDXGISwapChain4 *iface, UINT max_latency) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, max_latency %u.\n", iface, max_latency);
@@ -2610,9 +2611,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetMaximumFrameLatency(IDXGISwa return S_OK; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetMaximumFrameLatency(IDXGISwapChain3 *iface, UINT *max_latency) +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetMaximumFrameLatency(IDXGISwapChain4 *iface, UINT *max_latency) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p, max_latency %p.\n", iface, max_latency);
@@ -2626,16 +2627,16 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetMaximumFrameLatency(IDXGISwa return S_OK; }
-static HANDLE STDMETHODCALLTYPE d3d12_swapchain_GetFrameLatencyWaitableObject(IDXGISwapChain3 *iface) +static HANDLE STDMETHODCALLTYPE d3d12_swapchain_GetFrameLatencyWaitableObject(IDXGISwapChain4 *iface) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p.\n", iface);
return swapchain->frame_latency_event; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetMatrixTransform(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetMatrixTransform(IDXGISwapChain4 *iface, const DXGI_MATRIX_3X2_F *matrix) { FIXME("iface %p, matrix %p stub!\n", iface, matrix); @@ -2643,7 +2644,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetMatrixTransform(IDXGISwapCha return E_NOTIMPL; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetMatrixTransform(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetMatrixTransform(IDXGISwapChain4 *iface, DXGI_MATRIX_3X2_F *matrix) { FIXME("iface %p, matrix %p stub!\n", iface, matrix); @@ -2653,9 +2654,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetMatrixTransform(IDXGISwapCha
/* IDXGISwapChain3 methods */
-static UINT STDMETHODCALLTYPE d3d12_swapchain_GetCurrentBackBufferIndex(IDXGISwapChain3 *iface) +static UINT STDMETHODCALLTYPE d3d12_swapchain_GetCurrentBackBufferIndex(IDXGISwapChain4 *iface) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface);
TRACE("iface %p.\n", iface);
@@ -2664,7 +2665,7 @@ static UINT STDMETHODCALLTYPE d3d12_swapchain_GetCurrentBackBufferIndex(IDXGISwa return swapchain->current_buffer_index; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_CheckColorSpaceSupport(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_CheckColorSpaceSupport(IDXGISwapChain4 *iface, DXGI_COLOR_SPACE_TYPE colour_space, UINT *colour_space_support) { UINT support_flags = 0; @@ -2682,7 +2683,7 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_CheckColorSpaceSupport(IDXGISwa return S_OK; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetColorSpace1(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetColorSpace1(IDXGISwapChain4 *iface, DXGI_COLOR_SPACE_TYPE colour_space) { FIXME("iface %p, colour_space %#x semi-stub!\n", iface, colour_space); @@ -2696,11 +2697,11 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetColorSpace1(IDXGISwapChain3 return S_OK; }
-static HRESULT STDMETHODCALLTYPE d3d12_swapchain_ResizeBuffers1(IDXGISwapChain3 *iface, +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_ResizeBuffers1(IDXGISwapChain4 *iface, UINT buffer_count, UINT width, UINT height, DXGI_FORMAT format, UINT flags, const UINT *node_mask, IUnknown * const *present_queue) { - struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface); + struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain4(iface); size_t i, count;
TRACE("iface %p, buffer_count %u, width %u, height %u, format %s, flags %#x, " @@ -2722,7 +2723,17 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_ResizeBuffers1(IDXGISwapChain3 return d3d12_swapchain_resize_buffers(swapchain, buffer_count, width, height, format, flags); }
-static const struct IDXGISwapChain3Vtbl d3d12_swapchain_vtbl = +/* IDXGISwapChain4 methods */ + +static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetHDRMetaData(IDXGISwapChain4 *iface, + DXGI_HDR_METADATA_TYPE type, UINT size, void *metadata) +{ + FIXME("iface %p, type %#x, size %#x, metadata %p stub!\n", iface, type, size, metadata); + + return E_NOTIMPL; +} + +static const struct IDXGISwapChain4Vtbl d3d12_swapchain_vtbl = { /* IUnknown methods */ d3d12_swapchain_QueryInterface, @@ -2771,6 +2782,8 @@ static const struct IDXGISwapChain3Vtbl d3d12_swapchain_vtbl = d3d12_swapchain_CheckColorSpaceSupport, d3d12_swapchain_SetColorSpace1, d3d12_swapchain_ResizeBuffers1, + /* IDXGISwapChain4 methods */ + d3d12_swapchain_SetHDRMetaData, };
static BOOL load_vkd3d_functions(void *vkd3d_handle) @@ -2918,7 +2931,7 @@ static HRESULT d3d12_swapchain_init(struct d3d12_swapchain *swapchain, IWineDXGI return E_ACCESSDENIED; }
- swapchain->IDXGISwapChain3_iface.lpVtbl = &d3d12_swapchain_vtbl; + swapchain->IDXGISwapChain4_iface.lpVtbl = &d3d12_swapchain_vtbl; swapchain->refcount = 1;
swapchain->window = window; @@ -3123,7 +3136,7 @@ HRESULT d3d12_swapchain_create(IWineDXGIFactory *factory, ID3D12CommandQueue *qu
TRACE("Created swapchain %p.\n", object);
- *swapchain = (IDXGISwapChain1 *)&object->IDXGISwapChain3_iface; + *swapchain = (IDXGISwapChain1 *)&object->IDXGISwapChain4_iface;
return S_OK; }
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=75619
Your paranoid android.
=== debiant (32 bit report) ===
dxgi: dxgi: Timeout
=== debiant (32 bit Chinese:China report) ===
dxgi: dxgi: Timeout
=== debiant (32 bit WoW report) ===
dxgi: dxgi: Timeout
=== debiant (64 bit WoW report) ===
dxgi: dxgi: Timeout
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
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=75618
Your paranoid android.
=== debiant (32 bit report) ===
dxgi: dxgi: Timeout
=== debiant (build log) ===
0024:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded. 0024:err:winediag:nodrv_CreateWindow The explorer process failed to start. Task: WineTest did not produce the win32_zh_CN report
=== debiant (32 bit WoW report) ===
dxgi: dxgi: Timeout
=== debiant (64 bit WoW report) ===
dxgi: dxgi: Timeout