Procházet zdrojové kódy

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

Signed-off-by: Li Hongshan <[email protected]>
Hongshan Li před 1 rokem
rodič
revize
5bd6550bd9

+ 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());
                 }
 
+                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())
                 {
                     m_selectedPassPath = pass->GetPathName();