GDI得到加速。有谁知道这是什么时候发生的? [英] GDI has been accelerated. Does anyone know when this happened?

查看:208
本文介绍了GDI得到加速。有谁知道这是什么时候发生的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

勾勒出这个问题的背景:在工作中我们使用Dell Precision工作站。我目前使用的是NVidia Quadro FX1700。
我的团队正在开发用于实时数据采集系统的图形组件。
所以我们总是看着图形操作是否占用了太多的CPU时间。对于快速检查,我们有几个我们运行的测试程序,它们以指定的速率(例如10 fps)绘制场景,我们使用普通的旧任务管理器来查看CPU使用情况。
这些程序中的一个在GDI DrawRectangle调用中很重要(已填充)。这个程序一直用来消耗大约40%的CPU用户时间,但大约一年左右(只是在这里猜测),它只使用大约2-3%的内核时间。很显然,这里正在发生一些硬件加速。事实上,如果我关闭HW-accell,我们又回到原来的40%的用户时间。
所有这些当然都是好消息,因为我们已经在考虑去参加OpenGL了。年复一年的GDI从未获得硬件加速的好处。直到前一段时间。



有人对此有更多了解吗?微软做到了吗?或者它是gfx卡供应商特定的?

编辑

Thnx为已经答案(Ferrucio,Torlack和Rob Walker),但我的问题还没有得到解答。我们在这里谈论一个填充矩形。可能是最简单的优化功能:只需向GPU发送几个坐标并让其翻转即可。然而它总是在CPU端实现。
到目前为止,答案让我相信NVidia终于看到了光(超过10年)和加速的GDI。并没有公布这个?根本没有信息可以找到。
我的内部客户问我关于图形加速的问题,我只能说好吧,我们很幸运。

Edit2



根据不同的答案,它看起来好像是与驾驶员相关的。那么,NVidia多年来为其工作站卡制作了蹩脚的GDI驱动程序。在这家公司内部确实是一个公认的事实,即GDI没有加速并且所有的测试都证实了这一点。

GDI通过调用图形设备驱动程序中的各种功能。每个驱动程序都必须执行一组核心功能。其他功能可由驾驶员执行。如果它们不是,GDI将自己执行这些功能。



如果一个特定的函数没有在硬件中实现,那么驱动程序就没有必要执行这个函数的软件因为GDI可能会做得更好。 GDI针对性能进行了非常优化。

随着硬件实现更多功能,这些功能不仅功能更好,而且GDI的工作量也更少,导致在显卡上花费的CPU时间更少。

也许情况是,显卡供应商为了迅速将卡片推向市场,可能会没有实现卡可以执行的所有可能的硬件功能。然后,该驱动程序的更高版本可能会实现该功能,从而提高性能。


To sketch the background of this question : at work we use Dell Precision workstations. My current one has got an NVidia Quadro FX1700. My team is developing the graphics components for a real time data acquisition system. So we are always looking out to see if the graphics operations don't use up too much CPU time. For quick checks, we have a couple of test programs that we run, which draw scenes at a specified rate ( e.g. 10 fps ) and we use plain old Task Manager to see where CPU usage is at. One of these programs is heavy on GDI DrawRectangle calls ( which are filled ). This program always used to consume about 40% CPU user-time, but since about a year or so ( just guessing here ) it only uses about 2-3 % kernel-time. So clearly some hardware acceleration is going on here. And indeed, if I turn HW-accell off, we're back to the original 40% user-time. All of this is of course good news, because we were already thinking about going to OpenGL. Year after year GDI never got the benefit of hardware acceleration. Until some time ago that is.

Does anyone know anything more about this? Did Microsoft do this? Or is it gfx-card vendor specific?

Edit

Thnx for the answers already ( Ferrucio, Torlack and Rob Walker ) but my question has not been answered yet. We are talking about a filled rectangle here. Probably the most trivial function to optimize : just send a couple of coordinates to the GPU and let it rip. Yet it was always implemented on the CPU side. So far the answers lead me to believe that NVidia finally saw the light ( after more than 10 years ) and accelerated GDI. And no announcement about this? There's no information to be found on this at all. My internal customers ask me about the speedup of the graphics, and all I can say is "well, we got lucky".

Edit2

It does seem like it is driver related according to the different answers. So, then NVidia has made crappy GDI drivers for its workstation cards for years. It really was an accepted fact within this company that GDI was not accelerated and all the tests confirmed this.

解决方案

GDI works by calling various functions in the graphics device driver. There are a core set of functions that every driver must implement. Other functions may be implemented by the driver. If they are not, GDI will perform those functions itself.

If a particular function is not implemented in hardware then there is no point in the driver doing a software implementation of that function since GDI can probably do a better job. GDI is extremely well optimized for performance.

As more functions are implemented in hardware, not only do those functions perform much better, but there is also less work for GDI to do, resulting in less CPU time spent on graphics.

It may also be the case that the graphics card vendor, in an effort to get a card out to market quickly, may not have implemented all possible hardware functions that the card could perform. Later versions of that driver may then implement that functionality, resulting in improved performance.

这篇关于GDI得到加速。有谁知道这是什么时候发生的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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