Commit 6c9ff7df authored by Józef Kucia's avatar Józef Kucia Committed by Alexandre Julliard

dxgi: Implement IDXGIDevice1 interface.

parent f6788b91
......@@ -40,6 +40,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_QueryInterface(IWineDXGIDevice *ifa
if (IsEqualGUID(riid, &IID_IUnknown)
|| IsEqualGUID(riid, &IID_IDXGIObject)
|| IsEqualGUID(riid, &IID_IDXGIDevice)
|| IsEqualGUID(riid, &IID_IDXGIDevice1)
|| IsEqualGUID(riid, &IID_IWineDXGIDevice))
{
IUnknown_AddRef(iface);
......@@ -49,11 +50,11 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_QueryInterface(IWineDXGIDevice *ifa
if (This->child_layer)
{
TRACE("forwarding to child layer %p\n", This->child_layer);
TRACE("forwarding to child layer %p.\n", This->child_layer);
return IUnknown_QueryInterface(This->child_layer, riid, object);
}
WARN("%s not implemented, returning E_NOINTERFACE\n", debugstr_guid(riid));
WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(riid));
*object = NULL;
return E_NOINTERFACE;
......@@ -257,6 +258,26 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_GetGPUThreadPriority(IWineDXGIDevic
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE dxgi_device_SetMaximumFrameLatency(IWineDXGIDevice *iface, UINT max_latency)
{
FIXME("iface %p, max_latency %u stub!\n", iface, max_latency);
if (max_latency > DXGI_FRAME_LATENCY_MAX)
return DXGI_ERROR_INVALID_CALL;
return E_NOTIMPL;
}
static HRESULT STDMETHODCALLTYPE dxgi_device_GetMaximumFrameLatency(IWineDXGIDevice *iface, UINT *max_latency)
{
FIXME("iface %p, max_latency %p stub!\n", iface, max_latency);
if (max_latency)
*max_latency = DXGI_FRAME_LATENCY_DEFAULT;
return E_NOTIMPL;
}
/* IWineDXGIDevice methods */
static HRESULT STDMETHODCALLTYPE dxgi_device_create_surface(IWineDXGIDevice *iface,
......@@ -336,6 +357,9 @@ static const struct IWineDXGIDeviceVtbl dxgi_device_vtbl =
dxgi_device_QueryResourceResidency,
dxgi_device_SetGPUThreadPriority,
dxgi_device_GetGPUThreadPriority,
/* IDXGIDevice1 methods */
dxgi_device_SetMaximumFrameLatency,
dxgi_device_GetMaximumFrameLatency,
/* IWineDXGIDevice methods */
dxgi_device_create_surface,
dxgi_device_create_swapchain,
......
......@@ -37,6 +37,12 @@
#include "wine/wined3d.h"
#include "wine/winedxgi.h"
enum dxgi_frame_latency
{
DXGI_FRAME_LATENCY_DEFAULT = 3,
DXGI_FRAME_LATENCY_MAX = 16,
};
/* Layered device */
enum dxgi_device_layer_id
{
......
......@@ -23,7 +23,7 @@ import "dxgi.idl";
local,
uuid(3e1ff30b-c951-48c3-b010-0fb49f3dca71)
]
interface IWineDXGIDevice : IDXGIDevice
interface IWineDXGIDevice : IDXGIDevice1
{
HRESULT create_surface(
[in] struct wined3d_resource *wined3d_resource,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment