1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 02:52:10 +01:00

[dxgi] added stub implementation of IDXGIDevice2 (#172)

This commit is contained in:
Mikhail Paulyshka 2018-03-17 03:48:55 +03:00 committed by Philip Rebohle
parent 4fdea96fd0
commit 608cd33a25
3 changed files with 40 additions and 1 deletions

View File

@ -21,6 +21,7 @@ namespace dxvk {
COM_QUERY_IFACE(riid, ppvObject, IDXGIObject);
COM_QUERY_IFACE(riid, ppvObject, IDXGIDevice);
COM_QUERY_IFACE(riid, ppvObject, IDXGIDevice1);
COM_QUERY_IFACE(riid, ppvObject, IDXGIDevice2);
COM_QUERY_IFACE(riid, ppvObject, IDXGIDevicePrivate);
if (m_layer != nullptr)
@ -96,6 +97,31 @@ namespace dxvk {
}
HRESULT STDMETHODCALLTYPE DxgiDevice::OfferResources(
UINT NumResources,
IDXGIResource* const* ppResources,
DXGI_OFFER_RESOURCE_PRIORITY Priority) {
Logger::err("DxgiDevice::OfferResources: not implemented");
return DXGI_ERROR_UNSUPPORTED;
}
HRESULT STDMETHODCALLTYPE DxgiDevice::ReclaimResources(
UINT NumResources,
IDXGIResource* const* ppResources,
BOOL* pDiscarded) {
Logger::err("DxgiDevice::ReclaimResources: not implemented");
return DXGI_ERROR_UNSUPPORTED;
}
HRESULT STDMETHODCALLTYPE DxgiDevice::EnqueueSetEvent(HANDLE hEvent) {
Logger::err("DxgiDevice::EnqueueSetEvent: not implemented");
return DXGI_ERROR_UNSUPPORTED;
}
void STDMETHODCALLTYPE DxgiDevice::SetDeviceLayer(IUnknown* layer) {
m_layer = layer;
}

View File

@ -52,6 +52,19 @@ namespace dxvk {
HRESULT STDMETHODCALLTYPE SetMaximumFrameLatency(
UINT MaxLatency) final;
HRESULT STDMETHODCALLTYPE OfferResources(
UINT NumResources,
IDXGIResource* const* ppResources,
DXGI_OFFER_RESOURCE_PRIORITY Priority) final;
HRESULT STDMETHODCALLTYPE ReclaimResources(
UINT NumResources,
IDXGIResource* const* ppResources,
BOOL* pDiscarded) final;
HRESULT STDMETHODCALLTYPE EnqueueSetEvent(
HANDLE hEvent) final;
void STDMETHODCALLTYPE SetDeviceLayer(
IUnknown* layer) final;

View File

@ -88,7 +88,7 @@ IDXGIAdapterPrivate : public IDXGIAdapter1 {
* this interface.
*/
MIDL_INTERFACE("7a622cf6-627a-46b2-b52f-360ef3da831c")
IDXGIDevicePrivate : public IDXGIDevice1 {
IDXGIDevicePrivate : public IDXGIDevice2 {
static const GUID guid;
virtual void STDMETHODCALLTYPE SetDeviceLayer(