mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 02:52:10 +01:00
[d3d11] stub implementation of ID3D11Device1 (#175)
This commit is contained in:
parent
a3e7139c1e
commit
043982d3be
@ -56,6 +56,7 @@ namespace dxvk {
|
||||
HRESULT STDMETHODCALLTYPE D3D11Device::QueryInterface(REFIID riid, void** ppvObject) {
|
||||
COM_QUERY_IFACE(riid, ppvObject, IUnknown);
|
||||
COM_QUERY_IFACE(riid, ppvObject, ID3D11Device);
|
||||
COM_QUERY_IFACE(riid, ppvObject, ID3D11Device1);
|
||||
|
||||
if (riid == __uuidof(IDXGIDevice)
|
||||
|| riid == __uuidof(IDXGIDevice1)
|
||||
@ -1105,6 +1106,14 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11Device::CreateBlendState1(
|
||||
const D3D11_BLEND_DESC1* pBlendStateDesc,
|
||||
ID3D11BlendState1** ppBlendState) {
|
||||
Logger::err("D3D11Device::CreateBlendState1: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11Device::CreateDepthStencilState(
|
||||
const D3D11_DEPTH_STENCIL_DESC* pDepthStencilDesc,
|
||||
ID3D11DepthStencilState** ppDepthStencilState) {
|
||||
@ -1162,6 +1171,12 @@ namespace dxvk {
|
||||
} return S_FALSE;
|
||||
}
|
||||
|
||||
HRESULT D3D11Device::CreateRasterizerState1(
|
||||
const D3D11_RASTERIZER_DESC1* pRasterizerDesc,
|
||||
ID3D11RasterizerState1** ppRasterizerState) {
|
||||
Logger::err("D3D11Device::CreateRasterizerState1: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11Device::CreateSamplerState(
|
||||
const D3D11_SAMPLER_DESC* pSamplerDesc,
|
||||
@ -1244,6 +1259,24 @@ namespace dxvk {
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11Device::CreateDeferredContext1(
|
||||
UINT ContextFlags,
|
||||
ID3D11DeviceContext1** ppDeferredContext) {
|
||||
*ppDeferredContext = ref(new D3D11DeferredContext(this, m_dxvkDevice, ContextFlags));
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11Device::CreateDeviceContextState(
|
||||
UINT Flags,
|
||||
const D3D_FEATURE_LEVEL* pFeatureLevels,
|
||||
UINT FeatureLevels,
|
||||
UINT SDKVersion,
|
||||
REFIID EmulatedInterface,
|
||||
D3D_FEATURE_LEVEL* pChosenFeatureLevel,
|
||||
ID3DDeviceContextState** ppContextState) {
|
||||
Logger::err("D3D11Device::CreateDeviceContextState: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11Device::OpenSharedResource(
|
||||
HANDLE hResource,
|
||||
@ -1254,6 +1287,24 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11Device::OpenSharedResource1(
|
||||
HANDLE hResource,
|
||||
REFIID ReturnedInterface,
|
||||
void** ppResource) {
|
||||
Logger::err("D3D11Device::OpenSharedResource1: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11Device::OpenSharedResourceByName(
|
||||
LPCWSTR lpName,
|
||||
DWORD dwDesiredAccess,
|
||||
REFIID returnedInterface,
|
||||
void ** ppResource) {
|
||||
Logger::err("D3D11Device::OpenSharedResourceByName: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11Device::CheckFormatSupport(
|
||||
DXGI_FORMAT Format,
|
||||
UINT* pFormatSupport) {
|
||||
@ -1358,6 +1409,38 @@ namespace dxvk {
|
||||
info->ComputeShaders_Plus_RawAndStructuredBuffers_Via_Shader_4_x = TRUE;
|
||||
} return S_OK;
|
||||
|
||||
case D3D11_FEATURE_D3D11_OPTIONS: {
|
||||
if (FeatureSupportDataSize != sizeof(D3D11_FEATURE_DATA_D3D11_OPTIONS))
|
||||
return E_INVALIDARG;
|
||||
|
||||
auto info = static_cast<D3D11_FEATURE_DATA_D3D11_OPTIONS*>(pFeatureSupportData);
|
||||
|
||||
/*TODO: implement and enable*/
|
||||
/*https://msdn.microsoft.com/en-us/library/windows/desktop/hh404457(v=vs.85).aspx */
|
||||
info->OutputMergerLogicOp = false;
|
||||
info->UAVOnlyRenderingForcedSampleCount = false;
|
||||
info->DiscardAPIsSeenByDriver = false;
|
||||
info->FlagsForUpdateAndCopySeenByDriver = false;
|
||||
info->ClearView = false;
|
||||
info->CopyWithOverlap = false;
|
||||
info->ConstantBufferPartialUpdate = false;
|
||||
info->ConstantBufferOffsetting = false;
|
||||
info->MapNoOverwriteOnDynamicConstantBuffer = false;
|
||||
info->MapNoOverwriteOnDynamicBufferSRV = false;
|
||||
info->MultisampleRTVWithForcedSampleCountOne = false;
|
||||
info->SAD4ShaderInstructions = false;
|
||||
info->ExtendedDoublesShaderInstructions = false;
|
||||
info->ExtendedResourceSharing = false;
|
||||
} return S_OK;
|
||||
|
||||
case D3D11_FEATURE_ARCHITECTURE_INFO: {
|
||||
if (FeatureSupportDataSize != sizeof(D3D11_FEATURE_DATA_ARCHITECTURE_INFO))
|
||||
return E_INVALIDARG;
|
||||
|
||||
auto info = static_cast<D3D11_FEATURE_DATA_ARCHITECTURE_INFO*>(pFeatureSupportData);
|
||||
info->TileBasedDeferredRenderer = false;
|
||||
} return S_OK;
|
||||
|
||||
default:
|
||||
Logger::err(str::format(
|
||||
"D3D11Device: CheckFeatureSupport: Unknown feature: ",
|
||||
@ -1410,6 +1493,11 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11Device::GetImmediateContext1(ID3D11DeviceContext1 ** ppImmediateContext) {
|
||||
*ppImmediateContext = ref(m_context);
|
||||
}
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11Device::SetExceptionMode(UINT RaiseFlags) {
|
||||
Logger::err("D3D11Device::SetExceptionMode: Not implemented");
|
||||
return E_NOTIMPL;
|
||||
|
@ -28,7 +28,7 @@ namespace dxvk {
|
||||
class D3D11Texture2D;
|
||||
class D3D11Texture3D;
|
||||
|
||||
class D3D11Device : public ComObject<ID3D11Device> {
|
||||
class D3D11Device : public ComObject<ID3D11Device1> {
|
||||
/// Maximum number of resource init commands per command buffer
|
||||
constexpr static uint64_t InitCommandThreshold = 50;
|
||||
public:
|
||||
@ -144,6 +144,10 @@ namespace dxvk {
|
||||
const D3D11_BLEND_DESC* pBlendStateDesc,
|
||||
ID3D11BlendState** ppBlendState) final;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CreateBlendState1(
|
||||
const D3D11_BLEND_DESC1* pBlendStateDesc,
|
||||
ID3D11BlendState1** ppBlendState) final;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CreateDepthStencilState(
|
||||
const D3D11_DEPTH_STENCIL_DESC* pDepthStencilDesc,
|
||||
ID3D11DepthStencilState** ppDepthStencilState) final;
|
||||
@ -152,6 +156,10 @@ namespace dxvk {
|
||||
const D3D11_RASTERIZER_DESC* pRasterizerDesc,
|
||||
ID3D11RasterizerState** ppRasterizerState) final;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CreateRasterizerState1(
|
||||
const D3D11_RASTERIZER_DESC1* pRasterizerDesc,
|
||||
ID3D11RasterizerState1** ppRasterizerState) final;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CreateSamplerState(
|
||||
const D3D11_SAMPLER_DESC* pSamplerDesc,
|
||||
ID3D11SamplerState** ppSamplerState) final;
|
||||
@ -172,11 +180,35 @@ namespace dxvk {
|
||||
UINT ContextFlags,
|
||||
ID3D11DeviceContext** ppDeferredContext) final;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CreateDeferredContext1(
|
||||
UINT ContextFlags,
|
||||
ID3D11DeviceContext1** ppDeferredContext) final;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CreateDeviceContextState(
|
||||
UINT Flags,
|
||||
const D3D_FEATURE_LEVEL* pFeatureLevels,
|
||||
UINT FeatureLevels,
|
||||
UINT SDKVersion,
|
||||
REFIID EmulatedInterface,
|
||||
D3D_FEATURE_LEVEL* pChosenFeatureLevel,
|
||||
ID3DDeviceContextState** ppContextState) final;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE OpenSharedResource(
|
||||
HANDLE hResource,
|
||||
REFIID ReturnedInterface,
|
||||
void** ppResource) final;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE OpenSharedResource1(
|
||||
HANDLE hResource,
|
||||
REFIID returnedInterface,
|
||||
void** ppResource) final;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE OpenSharedResourceByName(
|
||||
LPCWSTR lpName,
|
||||
DWORD dwDesiredAccess,
|
||||
REFIID returnedInterface,
|
||||
void** ppResource) final;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE CheckFormatSupport(
|
||||
DXGI_FORMAT Format,
|
||||
UINT* pFormatSupport) final;
|
||||
@ -228,6 +260,9 @@ namespace dxvk {
|
||||
void STDMETHODCALLTYPE GetImmediateContext(
|
||||
ID3D11DeviceContext** ppImmediateContext) final;
|
||||
|
||||
void STDMETHODCALLTYPE GetImmediateContext1(
|
||||
ID3D11DeviceContext1** ppImmediateContext) final;
|
||||
|
||||
HRESULT STDMETHODCALLTYPE SetExceptionMode(UINT RaiseFlags) final;
|
||||
|
||||
UINT STDMETHODCALLTYPE GetExceptionMode() final;
|
||||
|
Loading…
x
Reference in New Issue
Block a user