1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-03 22:24:13 +01:00

[dxgi] Query DXVK instance from DXGI factory, not the adapter

This commit is contained in:
Philip Rebohle 2019-11-08 11:06:15 +01:00
parent ed8af3ccc4
commit 212f5ba1f3
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
4 changed files with 15 additions and 2 deletions

View File

@ -41,7 +41,7 @@ namespace dxvk {
VkInstance* pInstance, VkInstance* pInstance,
VkPhysicalDevice* pPhysDev) { VkPhysicalDevice* pPhysDev) {
auto adapter = m_adapter->GetDXVKAdapter(); auto adapter = m_adapter->GetDXVKAdapter();
auto instance = adapter->instance(); auto instance = m_adapter->GetDXVKInstance();
if (pInstance) if (pInstance)
*pInstance = instance->handle(); *pInstance = instance->handle();
@ -371,4 +371,9 @@ namespace dxvk {
return m_adapter; return m_adapter;
} }
Rc<DxvkInstance> STDMETHODCALLTYPE DxgiAdapter::GetDXVKInstance() {
return m_factory->GetDXVKInstance();
}
} }

View File

@ -101,6 +101,8 @@ namespace dxvk {
Rc<DxvkAdapter> STDMETHODCALLTYPE GetDXVKAdapter() final; Rc<DxvkAdapter> STDMETHODCALLTYPE GetDXVKAdapter() final;
Rc<DxvkInstance> STDMETHODCALLTYPE GetDXVKInstance() final;
private: private:
Com<DxgiFactory> m_factory; Com<DxgiFactory> m_factory;

View File

@ -118,6 +118,10 @@ namespace dxvk {
void* pFeatureSupportData, void* pFeatureSupportData,
UINT FeatureSupportDataSize) final; UINT FeatureSupportDataSize) final;
Rc<DxvkInstance> GetDXVKInstance() const {
return m_instance;
}
const DxgiOptions* GetOptions() const { const DxgiOptions* GetOptions() const {
return &m_options; return &m_options;
} }

View File

@ -86,6 +86,8 @@ IDXGIDXVKAdapter : public IDXGIAdapter3 {
virtual dxvk::Rc<dxvk::DxvkAdapter> STDMETHODCALLTYPE GetDXVKAdapter() = 0; virtual dxvk::Rc<dxvk::DxvkAdapter> STDMETHODCALLTYPE GetDXVKAdapter() = 0;
virtual dxvk::Rc<dxvk::DxvkInstance> STDMETHODCALLTYPE GetDXVKInstance() = 0;
}; };