mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-01 16:24:12 +01:00
[dxvk] Remove ability to query instance from adapter
Adapters don't hold a reference to the instance.
This commit is contained in:
parent
77574d9970
commit
a74449c367
@ -8,10 +8,9 @@
|
||||
namespace dxvk {
|
||||
|
||||
DxvkAdapter::DxvkAdapter(
|
||||
DxvkInstance* instance,
|
||||
const Rc<vk::InstanceFn>& vki,
|
||||
VkPhysicalDevice handle)
|
||||
: m_instance (instance),
|
||||
m_vki (instance->vki()),
|
||||
: m_vki (vki),
|
||||
m_handle (handle) {
|
||||
this->initHeapAllocInfo();
|
||||
this->queryExtensions();
|
||||
@ -28,11 +27,6 @@ namespace dxvk {
|
||||
}
|
||||
|
||||
|
||||
Rc<DxvkInstance> DxvkAdapter::instance() const {
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
|
||||
DxvkAdapterMemoryInfo DxvkAdapter::getMemoryHeapInfo() const {
|
||||
VkPhysicalDeviceMemoryBudgetPropertiesEXT memBudget = { };
|
||||
memBudget.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MEMORY_BUDGET_PROPERTIES_EXT;
|
||||
@ -98,8 +92,7 @@ namespace dxvk {
|
||||
VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT | VK_QUEUE_TRANSFER_BIT,
|
||||
VK_QUEUE_TRANSFER_BIT);
|
||||
|
||||
if (transferQueue == VK_QUEUE_FAMILY_IGNORED
|
||||
|| !m_instance->options().enableTransferQueue)
|
||||
if (transferQueue == VK_QUEUE_FAMILY_IGNORED)
|
||||
transferQueue = graphicsQueue;
|
||||
|
||||
DxvkAdapterQueueIndices queues;
|
||||
|
@ -62,7 +62,7 @@ namespace dxvk {
|
||||
public:
|
||||
|
||||
DxvkAdapter(
|
||||
DxvkInstance* instance,
|
||||
const Rc<vk::InstanceFn>& vki,
|
||||
VkPhysicalDevice handle);
|
||||
~DxvkAdapter();
|
||||
|
||||
@ -82,12 +82,6 @@ namespace dxvk {
|
||||
return m_handle;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Vulkan instance
|
||||
* \returns Vulkan instance
|
||||
*/
|
||||
Rc<DxvkInstance> instance() const;
|
||||
|
||||
/**
|
||||
* \brief Physical device properties
|
||||
*
|
||||
@ -257,7 +251,6 @@ namespace dxvk {
|
||||
|
||||
private:
|
||||
|
||||
DxvkInstance* m_instance;
|
||||
Rc<vk::InstanceFn> m_vki;
|
||||
VkPhysicalDevice m_handle;
|
||||
|
||||
|
@ -157,7 +157,7 @@ namespace dxvk {
|
||||
|
||||
std::vector<Rc<DxvkAdapter>> result;
|
||||
for (uint32_t i = 0; i < numAdapters; i++) {
|
||||
Rc<DxvkAdapter> adapter = new DxvkAdapter(this, adapters[i]);
|
||||
Rc<DxvkAdapter> adapter = new DxvkAdapter(m_vki, adapters[i]);
|
||||
|
||||
if (filter.testAdapter(adapter))
|
||||
result.push_back(adapter);
|
||||
|
Loading…
Reference in New Issue
Block a user