• Advertisement

d3stnd

Member
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

128 Neutral

About d3stnd

  • Rank
    Newbie
  1. DirectX11 Swap Chain Format

    Hi Guys,   After doing my research (of which I already knew half cheers for the information about the flip presentation info btw). Heres my findings:   Now when using the discard presentation in a Win32 app it passes the render target to DWM which then blits the target to the screen and when in full screen mode (provided you have resized your back buffer and refresh rate correctly) it will disable DWM and perform flips to render the scene. Now with metro apps there's no such thing as full screen exclusive (as they are essentially borderless window). So they would blit all the time (the discard presentation model is actually not allowed for metro apps). So you have to set the presentation model to flip in Win32 apps and metro apps(with this being your only option for metro :]). It will than pass your render target to DWM (I assume maybe it allows you access to its underlying target to draw into and uses dirty rectangles), and instead of blitting it will straight up flip/merge your target into the screen space it currently resides in and you get flip performance and in full screen it does the flip (assuming you resized buffers and refresh rate). Now for some reason the windows default back buffer for the OS is BGR and if you use this as your back buffer format the flip is slightly faster as it doesn't have to swizzle or do whatever it does to merge/flip. But you can use either RGBA or BGRA. Heres the msdn explaining the new presentation model: http://msdn.microsoft.com/en-us/library/windows/desktop/hh706346%28v=vs.85%29.aspx And heres another msdn confirming the slightly faster flip with bgra:http://social.msdn.microsoft.com/Forums/windowsapps/en-US/f56e4449-f3e1-491e-9f64-e65e989a518a/best-swap-buffer-format-rgba-or-bgra-
  2. DirectX11 Swap Chain Format

    Thanks for the reply. Ive read this article before And i noticed that it mentions you can still use the rgba format with flip and DWM will still compose the screen without a copy. So what about vista or windows 7 with directx 10/11 where flip sequential might not be available or using say discard as the presentation model?
  3. I was wondering if anyone could elaborate any further on something thats been bugging me.   In DirectX9 the main supported back buffer formats were D3DFMT_X8R8B8G8 and D3DFMT_A8R8G8B8 (Both being BGRA in layout).   http://msdn.microsoft.com/en-us/library/windows/desktop/bb174314(v=vs.85).aspx   With the initial version of DirectX10 their was no support for BGRA and all the textbooks (On both DirectX10 and 11) and online tutorials recommend   DXGI_FORMAT_R8G8B8A8_UNORM (being RGBA in layout).   Now with DirectX11 BGRA is supported again and it seems as if microsoft recommends using a BGRA format as the back buffer format.   http://msdn.microsoft.com/en-us/library/windows/apps/hh465096.aspx http://msdn.microsoft.com/en-us/library/windows/desktop/hh780339(v=vs.85).aspx   Is their any suggestions or are their performance implications of using one or the other.   (I assume not as obviously by specifying the format of the underlying resource the runtime will handle what bits your passing through and than infer how to utilise them based on the format).   Any feedback is appreciated.    
  • Advertisement