Shared textures support for the WPF control through D3DImage

by Nick July. 10, 14 0 Comment

This post is just a short preview for a substantial performance improvement in our WPF .NET control with Coherent UI 2.0. Until now, we used the system memory to transfer the image data from Coherent UI to the WPF application. While this works well in practice, there are some cases when you might want to display something in a very high resolution – say 8x8k. Copying that much memory inevitably lowers the performance.

One of our clients needed those very high resolutions and asked us if we can do something about it, suggesting transferring the surfaces through a D3DImage. By doing that we could use shared textures instead of the system memory to transfer the images. This way the image stays on the GPU and no copying occurs, leading to some quite substantial performance gains.

We’ve already explored that possibility previously, but haven’t implemented it since it was not going to be available for all OSes. With the recent end of support for Windows XP though (finally!), we decided to go for it and add an option for using shared textures. This feature is available on Vista SP2+ but all kinds of surveys suggest that the vast amount of users cover that requirement.

Here’s some benchmarks using the new feature (I used my 2k monitor so some of the pictures are cropped since the back buffers are larger):

 

2k Bunnymark shared memory

2k Bunnymark shared memory

 

2k Bunnymark D3DImage

2k Bunnymark D3DImage

 

4k IE Fishbowl shared memory

4k IE Fishbowl shared memory

 

4k IE Fishbowl test D3DImage

4k IE Fishbowl test D3DImage

 

For my last test I checked the FPS differently:

And here’s the shocker:

8k test logo animation shared memory

8k test logo animation shared memory

 

8k test logo animation D3DImage

8k test logo animation D3DImage

 

Coherent UI 2.0 for .NET comes with a fully-functional free trial. Get your copy from here.

Social Shares

Leave a Comment

Your email address will not be published. Required fields are marked *