2017-10-11 15:31:36 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "dxgi_include.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
class DxgiAdapter;
|
|
|
|
class DxvkAdapter;
|
2017-11-29 15:16:07 +01:00
|
|
|
class DxvkBuffer;
|
2017-10-11 15:31:36 +02:00
|
|
|
class DxvkDevice;
|
2017-11-29 15:16:07 +01:00
|
|
|
class DxvkImage;
|
2017-10-11 15:31:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2017-11-29 07:55:44 +01:00
|
|
|
* \brief Private DXGI adapter interface
|
2017-10-11 15:31:36 +02:00
|
|
|
*
|
|
|
|
* The implementation of \c IDXGIAdapter holds a
|
|
|
|
* \ref DxvkAdapter which can be retrieved using
|
|
|
|
* this interface.
|
|
|
|
*/
|
|
|
|
MIDL_INTERFACE("907bf281-ea3c-43b4-a8e4-9f231107b4ff")
|
2017-11-27 15:51:53 +01:00
|
|
|
IDXGIAdapterPrivate : public IDXGIAdapter1 {
|
2017-10-11 15:31:36 +02:00
|
|
|
static const GUID guid;
|
|
|
|
|
|
|
|
virtual dxvk::Rc<dxvk::DxvkAdapter> GetDXVKAdapter() = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
2017-11-29 07:55:44 +01:00
|
|
|
* \brief Private DXGI device interface
|
2017-10-11 15:31:36 +02:00
|
|
|
*
|
|
|
|
* The implementation of \c IDXGIDevice stores a
|
|
|
|
* \ref DxvkDevice which can be retrieved using
|
|
|
|
* this interface.
|
|
|
|
*/
|
|
|
|
MIDL_INTERFACE("7a622cf6-627a-46b2-b52f-360ef3da831c")
|
2017-11-27 15:51:53 +01:00
|
|
|
IDXGIDevicePrivate : public IDXGIDevice {
|
2017-10-11 15:31:36 +02:00
|
|
|
static const GUID guid;
|
|
|
|
|
|
|
|
virtual void SetDeviceLayer(
|
|
|
|
IUnknown* layer) = 0;
|
|
|
|
|
|
|
|
virtual dxvk::Rc<dxvk::DxvkDevice> GetDXVKDevice() = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-11-29 15:16:07 +01:00
|
|
|
/**
|
|
|
|
* \brief Private buffer resource interface
|
|
|
|
* Provides access to a raw DXVK buffer.
|
|
|
|
*/
|
|
|
|
MIDL_INTERFACE("5679becd-8547-4d93-96a1-e61a1ce7ef37")
|
|
|
|
IDXGIBufferResourcePrivate : public IDXGIResource {
|
|
|
|
static const GUID guid;
|
|
|
|
|
|
|
|
virtual dxvk::Rc<dxvk::DxvkBuffer> GetDXVKBuffer() = 0;
|
|
|
|
|
|
|
|
virtual void SetResourceLayer(
|
|
|
|
IUnknown* pLayer) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Private image resource interface
|
|
|
|
* Provides access to a raw DXVK image.
|
|
|
|
*/
|
|
|
|
MIDL_INTERFACE("1cfe6592-7de0-4a07-8dcb-4543cbbc6a7d")
|
|
|
|
IDXGIImageResourcePrivate : public IDXGIResource {
|
|
|
|
static const GUID guid;
|
|
|
|
|
|
|
|
virtual dxvk::Rc<dxvk::DxvkImage> GetDXVKImage() = 0;
|
|
|
|
|
|
|
|
virtual void SetResourceLayer(
|
|
|
|
IUnknown* pLayer) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-11-29 16:23:33 +01:00
|
|
|
/**
|
|
|
|
* \brief Private presentation device interface
|
|
|
|
*
|
|
|
|
* Allows a swap chain to communicate with the device
|
|
|
|
* in order to flush pending commands or create the
|
|
|
|
* back buffer interface.
|
|
|
|
*/
|
|
|
|
MIDL_INTERFACE("79352328-16f2-4f81-9746-9c2e2ccd43cf")
|
|
|
|
IDXGIPresentDevicePrivate : public IUnknown {
|
|
|
|
static const GUID guid;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Wraps swap chain image into a texture interface
|
|
|
|
*
|
|
|
|
* Creates an interface to the back buffer image of a
|
|
|
|
* swap chain. This interface will be returned by the
|
|
|
|
* swap chain's \c GetBuffer method.
|
|
|
|
* \param [in] image Image to wrap
|
|
|
|
* \param [in] pSwapChainDesc Swap chain properties
|
|
|
|
* \param [in] ppInterface Target interface
|
|
|
|
* \returns \c S_OK on success
|
|
|
|
*/
|
|
|
|
virtual HRESULT WrapSwapChainBackBuffer(
|
|
|
|
IDXGIImageResourcePrivate* pResource,
|
|
|
|
const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc,
|
|
|
|
IUnknown** ppInterface) = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Flushes the immediate context
|
|
|
|
*
|
|
|
|
* Used by the swap chain's \c Present method to
|
|
|
|
* ensure that all rendering commands get dispatched
|
|
|
|
* before presenting the swap chain's back buffer.
|
|
|
|
* \returns \c S_OK on success
|
|
|
|
*/
|
|
|
|
virtual HRESULT FlushRenderingCommands() = 0;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* \brief Underlying DXVK device
|
|
|
|
*
|
|
|
|
* \param [in] riid Device type
|
|
|
|
* \param [in] ppDevice device
|
|
|
|
* \returns DXVK device handle
|
|
|
|
*/
|
|
|
|
virtual HRESULT GetDevice(
|
|
|
|
REFGUID riid,
|
|
|
|
void** ppDevice) = 0;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-11-29 15:16:07 +01:00
|
|
|
DXVK_DEFINE_GUID(IDXGIAdapterPrivate);
|
|
|
|
DXVK_DEFINE_GUID(IDXGIDevicePrivate);
|
2017-11-29 16:23:33 +01:00
|
|
|
DXVK_DEFINE_GUID(IDXGIPresentDevicePrivate);
|
2017-11-29 15:16:07 +01:00
|
|
|
DXVK_DEFINE_GUID(IDXGIBufferResourcePrivate);
|
|
|
|
DXVK_DEFINE_GUID(IDXGIImageResourcePrivate);
|