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:
parent
1c39765b86
commit
191bba660b
@ -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;
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user