1
0
mirror of https://github.com/EduApps-CDG/OpenDX synced 2024-12-30 09:45:37 +01:00

[d3d11] stub implementation of ID3DDeviceContext1 ()

This commit is contained in:
Mikhail Paulyshka 2018-03-17 20:54:09 +03:00 committed by Philip Rebohle
parent 52a9a4f406
commit a3e7139c1e
2 changed files with 300 additions and 1 deletions

@ -65,6 +65,7 @@ namespace dxvk {
COM_QUERY_IFACE(riid, ppvObject, IUnknown);
COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceChild);
COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceContext);
COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceContext1);
if (riid == __uuidof(ID3DUserDefinedAnnotation))
return E_NOINTERFACE;
@ -74,6 +75,26 @@ namespace dxvk {
return E_NOINTERFACE;
}
void STDMETHODCALLTYPE D3D11DeviceContext::DiscardResource(ID3D11Resource * pResource) {
Logger::err("D3D11DeviceContext::DiscardResource: Not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::DiscardView(ID3D11View * pResourceView) {
Logger::err("D3D11DeviceContext::DiscardView: Not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::DiscardView1(
ID3D11View* pResourceView,
const D3D11_RECT* pRects,
UINT NumRects) {
Logger::err("D3D11DeviceContext::DiscardView1: Not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::SwapDeviceContextState(
ID3DDeviceContextState* pState,
ID3DDeviceContextState** ppPreviousState) {
Logger::err("D3D11DeviceContext::SwapDeviceContextState: Not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::GetDevice(ID3D11Device **ppDevice) {
*ppDevice = ref(m_parent);
@ -379,6 +400,20 @@ namespace dxvk {
}
}
void STDMETHODCALLTYPE D3D11DeviceContext::CopySubresourceRegion1(
ID3D11Resource* pDstResource,
UINT DstSubresource,
UINT DstX,
UINT DstY,
UINT DstZ,
ID3D11Resource* pSrcResource,
UINT SrcSubresource,
const D3D11_BOX* pSrcBox,
UINT CopyFlags) {
if (CopyFlags != 0)
Logger::warn("D3D11DeviceContext: CopySubresourceRegion1: ignoring flags");
CopySubresourceRegion(pDstResource, DstSubresource, DstX, DstY, DstZ, pSrcResource, SrcSubresource, pSrcBox);
}
void STDMETHODCALLTYPE D3D11DeviceContext::CopyResource(
ID3D11Resource* pDstResource,
@ -608,6 +643,13 @@ namespace dxvk {
});
}
void STDMETHODCALLTYPE D3D11DeviceContext::ClearView(
ID3D11View* pView,
const FLOAT Color[4],
const D3D11_RECT* pRect,
UINT NumRects) {
Logger::err("D3D11DeviceContext::ClearView: not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::GenerateMips(ID3D11ShaderResourceView* pShaderResourceView) {
auto view = static_cast<D3D11ShaderResourceView*>(pShaderResourceView);
@ -742,6 +784,20 @@ namespace dxvk {
}
void STDMETHODCALLTYPE D3D11DeviceContext::UpdateSubresource1(
ID3D11Resource* pDstResource,
UINT DstSubresource,
const D3D11_BOX* pDstBox,
const void* pSrcData,
UINT SrcRowPitch,
UINT SrcDepthPitch,
UINT CopyFlags) {
if(CopyFlags != 0 )
Logger::warn("D3D11DeviceContext::UpdateSubresource1: flags ignored");
UpdateSubresource(pDstResource, DstSubresource, pDstBox, pSrcData, SrcRowPitch, SrcDepthPitch);
}
void STDMETHODCALLTYPE D3D11DeviceContext::SetResourceMinLOD(
ID3D11Resource* pResource,
FLOAT MinLOD) {
@ -1092,6 +1148,16 @@ namespace dxvk {
}
void STDMETHODCALLTYPE D3D11DeviceContext::VSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers,
const UINT* pFirstConstant,
const UINT* pNumConstants) {
Logger::err("D3D11DeviceContext::VSSetConstantBuffers1: not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::VSSetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -1137,6 +1203,16 @@ namespace dxvk {
}
void STDMETHODCALLTYPE D3D11DeviceContext::VSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers,
UINT* pFirstConstant,
UINT* pNumConstants) {
Logger::err("D3D11DeviceContext::VSSetConstantBuffers1: not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::VSGetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -1195,6 +1271,16 @@ namespace dxvk {
}
void STDMETHODCALLTYPE D3D11DeviceContext::HSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers,
const UINT* pFirstConstant,
const UINT* pNumConstants) {
Logger::err("D3D11DeviceContext::HSSetConstantBuffers1: not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::HSSetSamplers(
UINT StartSlot,
UINT NumSamplers,
@ -1228,6 +1314,16 @@ namespace dxvk {
}
void D3D11DeviceContext::HSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers,
UINT* pFirstConstant,
UINT* pNumConstants) {
Logger::err("D3D11DeviceContext::HSGetConstantBuffers1: not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::HSGetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -1286,6 +1382,16 @@ namespace dxvk {
}
void STDMETHODCALLTYPE D3D11DeviceContext::DSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers,
const UINT* pFirstConstant,
const UINT* pNumConstants) {
Logger::err("D3D11DeviceContext::DSSetConstantBuffers1: not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::DSSetSamplers(
UINT StartSlot,
UINT NumSamplers,
@ -1319,6 +1425,16 @@ namespace dxvk {
}
void STDMETHODCALLTYPE D3D11DeviceContext::DSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers,
UINT* pFirstConstant,
UINT* pNumConstants) {
Logger::err("D3D11DeviceContext::DSGetConstantBuffers1: not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::DSGetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -1365,6 +1481,16 @@ namespace dxvk {
}
void D3D11DeviceContext::GSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers,
const UINT* pFirstConstant,
const UINT* pNumConstants) {
Logger::err("D3D11DeviceContext::GSSetConstantBuffers1: not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::GSSetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -1410,6 +1536,16 @@ namespace dxvk {
}
void D3D11DeviceContext::GSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers,
UINT* pFirstConstant,
UINT* pNumConstants) {
Logger::err("D3D11DeviceContext::GSGetConstantBuffers1: not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::GSGetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -1456,6 +1592,16 @@ namespace dxvk {
}
void D3D11DeviceContext::PSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers,
const UINT* pFirstConstant,
const UINT* pNumConstants) {
Logger::err("D3D11DeviceContext::PSSetConstantBuffers1: not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::PSSetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -1501,6 +1647,16 @@ namespace dxvk {
}
void D3D11DeviceContext::PSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers,
UINT* pFirstConstant,
UINT* pNumConstants) {
Logger::err("D3D11DeviceContext::PSSetConstantBuffers1: not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::PSGetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -1547,6 +1703,16 @@ namespace dxvk {
}
void STDMETHODCALLTYPE D3D11DeviceContext::CSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers,
const UINT* pFirstConstant,
const UINT* pNumConstants) {
Logger::err("D3D11DeviceContext::CSSetConstantBuffers1: not implemented notsupported");
}
void STDMETHODCALLTYPE D3D11DeviceContext::CSSetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -1611,6 +1777,16 @@ namespace dxvk {
}
void STDMETHODCALLTYPE D3D11DeviceContext::CSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers,
UINT* pFirstConstant,
UINT* pNumConstants) {
Logger::warn("D3D11DeviceContext::CSGetConstantBuffers1: not implemented");
}
void STDMETHODCALLTYPE D3D11DeviceContext::CSGetShaderResources(
UINT StartSlot,
UINT NumViews,

@ -11,7 +11,7 @@ namespace dxvk {
class D3D11Device;
class D3D11DeviceContext : public D3D11DeviceChild<ID3D11DeviceContext> {
class D3D11DeviceContext : public D3D11DeviceChild<ID3D11DeviceContext1> {
public:
@ -24,6 +24,19 @@ namespace dxvk {
REFIID riid,
void** ppvObject) final;
void STDMETHODCALLTYPE DiscardResource(ID3D11Resource *pResource) final;
void STDMETHODCALLTYPE DiscardView(ID3D11View* pResourceView) final;
void STDMETHODCALLTYPE DiscardView1(
ID3D11View* pResourceView,
const D3D11_RECT* pRects,
UINT NumRects) final;
void STDMETHODCALLTYPE SwapDeviceContextState(
ID3DDeviceContextState* pState,
ID3DDeviceContextState** ppPreviousState) final;
void STDMETHODCALLTYPE GetDevice(ID3D11Device **ppDevice) final;
void STDMETHODCALLTYPE ClearState() final;
@ -56,6 +69,17 @@ namespace dxvk {
UINT SrcSubresource,
const D3D11_BOX* pSrcBox) final;
void STDMETHODCALLTYPE CopySubresourceRegion1(
ID3D11Resource* pDstResource,
UINT DstSubresource,
UINT DstX,
UINT DstY,
UINT DstZ,
ID3D11Resource* pSrcResource,
UINT SrcSubresource,
const D3D11_BOX* pSrcBox,
UINT CopyFlags) final;
void STDMETHODCALLTYPE CopyResource(
ID3D11Resource* pDstResource,
ID3D11Resource* pSrcResource) final;
@ -83,6 +107,12 @@ namespace dxvk {
FLOAT Depth,
UINT8 Stencil) final;
void STDMETHODCALLTYPE ClearView(
ID3D11View *pView,
const FLOAT Color[4],
const D3D11_RECT *pRect,
UINT NumRects) final;
void STDMETHODCALLTYPE GenerateMips(
ID3D11ShaderResourceView* pShaderResourceView) final;
@ -94,6 +124,15 @@ namespace dxvk {
UINT SrcRowPitch,
UINT SrcDepthPitch) final;
void STDMETHODCALLTYPE UpdateSubresource1(
ID3D11Resource* pDstResource,
UINT DstSubresource,
const D3D11_BOX* pDstBox,
const void* pSrcData,
UINT SrcRowPitch,
UINT SrcDepthPitch,
UINT CopyFlags) final;
void STDMETHODCALLTYPE SetResourceMinLOD(
ID3D11Resource* pResource,
FLOAT MinLOD) final;
@ -195,6 +234,13 @@ namespace dxvk {
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers) final;
void STDMETHODCALLTYPE VSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers,
const UINT* pFirstConstant,
const UINT* pNumConstants) final;
void STDMETHODCALLTYPE VSSetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -215,6 +261,13 @@ namespace dxvk {
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers) final;
void STDMETHODCALLTYPE VSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers,
UINT* pFirstConstant,
UINT* pNumConstants) final;
void STDMETHODCALLTYPE VSGetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -240,6 +293,13 @@ namespace dxvk {
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers) final;
void STDMETHODCALLTYPE HSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers,
const UINT* pFirstConstant,
const UINT* pNumConstants) final;
void STDMETHODCALLTYPE HSSetSamplers(
UINT StartSlot,
UINT NumSamplers,
@ -255,6 +315,13 @@ namespace dxvk {
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers) final;
void STDMETHODCALLTYPE HSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers,
UINT* pFirstConstant,
UINT* pNumConstants) final;
void STDMETHODCALLTYPE HSGetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -280,6 +347,13 @@ namespace dxvk {
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers) final;
void STDMETHODCALLTYPE DSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers,
const UINT* pFirstConstant,
const UINT* pNumConstants) final;
void STDMETHODCALLTYPE DSSetSamplers(
UINT StartSlot,
UINT NumSamplers,
@ -295,6 +369,13 @@ namespace dxvk {
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers) final;
void STDMETHODCALLTYPE DSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers,
UINT* pFirstConstant,
UINT* pNumConstants) final;
void STDMETHODCALLTYPE DSGetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -315,6 +396,13 @@ namespace dxvk {
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers) final;
virtual void STDMETHODCALLTYPE GSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers,
const UINT* pFirstConstant,
const UINT* pNumConstants) final;
void STDMETHODCALLTYPE GSSetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -335,6 +423,13 @@ namespace dxvk {
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers) final;
void STDMETHODCALLTYPE GSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers,
UINT* pFirstConstant,
UINT* pNumConstants) final;
void STDMETHODCALLTYPE GSGetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -355,6 +450,13 @@ namespace dxvk {
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers) final;
void STDMETHODCALLTYPE PSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers,
const UINT* pFirstConstant,
const UINT* pNumConstants) final;
void STDMETHODCALLTYPE PSSetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -375,6 +477,13 @@ namespace dxvk {
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers) final;
void STDMETHODCALLTYPE PSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers,
UINT* pFirstConstant,
UINT* pNumConstants) final;
void STDMETHODCALLTYPE PSGetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -395,6 +504,13 @@ namespace dxvk {
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers) final;
void STDMETHODCALLTYPE CSSetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer* const* ppConstantBuffers,
const UINT* pFirstConstant,
const UINT* pNumConstants) final;
void STDMETHODCALLTYPE CSSetShaderResources(
UINT StartSlot,
UINT NumViews,
@ -421,6 +537,13 @@ namespace dxvk {
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers) final;
void STDMETHODCALLTYPE CSGetConstantBuffers1(
UINT StartSlot,
UINT NumBuffers,
ID3D11Buffer** ppConstantBuffers,
UINT* pFirstConstant,
UINT* pNumConstants) final;
void STDMETHODCALLTYPE CSGetShaderResources(
UINT StartSlot,
UINT NumViews,