mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-29 17:52:18 +01:00
[d3d11] Added D3D11 stubs
This commit is contained in:
parent
fce424ccfe
commit
c7680dea2a
861
src/d3d11/d3d11_context.cpp
Normal file
861
src/d3d11/d3d11_context.cpp
Normal file
@ -0,0 +1,861 @@
|
||||
#include "d3d11_context.h"
|
||||
#include "d3d11_device.h"
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
D3D11DeviceContext::D3D11DeviceContext() {
|
||||
TRACE(this);
|
||||
}
|
||||
|
||||
|
||||
D3D11DeviceContext::~D3D11DeviceContext() {
|
||||
TRACE(this);
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11DeviceContext::QueryInterface(
|
||||
REFIID riid,
|
||||
void** ppvObject) {
|
||||
COM_QUERY_IFACE(riid, ppvObject, ID3D11DeviceContext);
|
||||
|
||||
Logger::warn("D3D11DeviceContext::QueryInterface: Unknown interface query");
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::GetDevice(ID3D11Device **ppDevice) {
|
||||
Logger::warn("D3D11DeviceContext::GetDevice: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
D3D11_DEVICE_CONTEXT_TYPE D3D11DeviceContext::GetType() {
|
||||
return D3D11_DEVICE_CONTEXT_IMMEDIATE;
|
||||
}
|
||||
|
||||
|
||||
UINT D3D11DeviceContext::GetContextFlags() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::ClearState() {
|
||||
Logger::err("D3D11DeviceContext::ClearState: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::Flush() {
|
||||
Logger::err("D3D11DeviceContext::Flush: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::ExecuteCommandList(
|
||||
ID3D11CommandList* pCommandList,
|
||||
WINBOOL RestoreContextState) {
|
||||
Logger::err("D3D11DeviceContext::ExecuteCommandList: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11DeviceContext::FinishCommandList(
|
||||
WINBOOL RestoreDeferredContextState,
|
||||
ID3D11CommandList **ppCommandList) {
|
||||
Logger::err("D3D11DeviceContext::FinishCommandList: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11DeviceContext::Map(
|
||||
ID3D11Resource* pResource,
|
||||
UINT Subresource,
|
||||
D3D11_MAP MapType,
|
||||
UINT MapFlags,
|
||||
D3D11_MAPPED_SUBRESOURCE* pMappedResource) {
|
||||
Logger::err("D3D11DeviceContext::Map: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::Unmap(
|
||||
ID3D11Resource* pResource,
|
||||
UINT Subresource) {
|
||||
Logger::err("D3D11DeviceContext::Unmap: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::Begin(ID3D11Asynchronous *pAsync) {
|
||||
Logger::err("D3D11DeviceContext::Begin: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::End(ID3D11Asynchronous *pAsync) {
|
||||
Logger::err("D3D11DeviceContext::End: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11DeviceContext::GetData(
|
||||
ID3D11Asynchronous* pAsync,
|
||||
void* pData,
|
||||
UINT DataSize,
|
||||
UINT GetDataFlags) {
|
||||
Logger::err("D3D11DeviceContext::GetData: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::SetPredication(
|
||||
ID3D11Predicate* pPredicate,
|
||||
WINBOOL PredicateValue) {
|
||||
Logger::err("D3D11DeviceContext::SetPredication: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::GetPredication(
|
||||
ID3D11Predicate** ppPredicate,
|
||||
WINBOOL* pPredicateValue) {
|
||||
Logger::err("D3D11DeviceContext::GetPredication: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::CopySubresourceRegion(
|
||||
ID3D11Resource* pDstResource,
|
||||
UINT DstSubresource,
|
||||
UINT DstX,
|
||||
UINT DstY,
|
||||
UINT DstZ,
|
||||
ID3D11Resource* pSrcResource,
|
||||
UINT SrcSubresource,
|
||||
const D3D11_BOX* pSrcBox) {
|
||||
Logger::err("D3D11DeviceContext::CopySubresourceRegion: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::CopyResource(
|
||||
ID3D11Resource* pDstResource,
|
||||
ID3D11Resource* pSrcResource) {
|
||||
Logger::err("D3D11DeviceContext::CopyResource: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::CopyStructureCount(
|
||||
ID3D11Buffer* pDstBuffer,
|
||||
UINT DstAlignedByteOffset,
|
||||
ID3D11UnorderedAccessView* pSrcView) {
|
||||
Logger::err("D3D11DeviceContext::CopyStructureCount: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::ClearRenderTargetView(
|
||||
ID3D11RenderTargetView* pRenderTargetView,
|
||||
const FLOAT ColorRGBA[4]) {
|
||||
Logger::err("D3D11DeviceContext::ClearRenderTargetView: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::ClearUnorderedAccessViewUint(
|
||||
ID3D11UnorderedAccessView* pUnorderedAccessView,
|
||||
const UINT Values[4]) {
|
||||
Logger::err("D3D11DeviceContext::ClearUnorderedAccessViewUint: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::ClearUnorderedAccessViewFloat(
|
||||
ID3D11UnorderedAccessView* pUnorderedAccessView,
|
||||
const FLOAT Values[4]) {
|
||||
Logger::err("D3D11DeviceContext::ClearUnorderedAccessViewFloat: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::ClearDepthStencilView(
|
||||
ID3D11DepthStencilView* pDepthStencilView,
|
||||
UINT ClearFlags,
|
||||
FLOAT Depth,
|
||||
UINT8 Stencil) {
|
||||
Logger::err("D3D11DeviceContext::ClearDepthStencilView: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::GenerateMips(ID3D11ShaderResourceView* pShaderResourceView) {
|
||||
Logger::err("D3D11DeviceContext::GenerateMips: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::UpdateSubresource(
|
||||
ID3D11Resource* pDstResource,
|
||||
UINT DstSubresource,
|
||||
const D3D11_BOX* pDstBox,
|
||||
const void* pSrcData,
|
||||
UINT SrcRowPitch,
|
||||
UINT SrcDepthPitch) {
|
||||
Logger::err("D3D11DeviceContext::UpdateSubresource: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::SetResourceMinLOD(
|
||||
ID3D11Resource* pResource,
|
||||
FLOAT MinLOD) {
|
||||
Logger::err("D3D11DeviceContext::SetResourceMinLOD: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
FLOAT D3D11DeviceContext::GetResourceMinLOD(ID3D11Resource* pResource) {
|
||||
Logger::err("D3D11DeviceContext::GetResourceMinLOD: Not implemented");
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::ResolveSubresource(
|
||||
ID3D11Resource* pDstResource,
|
||||
UINT DstSubresource,
|
||||
ID3D11Resource* pSrcResource,
|
||||
UINT SrcSubresource,
|
||||
DXGI_FORMAT Format) {
|
||||
Logger::err("D3D11DeviceContext::ResolveSubresource: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DrawAuto() {
|
||||
Logger::err("D3D11DeviceContext::DrawAuto: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::Draw(
|
||||
UINT VertexCount,
|
||||
UINT StartVertexLocation) {
|
||||
Logger::err("D3D11DeviceContext::Draw: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DrawIndexed(
|
||||
UINT IndexCount,
|
||||
UINT StartIndexLocation,
|
||||
INT BaseVertexLocation) {
|
||||
Logger::err("D3D11DeviceContext::DrawIndexed: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DrawInstanced(
|
||||
UINT VertexCountPerInstance,
|
||||
UINT InstanceCount,
|
||||
UINT StartVertexLocation,
|
||||
UINT StartInstanceLocation) {
|
||||
Logger::err("D3D11DeviceContext::DrawInstanced: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DrawIndexedInstanced(
|
||||
UINT IndexCountPerInstance,
|
||||
UINT InstanceCount,
|
||||
UINT StartIndexLocation,
|
||||
INT BaseVertexLocation,
|
||||
UINT StartInstanceLocation) {
|
||||
Logger::err("D3D11DeviceContext::DrawIndexedInstanced: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DrawIndexedInstancedIndirect(
|
||||
ID3D11Buffer* pBufferForArgs,
|
||||
UINT AlignedByteOffsetForArgs) {
|
||||
Logger::err("D3D11DeviceContext::DrawIndexedInstancedIndirect: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DrawInstancedIndirect(
|
||||
ID3D11Buffer* pBufferForArgs,
|
||||
UINT AlignedByteOffsetForArgs) {
|
||||
Logger::err("D3D11DeviceContext::DrawInstancedIndirect: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::Dispatch(
|
||||
UINT ThreadGroupCountX,
|
||||
UINT ThreadGroupCountY,
|
||||
UINT ThreadGroupCountZ) {
|
||||
Logger::err("D3D11DeviceContext::Dispatch: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DispatchIndirect(
|
||||
ID3D11Buffer* pBufferForArgs,
|
||||
UINT AlignedByteOffsetForArgs) {
|
||||
Logger::err("D3D11DeviceContext::DispatchIndirect: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::IASetInputLayout(ID3D11InputLayout* pInputLayout) {
|
||||
Logger::err("D3D11DeviceContext::IASetInputLayout: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY Topology) {
|
||||
Logger::err("D3D11DeviceContext::IASetPrimitiveTopology: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::IASetVertexBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppVertexBuffers,
|
||||
const UINT* pStrides,
|
||||
const UINT* pOffsets) {
|
||||
Logger::err("D3D11DeviceContext::IASetVertexBuffers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::IASetIndexBuffer(
|
||||
ID3D11Buffer* pIndexBuffer,
|
||||
DXGI_FORMAT Format,
|
||||
UINT Offset) {
|
||||
Logger::err("D3D11DeviceContext::IASetIndexBuffer: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::IAGetInputLayout(ID3D11InputLayout** ppInputLayout) {
|
||||
Logger::err("D3D11DeviceContext::IAGetInputLayout: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::IAGetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY* pTopology) {
|
||||
Logger::err("D3D11DeviceContext::IAGetPrimitiveTopology: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::IAGetVertexBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppVertexBuffers,
|
||||
UINT* pStrides,
|
||||
UINT* pOffsets) {
|
||||
Logger::err("D3D11DeviceContext::IAGetVertexBuffers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::IAGetIndexBuffer(
|
||||
ID3D11Buffer** pIndexBuffer,
|
||||
DXGI_FORMAT* Format,
|
||||
UINT* Offset) {
|
||||
Logger::err("D3D11DeviceContext::IAGetIndexBuffer: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::VSSetShader(
|
||||
ID3D11VertexShader* pVertexShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances) {
|
||||
Logger::err("D3D11DeviceContext::VSSetShader: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::VSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
Logger::err("D3D11DeviceContext::VSSetConstantBuffers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::VSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView* const* ppShaderResourceViews) {
|
||||
Logger::err("D3D11DeviceContext::VSSetShaderResources: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::VSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers) {
|
||||
Logger::err("D3D11DeviceContext::VSSetSamplers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::VSGetShader(
|
||||
ID3D11VertexShader** ppVertexShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances) {
|
||||
Logger::err("D3D11DeviceContext::VSGetShader: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::VSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
Logger::err("D3D11DeviceContext::VSGetConstantBuffers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::VSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView** ppShaderResourceViews) {
|
||||
Logger::err("D3D11DeviceContext::VSGetShaderResources: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::VSGetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers) {
|
||||
Logger::err("D3D11DeviceContext::VSGetSamplers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::HSSetShader(
|
||||
ID3D11HullShader* pHullShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances) {
|
||||
Logger::err("D3D11DeviceContext::HSSetShader: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::HSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView* const* ppShaderResourceViews) {
|
||||
Logger::err("D3D11DeviceContext::HSSetShaderResources: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::HSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
Logger::err("D3D11DeviceContext::HSSetConstantBuffers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::HSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers) {
|
||||
Logger::err("D3D11DeviceContext::HSSetSamplers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::HSGetShader(
|
||||
ID3D11HullShader** ppHullShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances) {
|
||||
Logger::err("D3D11DeviceContext::HSGetShader: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::HSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
Logger::err("D3D11DeviceContext::HSGetConstantBuffers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::HSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView** ppShaderResourceViews) {
|
||||
Logger::err("D3D11DeviceContext::HSGetShaderResources: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::HSGetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers) {
|
||||
Logger::err("D3D11DeviceContext::HSGetSamplers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DSSetShader(
|
||||
ID3D11DomainShader* pDomainShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances) {
|
||||
Logger::err("D3D11DeviceContext::DSSetShader: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView* const* ppShaderResourceViews) {
|
||||
Logger::err("D3D11DeviceContext::DSSetShaderResources: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
Logger::err("D3D11DeviceContext::DSSetConstantBuffers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers) {
|
||||
Logger::err("D3D11DeviceContext::DSSetSamplers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DSGetShader(
|
||||
ID3D11DomainShader** ppDomainShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances) {
|
||||
Logger::err("D3D11DeviceContext::DSGetShader: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
Logger::err("D3D11DeviceContext::DSGetConstantBuffers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView** ppShaderResourceViews) {
|
||||
Logger::err("D3D11DeviceContext::DSGetShaderResources: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::DSGetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers) {
|
||||
Logger::err("D3D11DeviceContext::DSGetSamplers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::GSSetShader(
|
||||
ID3D11GeometryShader* pShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances) {
|
||||
Logger::err("D3D11DeviceContext::GSSetShader: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::GSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
Logger::err("D3D11DeviceContext::GSSetConstantBuffers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::GSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView* const* ppShaderResourceViews) {
|
||||
Logger::err("D3D11DeviceContext::GSSetShaderResources: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::GSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers) {
|
||||
Logger::err("D3D11DeviceContext::GSSetSamplers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::GSGetShader(
|
||||
ID3D11GeometryShader** ppGeometryShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances) {
|
||||
Logger::err("D3D11DeviceContext::GSGetShader: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::GSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
Logger::err("D3D11DeviceContext::GSGetConstantBuffers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::GSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView** ppShaderResourceViews) {
|
||||
Logger::err("D3D11DeviceContext::GSGetShaderResources: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::GSGetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers) {
|
||||
Logger::err("D3D11DeviceContext::GSGetSamplers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::PSSetShader(
|
||||
ID3D11PixelShader* pPixelShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances) {
|
||||
Logger::err("D3D11DeviceContext::PSSetShader: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::PSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
Logger::err("D3D11DeviceContext::PSSetConstantBuffers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::PSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView* const* ppShaderResourceViews) {
|
||||
Logger::err("D3D11DeviceContext::PSSetShaderResources: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::PSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers) {
|
||||
Logger::err("D3D11DeviceContext::PSSetSamplers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::PSGetShader(
|
||||
ID3D11PixelShader** ppPixelShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances) {
|
||||
Logger::err("D3D11DeviceContext::PSGetShader: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::PSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
Logger::err("D3D11DeviceContext::PSGetConstantBuffers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::PSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView** ppShaderResourceViews) {
|
||||
Logger::err("D3D11DeviceContext::PSGetShaderResources: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::PSGetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers) {
|
||||
Logger::err("D3D11DeviceContext::PSGetSamplers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::CSSetShader(
|
||||
ID3D11ComputeShader* pComputeShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances) {
|
||||
Logger::err("D3D11DeviceContext::CSSetShader: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::CSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) {
|
||||
Logger::err("D3D11DeviceContext::CSSetConstantBuffers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::CSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView* const* ppShaderResourceViews) {
|
||||
Logger::err("D3D11DeviceContext::CSSetShaderResources: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::CSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers) {
|
||||
Logger::err("D3D11DeviceContext::CSSetSamplers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::CSSetUnorderedAccessViews(
|
||||
UINT StartSlot,
|
||||
UINT NumUAVs,
|
||||
ID3D11UnorderedAccessView* const* ppUnorderedAccessViews,
|
||||
const UINT* pUAVInitialCounts) {
|
||||
Logger::err("D3D11DeviceContext::CSSetUnorderedAccessViews: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::CSGetShader(
|
||||
ID3D11ComputeShader** ppComputeShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances) {
|
||||
Logger::err("D3D11DeviceContext::CSGetShader: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::CSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) {
|
||||
Logger::err("D3D11DeviceContext::CSGetConstantBuffers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::CSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView** ppShaderResourceViews) {
|
||||
Logger::err("D3D11DeviceContext::CSGetShaderResources: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::CSGetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers) {
|
||||
Logger::err("D3D11DeviceContext::CSGetSamplers: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::CSGetUnorderedAccessViews(
|
||||
UINT StartSlot,
|
||||
UINT NumUAVs,
|
||||
ID3D11UnorderedAccessView** ppUnorderedAccessViews) {
|
||||
Logger::err("D3D11DeviceContext::CSGetUnorderedAccessViews: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::OMSetRenderTargets(
|
||||
UINT NumViews,
|
||||
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
||||
ID3D11DepthStencilView* pDepthStencilView) {
|
||||
Logger::err("D3D11DeviceContext::OMSetRenderTargets: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::OMSetRenderTargetsAndUnorderedAccessViews(
|
||||
UINT NumRTVs,
|
||||
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
||||
ID3D11DepthStencilView* pDepthStencilView,
|
||||
UINT UAVStartSlot,
|
||||
UINT NumUAVs,
|
||||
ID3D11UnorderedAccessView* const* ppUnorderedAccessViews,
|
||||
const UINT* pUAVInitialCounts) {
|
||||
Logger::err("D3D11DeviceContext::OMSetRenderTargetsAndUnorderedAccessViews: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::OMSetBlendState(
|
||||
ID3D11BlendState* pBlendState,
|
||||
const FLOAT BlendFactor[4],
|
||||
UINT SampleMask) {
|
||||
Logger::err("D3D11DeviceContext::OMSetBlendState: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::OMSetDepthStencilState(
|
||||
ID3D11DepthStencilState* pDepthStencilState,
|
||||
UINT StencilRef) {
|
||||
Logger::err("D3D11DeviceContext::OMSetDepthStencilState: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::OMGetRenderTargets(
|
||||
UINT NumViews,
|
||||
ID3D11RenderTargetView** ppRenderTargetViews,
|
||||
ID3D11DepthStencilView** ppDepthStencilView) {
|
||||
Logger::err("D3D11DeviceContext::OMGetRenderTargets: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::OMGetRenderTargetsAndUnorderedAccessViews(
|
||||
UINT NumRTVs,
|
||||
ID3D11RenderTargetView** ppRenderTargetViews,
|
||||
ID3D11DepthStencilView** ppDepthStencilView,
|
||||
UINT UAVStartSlot,
|
||||
UINT NumUAVs,
|
||||
ID3D11UnorderedAccessView** ppUnorderedAccessViews) {
|
||||
Logger::err("D3D11DeviceContext::OMGetRenderTargetsAndUnorderedAccessViews: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::OMGetBlendState(
|
||||
ID3D11BlendState** ppBlendState,
|
||||
FLOAT BlendFactor[4],
|
||||
UINT* pSampleMask) {
|
||||
Logger::err("D3D11DeviceContext::OMGetBlendState: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::OMGetDepthStencilState(
|
||||
ID3D11DepthStencilState** ppDepthStencilState,
|
||||
UINT* pStencilRef) {
|
||||
Logger::err("D3D11DeviceContext::OMGetDepthStencilState: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::RSSetState(ID3D11RasterizerState* pRasterizerState) {
|
||||
Logger::err("D3D11DeviceContext::RSSetState: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::RSSetViewports(
|
||||
UINT NumViewports,
|
||||
const D3D11_VIEWPORT* pViewports) {
|
||||
Logger::err("D3D11DeviceContext::RSSetViewports: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::RSSetScissorRects(
|
||||
UINT NumRects,
|
||||
const D3D11_RECT* pRects) {
|
||||
Logger::err("D3D11DeviceContext::RSSetScissorRects: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::RSGetState(ID3D11RasterizerState** ppRasterizerState) {
|
||||
Logger::err("D3D11DeviceContext::RSGetState: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::RSGetViewports(
|
||||
UINT* pNumViewports,
|
||||
D3D11_VIEWPORT* pViewports) {
|
||||
Logger::err("D3D11DeviceContext::RSGetViewports: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::RSGetScissorRects(
|
||||
UINT* pNumRects,
|
||||
D3D11_RECT* pRects) {
|
||||
Logger::err("D3D11DeviceContext::RSGetScissorRects: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::SOSetTargets(
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppSOTargets,
|
||||
const UINT* pOffsets) {
|
||||
Logger::err("D3D11DeviceContext::SOSetTargets: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
void D3D11DeviceContext::SOGetTargets(
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppSOTargets) {
|
||||
Logger::err("D3D11DeviceContext::SOGetTargets: Not implemented");
|
||||
}
|
||||
|
||||
}
|
541
src/d3d11/d3d11_context.h
Normal file
541
src/d3d11/d3d11_context.h
Normal file
@ -0,0 +1,541 @@
|
||||
#pragma once
|
||||
|
||||
#include "d3d11_device_child.h"
|
||||
|
||||
#include <dxvk_adapter.h>
|
||||
#include <dxvk_device.h>
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
class D3D11Device;
|
||||
|
||||
class D3D11DeviceContext : public D3D11DeviceChild<ID3D11DeviceContext> {
|
||||
|
||||
public:
|
||||
|
||||
D3D11DeviceContext();
|
||||
~D3D11DeviceContext();
|
||||
|
||||
|
||||
HRESULT QueryInterface(
|
||||
REFIID riid,
|
||||
void** ppvObject) final;
|
||||
|
||||
void GetDevice(ID3D11Device **ppDevice) final;
|
||||
|
||||
D3D11_DEVICE_CONTEXT_TYPE GetType() final;
|
||||
|
||||
UINT GetContextFlags() final;
|
||||
|
||||
void ClearState() final;
|
||||
|
||||
void Flush() final;
|
||||
|
||||
void ExecuteCommandList(
|
||||
ID3D11CommandList* pCommandList,
|
||||
WINBOOL RestoreContextState) final;
|
||||
|
||||
HRESULT FinishCommandList(
|
||||
WINBOOL RestoreDeferredContextState,
|
||||
ID3D11CommandList **ppCommandList) final;
|
||||
|
||||
HRESULT Map(
|
||||
ID3D11Resource* pResource,
|
||||
UINT Subresource,
|
||||
D3D11_MAP MapType,
|
||||
UINT MapFlags,
|
||||
D3D11_MAPPED_SUBRESOURCE* pMappedResource) final;
|
||||
|
||||
void Unmap(
|
||||
ID3D11Resource* pResource,
|
||||
UINT Subresource) final;
|
||||
|
||||
void Begin(ID3D11Asynchronous *pAsync) final;
|
||||
|
||||
void End(ID3D11Asynchronous *pAsync) final;
|
||||
|
||||
HRESULT GetData(
|
||||
ID3D11Asynchronous* pAsync,
|
||||
void* pData,
|
||||
UINT DataSize,
|
||||
UINT GetDataFlags) final;
|
||||
|
||||
void SetPredication(
|
||||
ID3D11Predicate* pPredicate,
|
||||
WINBOOL PredicateValue) final;
|
||||
|
||||
void GetPredication(
|
||||
ID3D11Predicate** ppPredicate,
|
||||
WINBOOL* pPredicateValue) final;
|
||||
|
||||
void CopySubresourceRegion(
|
||||
ID3D11Resource* pDstResource,
|
||||
UINT DstSubresource,
|
||||
UINT DstX,
|
||||
UINT DstY,
|
||||
UINT DstZ,
|
||||
ID3D11Resource* pSrcResource,
|
||||
UINT SrcSubresource,
|
||||
const D3D11_BOX* pSrcBox) final;
|
||||
|
||||
void CopyResource(
|
||||
ID3D11Resource* pDstResource,
|
||||
ID3D11Resource* pSrcResource) final;
|
||||
|
||||
void CopyStructureCount(
|
||||
ID3D11Buffer* pDstBuffer,
|
||||
UINT DstAlignedByteOffset,
|
||||
ID3D11UnorderedAccessView* pSrcView) final;
|
||||
|
||||
void ClearRenderTargetView(
|
||||
ID3D11RenderTargetView* pRenderTargetView,
|
||||
const FLOAT ColorRGBA[4]) final;
|
||||
|
||||
void ClearUnorderedAccessViewUint(
|
||||
ID3D11UnorderedAccessView* pUnorderedAccessView,
|
||||
const UINT Values[4]) final;
|
||||
|
||||
void ClearUnorderedAccessViewFloat(
|
||||
ID3D11UnorderedAccessView* pUnorderedAccessView,
|
||||
const FLOAT Values[4]) final;
|
||||
|
||||
void ClearDepthStencilView(
|
||||
ID3D11DepthStencilView* pDepthStencilView,
|
||||
UINT ClearFlags,
|
||||
FLOAT Depth,
|
||||
UINT8 Stencil) final;
|
||||
|
||||
void GenerateMips(
|
||||
ID3D11ShaderResourceView* pShaderResourceView) final;
|
||||
|
||||
void UpdateSubresource(
|
||||
ID3D11Resource* pDstResource,
|
||||
UINT DstSubresource,
|
||||
const D3D11_BOX* pDstBox,
|
||||
const void* pSrcData,
|
||||
UINT SrcRowPitch,
|
||||
UINT SrcDepthPitch) final;
|
||||
|
||||
void SetResourceMinLOD(
|
||||
ID3D11Resource* pResource,
|
||||
FLOAT MinLOD) final;
|
||||
|
||||
FLOAT GetResourceMinLOD(
|
||||
ID3D11Resource* pResource) final;
|
||||
|
||||
void ResolveSubresource(
|
||||
ID3D11Resource* pDstResource,
|
||||
UINT DstSubresource,
|
||||
ID3D11Resource* pSrcResource,
|
||||
UINT SrcSubresource,
|
||||
DXGI_FORMAT Format) final;
|
||||
|
||||
void DrawAuto() final;
|
||||
|
||||
void Draw(
|
||||
UINT VertexCount,
|
||||
UINT StartVertexLocation) final;
|
||||
|
||||
void DrawIndexed(
|
||||
UINT IndexCount,
|
||||
UINT StartIndexLocation,
|
||||
INT BaseVertexLocation) final;
|
||||
|
||||
void DrawInstanced(
|
||||
UINT VertexCountPerInstance,
|
||||
UINT InstanceCount,
|
||||
UINT StartVertexLocation,
|
||||
UINT StartInstanceLocation) final;
|
||||
|
||||
void DrawIndexedInstanced(
|
||||
UINT IndexCountPerInstance,
|
||||
UINT InstanceCount,
|
||||
UINT StartIndexLocation,
|
||||
INT BaseVertexLocation,
|
||||
UINT StartInstanceLocation) final;
|
||||
|
||||
void DrawIndexedInstancedIndirect(
|
||||
ID3D11Buffer* pBufferForArgs,
|
||||
UINT AlignedByteOffsetForArgs) final;
|
||||
|
||||
void DrawInstancedIndirect(
|
||||
ID3D11Buffer* pBufferForArgs,
|
||||
UINT AlignedByteOffsetForArgs) final;
|
||||
|
||||
void Dispatch(
|
||||
UINT ThreadGroupCountX,
|
||||
UINT ThreadGroupCountY,
|
||||
UINT ThreadGroupCountZ) final;
|
||||
|
||||
void DispatchIndirect(
|
||||
ID3D11Buffer* pBufferForArgs,
|
||||
UINT AlignedByteOffsetForArgs) final;
|
||||
|
||||
void IASetInputLayout(
|
||||
ID3D11InputLayout* pInputLayout) final;
|
||||
|
||||
void IASetPrimitiveTopology(
|
||||
D3D11_PRIMITIVE_TOPOLOGY Topology) final;
|
||||
|
||||
void IASetVertexBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppVertexBuffers,
|
||||
const UINT* pStrides,
|
||||
const UINT* pOffsets) final;
|
||||
|
||||
void IASetIndexBuffer(
|
||||
ID3D11Buffer* pIndexBuffer,
|
||||
DXGI_FORMAT Format,
|
||||
UINT Offset) final;
|
||||
|
||||
void IAGetInputLayout(
|
||||
ID3D11InputLayout** ppInputLayout) final;
|
||||
|
||||
void IAGetPrimitiveTopology(
|
||||
D3D11_PRIMITIVE_TOPOLOGY* pTopology) final;
|
||||
|
||||
void IAGetVertexBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppVertexBuffers,
|
||||
UINT* pStrides,
|
||||
UINT* pOffsets) final;
|
||||
|
||||
void IAGetIndexBuffer(
|
||||
ID3D11Buffer** pIndexBuffer,
|
||||
DXGI_FORMAT* Format,
|
||||
UINT* Offset) final;
|
||||
|
||||
void VSSetShader(
|
||||
ID3D11VertexShader* pVertexShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances) final;
|
||||
|
||||
void VSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) final;
|
||||
|
||||
void VSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView* const* ppShaderResourceViews) final;
|
||||
|
||||
void VSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers) final;
|
||||
|
||||
void VSGetShader(
|
||||
ID3D11VertexShader** ppVertexShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances) final;
|
||||
|
||||
void VSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) final;
|
||||
|
||||
void VSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView** ppShaderResourceViews) final;
|
||||
|
||||
void VSGetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers) final;
|
||||
|
||||
void HSSetShader(
|
||||
ID3D11HullShader* pHullShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances) final;
|
||||
|
||||
void HSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView* const* ppShaderResourceViews) final;
|
||||
|
||||
void HSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) final;
|
||||
|
||||
void HSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers) final;
|
||||
|
||||
void HSGetShader(
|
||||
ID3D11HullShader** ppHullShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances) final;
|
||||
|
||||
void HSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) final;
|
||||
|
||||
void HSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView** ppShaderResourceViews) final;
|
||||
|
||||
void HSGetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers) final;
|
||||
|
||||
void DSSetShader(
|
||||
ID3D11DomainShader* pDomainShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances) final;
|
||||
|
||||
void DSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView* const* ppShaderResourceViews) final;
|
||||
|
||||
void DSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) final;
|
||||
|
||||
void DSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers) final;
|
||||
|
||||
void DSGetShader(
|
||||
ID3D11DomainShader** ppDomainShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances) final;
|
||||
|
||||
void DSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) final;
|
||||
|
||||
void DSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView** ppShaderResourceViews) final;
|
||||
|
||||
void DSGetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers) final;
|
||||
|
||||
void GSSetShader(
|
||||
ID3D11GeometryShader* pShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances) final;
|
||||
|
||||
void GSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) final;
|
||||
|
||||
void GSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView* const* ppShaderResourceViews) final;
|
||||
|
||||
void GSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers) final;
|
||||
|
||||
void GSGetShader(
|
||||
ID3D11GeometryShader** ppGeometryShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances) final;
|
||||
|
||||
void GSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) final;
|
||||
|
||||
void GSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView** ppShaderResourceViews) final;
|
||||
|
||||
void GSGetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers) final;
|
||||
|
||||
void PSSetShader(
|
||||
ID3D11PixelShader* pPixelShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances) final;
|
||||
|
||||
void PSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) final;
|
||||
|
||||
void PSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView* const* ppShaderResourceViews) final;
|
||||
|
||||
void PSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers) final;
|
||||
|
||||
void PSGetShader(
|
||||
ID3D11PixelShader** ppPixelShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances) final;
|
||||
|
||||
void PSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) final;
|
||||
|
||||
void PSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView** ppShaderResourceViews) final;
|
||||
|
||||
void PSGetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers) final;
|
||||
|
||||
void CSSetShader(
|
||||
ID3D11ComputeShader* pComputeShader,
|
||||
ID3D11ClassInstance* const* ppClassInstances,
|
||||
UINT NumClassInstances) final;
|
||||
|
||||
void CSSetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppConstantBuffers) final;
|
||||
|
||||
void CSSetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView* const* ppShaderResourceViews) final;
|
||||
|
||||
void CSSetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState* const* ppSamplers) final;
|
||||
|
||||
void CSSetUnorderedAccessViews(
|
||||
UINT StartSlot,
|
||||
UINT NumUAVs,
|
||||
ID3D11UnorderedAccessView* const* ppUnorderedAccessViews,
|
||||
const UINT* pUAVInitialCounts) final;
|
||||
|
||||
void CSGetShader(
|
||||
ID3D11ComputeShader** ppComputeShader,
|
||||
ID3D11ClassInstance** ppClassInstances,
|
||||
UINT* pNumClassInstances) final;
|
||||
|
||||
void CSGetConstantBuffers(
|
||||
UINT StartSlot,
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppConstantBuffers) final;
|
||||
|
||||
void CSGetShaderResources(
|
||||
UINT StartSlot,
|
||||
UINT NumViews,
|
||||
ID3D11ShaderResourceView** ppShaderResourceViews) final;
|
||||
|
||||
void CSGetSamplers(
|
||||
UINT StartSlot,
|
||||
UINT NumSamplers,
|
||||
ID3D11SamplerState** ppSamplers) final;
|
||||
|
||||
void CSGetUnorderedAccessViews(
|
||||
UINT StartSlot,
|
||||
UINT NumUAVs,
|
||||
ID3D11UnorderedAccessView** ppUnorderedAccessViews) final;
|
||||
|
||||
void OMSetRenderTargets(
|
||||
UINT NumViews,
|
||||
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
||||
ID3D11DepthStencilView* pDepthStencilView) final;
|
||||
|
||||
void OMSetRenderTargetsAndUnorderedAccessViews(
|
||||
UINT NumRTVs,
|
||||
ID3D11RenderTargetView* const* ppRenderTargetViews,
|
||||
ID3D11DepthStencilView* pDepthStencilView,
|
||||
UINT UAVStartSlot,
|
||||
UINT NumUAVs,
|
||||
ID3D11UnorderedAccessView* const* ppUnorderedAccessViews,
|
||||
const UINT* pUAVInitialCounts) final;
|
||||
|
||||
void OMSetBlendState(
|
||||
ID3D11BlendState* pBlendState,
|
||||
const FLOAT BlendFactor[4],
|
||||
UINT SampleMask) final;
|
||||
|
||||
void OMSetDepthStencilState(
|
||||
ID3D11DepthStencilState* pDepthStencilState,
|
||||
UINT StencilRef) final;
|
||||
|
||||
void OMGetRenderTargets(
|
||||
UINT NumViews,
|
||||
ID3D11RenderTargetView** ppRenderTargetViews,
|
||||
ID3D11DepthStencilView** ppDepthStencilView) final;
|
||||
|
||||
void OMGetRenderTargetsAndUnorderedAccessViews(
|
||||
UINT NumRTVs,
|
||||
ID3D11RenderTargetView** ppRenderTargetViews,
|
||||
ID3D11DepthStencilView** ppDepthStencilView,
|
||||
UINT UAVStartSlot,
|
||||
UINT NumUAVs,
|
||||
ID3D11UnorderedAccessView** ppUnorderedAccessViews) final;
|
||||
|
||||
void OMGetBlendState(
|
||||
ID3D11BlendState** ppBlendState,
|
||||
FLOAT BlendFactor[4],
|
||||
UINT* pSampleMask) final;
|
||||
|
||||
void OMGetDepthStencilState(
|
||||
ID3D11DepthStencilState** ppDepthStencilState,
|
||||
UINT* pStencilRef) final;
|
||||
|
||||
void RSSetState(
|
||||
ID3D11RasterizerState* pRasterizerState) final;
|
||||
|
||||
void RSSetViewports(
|
||||
UINT NumViewports,
|
||||
const D3D11_VIEWPORT* pViewports) final;
|
||||
|
||||
void RSSetScissorRects(
|
||||
UINT NumRects,
|
||||
const D3D11_RECT* pRects) final;
|
||||
|
||||
void RSGetState(
|
||||
ID3D11RasterizerState** ppRasterizerState) final;
|
||||
|
||||
void RSGetViewports(
|
||||
UINT* pNumViewports,
|
||||
D3D11_VIEWPORT* pViewports) final;
|
||||
|
||||
void RSGetScissorRects(
|
||||
UINT* pNumRects,
|
||||
D3D11_RECT* pRects) final;
|
||||
|
||||
void SOSetTargets(
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer* const* ppSOTargets,
|
||||
const UINT* pOffsets) final;
|
||||
|
||||
void SOGetTargets(
|
||||
UINT NumBuffers,
|
||||
ID3D11Buffer** ppSOTargets) final;
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
}
|
365
src/d3d11/d3d11_device.cpp
Normal file
365
src/d3d11/d3d11_device.cpp
Normal file
@ -0,0 +1,365 @@
|
||||
#include <cstring>
|
||||
|
||||
#include "d3d11_context.h"
|
||||
#include "d3d11_device.h"
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
D3D11Device::D3D11Device(
|
||||
D3D_FEATURE_LEVEL featureLevel,
|
||||
UINT featureFlags)
|
||||
: m_featureLevel(featureLevel),
|
||||
m_featureFlags(featureFlags) {
|
||||
TRACE(this, featureLevel, featureFlags);
|
||||
}
|
||||
|
||||
|
||||
D3D11Device::~D3D11Device() {
|
||||
TRACE(this);
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::QueryInterface(
|
||||
REFIID riid,
|
||||
void **ppvObject) {
|
||||
COM_QUERY_IFACE(riid, ppvObject, ID3D11Device);
|
||||
|
||||
Logger::warn("D3D11Device::QueryInterface: Unknown interface query");
|
||||
return E_NOINTERFACE;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateBuffer(
|
||||
const D3D11_BUFFER_DESC* pDesc,
|
||||
const D3D11_SUBRESOURCE_DATA* pInitialData,
|
||||
ID3D11Buffer** ppBuffer) {
|
||||
Logger::err("D3D11Device::CreateBuffer: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateTexture1D(
|
||||
const D3D11_TEXTURE1D_DESC* pDesc,
|
||||
const D3D11_SUBRESOURCE_DATA* pInitialData,
|
||||
ID3D11Texture1D** ppTexture1D) {
|
||||
Logger::err("D3D11Device::CreateTexture1D: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateTexture2D(
|
||||
const D3D11_TEXTURE2D_DESC* pDesc,
|
||||
const D3D11_SUBRESOURCE_DATA* pInitialData,
|
||||
ID3D11Texture2D** ppTexture2D) {
|
||||
Logger::err("D3D11Device::CreateTexture2D: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateTexture3D(
|
||||
const D3D11_TEXTURE3D_DESC* pDesc,
|
||||
const D3D11_SUBRESOURCE_DATA* pInitialData,
|
||||
ID3D11Texture3D** ppTexture3D) {
|
||||
Logger::err("D3D11Device::CreateTexture3D: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateShaderResourceView(
|
||||
ID3D11Resource* pResource,
|
||||
const D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc,
|
||||
ID3D11ShaderResourceView** ppSRView) {
|
||||
Logger::err("D3D11Device::CreateShaderResourceView: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateUnorderedAccessView(
|
||||
ID3D11Resource* pResource,
|
||||
const D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc,
|
||||
ID3D11UnorderedAccessView** ppUAView) {
|
||||
Logger::err("D3D11Device::CreateUnorderedAccessView: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateRenderTargetView(
|
||||
ID3D11Resource* pResource,
|
||||
const D3D11_RENDER_TARGET_VIEW_DESC* pDesc,
|
||||
ID3D11RenderTargetView** ppRTView) {
|
||||
Logger::err("D3D11Device::CreateRenderTargetView: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateDepthStencilView(
|
||||
ID3D11Resource* pResource,
|
||||
const D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc,
|
||||
ID3D11DepthStencilView** ppDepthStencilView) {
|
||||
Logger::err("D3D11Device::CreateRenderTargetView: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateInputLayout(
|
||||
const D3D11_INPUT_ELEMENT_DESC* pInputElementDescs,
|
||||
UINT NumElements,
|
||||
const void* pShaderBytecodeWithInputSignature,
|
||||
SIZE_T BytecodeLength,
|
||||
ID3D11InputLayout** ppInputLayout) {
|
||||
Logger::err("D3D11Device::CreateInputLayout: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateVertexShader(
|
||||
const void* pShaderBytecode,
|
||||
SIZE_T BytecodeLength,
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11VertexShader** ppVertexShader) {
|
||||
Logger::err("D3D11Device::CreateVertexShader: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateGeometryShader(
|
||||
const void* pShaderBytecode,
|
||||
SIZE_T BytecodeLength,
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11GeometryShader** ppGeometryShader) {
|
||||
Logger::err("D3D11Device::CreateGeometryShader: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateGeometryShaderWithStreamOutput(
|
||||
const void* pShaderBytecode,
|
||||
SIZE_T BytecodeLength,
|
||||
const D3D11_SO_DECLARATION_ENTRY* pSODeclaration,
|
||||
UINT NumEntries,
|
||||
const UINT* pBufferStrides,
|
||||
UINT NumStrides,
|
||||
UINT RasterizedStream,
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11GeometryShader** ppGeometryShader) {
|
||||
Logger::err("D3D11Device::CreateGeometryShaderWithStreamOutput: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreatePixelShader(
|
||||
const void* pShaderBytecode,
|
||||
SIZE_T BytecodeLength,
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11PixelShader** ppPixelShader) {
|
||||
Logger::err("D3D11Device::CreatePixelShader: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateHullShader(
|
||||
const void* pShaderBytecode,
|
||||
SIZE_T BytecodeLength,
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11HullShader** ppHullShader) {
|
||||
Logger::err("D3D11Device::CreateHullShader: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateDomainShader(
|
||||
const void* pShaderBytecode,
|
||||
SIZE_T BytecodeLength,
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11DomainShader** ppDomainShader) {
|
||||
Logger::err("D3D11Device::CreateDomainShader: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateComputeShader(
|
||||
const void* pShaderBytecode,
|
||||
SIZE_T BytecodeLength,
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11ComputeShader** ppComputeShader) {
|
||||
Logger::err("D3D11Device::CreateComputeShader: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateClassLinkage(ID3D11ClassLinkage** ppLinkage) {
|
||||
Logger::err("D3D11Device::CreateClassLinkage: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateBlendState(
|
||||
const D3D11_BLEND_DESC* pBlendStateDesc,
|
||||
ID3D11BlendState** ppBlendState) {
|
||||
Logger::err("D3D11Device::CreateBlendState: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateDepthStencilState(
|
||||
const D3D11_DEPTH_STENCIL_DESC* pDepthStencilDesc,
|
||||
ID3D11DepthStencilState** ppDepthStencilState) {
|
||||
Logger::err("D3D11Device::CreateDepthStencilState: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateRasterizerState(
|
||||
const D3D11_RASTERIZER_DESC* pRasterizerDesc,
|
||||
ID3D11RasterizerState** ppRasterizerState) {
|
||||
Logger::err("D3D11Device::CreateRasterizerState: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateSamplerState(
|
||||
const D3D11_SAMPLER_DESC* pSamplerDesc,
|
||||
ID3D11SamplerState** ppSamplerState) {
|
||||
Logger::err("D3D11Device::CreateSamplerState: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateQuery(
|
||||
const D3D11_QUERY_DESC* pQueryDesc,
|
||||
ID3D11Query** ppQuery) {
|
||||
Logger::err("D3D11Device::CreateQuery: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreatePredicate(
|
||||
const D3D11_QUERY_DESC* pPredicateDesc,
|
||||
ID3D11Predicate** ppPredicate) {
|
||||
Logger::err("D3D11Device::CreatePredicate: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateCounter(
|
||||
const D3D11_COUNTER_DESC* pCounterDesc,
|
||||
ID3D11Counter** ppCounter) {
|
||||
Logger::err("D3D11Device::CreateCounter: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CreateDeferredContext(
|
||||
UINT ContextFlags,
|
||||
ID3D11DeviceContext** ppDeferredContext) {
|
||||
Logger::err("D3D11Device::CreateDeferredContext: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::OpenSharedResource(
|
||||
HANDLE hResource,
|
||||
REFIID ReturnedInterface,
|
||||
void** ppResource) {
|
||||
Logger::err("D3D11Device::OpenSharedResource: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CheckFormatSupport(
|
||||
DXGI_FORMAT Format,
|
||||
UINT* pFormatSupport) {
|
||||
Logger::err("D3D11Device::CheckFormatSupport: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CheckMultisampleQualityLevels(
|
||||
DXGI_FORMAT Format,
|
||||
UINT SampleCount,
|
||||
UINT* pNumQualityLevels) {
|
||||
Logger::err("D3D11Device::CheckMultisampleQualityLevels: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
void D3D11Device::CheckCounterInfo(D3D11_COUNTER_INFO* pCounterInfo) {
|
||||
Logger::err("D3D11Device::CheckCounterInfo: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CheckCounter(
|
||||
const D3D11_COUNTER_DESC* pDesc,
|
||||
D3D11_COUNTER_TYPE* pType,
|
||||
UINT* pActiveCounters,
|
||||
LPSTR szName,
|
||||
UINT* pNameLength,
|
||||
LPSTR szUnits,
|
||||
UINT* pUnitsLength,
|
||||
LPSTR szDescription,
|
||||
UINT* pDescriptionLength) {
|
||||
Logger::err("D3D11Device::CheckCounter: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::CheckFeatureSupport(
|
||||
D3D11_FEATURE Feature,
|
||||
void* pFeatureSupportData,
|
||||
UINT FeatureSupportDataSize) {
|
||||
Logger::err("D3D11Device::CheckFeatureSupport: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::GetPrivateData(
|
||||
REFGUID guid, UINT* pDataSize, void* pData) {
|
||||
return m_privateData.getData(guid, pDataSize, pData);
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::SetPrivateData(
|
||||
REFGUID guid, UINT DataSize, const void* pData) {
|
||||
return m_privateData.setData(guid, DataSize, pData);
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::SetPrivateDataInterface(
|
||||
REFGUID guid, const IUnknown* pData) {
|
||||
return m_privateData.setInterface(guid, pData);
|
||||
}
|
||||
|
||||
|
||||
D3D_FEATURE_LEVEL D3D11Device::GetFeatureLevel() {
|
||||
return m_featureLevel;
|
||||
}
|
||||
|
||||
|
||||
UINT D3D11Device::GetCreationFlags() {
|
||||
return m_featureFlags;
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::GetDeviceRemovedReason() {
|
||||
Logger::err("D3D11Device::GetDeviceRemovedReason: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
void D3D11Device::GetImmediateContext(ID3D11DeviceContext** ppImmediateContext) {
|
||||
Logger::err("D3D11Device::GetImmediateContext: Not implemented");
|
||||
}
|
||||
|
||||
|
||||
HRESULT D3D11Device::SetExceptionMode(UINT RaiseFlags) {
|
||||
Logger::err("D3D11Device::SetExceptionMode: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
UINT D3D11Device::GetExceptionMode() {
|
||||
Logger::err("D3D11Device::GetExceptionMode: Not implemented");
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
223
src/d3d11/d3d11_device.h
Normal file
223
src/d3d11/d3d11_device.h
Normal file
@ -0,0 +1,223 @@
|
||||
#pragma once
|
||||
|
||||
#include "d3d11_include.h"
|
||||
|
||||
#include "../util/com/com_private_data.h"
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
class DxgiAdapter;
|
||||
class D3D11DeviceContext;
|
||||
|
||||
class D3D11Device : public ComObject<ID3D11Device> {
|
||||
|
||||
public:
|
||||
|
||||
D3D11Device(
|
||||
D3D_FEATURE_LEVEL featureLevel,
|
||||
UINT featureFlags);
|
||||
~D3D11Device();
|
||||
|
||||
HRESULT QueryInterface(
|
||||
REFIID riid,
|
||||
void **ppvObject) final;
|
||||
|
||||
HRESULT CreateBuffer(
|
||||
const D3D11_BUFFER_DESC* pDesc,
|
||||
const D3D11_SUBRESOURCE_DATA* pInitialData,
|
||||
ID3D11Buffer** ppBuffer) final;
|
||||
|
||||
HRESULT CreateTexture1D(
|
||||
const D3D11_TEXTURE1D_DESC* pDesc,
|
||||
const D3D11_SUBRESOURCE_DATA* pInitialData,
|
||||
ID3D11Texture1D** ppTexture1D) final;
|
||||
|
||||
HRESULT CreateTexture2D(
|
||||
const D3D11_TEXTURE2D_DESC* pDesc,
|
||||
const D3D11_SUBRESOURCE_DATA* pInitialData,
|
||||
ID3D11Texture2D** ppTexture2D) final;
|
||||
|
||||
HRESULT CreateTexture3D(
|
||||
const D3D11_TEXTURE3D_DESC* pDesc,
|
||||
const D3D11_SUBRESOURCE_DATA* pInitialData,
|
||||
ID3D11Texture3D** ppTexture3D) final;
|
||||
|
||||
HRESULT CreateShaderResourceView(
|
||||
ID3D11Resource* pResource,
|
||||
const D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc,
|
||||
ID3D11ShaderResourceView** ppSRView) final;
|
||||
|
||||
HRESULT CreateUnorderedAccessView(
|
||||
ID3D11Resource* pResource,
|
||||
const D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc,
|
||||
ID3D11UnorderedAccessView** ppUAView) final;
|
||||
|
||||
HRESULT CreateRenderTargetView(
|
||||
ID3D11Resource* pResource,
|
||||
const D3D11_RENDER_TARGET_VIEW_DESC* pDesc,
|
||||
ID3D11RenderTargetView** ppRTView) final;
|
||||
|
||||
HRESULT CreateDepthStencilView(
|
||||
ID3D11Resource* pResource,
|
||||
const D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc,
|
||||
ID3D11DepthStencilView** ppDepthStencilView) final;
|
||||
|
||||
HRESULT CreateInputLayout(
|
||||
const D3D11_INPUT_ELEMENT_DESC* pInputElementDescs,
|
||||
UINT NumElements,
|
||||
const void* pShaderBytecodeWithInputSignature,
|
||||
SIZE_T BytecodeLength,
|
||||
ID3D11InputLayout** ppInputLayout) final;
|
||||
|
||||
HRESULT CreateVertexShader(
|
||||
const void* pShaderBytecode,
|
||||
SIZE_T BytecodeLength,
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11VertexShader** ppVertexShader) final;
|
||||
|
||||
HRESULT CreateGeometryShader(
|
||||
const void* pShaderBytecode,
|
||||
SIZE_T BytecodeLength,
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11GeometryShader** ppGeometryShader) final;
|
||||
|
||||
HRESULT CreateGeometryShaderWithStreamOutput(
|
||||
const void* pShaderBytecode,
|
||||
SIZE_T BytecodeLength,
|
||||
const D3D11_SO_DECLARATION_ENTRY* pSODeclaration,
|
||||
UINT NumEntries,
|
||||
const UINT* pBufferStrides,
|
||||
UINT NumStrides,
|
||||
UINT RasterizedStream,
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11GeometryShader** ppGeometryShader) final;
|
||||
|
||||
HRESULT CreatePixelShader(
|
||||
const void* pShaderBytecode,
|
||||
SIZE_T BytecodeLength,
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11PixelShader** ppPixelShader) final;
|
||||
|
||||
HRESULT CreateHullShader(
|
||||
const void* pShaderBytecode,
|
||||
SIZE_T BytecodeLength,
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11HullShader** ppHullShader) final;
|
||||
|
||||
HRESULT CreateDomainShader(
|
||||
const void* pShaderBytecode,
|
||||
SIZE_T BytecodeLength,
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11DomainShader** ppDomainShader) final;
|
||||
|
||||
HRESULT CreateComputeShader(
|
||||
const void* pShaderBytecode,
|
||||
SIZE_T BytecodeLength,
|
||||
ID3D11ClassLinkage* pClassLinkage,
|
||||
ID3D11ComputeShader** ppComputeShader) final;
|
||||
|
||||
HRESULT CreateClassLinkage(
|
||||
ID3D11ClassLinkage** ppLinkage) final;
|
||||
|
||||
HRESULT CreateBlendState(
|
||||
const D3D11_BLEND_DESC* pBlendStateDesc,
|
||||
ID3D11BlendState** ppBlendState) final;
|
||||
|
||||
HRESULT CreateDepthStencilState(
|
||||
const D3D11_DEPTH_STENCIL_DESC* pDepthStencilDesc,
|
||||
ID3D11DepthStencilState** ppDepthStencilState) final;
|
||||
|
||||
HRESULT CreateRasterizerState(
|
||||
const D3D11_RASTERIZER_DESC* pRasterizerDesc,
|
||||
ID3D11RasterizerState** ppRasterizerState) final;
|
||||
|
||||
HRESULT CreateSamplerState(
|
||||
const D3D11_SAMPLER_DESC* pSamplerDesc,
|
||||
ID3D11SamplerState** ppSamplerState) final;
|
||||
|
||||
HRESULT CreateQuery(
|
||||
const D3D11_QUERY_DESC* pQueryDesc,
|
||||
ID3D11Query** ppQuery) final;
|
||||
|
||||
HRESULT CreatePredicate(
|
||||
const D3D11_QUERY_DESC* pPredicateDesc,
|
||||
ID3D11Predicate** ppPredicate) final;
|
||||
|
||||
HRESULT CreateCounter(
|
||||
const D3D11_COUNTER_DESC* pCounterDesc,
|
||||
ID3D11Counter** ppCounter) final;
|
||||
|
||||
HRESULT CreateDeferredContext(
|
||||
UINT ContextFlags,
|
||||
ID3D11DeviceContext** ppDeferredContext) final;
|
||||
|
||||
HRESULT OpenSharedResource(
|
||||
HANDLE hResource,
|
||||
REFIID ReturnedInterface,
|
||||
void** ppResource) final;
|
||||
|
||||
HRESULT CheckFormatSupport(
|
||||
DXGI_FORMAT Format,
|
||||
UINT* pFormatSupport) final;
|
||||
|
||||
HRESULT CheckMultisampleQualityLevels(
|
||||
DXGI_FORMAT Format,
|
||||
UINT SampleCount,
|
||||
UINT* pNumQualityLevels) final;
|
||||
|
||||
void CheckCounterInfo(
|
||||
D3D11_COUNTER_INFO* pCounterInfo) final;
|
||||
|
||||
HRESULT CheckCounter(
|
||||
const D3D11_COUNTER_DESC* pDesc,
|
||||
D3D11_COUNTER_TYPE* pType,
|
||||
UINT* pActiveCounters,
|
||||
LPSTR szName,
|
||||
UINT* pNameLength,
|
||||
LPSTR szUnits,
|
||||
UINT* pUnitsLength,
|
||||
LPSTR szDescription,
|
||||
UINT* pDescriptionLength) final;
|
||||
|
||||
HRESULT CheckFeatureSupport(
|
||||
D3D11_FEATURE Feature,
|
||||
void* pFeatureSupportData,
|
||||
UINT FeatureSupportDataSize) final;
|
||||
|
||||
HRESULT GetPrivateData(
|
||||
REFGUID guid,
|
||||
UINT* pDataSize,
|
||||
void* pData) final;
|
||||
|
||||
HRESULT SetPrivateData(
|
||||
REFGUID guid,
|
||||
UINT DataSize,
|
||||
const void* pData) final;
|
||||
|
||||
HRESULT SetPrivateDataInterface(
|
||||
REFGUID guid,
|
||||
const IUnknown* pData) final;
|
||||
|
||||
D3D_FEATURE_LEVEL GetFeatureLevel() final;
|
||||
|
||||
UINT GetCreationFlags() final;
|
||||
|
||||
HRESULT GetDeviceRemovedReason() final;
|
||||
|
||||
void GetImmediateContext(
|
||||
ID3D11DeviceContext** ppImmediateContext) final;
|
||||
|
||||
HRESULT SetExceptionMode(UINT RaiseFlags) final;
|
||||
|
||||
UINT GetExceptionMode() final;
|
||||
|
||||
private:
|
||||
|
||||
const D3D_FEATURE_LEVEL m_featureLevel;
|
||||
const UINT m_featureFlags;
|
||||
|
||||
ComPrivateData m_privateData;
|
||||
|
||||
};
|
||||
|
||||
}
|
43
src/d3d11/d3d11_device_child.h
Normal file
43
src/d3d11/d3d11_device_child.h
Normal file
@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include "d3d11_include.h"
|
||||
|
||||
#include "../util/com/com_private_data.h"
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
template<typename Base>
|
||||
class D3D11DeviceChild : public ComObject<Base> {
|
||||
|
||||
public:
|
||||
|
||||
HRESULT GetPrivateData(
|
||||
REFGUID guid,
|
||||
UINT *pDataSize,
|
||||
void *pData) final {
|
||||
return m_privateData.getData(
|
||||
guid, pDataSize, pData);
|
||||
}
|
||||
|
||||
HRESULT SetPrivateData(
|
||||
REFGUID guid,
|
||||
UINT DataSize,
|
||||
const void *pData) final {
|
||||
return m_privateData.setData(
|
||||
guid, DataSize, pData);
|
||||
}
|
||||
|
||||
HRESULT SetPrivateDataInterface(
|
||||
REFGUID guid,
|
||||
const IUnknown *pUnknown) final {
|
||||
return m_privateData.setInterface(
|
||||
guid, pUnknown);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
ComPrivateData m_privateData;
|
||||
|
||||
};
|
||||
|
||||
}
|
4
src/d3d11/d3d11_include.h
Normal file
4
src/d3d11/d3d11_include.h
Normal file
@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#include <dxgi_include.h>
|
||||
#include <d3d11_1.h>
|
46
src/d3d11/d3d11_main.cpp
Normal file
46
src/d3d11/d3d11_main.cpp
Normal file
@ -0,0 +1,46 @@
|
||||
#include <dxgi_adapter.h>
|
||||
|
||||
#include "d3d11_device.h"
|
||||
|
||||
using namespace dxvk;
|
||||
|
||||
extern "C" {
|
||||
|
||||
DLLEXPORT HRESULT __stdcall D3D11CreateDevice(
|
||||
IDXGIAdapter *pAdapter,
|
||||
D3D_DRIVER_TYPE DriverType,
|
||||
HMODULE Software,
|
||||
UINT Flags,
|
||||
const D3D_FEATURE_LEVEL *pFeatureLevels,
|
||||
UINT FeatureLevels,
|
||||
UINT SDKVersion,
|
||||
ID3D11Device **ppDevice,
|
||||
D3D_FEATURE_LEVEL *pFeatureLevel,
|
||||
ID3D11DeviceContext **ppImmediateContext) {
|
||||
TRACE(pAdapter, DriverType, Software,
|
||||
Flags, pFeatureLevels, FeatureLevels,
|
||||
SDKVersion, ppDevice, pFeatureLevel,
|
||||
ppImmediateContext);
|
||||
Logger::err("D3D11CreateDevice: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
DLLEXPORT HRESULT __stdcall D3D11CreateDeviceAndSwapChain(
|
||||
IDXGIAdapter *pAdapter,
|
||||
D3D_DRIVER_TYPE DriverType,
|
||||
HMODULE Software,
|
||||
UINT Flags,
|
||||
const D3D_FEATURE_LEVEL *pFeatureLevels,
|
||||
UINT FeatureLevels,
|
||||
UINT SDKVersion,
|
||||
const DXGI_SWAP_CHAIN_DESC *pSwapChainDesc,
|
||||
IDXGISwapChain **ppSwapChain,
|
||||
ID3D11Device **ppDevice,
|
||||
D3D_FEATURE_LEVEL *pFeatureLevel,
|
||||
ID3D11DeviceContext **ppImmediateContext) {
|
||||
Logger::err("D3D11CreateDeviceAndSwapChain: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
}
|
14
src/d3d11/meson.build
Normal file
14
src/d3d11/meson.build
Normal file
@ -0,0 +1,14 @@
|
||||
d3d11_src = [
|
||||
'd3d11_context.cpp',
|
||||
'd3d11_device.cpp',
|
||||
'd3d11_main.cpp',
|
||||
]
|
||||
|
||||
d3d11_dll = shared_library('d3d11', d3d11_src,
|
||||
link_with : [ util_lib ],
|
||||
dependencies : [ dxvk_dep, dxgi_dep ],
|
||||
include_directories : dxvk_include_path)
|
||||
|
||||
d3d11_dep = declare_dependency(
|
||||
link_with : [ d3d11_dll ],
|
||||
include_directories : [ dxvk_include_path, include_directories('.') ])
|
Loading…
x
Reference in New Issue
Block a user