Skip to content

Commit 1f8c6fe

Browse files
committed
rendervulkan: Use general queue for Intel devices
During forced composition, work sent to the compute-only queue is starved for resources, competing with the general queue. When resources are freed up for the compute-only queue, the general queue is waiting at a sync point for the compute work to finish. This can be beneficial for some workloads, but it causes applications running with gamescope's forced composition to slow down when the queues are competing for resources. By forcing the compositing work to be done in the general queue, we avoid the wait for sync points and the performance loss is not observed. Signed-off-by: Casey Bowman <[email protected]>
1 parent 12494be commit 1f8c6fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/rendervulkan.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,8 @@ bool CVulkanDevice::selectPhysDev(VkSurfaceKHR surface)
379379
m_generalQueueFamily = generalIndex;
380380
m_physDev = cphysDev;
381381

382-
if ( env_to_bool( getenv( "GAMESCOPE_FORCE_GENERAL_QUEUE" ) ) )
382+
if ( env_to_bool( getenv( "GAMESCOPE_FORCE_GENERAL_QUEUE" ) ) ||
383+
deviceProperties.vendorID == 32902) /* Intel */
383384
m_queueFamily = generalIndex;
384385
}
385386
}

0 commit comments

Comments
 (0)