mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[d3d11] Implement D3D11Device::CreateDeviceContextState
This commit is contained in:
parent
c1929ccb6f
commit
82c6a5eb1a
@ -18,6 +18,7 @@
|
|||||||
#include "d3d11_resource.h"
|
#include "d3d11_resource.h"
|
||||||
#include "d3d11_sampler.h"
|
#include "d3d11_sampler.h"
|
||||||
#include "d3d11_shader.h"
|
#include "d3d11_shader.h"
|
||||||
|
#include "d3d11_state_object.h"
|
||||||
#include "d3d11_swapchain.h"
|
#include "d3d11_swapchain.h"
|
||||||
#include "d3d11_texture.h"
|
#include "d3d11_texture.h"
|
||||||
|
|
||||||
@ -1045,9 +1046,36 @@ namespace dxvk {
|
|||||||
D3D_FEATURE_LEVEL* pChosenFeatureLevel,
|
D3D_FEATURE_LEVEL* pChosenFeatureLevel,
|
||||||
ID3DDeviceContextState** ppContextState) {
|
ID3DDeviceContextState** ppContextState) {
|
||||||
InitReturnPtr(ppContextState);
|
InitReturnPtr(ppContextState);
|
||||||
|
|
||||||
|
if (!pFeatureLevels || FeatureLevels == 0)
|
||||||
|
return E_INVALIDARG;
|
||||||
|
|
||||||
Logger::err("D3D11Device::CreateDeviceContextState: Not implemented");
|
if (EmulatedInterface != __uuidof(ID3D10Device)
|
||||||
return E_NOTIMPL;
|
&& 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(
|
HRESULT STDMETHODCALLTYPE D3D11Device::OpenSharedResource(
|
||||||
|
@ -344,8 +344,8 @@ namespace dxvk {
|
|||||||
|
|
||||||
IDXGIObject* m_container;
|
IDXGIObject* m_container;
|
||||||
|
|
||||||
const D3D_FEATURE_LEVEL m_featureLevel;
|
D3D_FEATURE_LEVEL m_featureLevel;
|
||||||
const UINT m_featureFlags;
|
UINT m_featureFlags;
|
||||||
|
|
||||||
const Rc<DxvkDevice> m_dxvkDevice;
|
const Rc<DxvkDevice> m_dxvkDevice;
|
||||||
const Rc<DxvkAdapter> m_dxvkAdapter;
|
const Rc<DxvkAdapter> m_dxvkAdapter;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user