浏览代码

Show pass execution device index if multi devices are available (#17904)

Signed-off-by: Li Hongshan <[email protected]>
Hongshan Li 1 年之前
父节点
当前提交
5bd6550bd9
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl

+ 6 - 0
Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl

@@ -284,6 +284,12 @@ namespace AZ::Render
                     ImGui::Text("Raster pass with %d draw items", asRasterPass->GetDrawItemCount());
                     ImGui::Text("Raster pass with %d draw items", asRasterPass->GetDrawItemCount());
                 }
                 }
 
 
+                AZ::RPI::RenderPass* asRenderPass = azrtti_cast<AZ::RPI::RenderPass*>(pass);
+                if (AZ::RHI::RHISystemInterface::Get()->GetDeviceCount() > 1 && asRenderPass && asRenderPass->IsEnabled())
+                {
+                    ImGui::Text("Pass runs on device %d", AZStd::max(asRenderPass->ScopeProducer::GetDeviceIndex(), 0));
+                }
+
                 if (ImGui::IsItemClicked())
                 if (ImGui::IsItemClicked())
                 {
                 {
                     m_selectedPassPath = pass->GetPathName();
                     m_selectedPassPath = pass->GetPathName();