d3d12: fallback to integrated adapter instead of arbitrary one
authorTiago Koji Castro Shibata <tiago.shibata@gmail.com>
Thu, 26 May 2022 04:41:27 +0000 (21:41 -0700)
committerMarge Bot <emma+marge@anholt.net>
Thu, 16 Jun 2022 00:19:54 +0000 (00:19 +0000)
commit4622e99e103ec2c079c6da082752f8a3c2bd0c83
tree09f96be5e15cab11446428b1f31135c59e6e9f68
parent3b867ae69b1739a5a2950009fc9bd1d4e0d81701
d3d12: fallback to integrated adapter instead of arbitrary one

Using the integrated adapter when none is specified uses less power by
default and doesn't break scenarios on Optimus systems (for example, on
Surface Books, detaching the screen gets prohibited because the GPU on
the performance base is in use)

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17005>
src/gallium/drivers/d3d12/d3d12_dxcore_screen.cpp