{"id":1983,"date":"2019-12-27T19:33:34","date_gmt":"2019-12-27T17:33:34","guid":{"rendered":"https:\/\/alax.info\/blog\/?p=1983"},"modified":"2019-12-27T19:33:34","modified_gmt":"2019-12-27T17:33:34","slug":"mediafoundationdxgicapabilities-gpu-preference-hybrid-gpu-systems","status":"publish","type":"post","link":"https:\/\/alax.info\/blog\/1983","title":{"rendered":"MediaFoundationDxgiCapabilities: GPU preference &#038; Hybrid GPU systems"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I added a section that enumerates DXGI adapters with the help <code><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/api\/dxgi1_6\/nf-dxgi1_6-idxgifactory6-enumadapterbygpupreference\">IDXGIFactory6::EnumAdapterByGpuPreference<\/a><\/code> &#8211; this is included into the produced output.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unfortunately the method does not distinguish between dual GPU systems, such as with discrete GPU and additional CPU integrated  Intel  GPU&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">DXGI Capabilities\n NOTE: Baseline capabilities are corresponding to DXGI 1.1\n Windowed Stereo: 0\n DXGI_FEATURE_PRESENT_ALLOW_TEARING: 1\n<strong> Adapters by Preference:\n DXGI_GPU_PREFERENCE_UNSPECIFIED: Radeon RX 570 Series (0.0x0000D18A), Intel(R) UHD Graphics 630 (0.0x8E94827B), Microsoft Basic Render Driver (0.0x0000D163)\n DXGI_GPU_PREFERENCE_MINIMUM_POWER: Intel(R) UHD Graphics 630 (0.0x8E94827B), Radeon RX 570 Series (0.0x0000D18A), Microsoft Basic Render Driver (0.0x0000D163)\n DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE: Radeon RX 570 Series (0.0x0000D18A), Intel(R) UHD Graphics 630 (0.0x8E94827B), Microsoft Basic Render Driver (0.0x0000D163)\n<\/strong> Factory Interfaces: IDXGIObject, IDXGIFactory, IDXGIFactory1, IDXGIFactory2, IDXGIFactory3, IDXGIFactory4, IDXGIFactory5, IDXGIFactory6, IDXGIFactory7, IDXGIDisplayControl \n\nAdapters\n Radeon RX 570 Series\n Intel(R) UHD Graphics 630 <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230;and hybrid systems such as <a href=\"https:\/\/en.wikipedia.org\/wiki\/Nvidia_Optimus\">NVIDIA Optimus<\/a> and <a href=\"https:\/\/en.wikipedia.org\/wiki\/AMD_Hybrid_Graphics\">AMD PowerXpress<\/a>. Those from AMD seem to be discontinued and AMD is traditionally <a href=\"https:\/\/community.amd.com\/thread\/151386\">provides zero helpful feedback<\/a> to developers (although NVIDIA is <a href=\"https:\/\/devtalk.nvidia.com\/default\/topic\/763123\/programmatically-selecting-integrated-graphics-in-nvidia-optimus\">not any better<\/a>).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However this time I might have spotted something interesting. On an NVIDIA hybrid system when an app is executed on iGPU, the output is this (expected):<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">DXGI Capabilities\n NOTE: Baseline capabilities are corresponding to DXGI 1.1\n Windowed Stereo: 0\n DXGI_FEATURE_PRESENT_ALLOW_TEARING: 1\n Adapters by Preference:\n<strong> DXGI_GPU_PREFERENCE_UNSPECIFIED: Intel(R) HD Graphics 520 (0.0x00010765), NVIDIA GeForce 940MX (0.0x00010A9D), Microsoft Basic Render Driver (0.0x00010A66)\n DXGI_GPU_PREFERENCE_MINIMUM_POWER: Intel(R) HD Graphics 520 (0.0x00010765), NVIDIA GeForce 940MX (0.0x00010A9D), Microsoft Basic Render Driver (0.0x00010A66)\n DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE: NVIDIA GeForce 940MX (0.0x00010A9D), Intel(R) HD Graphics 520 (0.0x00010765), Microsoft Basic Render Driver (0.0x00010A66)\n<\/strong> Factory Interfaces: IDXGIObject, IDXGIFactory, IDXGIFactory1, IDXGIFactory2, IDXGIFactory3, IDXGIFactory4, IDXGIFactory5, IDXGIFactory6, IDXGIFactory7, IDXGIDisplayControl \n\nAdapters\n Intel(R) HD Graphics 520\n NVIDIA GeForce 940MX \n\n[...]\n\nOutput Protection Manager (OPM Semantics)\n Certificate Subject: IntelVpgOpm2011\n OPM_GET_OUTPUT_ID: OutputId 0x0000000000040F04\n OPM_GET_ADAPTER_BUS_TYPE: ulInformation OPM_BUS_TYPE_OTHER | OPM_BUS_IMPLEMENTATION_MODIFIER_INSIDE_OF_CHIPSET | OPM_COPP_COMPATIBLE_BUS_TYPE_INTEGRATED\n OPM_GET_CONNECTOR_TYPE: ulInformation OPM_CONNECTOR_TYPE_DISPLAYPORT_EMBEDDED \n\n[...]\n \nOutput Duplication\n Direct3D 11 Feature Level: D3D_FEATURE_LEVEL_11_1; https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ff476876#Overview\n Mode Description:\n Width: 1\u00c2\u00a0920\n Height: 1\u00c2\u00a0080\n Refresh Rate: 138\u00c2\u00a0500\u00c2\u00a0000\/2\u00c2\u00a0310\u00c2\u00a0880 (59,934)\n Format: DXGI_FORMAT_B8G8R8A8_UNORM\n Scanline Ordering: DXGI_MODE_SCANLINE_ORDER_PROGRESSIVE\n Scaling: DXGI_MODE_SCALING_UNSPECIFIED\n Rotation: DXGI_MODE_ROTATION_IDENTITY\n Desktop Image In System Memory: 0 <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">However, when the app is started on dGPU, adapter enumeration order is expectedly changed, and also Desktop Duplication API is dysfunctional as documented here: <a href=\"https:\/\/support.microsoft.com\/en-ie\/help\/3019314\/error-generated-when-desktop-duplication-api-capable-application-is-ru\">Error generated when Desktop Duplication API-capable application is run against discrete GPU<\/a>, but&#8230;<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">DXGI Capabilities\n NOTE: Baseline capabilities are corresponding to DXGI 1.1\n Windowed Stereo: 0\n DXGI_FEATURE_PRESENT_ALLOW_TEARING: 1\n Adapters by Preference:\n<strong> DXGI_GPU_PREFERENCE_UNSPECIFIED: NVIDIA GeForce 940MX (0.0x00010A9D), Intel(R) HD Graphics 520 (0.0x00010765), Microsoft Basic Render Driver (0.0x00010A66)\n DXGI_GPU_PREFERENCE_MINIMUM_POWER: Intel(R) HD Graphics 520 (0.0x00010765), NVIDIA GeForce 940MX (0.0x00010A9D), Microsoft Basic Render Driver (0.0x00010A66)\n DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE: NVIDIA GeForce 940MX (0.0x00010A9D), Intel(R) HD Graphics 520 (0.0x00010765), Microsoft Basic Render Driver (0.0x00010A66)\n<\/strong> Factory Interfaces: IDXGIObject, IDXGIFactory, IDXGIFactory1, IDXGIFactory2, IDXGIFactory3, IDXGIFactory4, IDXGIFactory5, IDXGIFactory6, IDXGIFactory7, IDXGIDisplayControl \n\nAdapters\n NVIDIA GeForce 940MX\n Intel(R) HD Graphics 520 \n\n[...]\n\n<strong>Output Protection Manager (OPM Semantics)\n Certificate Subject: IntelVpgOpm2011\n<\/strong> OPM_GET_OUTPUT_ID: OutputId 0x0000000000040F04\n OPM_GET_ADAPTER_BUS_TYPE: ulInformation OPM_BUS_TYPE_OTHER | OPM_BUS_IMPLEMENTATION_MODIFIER_INSIDE_OF_CHIPSET | OPM_COPP_COMPATIBLE_BUS_TYPE_INTEGRATED\n OPM_GET_CONNECTOR_TYPE: ulInformation OPM_CONNECTOR_TYPE_DISPLAYPORT_EMBEDDED\n\n[...]\n \nOutput Duplication\n Exception: \u00d0\u00a3\u00d0\u00ba\u00d0\u00b0\u00d0\u00b7\u00d0\u00b0\u00d0\u00bd\u00d0\u00bd\u00d1\u2039\u00d0\u00b9 \u00d0\u00b8\u00d0\u00bd\u00d1\u201a\u00d0\u00b5\u00d1\u20ac\u00d1\u201e\u00d0\u00b5\u00d0\u00b9\u00d1\u0081 \u00d1\u0192\u00d1\u0081\u00d1\u201a\u00d1\u20ac\u00d0\u00be\u00d0\u00b9\u00d1\u0081\u00d1\u201a\u00d0\u00b2\u00d0\u00b0 \u00d0\u00b8\u00d0\u00bb\u00d0\u00b8 \u00d1\u0192\u00d1\u20ac\u00d0\u00be\u00d0\u00b2\u00d0\u00b5\u00d0\u00bd\u00d1\u0152 \u00d0\u00ba\u00d0\u00be\u00d0\u00bc\u00d0\u00bf\u00d0\u00be\u00d0\u00bd\u00d0\u00b5\u00d0\u00bd\u00d1\u201a\u00d0\u00b0 \u00d0\u00bd\u00d0\u00b5 \u00d0\u00bf\u00d0\u00be\u00d0\u00b4\u00d0\u00b4\u00d0\u00b5\u00d1\u20ac\u00d0\u00b6\u00d0\u00b8\u00d0\u00b2\u00d0\u00b0\u00d0\u00b5\u00d1\u201a\u00d1\u0081\u00d1\u008f \u00d0\u00b2 \u00d0\u00b4\u00d0\u00b0\u00d0\u00bd\u00d0\u00bd\u00d0\u00be\u00d0\u00b9 \u00d1\u0081\u00d0\u00b8\u00d1\u0081\u00d1\u201a\u00d0\u00b5\u00d0\u00bc\u00d0\u00b5 (0x887A0004; DXGI_ERROR_UNSUPPORTED); https:\/\/support.microsoft.com\/en-ie\/help\/3019314\/error-generated-when-desktop-duplication-api-capable-application-is-ru <\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">&#8230;here is the news: NVIDIA DXGI adapter is enumerated with Intel OPM certificate&#8230; What a find!<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Download links<\/h3>\n\n\n\n<ul class=\"wp-block-list\"><li>Binaries:\n<ul><li>32-bit: <a href=\"https:\/\/www.alax.info\/svn\/public\/trunk\/Toolbox\/MediaFoundationDxgiCapabilities-Win32.exe\">MediaFoundationDxgiCapabilities-Win32.exe<\/a><\/li><li>64-bit: <a href=\"https:\/\/www.alax.info\/svn\/public\/trunk\/Toolbox\/MediaFoundationDxgiCapabilities-x64.exe\">MediaFoundationDxgiCapabilities-x64.exe<\/a><\/li><li>License: This software is free to use<\/li><\/ul>\n<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I added a section that enumerates DXGI adapters with the help IDXGIFactory6::EnumAdapterByGpuPreference &#8211; this is included into the produced output. Unfortunately the method does not distinguish between dual GPU systems, such as with discrete GPU and additional CPU integrated Intel GPU&#8230; DXGI Capabilities NOTE: Baseline capabilities are corresponding to DXGI 1.1 Windowed Stereo: 0 DXGI_FEATURE_PRESENT_ALLOW_TEARING:&hellip; <\/p>\n<p><a class=\"moretag\" href=\"https:\/\/alax.info\/blog\/1983\">Read the full article<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[585,539,586,486,581],"class_list":["post-1983","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-dgpu","tag-dxgi","tag-igpu","tag-video","tag-winapi-2"],"_links":{"self":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/comments?post=1983"}],"version-history":[{"count":0,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/posts\/1983\/revisions"}],"wp:attachment":[{"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/media?parent=1983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/categories?post=1983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alax.info\/blog\/wp-json\/wp\/v2\/tags?post=1983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}