桌面复制API和可切换的图形 [英] Desktop Duplication API & switchable graphics

查看:246
本文介绍了桌面复制API和可切换的图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题:调用 IDXGIOutput1 :: DuplicateOutput方法返回DXGI_ERROR_UNSUPPORTED.

The problem: calling IDXGIOutput1::DuplicateOutput method returns DXGI_ERROR_UNSUPPORTED when you run an application using discrete graphics controller on a machine with switchable graphics.

此答案阐明了该问题.简而言之,离散图形仅呈现屏幕的一部分,并将数据发送到集成图形控制器的帧缓冲区-换句话说,所有输出始终通过集成图形控制器.看来这就是为什么DuplicateOutput返回DXGI_ERROR_UNSUPPORTED的原因.

This answer shed some light on the issue. In short, the discrete graphics renders only a part of the screen and sends the data to the framebuffer of the intergrated graphics controller -- in other words all output always goes through the integrated graphics controller. It seems that this is why DuplicateOutput returns DXGI_ERROR_UNSUPPORTED.

我写了一个示例,该示例使用 winapi ( IDXGIAdapter :: EnumOutputs方法),以便在具有可切换图形的计算机(Intel HD 4600和NVIDIA 840M)上进行比较.结果如下:

I wrote a sample that gets all outputs and their videoadapters using winapi (EnumDisplayDevices function) & directx (IDXGIFactory::EnumAdapters method & IDXGIAdapter::EnumOutputs method) to compare on a machine with switchable graphics (Intel HD 4600 & NVIDIA 840M). This is the result:

不确定我可以比较多少正确,但是您可以看到 winapi 说DISPLAY1属于Intel卡,而 directx 说DISPLAY1属于NVIDIA卡.一种解决方案是复制Intel卡的输出(因为所有事情都会通过它),但是EnumOutputs不会为它返回任何输出.

Not sure how much correct is my may of comparison, but you can see that winapi says that DISPLAY1 belongs to Intel card and directx says DISPLAY1 belongs to NVIDIA card. One solution would be to duplicate the output of Intel card (because everything goes through it) but EnumOutputs returns no outputs for it.

当前有一个解决方法:始终使用集成的图形控制器运行使用Duplicat API的应用程序.

Currently there is a workaround: always run an application that uses Duplication API using the integrated graphics controller.

问题:如何使DuplicateOutput与带有可切换图形的笔记本电脑上的独立图形控制器一起工作?还是桌面复制API的局限性?

The question: how to make DuplicateOutput work with the discrete graphics controller on a laptop with switchable graphics? Or it is a limitation of the Desktop Duplication API?

推荐答案

已解决:

不幸的是,发生此问题的原因是桌面复制API 不支持在Microsoft的离散GPU上运行 混合系统.根据设计,调用将失败并显示错误代码 在这种情况下为DXGI_ERROR_UNSUPPORTED.

unfortunately this issue occurs because the Desktop Duplication API does not support being run against the discrete GPU on a Microsoft Hybrid system. By design, the call fails together with error code DXGI_ERROR_UNSUPPORTED in such a scenario.

要变通解决此问题,请在集成的GPU上运行该应用程序 而不是在Microsoft Hybrid系统上的离散GPU上.

To work around this issue, run the application on the integrated GPU instead of on the discrete GPU on a Microsoft Hybrid system.

从这里

: https://support.microsoft.com/en-us/kb/3019314

这篇关于桌面复制API和可切换的图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆