1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-13 16:08:50 +01:00
dxvk/src/d3d11/d3d11_present.h

80 lines
1.8 KiB
C
Raw Normal View History

#pragma once
2017-12-12 12:50:52 +01:00
#include "../dxgi/dxgi_device.h"
#include "../dxgi/dxgi_interfaces.h"
2017-12-12 12:50:52 +01:00
#include "d3d11_include.h"
#include "d3d11_swapchain.h"
2017-12-19 16:01:50 +01:00
#include "d3d11_texture.h"
2017-12-12 12:50:52 +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:
D3D11VkBackBuffer(D3D11Texture2D* pTexture);
~D3D11VkBackBuffer();
2017-12-19 16:01:50 +01:00
HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid,
void** ppvObject) final;
Rc<DxvkImage> GetDXVKImage() final;
public:
D3D11Texture2D* m_texture;
2017-12-19 16:01:50 +01:00
};
/**
* \brief Present device
*
* Wires up some swap chain related
* functions to the D3D11 device.
*/
class D3D11Presenter final : public IDXGIVkPresenter {
public:
D3D11Presenter(
IDXGIObject* pContainer,
ID3D11Device* pDevice);
~D3D11Presenter();
ULONG STDMETHODCALLTYPE AddRef();
ULONG STDMETHODCALLTYPE Release();
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid,
void** ppvObject);
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,
IDXGIVkBackBuffer** ppInterface);
HRESULT STDMETHODCALLTYPE FlushRenderingCommands();
2017-12-12 12:50:52 +01:00
HRESULT STDMETHODCALLTYPE GetDevice(
REFGUID riid,
void** ppvDevice);
HRESULT STDMETHODCALLTYPE CreateSwapChainForHwnd(
HWND hWnd,
const DXGI_SWAP_CHAIN_DESC1* pDesc,
IDXGIVkSwapChain** ppSwapChain);
private:
IDXGIObject* m_container;
ID3D11Device* m_device;
};
}