diff --git a/src/dxvk/dxvk_cmdlist.cpp b/src/dxvk/dxvk_cmdlist.cpp index 2da9d26f3..03e1f5256 100644 --- a/src/dxvk/dxvk_cmdlist.cpp +++ b/src/dxvk/dxvk_cmdlist.cpp @@ -3,10 +3,9 @@ namespace dxvk { - DxvkCommandList::DxvkCommandList( - DxvkDevice* device, - uint32_t queueFamily) - : m_vkd (device->vkd()), + DxvkCommandList::DxvkCommandList(DxvkDevice* device) + : m_device (device), + m_vkd (device->vkd()), m_cmdBuffersUsed(0), m_descriptorPoolTracker(device) { VkFenceCreateInfo fenceInfo; @@ -21,7 +20,7 @@ namespace dxvk { poolInfo.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO; poolInfo.pNext = nullptr; poolInfo.flags = 0; - poolInfo.queueFamilyIndex = queueFamily; + poolInfo.queueFamilyIndex = device->queues().graphics.queueFamily; if (m_vkd->vkCreateCommandPool(m_vkd->device(), &poolInfo, nullptr, &m_pool) != VK_SUCCESS) throw DxvkError("DxvkCommandList: Failed to create command pool"); @@ -48,9 +47,10 @@ namespace dxvk { VkResult DxvkCommandList::submit( - VkQueue queue, VkSemaphore waitSemaphore, VkSemaphore wakeSemaphore) { + const auto& graphics = m_device->queues().graphics; + std::array cmdBuffers; uint32_t cmdBufferCount = 0; @@ -73,7 +73,7 @@ namespace dxvk { info.signalSemaphoreCount = wakeSemaphore == VK_NULL_HANDLE ? 0 : 1; info.pSignalSemaphores = &wakeSemaphore; - return m_vkd->vkQueueSubmit(queue, 1, &info, m_fence); + return m_vkd->vkQueueSubmit(graphics.queueHandle, 1, &info, m_fence); } diff --git a/src/dxvk/dxvk_cmdlist.h b/src/dxvk/dxvk_cmdlist.h index 841449065..5744da057 100644 --- a/src/dxvk/dxvk_cmdlist.h +++ b/src/dxvk/dxvk_cmdlist.h @@ -42,9 +42,7 @@ namespace dxvk { public: - DxvkCommandList( - DxvkDevice* device, - uint32_t queueFamily); + DxvkCommandList(DxvkDevice* device); ~DxvkCommandList(); /** @@ -56,7 +54,6 @@ namespace dxvk { * \returns Submission status */ VkResult submit( - VkQueue queue, VkSemaphore waitSemaphore, VkSemaphore wakeSemaphore); @@ -724,6 +721,7 @@ namespace dxvk { private: + DxvkDevice* m_device; Rc m_vkd; VkFence m_fence; diff --git a/src/dxvk/dxvk_device.cpp b/src/dxvk/dxvk_device.cpp index f008f826d..fbd386c25 100644 --- a/src/dxvk/dxvk_device.cpp +++ b/src/dxvk/dxvk_device.cpp @@ -70,7 +70,7 @@ namespace dxvk { Rc cmdList = m_recycledCommandLists.retrieveObject(); if (cmdList == nullptr) - cmdList = new DxvkCommandList(this, m_queues.graphics.queueFamily); + cmdList = new DxvkCommandList(this); return cmdList; } @@ -229,7 +229,6 @@ namespace dxvk { VkSemaphore wakeSync) { DxvkSubmitInfo submitInfo; submitInfo.cmdList = commandList; - submitInfo.queue = m_queues.graphics.queueHandle; submitInfo.waitSync = waitSync; submitInfo.wakeSync = wakeSync; m_submissionQueue.submit(submitInfo); diff --git a/src/dxvk/dxvk_queue.cpp b/src/dxvk/dxvk_queue.cpp index 6278ccea1..daa1fb9a1 100644 --- a/src/dxvk/dxvk_queue.cpp +++ b/src/dxvk/dxvk_queue.cpp @@ -86,7 +86,6 @@ namespace dxvk { { std::lock_guard lock(m_mutexQueue); status = submitInfo.cmdList->submit( - submitInfo.queue, submitInfo.waitSync, submitInfo.wakeSync); } diff --git a/src/dxvk/dxvk_queue.h b/src/dxvk/dxvk_queue.h index aa8421422..ba7bf27e5 100644 --- a/src/dxvk/dxvk_queue.h +++ b/src/dxvk/dxvk_queue.h @@ -22,7 +22,6 @@ namespace dxvk { */ struct DxvkSubmitInfo { Rc cmdList; - VkQueue queue; VkSemaphore waitSync; VkSemaphore wakeSync; };