mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-06 20:58:37 +01:00
[dxvk] Allow using transfer and sparse queues when importing device
This commit is contained in:
parent
65053c4412
commit
afc24ddbe9
2 changed files with 20 additions and 8 deletions
|
@ -678,11 +678,17 @@ namespace dxvk {
|
|||
// Create device loader
|
||||
Rc<vk::DeviceFn> vkd = new vk::DeviceFn(m_vki, false, args.device);
|
||||
|
||||
// We only support one queue when importing devices, and no sparse.
|
||||
// By default, we only use one queue when importing devices, and no sparse.
|
||||
DxvkDeviceQueueSet queues = { };
|
||||
queues.graphics = { args.queue, args.queueFamily };
|
||||
queues.transfer = queues.graphics;
|
||||
|
||||
if (args.transferQueue != VK_NULL_HANDLE && args.transferQueueFamily != VK_QUEUE_FAMILY_IGNORED)
|
||||
queues.transfer = { args.transferQueue, args.transferQueueFamily };
|
||||
|
||||
if (args.sparseQueue != VK_NULL_HANDLE && args.sparseQueueFamily != VK_QUEUE_FAMILY_IGNORED)
|
||||
queues.sparse = { args.sparseQueue, args.sparseQueueFamily };
|
||||
|
||||
return new DxvkDevice(instance, this, vkd, enabledFeatures, queues, args.queueCallback);
|
||||
}
|
||||
|
||||
|
|
|
@ -84,13 +84,19 @@ namespace dxvk {
|
|||
* \brief Device import info
|
||||
*/
|
||||
struct DxvkDeviceImportInfo {
|
||||
VkDevice device;
|
||||
VkQueue queue;
|
||||
uint32_t queueFamily;
|
||||
uint32_t extensionCount;
|
||||
const char** extensionNames;
|
||||
const VkPhysicalDeviceFeatures2* features;
|
||||
DxvkQueueCallback queueCallback;
|
||||
VkDevice device;
|
||||
VkQueue queue;
|
||||
uint32_t queueFamily;
|
||||
uint32_t extensionCount;
|
||||
const char** extensionNames;
|
||||
const VkPhysicalDeviceFeatures2* features;
|
||||
DxvkQueueCallback queueCallback;
|
||||
|
||||
// Optional additional queues
|
||||
VkQueue transferQueue = VK_NULL_HANDLE;
|
||||
uint32_t transferQueueFamily = VK_QUEUE_FAMILY_IGNORED;
|
||||
VkQueue sparseQueue = VK_NULL_HANDLE;
|
||||
uint32_t sparseQueueFamily = VK_QUEUE_FAMILY_IGNORED;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue