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;
|
|
|
|
|
2017-12-19 16:01:50 +01:00
|
|
|
class D3D11PresentBackBuffer : public ComObject<IDXGIPresentBackBuffer> {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
D3D11PresentBackBuffer(D3D11Texture2D* pTexture)
|
|
|
|
: m_texture(pTexture) { }
|
|
|
|
|
|
|
|
HRESULT STDMETHODCALLTYPE QueryInterface(
|
|
|
|
REFIID riid,
|
|
|
|
void** ppvObject) final;
|
|
|
|
|
|
|
|
Rc<DxvkImage> GetDXVKImage() final;
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
Com<D3D11Texture2D> m_texture;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2017-11-29 16:23:33 +01:00
|
|
|
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-19 16:01:50 +01:00
|
|
|
HRESULT STDMETHODCALLTYPE CreateSwapChainBackBuffer(
|
2017-11-29 16:23:33 +01:00
|
|
|
const DXGI_SWAP_CHAIN_DESC* pSwapChainDesc,
|
2017-12-19 16:01:50 +01:00
|
|
|
IDXGIPresentBackBuffer** ppInterface) final;
|
2017-11-29 16:23:33 +01:00
|
|
|
|
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;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|