2017-11-29 15:16:07 +01:00
|
|
|
#include "d3d11_device.h"
|
|
|
|
#include "d3d11_view.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
D3D11RenderTargetView::D3D11RenderTargetView(
|
|
|
|
D3D11Device* device,
|
2017-11-29 20:19:40 +01:00
|
|
|
ID3D11Resource* resource,
|
|
|
|
const D3D11_RENDER_TARGET_VIEW_DESC& desc,
|
|
|
|
Rc<DxvkImageView> view)
|
2017-11-29 15:16:07 +01:00
|
|
|
: m_device (device),
|
2017-11-29 20:19:40 +01:00
|
|
|
m_resource(resource),
|
|
|
|
m_desc (desc),
|
|
|
|
m_view (view) {
|
2017-11-29 15:16:07 +01:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
D3D11RenderTargetView::~D3D11RenderTargetView() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
HRESULT D3D11RenderTargetView::QueryInterface(REFIID riid, void** ppvObject) {
|
|
|
|
COM_QUERY_IFACE(riid, ppvObject, IUnknown);
|
|
|
|
COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild);
|
|
|
|
COM_QUERY_IFACE(riid, ppvObject, ID3D11View);
|
|
|
|
COM_QUERY_IFACE(riid, ppvObject, ID3D11RenderTargetView);
|
|
|
|
|
|
|
|
Logger::warn("D3D11RenderTargetView::QueryInterface: Unknown interface query");
|
|
|
|
return E_NOINTERFACE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void D3D11RenderTargetView::GetDevice(ID3D11Device** ppDevice) {
|
2017-12-07 00:55:21 +01:00
|
|
|
*ppDevice = ref(m_device);
|
2017-11-29 15:16:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void D3D11RenderTargetView::GetResource(ID3D11Resource **ppResource) {
|
2017-11-29 20:19:40 +01:00
|
|
|
*ppResource = m_resource.ref();
|
2017-11-29 15:16:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void D3D11RenderTargetView::GetDesc(D3D11_RENDER_TARGET_VIEW_DESC* pDesc) {
|
|
|
|
*pDesc = m_desc;
|
|
|
|
}
|
|
|
|
|
2017-11-29 20:19:40 +01:00
|
|
|
|
|
|
|
Rc<DxvkImageView> D3D11RenderTargetView::GetDXVKImageView() {
|
|
|
|
return m_view;
|
|
|
|
}
|
|
|
|
|
2017-11-29 15:16:07 +01:00
|
|
|
}
|