locked
Static Background Performace

    Question

  • To draw a static backgournd image, which is faster?

    A, Draw a Quad with texture.

    B, Prepare a texture with screen size. CopyResource this texture to backbuffer.

    Any other way ?


    C++ DX11

    Sunday, August 26, 2012 9:31 AM

Answers

  • Copying directly to the back buffer might be "faster" in isolation, but it will stall the GPU's ability to render to the back buffer. Unless you are literaly just showing a static image and not doing any drawing or effects or scaling at all--in which case why use Direct3D in the first place instead of Driect2D?--it's not going to be a win. Full-screen quads are quite fast.

    • Marked as answer by Raptor K Wednesday, August 29, 2012 2:09 AM
    Tuesday, August 28, 2012 11:54 PM

All replies

  • Hello,

    What do you mean by "faster"? Can you please clarify? Copying the resource to the back-buffer would likely bypass the render pipeline that might give you marginally better perf.

    I hope this helps,

    James


    Windows Media SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Tuesday, August 28, 2012 1:06 AM
    Moderator
  • That's what I mean. Thanks.


    C++ DX11

    Tuesday, August 28, 2012 2:30 AM
  • Copying directly to the back buffer might be "faster" in isolation, but it will stall the GPU's ability to render to the back buffer. Unless you are literaly just showing a static image and not doing any drawing or effects or scaling at all--in which case why use Direct3D in the first place instead of Driect2D?--it's not going to be a win. Full-screen quads are quite fast.

    • Marked as answer by Raptor K Wednesday, August 29, 2012 2:09 AM
    Tuesday, August 28, 2012 11:54 PM
  • Yes , I'm literally just showing a simple static background image without any change, and it seems a little faster by using ID3D11DeviceContext::CopyResource.

    And you mean Direct2D's scaling will be faster ?

    BTW, how can I test FPS of Metro Apps? It seems locked to 60FPS.

    Thank you.


    • Edited by Raptor K Wednesday, August 29, 2012 3:42 AM
    Wednesday, August 29, 2012 2:06 AM
  • I don't see how displaying a single static image is a performance concern so why over optimize this? Direct2D is probably the easist way to display an image like this.

    Windows Store apps Presentation is always locked to VSYNC, so you won't get faster than 60 fps.

    Wednesday, August 29, 2012 6:56 PM
  • I understand now. Thanks!


    C++ DX11

    Thursday, August 30, 2012 3:15 AM