locked
A possible bug in VS2012 C++ compiler optimization for XAML/DirectX application

    Question

  • Hello. I am currently developing DirectX/XAML Metro style application and have noticed next interesting thing. When I build my app which for now simply renders one model in Debug mode, I have next image:

    But when I build my app in release mode I have some bugs in image rendering:

    After some investigation it turned out that this artifact occurs when Maximize Speed (/O2) or Full optimization methods are used. When I use Minimize Size method or disable optimization (like in Debug mode) everything works fine. Use Win 8 RP & VS2012 RC and D3D_DRIVER_TYPE_WARP mode. Did anybody see similar problem?

    Saturday, July 28, 2012 9:32 AM

Answers

  • It turned out that I can`t reproduce bug after restart of VS. So now everything renders fine in both Release & Debug modes with /O2 optimization. Btw, Graphics Debugging works fine too.

    • Marked as answer by RenGate Saturday, July 28, 2012 12:26 PM
    • Edited by RenGate Saturday, July 28, 2012 12:27 PM Added info about Graphics Debugging
    Saturday, July 28, 2012 12:26 PM

All replies

  • May be something not initialized.  Some variables will be initialized in debug mode. Can you use Graphics Debugging? I cannot use it in metro mode.

    C++ DX11

    Saturday, July 28, 2012 12:01 PM
  • It turned out that I can`t reproduce bug after restart of VS. So now everything renders fine in both Release & Debug modes with /O2 optimization. Btw, Graphics Debugging works fine too.

    • Marked as answer by RenGate Saturday, July 28, 2012 12:26 PM
    • Edited by RenGate Saturday, July 28, 2012 12:27 PM Added info about Graphics Debugging
    Saturday, July 28, 2012 12:26 PM