{"id":847,"date":"2017-03-01T17:23:54","date_gmt":"2017-03-02T01:23:54","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/directx\/?p=847"},"modified":"2019-03-08T20:58:37","modified_gmt":"2019-03-09T04:58:37","slug":"gpu-plugins-improved-sdk-layers-and-hang-debugging-bringing-directx-12-tools-to-the-next-level","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/directx\/gpu-plugins-improved-sdk-layers-and-hang-debugging-bringing-directx-12-tools-to-the-next-level\/","title":{"rendered":"GPU plugins, improved SDK layers, and hang debugging: Bringing DirectX 12 tools to the next level"},"content":{"rendered":"<p>If you are a Windows game developer using DirectX 12, you know that great tools are essential for getting the most out of the graphics hardware. In the past few months, we\u2019ve been making rapid progress on delivering the tools you\u2019ve requested. At the Game Developers Conference today, we demoed new features for both PIX, our premier tool for tuning and debugging, as well as the debug layers, a tool that ensures that your game is calling the DirectX 12 API correctly.<\/p>\n<p>Of course, no GDC talk would be complete without an announcement \u2026<\/p>\n<h2>Introducing hardware specific plugins for PIX<\/h2>\n<p>PIX on Windows supports a plugin model that enables GPU vendors to expose low-level hardware counters directly in the PIX Events list, giving a detailed breakdown of what the hardware is doing per event. Through collaboration with our partners at NVIDIA, we now have a working early version of <strong>PIX with support for NVIDIA hardware counters<\/strong> that we demoed today at GDC! The counters let you understand utilization of the different parts of the GPU, memory bandwidth usage and much more. The screenshot below shows a selection of NVIDIA counters enabled for a PIX GPU capture.<\/p>\n<p><a href=\"http:\/\/devblogs.microsoft.com\/directx\/wp-content\/uploads\/sites\/42\/2017\/03\/pix-nvidia-counters.png\"><img decoding=\"async\" src=\"http:\/\/devblogs.microsoft.com\/directx\/wp-content\/uploads\/sites\/42\/2017\/03\/pix-nvidia-counters.png\" alt=\"NVIDIA hardware counters in PIX\" width=\"1858\" height=\"1080\" class=\"aligncenter size-full wp-image-855\" srcset=\"https:\/\/devblogs.microsoft.com\/directx\/wp-content\/uploads\/sites\/42\/2017\/03\/pix-nvidia-counters.png 1858w, https:\/\/devblogs.microsoft.com\/directx\/wp-content\/uploads\/sites\/42\/2017\/03\/pix-nvidia-counters-300x174.png 300w, https:\/\/devblogs.microsoft.com\/directx\/wp-content\/uploads\/sites\/42\/2017\/03\/pix-nvidia-counters-768x446.png 768w, https:\/\/devblogs.microsoft.com\/directx\/wp-content\/uploads\/sites\/42\/2017\/03\/pix-nvidia-counters-1024x595.png 1024w\" sizes=\"(max-width: 1858px) 100vw, 1858px\" \/><\/a><\/p>\n<p>NVIDIA\u2019s plugin for PIX on Windows will be available soon so be sure to check the <a href=\"http:\/\/blogs.msdn.microsoft.com\/pix\/\">PIX blog<\/a> for updates. We\u2019re working with AMD and Intel to provide similar plugins for their GPUs as well.<\/p>\n<p>For more information on PIX, check out the <a href=\"https:\/\/blogs.msdn.microsoft.com\/directx\/2017\/01\/17\/pix-on-windows-beta-released\/\">initial announcement of the PIX beta<\/a>, and the <a href=\"https:\/\/blogs.msdn.microsoft.com\/pix\/2017\/02\/23\/pix-1702-23-002\">February update for PIX<\/a>.<\/p>\n<h2>NVIDIA also first to provide enhanced GPU hang debugging<\/h2>\n<p>DirectX 12 provides unprecedented access to the GPU, which is great for optimizing performance, but low level hardware control comes with low level hardware errors such as GPU crashes and hangs. These can be very hard to troubleshoot. NVIDIA is releasing Aftermath, a new debugging tool for Windows to help you track down the source of these issues.<\/p>\n<p>Aftermath is a compact C++ library aimed at D3D based developers. It works by allowing you to insert markers on the GPU timeline, which can be read post-GPU hang, to determine what work the GPU was processing at the point of failure. Aftermath also includes a facility to query the current device state, to help you understand the reason for the crash. For more information on Aftermath be sure to check <a href=\"https:\/\/developer.nvidia.com\/debugging-gpu-crashestdrs\">NVIDIA\u2019s session at GDC<\/a> on Thursday at 3 PM and <a href=\"https:\/\/developer.nvidia.com\/aftermath-debugging-crashes-and-tdrs-gpu\">visit the NVIDIA developer blog<\/a>.<\/p>\n<h2>Debug Layers and GPU-based validation<\/h2>\n<p>Another great addition to the growing set of tools for DirectX 12 is the validation built into the runtime itself.\u00a0 If you enable the Graphics Tools optional feature in Windows 10, you get two other tools that help speed up the development by validating API usage and troubleshooting low-level GPU issues. D3D12 debug layer is a low overhead tool to help you validate correct usage of the APIs. D3D12 debug layer should be your first line of defense against critical, hard-to-find errors. For problems that occur after work is submitted to the GPU, the <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/mt490477(v=vs.85).aspx\">GPU-based validation<\/a> tool provides the next level of defense by patching shaders and command lists with validation code. This enables you to find problems such as barrier related issues, uninitialized descriptors and out-of-bounds access of descriptor heaps. <\/p>\n<p>If you missed our talk at GDC a video will be available later. We&#8217;ll update this post once the video is ready. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are a Windows game developer using DirectX 12, you know that great tools are essential for getting the most out of the graphics hardware. In the past few months, we\u2019ve been making rapid progress on delivering the tools you\u2019ve requested. At the Game Developers Conference today, we demoed new features for both PIX, [&hellip;]<\/p>\n","protected":false},"author":1916,"featured_media":12651,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[14,18,27,31,39,42],"class_list":["post-847","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-directx","tag-direct3d12","tag-directx-12","tag-gaming","tag-graphics","tag-nvidia","tag-pix"],"acf":[],"blog_post_summary":"<p>If you are a Windows game developer using DirectX 12, you know that great tools are essential for getting the most out of the graphics hardware. In the past few months, we\u2019ve been making rapid progress on delivering the tools you\u2019ve requested. At the Game Developers Conference today, we demoed new features for both PIX, [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/directx\/wp-json\/wp\/v2\/posts\/847","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/directx\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/directx\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/directx\/wp-json\/wp\/v2\/users\/1916"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/directx\/wp-json\/wp\/v2\/comments?post=847"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/directx\/wp-json\/wp\/v2\/posts\/847\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/directx\/wp-json\/wp\/v2\/media\/12651"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/directx\/wp-json\/wp\/v2\/media?parent=847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/directx\/wp-json\/wp\/v2\/categories?post=847"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/directx\/wp-json\/wp\/v2\/tags?post=847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}