Select GPU for UWP app programatically

Anonymous
2020-03-16T17:09:56.997+00:00

I know I can select the default cpu in windows 10 graphics settings for an uwp app. This for example affects which gpu is used by the xaml ui and the media capture api-s. I have an issue with an app which uses direct3d + xaml + media capture to overlay 3d rendered content on video captured in a xaml app. The issue is caused by having the 3d rendering and the media capture shared surface being done on different display adapters. I would like to be able to set the default gpu for the app at startup after reading in the settings, so my users can avoid setting it in windows settings.

Universal Windows Platform (UWP)
{count} vote