Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know if a graphics card provides hardware rendering for wpf

Tags:

.net

wpf

I have to run a wpf-app in an environment that has all the same dell-pc's with an intel gma 3000 graphics chip (onbard, Q963/Q965). The app renders only with software rendering (Stated so by the RenderCapability.Tier-property and also Perforator of the Performance Toolkit Shows that.

On all of this machines, DirectX 9c is installed and DXDiag states on many but not on all of this machines, that Direct-3d and Direct-Draw-acceleration is activated. I checked also the registry if the setup of these machines disabled wpf-hw rendering but that's also not the case. On one machine I also updated the video-driver and dx with no success.

If I interpret the resources right, then on a pc that has DirectX 9c installed (and D3D-acceleration is active), also wpf hardware rendering takes place. But on the above machines DX9c is installed, however there is no hw rendering. According to the specification provided by the post of Daniel Bern, I also think that at least rendering on tier 1 must be possible and active.

The only thing I'm not shure about is the memory, because the graphics system allocates dynamically system memory and has no own memory. How can I find out if a specific graphics-chip has to support hardware rendering for wpf or not. Is it so that with active DirectX 9c also harware rendering is supported or were there also any other requirements that must be fullfilled that go further that dx9c requires? The second question is, if wpf renders through dx, is this done through direct-3d or is direct-draw used. Is there any good documentation on this topic?


It turned out that on the customers pc's the direct-3d-acceleration was active (in DXDiag), howewer not functional. The testprograms to test direct 3d always ended in errors. This makes the problem to a support problem and I will open a ticket in the involved companies support department.

The question about which component of dx is used to render wpf in hardware can be answered as follows: Rendering is done via the Media Integration Layer (MIL). If DirectX (appropriate version) is available and operable, MIL writes all rendering commands direct to D3D. Additionaly, DirectShow (or its successor) is used to process videos. The media integration layer is unmanaged code and there seems to be a very few documentation about.

The above facts led me to the perception, that an active DirectX9c is a clear indicator that hw-rendering for wpf can and will take place. Therefore the question which chip supports hw-rendering can be responded by checking if the chip supports dx9c (for tier 2 rendering). The requirements specification can be found here (thanks to Daniel Bern).

UPDATE

The reason why d3d and hardware rendering did not work in the above case was an application that registered a mirror video driver to provide remote terminal services such as net meeting does (it was software from the support department that was used to remotely administer the client pc’s). Disabling this mirror driver led to a functional direct 3d and thus the WPF hardware rendering took place. However the render level was only tier 1 (I think because of the video memory limitation).

I hope this post will help other people who have a similar problem.

Here some links to enter into the topic:

WPF Architecture Overview, Hardware Acceleration in WPF, Introducing Direct2D, Advanced WPF Application Performance Tuning and Analysis, RenderCapability.Tier returns not the render mode

like image 292
HCL Avatar asked May 30 '10 15:05

HCL


1 Answers

Read this Graphics Rendering Tiers and this Optimizing WPF Application Performance. Also have a look on this tool WPF Performance Suite

like image 152
Daniel Bern Avatar answered Sep 19 '22 11:09

Daniel Bern