1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[d3d11] Implement D3D11Device::CreateDeviceContextState

This commit is contained in:
Philip Rebohle 2019-05-03 16:41:16 +02:00
parent c1929ccb6f
commit 82c6a5eb1a
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 32 additions and 4 deletions

View File

@ -18,6 +18,7 @@
#include "d3d11_resource.h"
#include "d3d11_sampler.h"
#include "d3d11_shader.h"
#include "d3d11_state_object.h"
#include "d3d11_swapchain.h"
#include "d3d11_texture.h"
@ -1045,9 +1046,36 @@ namespace dxvk {
D3D_FEATURE_LEVEL* pChosenFeatureLevel,
ID3DDeviceContextState** ppContextState) {
InitReturnPtr(ppContextState);
if (!pFeatureLevels || FeatureLevels == 0)
return E_INVALIDARG;
Logger::err("D3D11Device::CreateDeviceContextState: Not implemented");
return E_NOTIMPL;
if (EmulatedInterface != __uuidof(ID3D10Device)
&& EmulatedInterface != __uuidof(ID3D10Device1)
&& EmulatedInterface != __uuidof(ID3D11Device)
&& EmulatedInterface != __uuidof(ID3D11Device1))
return E_INVALIDARG;
UINT flId;
for (flId = 0; flId < FeatureLevels; flId++) {
if (CheckFeatureLevelSupport(m_dxvkAdapter, pFeatureLevels[flId]))
break;
}
if (flId == FeatureLevels)
return E_INVALIDARG;
if (pFeatureLevels[flId] > m_featureLevel)
m_featureLevel = pFeatureLevels[flId];
if (pChosenFeatureLevel)
*pChosenFeatureLevel = pFeatureLevels[flId];
if (!ppContextState)
return S_FALSE;
*ppContextState = ref(new D3D11DeviceContextState(this));
return S_OK;
}
HRESULT STDMETHODCALLTYPE D3D11Device::OpenSharedResource(

View File

@ -344,8 +344,8 @@ namespace dxvk {
IDXGIObject* m_container;
const D3D_FEATURE_LEVEL m_featureLevel;
const UINT m_featureFlags;
D3D_FEATURE_LEVEL m_featureLevel;
UINT m_featureFlags;
const Rc<DxvkDevice> m_dxvkDevice;
const Rc<DxvkAdapter> m_dxvkAdapter;