1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 14:52:11 +01:00

[dxvk] Provide way to access queue properties from device

This commit is contained in:
Philip Rebohle 2019-06-28 00:20:38 +02:00
parent 1c39765b86
commit 191bba660b
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
3 changed files with 17 additions and 8 deletions

View File

@ -60,7 +60,7 @@ namespace dxvk {
VkQueue* pQueue, VkQueue* pQueue,
uint32_t* pQueueFamilyIndex) { uint32_t* pQueueFamilyIndex) {
auto device = static_cast<D3D11Device*>(m_device)->GetDXVKDevice(); auto device = static_cast<D3D11Device*>(m_device)->GetDXVKDevice();
DxvkDeviceQueue queue = device->graphicsQueue(); DxvkDeviceQueue queue = device->queues().graphics;
if (pQueue != nullptr) if (pQueue != nullptr)
*pQueue = queue.queueHandle; *pQueue = queue.queueHandle;

View File

@ -330,7 +330,7 @@ namespace dxvk {
void D3D11SwapChain::CreatePresenter() { void D3D11SwapChain::CreatePresenter() {
DxvkDeviceQueue graphicsQueue = m_device->graphicsQueue(); DxvkDeviceQueue graphicsQueue = m_device->queues().graphics;
vk::PresenterDevice presenterDevice; vk::PresenterDevice presenterDevice;
presenterDevice.queueFamily = graphicsQueue.queueFamily; presenterDevice.queueFamily = graphicsQueue.queueFamily;

View File

@ -111,14 +111,23 @@ namespace dxvk {
} }
/** /**
* \brief Graphics queue properties * \brief Queue handles
* *
* Handle and queue family index of * Handles and queue family indices
* the queue used for rendering. * of all known device queues.
* \returns Graphics queue info * \returns Device queue infos
*/ */
DxvkDeviceQueue graphicsQueue() const { const DxvkDeviceQueueSet& queues() const {
return m_queues.graphics; return m_queues;
}
/**
* \brief Tests whether a dedicated transfer queue is available
* \returns \c true if an SDMA queue is supported by the device
*/
bool hasDedicatedTransferQueue() const {
return m_queues.transfer.queueHandle
!= m_queues.graphics.queueHandle;
} }
/** /**