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"
|
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
#include "d3d11_include.h"
|
2017-12-19 16:01:50 +01:00
|
|
|
#include "d3d11_texture.h"
|
2017-12-12 12:50:52 +01:00
|
|
|
|
2017-11-29 16:23:33 +01:00
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
class D3D11Device;
|
|
|
|
|
2018-03-28 19:06:00 +02:00
|
|
|
class D3D11VkBackBuffer : public ComObject<IDXGIVkBackBuffer> {
|
2017-12-19 16:01:50 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2018-03-28 19:06:00 +02:00
|
|
|
D3D11VkBackBuffer(D3D11Texture2D* pTexture)
|
2017-12-19 16:01:50 +01:00
|
|
|
: m_texture(pTexture) { }
|
|
|
|
|
|
|
|
HRESULT STDMETHODCALLTYPE QueryInterface(
|
|
|
|
REFIID riid,
|
|
|
|
void** ppvObject) final;
|
|
|
|
|
|
|
|
Rc<DxvkImage> GetDXVKImage() final;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
Com<D3D11Texture2D> m_texture;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2018-03-28 21:24:52 +02:00
|
|
|
/**
|
|
|
|
* \brief Present device
|
|
|
|
*
|
|
|
|
* Wires up some swap chain related
|
|
|
|
* functions to the D3D11 device.
|
|
|
|
*/
|
|
|
|
class D3D11Presenter final : public IDXGIVkPresenter {
|
2017-11-29 16:23:33 +01:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2018-03-28 21:24:52 +02:00
|
|
|
D3D11Presenter(
|
|
|
|
IDXGIObject* pContainer,
|
|
|
|
ID3D11Device* pDevice);
|
|
|
|
~D3D11Presenter();
|
|
|
|
|
|
|
|
ULONG STDMETHODCALLTYPE AddRef();
|
|
|
|
|
|
|
|
ULONG STDMETHODCALLTYPE Release();
|
2017-11-29 16:23:33 +01:00
|
|
|
|
2017-12-12 12:50:52 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE QueryInterface(
|
2017-11-29 16:23:33 +01:00
|
|
|
REFIID riid,
|
2018-03-28 21:24:52 +02:00
|
|
|
void** ppvObject);
|
2017-11-29 16:23:33 +01:00
|
|
|
|
2017-12-19 16:01:50 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE CreateSwapChainBackBuffer(
|
2018-05-23 01:06:34 +02:00
|
|
|
const DXGI_SWAP_CHAIN_DESC1* pSwapChainDesc,
|
2018-03-28 21:24:52 +02:00
|
|
|
IDXGIVkBackBuffer** ppInterface);
|
2017-11-29 16:23:33 +01:00
|
|
|
|
2018-03-28 21:24:52 +02:00
|
|
|
HRESULT STDMETHODCALLTYPE FlushRenderingCommands();
|
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,
|
2018-03-28 21:24:52 +02:00
|
|
|
void** ppvDevice);
|
2017-11-29 16:23:33 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
|
2018-03-28 21:24:52 +02:00
|
|
|
IDXGIObject* m_container;
|
|
|
|
ID3D11Device* m_device;
|
2017-11-29 16:23:33 +01:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|