{"id":5627,"date":"2021-08-19T11:30:30","date_gmt":"2021-08-19T18:30:30","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/pix\/?p=5627"},"modified":"2021-08-19T12:40:27","modified_gmt":"2021-08-19T19:40:27","slug":"pix-2108-18","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/pix\/pix-2108-18\/","title":{"rendered":"PIX 2108.18: New programmatic capture APIs and much more"},"content":{"rendered":"<p>Today we released PIX on Windows version 2108.18, which can be downloaded <a href=\"https:\/\/devblogs.microsoft.com\/pix\/download\/\">here<\/a>. We have also released a new version of WinPixEventRuntime, available <a href=\"https:\/\/www.nuget.org\/packages\/WinPixEventRuntime\">here<\/a>.<\/p>\n<p>This release has a lot of new features, including:<\/p>\n<ul>\n<li>New in-application capture APIs.\n<ul>\n<li>These allow you to programmatically take GPU captures within your application, without running PIX programs like the PIX UI or pixtool.<\/li>\n<\/ul>\n<\/li>\n<li>New AMD counter graphs in the timeline.\n<ul>\n<li>These help you understand your occupancy and what factors are limiting it, such as VGPR usage.<\/li>\n<\/ul>\n<\/li>\n<li>The first release of our new Acceleration Structure viewer.\n<ul>\n<li>The new viewer is much faster than the old viewer. It also adds support for a free-roam camera.<\/li>\n<li>We will be adding new features to this Acceleration Structure viewer over the coming months. Stay tuned for details!<\/li>\n<\/ul>\n<\/li>\n<li>File IO profiling support for archive files<\/li>\n<li>Many bug fixes and other smaller improvements.<\/li>\n<\/ul>\n<p>This release also includes a new Visual C++ Redistributable that may request a reboot during installation. We believe that anyone who has previously installed a 2019 VC++ redist on their computer (such as the one installed by older version of PIX) can safely ignore this reboot request.<\/p>\n<p>As a friendly reminder, <a href=\"https:\/\/devblogs.microsoft.com\/pix\/pix-survey\/\">our PIX survey<\/a> is still open for responses! If you haven&#8217;t already done so, then please consider filling in the survey to help us shape our future plans and make PIX better for you.<\/p>\n<p>&nbsp;<\/p>\n<h3>New in-application capture APIs<\/h3>\n<p>This release adds several new APIs to pix3.h that you can use within your application to take and\/or control GPU Captures. The new APIs are documented <a href=\"https:\/\/devblogs.microsoft.com\/pix\/programmatic-capture\/\">here<\/a>, including a setup guide.<\/p>\n<p>These new APIs <strong>do not<\/strong> require you to use the PIX UI or pixtool at all. You just need to load WinPixGpuCapturer.dll into your application before creating your D3D12 device. We have added a helper function, PIXLoadLatestWinPixGpuCapturerLibrary(), to help with this.<\/p>\n<p>Here\u2019s a brief overview of the new APIs:<\/p>\n<ul>\n<li>PIXBeginCapture()\n<ul>\n<li>Use this to programmatically start a GPU Capture immediately.<\/li>\n<li>It takes the destination filename as input.<\/li>\n<\/ul>\n<\/li>\n<li>PIXEndCapture()\n<ul>\n<li>Ends a GPU Capture started via PIXBeginCapture()<\/li>\n<\/ul>\n<\/li>\n<li>PIXGpuCaptureNextFrames()\n<ul>\n<li>Use this to enqueue a GPU Capture that will start next time a qualifying Present() call is made.<\/li>\n<li>This could, for example, be used to add your own \u201cTake Capture\u201d button to your in-game UI.<\/li>\n<\/ul>\n<\/li>\n<li>PIXSetTargetWindow()\n<ul>\n<li>This tells PIX which HWND the application is interested in capturing.<\/li>\n<li>After calling this API, PIX will only start or stop present-to-present captures when the application presents the specified HWND.<\/li>\n<li>This is helpful for multi-window applications, such as an engine editor. Without it, a present-to-present capture will capture the GPU work submitted between the next two Present() calls made for any HWNDs, which may not include the region of interest to the user.<\/li>\n<\/ul>\n<\/li>\n<li>PIXLoadLatestWinPixGpuCapturerLibrary()\n<ul>\n<li>This is a helper function to find and load the most recent version of WinPixGpuCapturer.dll that\u2019s installed on the current PC.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>We will be adding more APIs like these in the future. Please contact us if you have any particular requests.<\/p>\n<p>&nbsp;<\/p>\n<h3>New AMD occupancy graphs<\/h3>\n<p>This release adds new graphs to our timeline on RX 5000 and RX 6000 series AMD GPUs, to help you understand your GPU occupancy. The new graphs show your wave distribution across different shader types and occupancy limiting factors such as VGPR usage. These graphs complement similar graphs available on Intel and NVIDIA GPUs. Many thanks to our IHV partners for making this possible!<\/p>\n<p>The new counters are documented <a href=\"https:\/\/devblogs.microsoft.com\/pix\/hardware-counters-in-gpu-captures\/\">here<\/a>.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/202108-AmdGraphs.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-5635\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/202108-AmdGraphs.png\" alt=\"Image 202108 AmdGraphs\" width=\"1249\" height=\"775\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/202108-AmdGraphs.png 1249w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/202108-AmdGraphs-300x186.png 300w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/202108-AmdGraphs-1024x635.png 1024w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/202108-AmdGraphs-768x477.png 768w\" sizes=\"(max-width: 1249px) 100vw, 1249px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>New Acceleration Structure Viewer<span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559738&quot;:40,&quot;335559739&quot;:0,&quot;335559740&quot;:259}\">\u00a0<\/span><\/h3>\n<p><span data-contrast=\"auto\">Over the last few months, we\u2019ve been rewriting\u00a0our\u00a0Acceleration Structure viewer,\u00a0taking into account\u00a0all\u00a0the feedback you\u2019ve sent to us about it.\u00a0We\u00a0have\u00a0lots more planned for it, but we hope that you enjoy the improvements we\u2019ve made so far.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\"><strong>Load-time performance<\/strong>: Large acceleration structures would take an unacceptably long time to load with the old viewer. For example, we saw a capture that had a TLAS with &gt; 100k instances and would take well over 10 minutes to load!<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">We\u2019ve focused heavily on improving this experience, and the new viewer can load acceleration structures\u00a0much faster across the board. As a reference point, it can load the previously mentioned TLAS in less than 1 second. That\u2019s a 600x improvement!<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><strong>Free-roam camera<\/strong>: TLASes\u00a0may contain the entirety of the scene being rendered, making it awkward to navigate around with PIX\u2019s\u00a0arcball-style camera controls. As such, the new viewer has integrated free-roam\/FPS-style\u00a0camera controls, which should make it much easier to fly around and investigate your scenes.<span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><span data-contrast=\"auto\">Simply navigate with WASD, and right-click + move the mouse\u00a0(or use the arrow keys) to\u00a0rotate the camera. Additionally, holding shift will let you move faster throughout the scene.<\/span><span data-ccp-props=\"{&quot;201341983&quot;:0,&quot;335559739&quot;:160,&quot;335559740&quot;:259}\">\u00a0<\/span><\/p>\n<p><strong>Future Plans: <\/strong>We will be adding new features to this new acceleration structure viewer over the coming months. Please continue to contact us with your feature requests and\/or suggestions!<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/202108-AsViewer.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-5636\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/202108-AsViewer.png\" alt=\"Image 202108 AsViewer\" width=\"1260\" height=\"662\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/202108-AsViewer.png 1260w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/202108-AsViewer-300x158.png 300w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/202108-AsViewer-1024x538.png 1024w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/202108-AsViewer-768x404.png 768w\" sizes=\"(max-width: 1260px) 100vw, 1260px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>File IO profiling support for archive files<\/h3>\n<p>If your title packages individual assets into composite archive files such as .zip or .pak, the file io profiler built into Timing Captures can now show which assets within the composite file were accessed, but it requires extra information from you, the title developer, to do so.\u00a0 The extra information you supply is in the form of a Mapping File that PIX uses to decode accesses that occur within archive files.\u00a0 The names of individual assets are displayed in the Range Details, Element Details and Timeline views in the UI.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/2108-IoProfiling.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-5638\" src=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/2108-IoProfiling.png\" alt=\"Image 2108 IoProfiling\" width=\"1420\" height=\"492\" srcset=\"https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/2108-IoProfiling.png 1420w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/2108-IoProfiling-300x104.png 300w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/2108-IoProfiling-1024x355.png 1024w, https:\/\/devblogs.microsoft.com\/pix\/wp-content\/uploads\/sites\/41\/2021\/08\/2108-IoProfiling-768x266.png 768w\" sizes=\"(max-width: 1420px) 100vw, 1420px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h3>Other improvements<\/h3>\n<p><strong>GPU Captures<\/strong><\/p>\n<ul>\n<li>Don&#8217;t throw exceptions in ID3D12PipelineLibrary::StorePipeline, to fix long launch times<\/li>\n<li>Don&#8217;t show warning in Shader Table Viewer if no local root signature is set<\/li>\n<li>Display the correct value of unbiased exponent for 999e5<\/li>\n<li>Add partial support for capturing shared ID3D12Heaps<\/li>\n<li>Avoid GPU Capture HUD crash during app termination on some GPUs<\/li>\n<li>Make D3D12CreateDevice with NULL outptr return S_FALSE at capture time<\/li>\n<\/ul>\n<p><strong>Timing Captures<\/strong><\/p>\n<ul>\n<li>Fix bug where the ContextSwitch WaitReason was incorrect in extracted captures<\/li>\n<\/ul>\n<p><strong>Misc<\/strong><\/p>\n<ul>\n<li>Add safety measures to preserve UI state files in case of write failure (e.g. a full disk)<\/li>\n<li>Avoid issue that can prevent running process list from populating on some PCs<\/li>\n<li>Update VcRedist to latest version, to prevent installer hangs on ARM64<\/li>\n<li>Add option to disable virtual space in the text editor<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Feedback<\/h3>\n<p>As always, if you have any feedback on PIX then please don\u2019t hesitate to contact us. The best ways to reach us are via the feedback button (in the top-right corner of PIX), or on the <a href=\"https:\/\/discord.gg\/directx\">DirectX Discord<\/a> channel.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we released PIX on Windows version 2108.18, which can be downloaded here. We have also released a new version of WinPixEventRuntime, available here. This release has a lot of new features, including: New in-application capture APIs. These allow you to programmatically take GPU captures within your application, without running PIX programs like the PIX [&hellip;]<\/p>\n","protected":false},"author":1899,"featured_media":4769,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[4],"class_list":["post-5627","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pix","tag-release"],"acf":[],"blog_post_summary":"<p>Today we released PIX on Windows version 2108.18, which can be downloaded here. We have also released a new version of WinPixEventRuntime, available here. This release has a lot of new features, including: New in-application capture APIs. These allow you to programmatically take GPU captures within your application, without running PIX programs like the PIX [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts\/5627","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/users\/1899"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/comments?post=5627"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/posts\/5627\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/media\/4769"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/media?parent=5627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/categories?post=5627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/pix\/wp-json\/wp\/v2\/tags?post=5627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}