felixdoerre / primus_vk

Vulkan GPU-offloading layer
BSD 2-Clause "Simplified" License
229 stars 17 forks source link

Added the choice to set explicit devices via env vars #28

Closed boberfly closed 5 years ago

boberfly commented 5 years ago

Added the choice to set explicit environment variables to choose exactly what GPU should be used for display and render using vendorID:deviceID notation eg. PRIMUS_VK_DISPLAYID=1002:6863 PRIMUS_VK_RENDERID=10de:0ffe

This is handy on machines with 2 discrete GPUs and you want one rendering into the one that is displaying, addressing: https://github.com/felixdoerre/primus_vk/issues/14

Having these not set will work exactly like it did before via VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU and VK_PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU checking.