2017-11-29 16:23:33 +01:00
|
|
|
#pragma once
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
#include "../dxgi/dxgi_device.h"
|
2017-11-29 16:23:33 +01:00
|
|
|
#include "../dxgi/dxgi_interfaces.h"
|
|
|
|
#include "../dxgi/dxgi_resource.h"
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
#include "d3d11_include.h"
|
|
|
|
|
2017-11-29 16:23:33 +01:00
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
class D3D11Device;
|
|
|
|
|
|
|
|
class D3D11PresentDevice : public ComObject<IDXGIPresentDevicePrivate> {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
D3D11PresentDevice();
|
|
|
|
~D3D11PresentDevice();
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE QueryInterface(
|
2017-11-29 16:23:33 +01:00
|
|
|
REFIID riid,
|
|
|
|
void** ppvObject) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE WrapSwapChainBackBuffer(
|
2017-11-29 16:23:33 +01:00
|
|
|
IDXGIImageResourcePrivate* pResource,
|
|
|
|
const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc,
|
|
|
|
IUnknown** ppInterface) final;
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE FlushRenderingCommands() final;
|
2017-11-29 16:23:33 +01:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE GetDevice(
|
2017-11-29 16:23:33 +01:00
|
|
|
REFGUID riid,
|
|
|
|
void** ppvDevice) final;
|
|
|
|
|
|
|
|
void SetDeviceLayer(D3D11Device* pDevice) {
|
|
|
|
m_device = pDevice;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
D3D11Device* m_device = nullptr;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|