1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-01 16:24:12 +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,
VkPhysicalDevice* pPhysDev) {
auto adapter = m_adapter->GetDXVKAdapter();
auto instance = adapter->instance();
auto instance = m_adapter->GetDXVKInstance();
if (pInstance)
*pInstance = instance->handle();
@ -370,5 +370,10 @@ namespace dxvk {
Rc<DxvkAdapter> STDMETHODCALLTYPE DxgiAdapter::GetDXVKAdapter() {
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<DxvkInstance> STDMETHODCALLTYPE GetDXVKInstance() final;
private:
Com<DxgiFactory> m_factory;

View File

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

View File

@ -85,7 +85,9 @@ IDXGIDXVKAdapter : public IDXGIAdapter3 {
static const GUID guid;
virtual dxvk::Rc<dxvk::DxvkAdapter> STDMETHODCALLTYPE GetDXVKAdapter() = 0;
virtual dxvk::Rc<dxvk::DxvkInstance> STDMETHODCALLTYPE GetDXVKInstance() = 0;
};