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:
parent
ed8af3ccc4
commit
212f5ba1f3
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -101,6 +101,8 @@ namespace dxvk {
|
||||
|
||||
Rc<DxvkAdapter> STDMETHODCALLTYPE GetDXVKAdapter() final;
|
||||
|
||||
Rc<DxvkInstance> STDMETHODCALLTYPE GetDXVKInstance() final;
|
||||
|
||||
private:
|
||||
|
||||
Com<DxgiFactory> m_factory;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user