diff --git a/Code/Editor/TrackView/AtomOutputFrameCapture.cpp b/Code/Editor/TrackView/AtomOutputFrameCapture.cpp index d5ceeae9b2..cd5a977367 100644 --- a/Code/Editor/TrackView/AtomOutputFrameCapture.cpp +++ b/Code/Editor/TrackView/AtomOutputFrameCapture.cpp @@ -73,7 +73,7 @@ namespace TrackView bool startedCapture = false; AZ::Render::FrameCaptureRequestBus::BroadcastResult( startedCapture, &AZ::Render::FrameCaptureRequestBus::Events::CapturePassAttachmentWithCallback, m_passHierarchy, - AZStd::string("Output"), attachmentReadbackCallback); + AZStd::string("Output"), attachmentReadbackCallback, AZ::RPI::PassAttachmentReadbackOption::Output); return startedCapture; } diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp index 4c5e2adabd..7417bed2a0 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/FancyDocking.cpp @@ -3288,15 +3288,20 @@ namespace AzQtComponents } // Untab tabbed dock widgets before restoring, as the restore only works on dock widgets parented directly to the main window - const QList dockWidgets = m_mainWindow->findChildren(); - for (QDockWidget* dockWidget : dockWidgets) + for (QDockWidget* dockWidget : m_mainWindow->findChildren( + QRegularExpression(QString("%1.*").arg(m_tabContainerIdentifierPrefix)), Qt::FindChildrenRecursively)) { - if (QStackedWidget* stackedWidget = qobject_cast(dockWidget->parentWidget())) + DockTabWidget* tabWidget = qobject_cast(dockWidget->widget()); + if (!tabWidget) { - if (AzQtComponents::DockTabWidget* tabWidget = qobject_cast(stackedWidget->parentWidget())) - { - tabWidget->removeTab(dockWidget); - } + continue; + } + + // Remove the tabs from the tab widget (we don't actually want to close them, which could delete them at this point) + int numTabs = tabWidget->count(); + for (int i = 0; i < numTabs; ++i) + { + tabWidget->removeTab(0); } } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp index 147e06475e..3bde5bea43 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/Views/AssetBrowserTreeView.cpp @@ -210,6 +210,21 @@ namespace AzToolsFramework void AssetBrowserTreeView::UpdateAfterFilter(bool hasFilter, bool selectFirstValidEntry) { + const QModelIndexList& selectedIndexes = selectionModel()->selectedRows(); + + // If we've cleared the filter but had something selected, ensure it stays selected and visible. + if (!hasFilter && !selectedIndexes.isEmpty()) + { + QModelIndex curIndex = selectedIndexes[0]; + m_expandToEntriesByDefault = true; + m_treeStateSaver->ApplySnapshot(); + + setCurrentIndex(curIndex); + scrollTo(curIndex); + + return; + } + // Flag our default expansion state so that we expand down to source entries after filtering m_expandToEntriesByDefault = hasFilter; // Then ask our state saver to apply its current snapshot again, falling back on asking us if entries should be expanded or not diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli index 8042758db8..6e45cf30c8 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/PBR/Lights/Ltc.azsli @@ -111,13 +111,9 @@ float IntegrateEdge(float3 v1, float3 v2) float IntegrateEdgeDiffuse(float3 v1, float3 v2) { float cosTheta = dot(v1, v2); - float theta_sinTheta = 0.0; - if (cosTheta > 0.0) - { - float absCosTheta = abs(cosTheta); - theta_sinTheta = 1.5708 + (-0.879406 + 0.308609 * absCosTheta) * absCosTheta; - } - else + float absCosTheta = abs(cosTheta); + float theta_sinTheta = 1.5708 + (-0.879406 + 0.308609 * absCosTheta) * absCosTheta; + if (cosTheta < 0.0) { theta_sinTheta = PI * rsqrt(1.0 - cosTheta * cosTheta) - theta_sinTheta; } diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/FrameCaptureBus.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/FrameCaptureBus.h index e783a03071..53e7de9148 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/FrameCaptureBus.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/FrameCaptureBus.h @@ -46,14 +46,16 @@ namespace AZ //! Save a buffer attachment or a image attachment binded to a pass's slot to a data file. //! @param passHierarchy For finding the pass by using PassHierarchyFilter //! @param slotName Name of the pass's slot. The attachment bound to this slot will be captured. + //! @param option Only valid for an InputOutput attachment. Use PassAttachmentReadbackOption::Input to capture the input state + //! and use PassAttachmentReadbackOption::Output to capture the output state //! @param outputFilename The output file path. virtual bool CapturePassAttachment(const AZStd::vector& passHierarchy, const AZStd::string& slotName - , const AZStd::string& outputFilePath) = 0; + , const AZStd::string& outputFilePath, RPI::PassAttachmentReadbackOption option) = 0; //! Similar to CapturePassAttachment. But instead of saving the read back result to a file, it will call the callback function provide //! in the input when callback is finished virtual bool CapturePassAttachmentWithCallback(const AZStd::vector& passHierarchy, const AZStd::string& slotName - , RPI::AttachmentReadback::CallbackFunction callback) = 0; + , RPI::AttachmentReadback::CallbackFunction callback, RPI::PassAttachmentReadbackOption option) = 0; }; using FrameCaptureRequestBus = EBus; diff --git a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp index a115bfa6e8..e8e4609ec4 100644 --- a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp @@ -343,7 +343,7 @@ namespace AZ } bool FrameCaptureSystemComponent::CapturePassAttachment(const AZStd::vector& passHierarchy, const AZStd::string& slot, - const AZStd::string& outputFilePath) + const AZStd::string& outputFilePath, RPI::PassAttachmentReadbackOption option) { InitReadback(); @@ -376,40 +376,22 @@ namespace AZ return false; } - AZ::RPI::RenderPass* renderPass = azrtti_cast(foundPasses[0]); - if (renderPass) + AZ::RPI::Pass* pass = foundPasses[0]; + if (pass->ReadbackAttachment(m_readback, Name(slot), option)) { - Name slotName = Name(slot); - AZ::RPI::PassAttachment* attachment = nullptr; - for (auto& binding : renderPass->GetAttachmentBindings()) - { - if (binding.m_name == slotName) - { - attachment = binding.m_attachment.get(); - break; - } - } - if (attachment) - { - m_state = State::Pending; - m_result = FrameCaptureResult::None; - SystemTickBus::Handler::BusConnect(); - renderPass->ReadbackAttachment(m_readback, attachment); - } - else - { - AZ_Warning("FrameCaptureSystemComponent", false, "Failed to find attachment bound to pass [%s] slot [%s]", - renderPass->GetName().GetCStr(), slotName.GetCStr()); - return false; - } + m_state = State::Pending; + m_result = FrameCaptureResult::None; + SystemTickBus::Handler::BusConnect(); + return true; } - return true; + AZ_Warning("FrameCaptureSystemComponent", false, "Failed to readback the attachment bound to pass [%s] slot [%s]", pass->GetName().GetCStr(), slot.c_str()); + return false; } bool FrameCaptureSystemComponent::CapturePassAttachmentWithCallback(const AZStd::vector& passHierarchy, const AZStd::string& slotName - , RPI::AttachmentReadback::CallbackFunction callback) + , RPI::AttachmentReadback::CallbackFunction callback, RPI::PassAttachmentReadbackOption option) { - bool result = CapturePassAttachment(passHierarchy, slotName, ""); + bool result = CapturePassAttachment(passHierarchy, slotName, "", option); // Append state change to user provided call back AZ::RPI::AttachmentReadback::CallbackFunction callbackSetState = [&, callback](const AZ::RPI::AttachmentReadback::ReadbackResult& result) diff --git a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.h b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.h index 472dd5da74..eb08494699 100644 --- a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.h +++ b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.h @@ -36,9 +36,10 @@ namespace AZ bool CaptureScreenshot(const AZStd::string& filePath) override; bool CaptureScreenshotForWindow(const AZStd::string& filePath, AzFramework::NativeWindowHandle windowHandle) override; bool CaptureScreenshotWithPreview(const AZStd::string& outputFilePath) override; - bool CapturePassAttachment(const AZStd::vector& passHierarchy, const AZStd::string& slotName, const AZStd::string& outputFilePath) override; + bool CapturePassAttachment(const AZStd::vector& passHierarchy, const AZStd::string& slotName, const AZStd::string& outputFilePath, + RPI::PassAttachmentReadbackOption option) override; bool CapturePassAttachmentWithCallback(const AZStd::vector& passHierarchy, const AZStd::string& slotName - , RPI::AttachmentReadback::CallbackFunction callback) override; + , RPI::AttachmentReadback::CallbackFunction callback, RPI::PassAttachmentReadbackOption option) override; private: void CaptureAttachmentCallback(const AZ::RPI::AttachmentReadback::ReadbackResult& readbackResult); diff --git a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp index 5faaba136e..63437ebbad 100644 --- a/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/LuxCore/LuxCoreTexturePass.cpp @@ -64,23 +64,9 @@ namespace AZ // Set up read back attachment before children prepare if (m_readback->IsReady()) { - AZ::RPI::RenderPass* renderPass = azrtti_cast(m_renderTargetPass.get()); - if (renderPass) + if (m_renderTargetPass) { - RPI::PassAttachment* attachment = nullptr; - for (auto& binding : renderPass->GetAttachmentBindings()) - { - if (binding.m_slotType == RPI::PassSlotType::Output) - { - attachment = binding.m_attachment.get(); - break; - } - } - if (attachment) - { - renderPass->ReadbackAttachment(m_readback, attachment); - m_attachmentReadbackComplete = true; - } + m_attachmentReadbackComplete = m_renderTargetPass->ReadbackAttachment(m_readback, AZ::Name("RenderTargetOutput")); } } } diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Pass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Pass.h index c6667e660a..736252a8a2 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Pass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Pass.h @@ -57,6 +57,7 @@ namespace AZ class PassTemplate; struct PassRequest; struct PassValidationResults; + class AttachmentReadback; using SortedPipelineViewTags = AZStd::set; using PassesByDrawList = AZStd::map; @@ -65,7 +66,12 @@ namespace AZ const uint32_t PassInputBindingCountMax = 16; const uint32_t PassInputOutputBindingCountMax = PassInputBindingCountMax; const uint32_t PassOutputBindingCountMax = PassInputBindingCountMax; - + + enum class PassAttachmentReadbackOption : uint8_t + { + Input = 0, + Output + }; //! Atom's base pass class (every pass class in Atom must derive from this class). //! @@ -222,6 +228,14 @@ namespace AZ //! Enables/Disables PipelineStatistics queries for this pass virtual void SetPipelineStatisticsQueryEnabled(bool enable); + //! Readback an attachment attached to the specified slot name + //! @param readback The AttachmentReadback object which is used for readback. Its callback function will be called when readback is finished. + //! @param slotName The attachment bind to the slot with this slotName is to be readback + //! @param option The option is used for choosing input or output state when readback an InputOutput attachment. + //! It's ignored if the attachment isn't an InputOutput attachment. + //! Return true if the readback request was successful. User may expect the AttachmentReadback's callback function would be called. + bool ReadbackAttachment(AZStd::shared_ptr readback, const Name& slotName, PassAttachmentReadbackOption option = PassAttachmentReadbackOption::Output); + //! Returns whether the Timestamp queries is enabled/disabled for this pass bool IsTimestampQueryEnabled() const; @@ -266,7 +280,6 @@ namespace AZ // Update output bindings on this pass that are connected to bindings on other passes void UpdateConnectedOutputBindings(); - protected: explicit Pass(const PassDescriptor& descriptor); @@ -349,6 +362,7 @@ namespace AZ void FrameEnd(); virtual void FrameEndInternal() { } + void UpdateReadbackAttachment(FramePrepareParams params, bool beforeAddScopes); // --- Protected Members --- @@ -442,7 +456,10 @@ namespace AZ // Sort type to be used by the default sort implementation. Passes can also provide // fully custom sort implementations by overriding the SortDrawList() function. RHI::DrawListSortType m_drawListSortType = RHI::DrawListSortType::KeyThenDepth; - + + // For read back attachment + AZStd::shared_ptr m_attachmentReadback; + PassAttachmentReadbackOption m_readbackOption; private: // Return the Timestamp result of this pass diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h index b13091082b..3d4ab0a573 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/RenderPass.h @@ -55,10 +55,7 @@ namespace AZ //! Get MultisampleState of this pass from its output attachments RHI::MultisampleState GetMultisampleState() const; - - //! Capture pass's output and input/output attachments in following frames - void ReadbackAttachment(AZStd::shared_ptr readback, const PassAttachment* attachment); - + //! Returns a pointer to the Pass ShaderResourceGroup Data::Instance GetShaderResourceGroup(); @@ -145,9 +142,6 @@ namespace AZ // Readback the results from the ScopeQueries void ReadbackScopeQueryResults(); - // For read back attachments - AZStd::shared_ptr m_attachmentReadback; - AZStd::weak_ptr m_attachmentCopy; // Readback results from the Timestamp queries diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.h index f855154975..fac9abfe28 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.h @@ -166,9 +166,6 @@ namespace AZ AZ::Vector2 m_position = AZ::Vector2(0, 0.6f); AZ::Vector2 m_size = AZ::Vector2(0.4f, 0.4f); bool m_keepAspectRatio = true; - - // For readback the output image attachment - AZStd::shared_ptr m_readback; }; } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/RenderToTexturePass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/RenderToTexturePass.h index 0a689f2f74..f96fe92610 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/RenderToTexturePass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/RenderToTexturePass.h @@ -60,9 +60,6 @@ namespace AZ // Name of the template used to create the child pass. Needed for Recreate() Name m_childTemplateName; - // For read back output - AZStd::shared_ptr m_readback; - Ptr m_outputAttachment; // saved settings for this pass diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SelectorPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SelectorPass.h index 6b9559e824..9d1376c840 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SelectorPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SelectorPass.h @@ -15,7 +15,6 @@ #include #include -#include #include #include diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SwapChainPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SwapChainPass.h index e7869d463c..e8aeddf7e7 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SwapChainPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/SwapChainPass.h @@ -15,7 +15,6 @@ #include #include -#include #include #include @@ -88,9 +87,6 @@ namespace AZ // Name of the template used to create the child pass. Needed for Recreate() Name m_childTemplateName; - - // For read back swap chain - AZStd::shared_ptr m_swapChainReadback; }; } // namespace RPI diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp index 9d3a776b80..dfe470c3f8 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Pass.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -36,8 +37,7 @@ namespace AZ { namespace RPI - { - + { // --- Constructors --- Pass::Pass(const PassDescriptor& descriptor) @@ -1285,9 +1285,15 @@ namespace AZ CreateTransientAttachments(params.m_frameGraphBuilder->GetAttachmentDatabase()); ImportAttachments(params.m_frameGraphBuilder->GetAttachmentDatabase()); + // readback attachment with input state + UpdateReadbackAttachment(params, true); + // FrameBeginInternal needs to be the last function be called in FrameBegin because its implementation expects // all the attachments are imported to database (for example, ImageAttachmentPreview) FrameBeginInternal(params); + + // readback attachment with output state + UpdateReadbackAttachment(params, false); UpdateConnectedOutputBindings(); } @@ -1426,6 +1432,57 @@ namespace AZ m_flags.m_pipelineStatisticsQueryEnabled = enable; } + bool Pass::ReadbackAttachment(AZStd::shared_ptr readback, const Name& slotName, PassAttachmentReadbackOption option) + { + // Return false if it's already readback + if (m_attachmentReadback) + { + AZ_Warning("Pass", false, "ReadbackAttachment: skip readback pass [%s] slot [%s]because there is an another active readback", m_name.GetCStr(), slotName.GetCStr()); + return false; + } + uint32_t bindingIndex = 0; + for (auto& binding : m_attachmentBindings) + { + if (slotName == binding.m_name) + { + RHI::AttachmentType type = binding.m_attachment->GetAttachmentType(); + if (type == RHI::AttachmentType::Buffer || type == RHI::AttachmentType::Image) + { + RHI::AttachmentId attachmentId = binding.m_attachment->GetAttachmentId(); + + // Append slot index and pass name so the read back's name won't be same as the attachment used in other passes. + AZStd::string readbackName = AZStd::string::format("%s_%d_%s", attachmentId.GetCStr(), + bindingIndex, GetName().GetCStr()); + if (readback->ReadPassAttachment(binding.m_attachment.get(), AZ::Name(readbackName))) + { + m_readbackOption = PassAttachmentReadbackOption::Output; + // The m_readbackOption is only meaningful if the attachment is used for InputOutput. + if (binding.m_slotType == PassSlotType::InputOutput) + { + m_readbackOption = option; + } + m_attachmentReadback = readback; + return true; + } + return false; + } + } + bindingIndex++; + } + AZ_Warning("Pass", false, "ReadbackAttachment: failed to find slot [%s] from pass [%s]", slotName.GetCStr(), m_name.GetCStr()); + return false; + } + + void Pass::UpdateReadbackAttachment(FramePrepareParams params, bool beforeAddScopes) + { + if (beforeAddScopes == (m_readbackOption == PassAttachmentReadbackOption::Input) && m_attachmentReadback) + { + // Read the attachment for one frame. The reference can be released afterwards + m_attachmentReadback->FrameBegin(params); + m_attachmentReadback = nullptr; + } + } + bool Pass::IsTimestampQueryEnabled() const { return m_flags.m_timestampQueryEnabled; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp index f386c93f63..a3e7e2a9e2 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/RenderPass.cpp @@ -188,14 +188,8 @@ namespace AZ { SetScopeId(RHI::ScopeId(GetPathName())); } - params.m_frameGraphBuilder->ImportScopeProducer(*this); - // Read the attachment for one frame. The reference can be released afterwards - if (m_attachmentReadback) - { - m_attachmentReadback->FrameBegin(params); - m_attachmentReadback = nullptr; - } + params.m_frameGraphBuilder->ImportScopeProducer(*this); // Read back the ScopeQueries submitted from previous frames ReadbackScopeQueryResults(); @@ -414,31 +408,6 @@ namespace AZ m_flags.m_hasPipelineViewTag = !viewTag.IsEmpty(); } - void RenderPass::ReadbackAttachment(AZStd::shared_ptr readback, const PassAttachment* attachment) - { - m_attachmentReadback = readback; - - uint32_t bindingIndex = 0; - for (auto& binding : m_attachmentBindings) - { - if (attachment == binding.m_attachment) - { - RHI::AttachmentType type = binding.m_attachment->GetAttachmentType(); - if (type == RHI::AttachmentType::Buffer || type == RHI::AttachmentType::Image) - { - RHI::AttachmentId attachmentId = binding.m_attachment->GetAttachmentId(); - - // Append slot index and pass name so the read back's name won't be same as the attachment used in other passes. - AZStd::string readbackName = AZStd::string::format("%s_%d_%s", attachmentId.GetCStr(), - bindingIndex, GetName().GetCStr()); - m_attachmentReadback->ReadPassAttachment(binding.m_attachment.get(), AZ::Name(readbackName)); - return; - } - } - bindingIndex++; - } - } - TimestampResult RenderPass::GetTimestampResultInternal() const { return m_timestampResult; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp index abca45493a..66c994e113 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/ImageAttachmentPreviewPass.cpp @@ -334,22 +334,16 @@ namespace AZ m_passSrg->Compile(); m_passSrgChanged = false; } - - // Read preview output - if (m_readback) - { - m_readback->FrameBegin(params); - m_readback = nullptr; - } } bool ImageAttachmentPreviewPass::ReadbackOutput(AZStd::shared_ptr readback) { if (m_outputColorAttachment) { - m_readback = readback; + m_readbackOption = PassAttachmentReadbackOption::Output; + m_attachmentReadback = readback; AZStd::string readbackName = AZStd::string::format("%s_%s", m_outputColorAttachment->GetAttachmentId().GetCStr(), GetName().GetCStr()); - return m_readback->ReadPassAttachment(m_outputColorAttachment.get(), AZ::Name(readbackName)); + return m_attachmentReadback->ReadPassAttachment(m_outputColorAttachment.get(), AZ::Name(readbackName)); } return false; } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/RenderToTexturePass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/RenderToTexturePass.cpp index 8b4c9b8aab..c532a1324f 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/RenderToTexturePass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/RenderToTexturePass.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -77,17 +78,6 @@ namespace AZ params.m_viewportState = m_viewport; Base::FrameBeginInternal(params); - - // for read back output - if (m_readback) - { - m_readback->FrameBegin(params); - if (m_readback->IsFinished()) - { - // Done reading. Remove the reference - m_readback = nullptr; - } - } } void RenderToTexturePass::ResizeOutput(uint32_t width, uint32_t height) @@ -118,9 +108,10 @@ namespace AZ { if (m_outputAttachment) { - m_readback = readback; + m_readbackOption = PassAttachmentReadbackOption::Output; + m_attachmentReadback = readback; AZStd::string readbackName = AZStd::string::format("%s_%s", m_outputAttachment->GetAttachmentId().GetCStr(), GetName().GetCStr()); - m_readback->ReadPassAttachment(m_outputAttachment.get(), AZ::Name(readbackName)); + m_attachmentReadback->ReadPassAttachment(m_outputAttachment.get(), AZ::Name(readbackName)); } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/SwapChainPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/SwapChainPass.cpp index 7a3bf3a011..62649cd0b2 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/SwapChainPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/SwapChainPass.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -134,13 +135,6 @@ namespace AZ attachmentDatabase.ImportSwapChain(m_windowContext->GetSwapChainAttachmentId(), m_windowContext->GetSwapChain()); ParentPass::FrameBeginInternal(params); - - // Read swap chain for one frame. The reference can be released afterwards - if (m_swapChainReadback) - { - m_swapChainReadback->FrameBegin(params); - m_swapChainReadback = nullptr; - } } void SwapChainPass::OnWindowResized([[maybe_unused]] uint32_t width, [[maybe_unused]] uint32_t height) @@ -152,9 +146,11 @@ namespace AZ { if (m_swapChainAttachment) { - m_swapChainReadback = readback; + m_readbackOption = PassAttachmentReadbackOption::Output; + m_attachmentReadback = readback; + AZStd::string readbackName = AZStd::string::format("%s_%s", m_swapChainAttachment->GetAttachmentId().GetCStr(), GetName().GetCStr()); - m_swapChainReadback->ReadPassAttachment(m_swapChainAttachment.get(), AZ::Name(readbackName)); + m_attachmentReadback->ReadPassAttachment(m_swapChainAttachment.get(), AZ::Name(readbackName)); } } diff --git a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.h b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.h index e735852926..d907e7e7eb 100644 --- a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.h +++ b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.h @@ -32,11 +32,14 @@ namespace AZ void ReadbackCallback(const AZ::RPI::AttachmentReadback::ReadbackResult& readbackResult); + void DrawPassAttachments(AZ::RPI::Pass* pass); + bool m_previewAttachment = false; bool m_showAttachments = false; AZ::RPI::Pass* m_selectedPass = nullptr; AZ::RHI::AttachmentId m_attachmentId; + AZ::Name m_slotName; bool m_selectedChanged = false; AZStd::shared_ptr m_readback; diff --git a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl index cd53131933..d31674754e 100644 --- a/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl +++ b/Gems/Atom/Utils/Code/Include/Atom/Utils/ImGuiPassTree.inl @@ -76,6 +76,7 @@ namespace AZ::Render { m_selectedChanged = true; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; } } @@ -88,13 +89,12 @@ namespace AZ::Render m_readback->SetCallback(AZStd::bind(&ImGuiPassTree::ReadbackCallback, this, AZStd::placeholders::_1)); } - if (m_selectedPass && !m_attachmentId.IsEmpty()) + if (m_selectedPass && !m_slotName.IsEmpty()) { - AZ::RPI::RenderPass* renderPass = azrtti_cast(m_selectedPass); - if (renderPass) + bool readbackResult = m_selectedPass->ReadbackAttachment(m_readback, m_slotName); + if (!readbackResult) { - AZ::RPI::PassAttachment* attachment = FindPassAttachment(renderPass, m_attachmentId); - renderPass->ReadbackAttachment(m_readback, attachment); + AZ_Error("ImGuiPassTree", false, "Failed to readback attachment from pass [%s] slot [%s]", m_selectedPass->GetName().GetCStr(), m_slotName.GetCStr()); } } } @@ -144,6 +144,77 @@ namespace AZ::Render } ImGui::End(); } + + inline void ImGuiPassTree::DrawPassAttachments(AZ::RPI::Pass* pass) + { + for (const auto& binding : pass->GetAttachmentBindings()) + { + // Binding info: [slot type] [slot name] + AZStd::string label = AZStd::string::format("[%s] [%s]", AZ::RPI::ToString(binding.m_slotType), + binding.m_name.GetCStr()); + + // Append attachment info if the attachment exists + if (binding.m_attachment) + { + AZ::RHI::AttachmentType type = binding.m_attachment->GetAttachmentType(); + + // Append attachment info: [attachment type] attachment name + label += AZStd::string::format(" [%s] %s", + AZ::RHI::ToString(type), + binding.m_attachment->m_name.GetCStr()); + + if (type == AZ::RHI::AttachmentType::Image) + { + // Append image info: [format] [size] [msaa] + AZ::RHI::ImageDescriptor descriptor; + if (binding.m_attachment->m_importedResource) + { + AZ::RPI::Image* image = static_cast(binding.m_attachment->m_importedResource.get()); + descriptor = image->GetRHIImage()->GetDescriptor(); + } + else + { + descriptor = binding.m_attachment->m_descriptor.m_image; + } + auto format = descriptor.m_format; + auto size = descriptor.m_size; + label += AZStd::string::format(" [%s] [%dx%d]", AZ::RHI::ToString(format), size.m_width, size.m_height); + + if (descriptor.m_multisampleState.m_samples > 1) + { + if (descriptor.m_multisampleState.m_customPositionsCount > 0) + { + label += AZStd::string::format(" [MSAA_Custom_%dx]", descriptor.m_multisampleState.m_samples); + } + else + { + label += AZStd::string::format(" [MSAA_%dx]", descriptor.m_multisampleState.m_samples); + } + } + } + else if (type == AZ::RHI::AttachmentType::Buffer) + { + // Append buffer info: [size] + auto size = binding.m_attachment->m_descriptor.m_buffer.m_byteCount; + label += AZStd::string::format(" [%llu]", size); + } + + if (Scriptable_ImGui::Selectable(label.c_str(), m_attachmentId == binding.m_attachment->GetAttachmentId())) + { + m_selectedPass = pass; + m_attachmentId = binding.m_attachment->GetAttachmentId(); + m_slotName = binding.m_name; + m_selectedChanged = true; + } + } + else + { + // Only draw text (not selectable) if there is no attachment binded to the slot. + ImGui::Text(label.c_str()); + } + } + + } inline void ImGuiPassTree::DrawTreeView(AZ::RPI::Pass* pass) { @@ -164,6 +235,7 @@ namespace AZ::Render { m_selectedPass = pass; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; m_selectedChanged = true; } } @@ -179,76 +251,13 @@ namespace AZ::Render { m_selectedPass = pass; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; m_selectedChanged = true; } if (nodeOpen) { - for (const auto& binding : pass->GetAttachmentBindings()) - { - // Binding info: [slot type] [slot name] - AZStd::string label = AZStd::string::format("[%s] [%s]", AZ::RPI::ToString(binding.m_slotType), - binding.m_name.GetCStr()); - - // Append attachment info if the attachment exists - if (binding.m_attachment) - { - AZ::RHI::AttachmentType type = binding.m_attachment->GetAttachmentType(); - - // Append attachment info: [attachment type] attachment name - label += AZStd::string::format(" [%s] %s", - AZ::RHI::ToString(type), - binding.m_attachment->m_name.GetCStr()); - - if (type == AZ::RHI::AttachmentType::Image) - { - // Append image info: [format] [size] [msaa] - AZ::RHI::ImageDescriptor descriptor; - if (binding.m_attachment->m_importedResource) - { - AZ::RPI::Image* image = static_cast(binding.m_attachment->m_importedResource.get()); - descriptor = image->GetRHIImage()->GetDescriptor(); - } - else - { - descriptor = binding.m_attachment->m_descriptor.m_image; - } - auto format = descriptor.m_format; - auto size = descriptor.m_size; - label += AZStd::string::format(" [%s] [%dx%d]", AZ::RHI::ToString(format), size.m_width, size.m_height); - - if (descriptor.m_multisampleState.m_samples > 1) - { - if (descriptor.m_multisampleState.m_customPositionsCount > 0) - { - label += AZStd::string::format(" [MSAA_Custom_%dx]", descriptor.m_multisampleState.m_samples); - } - else - { - label += AZStd::string::format(" [MSAA_%dx]", descriptor.m_multisampleState.m_samples); - } - } - } - else if (type == AZ::RHI::AttachmentType::Buffer) - { - // Append buffer info: [size] - auto size = binding.m_attachment->m_descriptor.m_buffer.m_byteCount; - label += AZStd::string::format(" [%llu]", size); - } - - if (Scriptable_ImGui::Selectable(label.c_str(), m_attachmentId == binding.m_attachment->GetAttachmentId())) - { - m_selectedPass = pass; - m_attachmentId = binding.m_attachment->GetAttachmentId(); - m_selectedChanged = true; - } - } - else - { - // Only draw text (not selectable) if there is no attachment binded to the slot. - ImGui::Text(label.c_str()); - } - } + DrawPassAttachments(pass); Scriptable_ImGui::TreePop(); } @@ -266,11 +275,13 @@ namespace AZ::Render { m_selectedPass = pass; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; m_selectedChanged = true; } if (nodeOpen) { + DrawPassAttachments(pass); for (const auto& child : asParent->GetChildren()) { DrawTreeView(child.get()); @@ -354,6 +365,7 @@ namespace AZ::Render m_selectedPass = nullptr; m_attachmentId = AZ::RHI::AttachmentId{}; + m_slotName = AZ::Name{}; m_selectedChanged = false; m_readback = nullptr; m_previewPass = nullptr; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp index 5dabd7317b..81e87f3cb5 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp @@ -263,7 +263,23 @@ namespace AZ // Update the cached light type. m_lightType = m_controller.m_configuration.m_lightType; + + // Check to see if the current photometric type is supported by the light type. If not, convert to lumens before deactivating. + auto supportedPhotometricUnits = m_controller.m_configuration.GetValidPhotometricUnits(); + auto foundIt = AZStd::find_if( + supportedPhotometricUnits.begin(), + supportedPhotometricUnits.end(), + [&](const Edit::EnumConstant& entry) -> bool + { + return AZStd::RemoveEnum::type(m_controller.m_configuration.m_intensityMode) == entry.m_value; + } + ); + if (foundIt == supportedPhotometricUnits.end()) + { + m_controller.ConvertToIntensityMode(PhotometricUnit::Lumen); + } + // componets may be removed or added here, so deactivate now and reactivate the entity when everything is done shifting around. GetEntity()->Deactivate(); @@ -320,7 +336,7 @@ namespace AZ // Some light types don't require a shape, this is ok. break; } - + GetEntity()->Activate(); // Set more reasonable default values for certain shapes. @@ -333,7 +349,7 @@ namespace AZ LmbrCentral::DiskShapeComponentRequestBus::Event(GetEntityId(), &LmbrCentral::DiskShapeComponentRequests::SetRadius, 0.05f); break; } - + return true; } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Thumbnails/Rendering/ThumbnailRendererSteps/CaptureStep.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Thumbnails/Rendering/ThumbnailRendererSteps/CaptureStep.cpp index 46d9b59edb..3881a8c8f8 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Thumbnails/Rendering/ThumbnailRendererSteps/CaptureStep.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Thumbnails/Rendering/ThumbnailRendererSteps/CaptureStep.cpp @@ -114,7 +114,7 @@ namespace AZ Render::FrameCaptureRequestBus::BroadcastResult( startedCapture, &Render::FrameCaptureRequestBus::Events::CapturePassAttachmentWithCallback, - m_context->GetData()->m_passHierarchy, AZStd::string("Output"), readbackCallback); + m_context->GetData()->m_passHierarchy, AZStd::string("Output"), readbackCallback, RPI::PassAttachmentReadbackOption::Output); // Reset the capture flag if the capture request was successful. Otherwise try capture it again next tick. if (startedCapture) { diff --git a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp index 843f30fced..c9fcbe33ca 100644 --- a/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp +++ b/Gems/AtomLyIntegration/ImguiAtom/Code/Source/ImguiAtomSystemComponent.cpp @@ -115,7 +115,7 @@ namespace AZ #endif //define(IMGUI_ENABLED) } - void ImguiAtomSystemComponent::OnViewportDpiScalingChanged(float dpiScale) + void ImguiAtomSystemComponent::OnViewportDpiScalingChanged([[maybe_unused]] float dpiScale) { #if defined(IMGUI_ENABLED) ImGui::ImGuiManagerBus::Broadcast(&ImGui::ImGuiManagerBus::Events::SetDpiScalingFactor, dpiScale); diff --git a/Gems/NvCloth/Code/Platform/Android/PAL_android.cmake b/Gems/NvCloth/Code/Platform/Android/PAL_android.cmake index 77e8a42871..ffaa3f828f 100644 --- a/Gems/NvCloth/Code/Platform/Android/PAL_android.cmake +++ b/Gems/NvCloth/Code/Platform/Android/PAL_android.cmake @@ -5,6 +5,6 @@ # # -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-android TARGETS NvCloth PACKAGE_HASH 01eb0bc7fae91bb088a7d4c0f9555743a2c442f7b823a89072eacad361a20b42) set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) diff --git a/Gems/NvCloth/Code/Platform/Linux/PAL_linux.cmake b/Gems/NvCloth/Code/Platform/Linux/PAL_linux.cmake index 77e8a42871..eaf3d92b1c 100644 --- a/Gems/NvCloth/Code/Platform/Linux/PAL_linux.cmake +++ b/Gems/NvCloth/Code/Platform/Linux/PAL_linux.cmake @@ -5,6 +5,6 @@ # # -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-linux TARGETS NvCloth PACKAGE_HASH c2e469c909fb358105ffe854476e87d9c69626aa16bd0ca0bcd941522adadc6d) set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) diff --git a/Gems/NvCloth/Code/Platform/Mac/PAL_mac.cmake b/Gems/NvCloth/Code/Platform/Mac/PAL_mac.cmake index 77e8a42871..1e856fa1c2 100644 --- a/Gems/NvCloth/Code/Platform/Mac/PAL_mac.cmake +++ b/Gems/NvCloth/Code/Platform/Mac/PAL_mac.cmake @@ -5,6 +5,6 @@ # # -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-mac TARGETS NvCloth PACKAGE_HASH 9156548da6fc35f89b592306cc512257042159e3c9c2ce5f483d8d0701b63716) set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) diff --git a/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake b/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake index afedeb2df8..1e8ba72eb8 100644 --- a/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake +++ b/Gems/NvCloth/Code/Platform/Windows/PAL_windows.cmake @@ -7,4 +7,4 @@ set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-windows TARGETS NvCloth PACKAGE_HASH 8f7b3d151db93fcd511afcbcb3a34884eec47fb511c90c8f2c770ac602150010) diff --git a/Gems/NvCloth/Code/Platform/iOS/PAL_ios.cmake b/Gems/NvCloth/Code/Platform/iOS/PAL_ios.cmake index 77e8a42871..fa099bfd3e 100644 --- a/Gems/NvCloth/Code/Platform/iOS/PAL_ios.cmake +++ b/Gems/NvCloth/Code/Platform/iOS/PAL_ios.cmake @@ -5,6 +5,6 @@ # # -ly_associate_package(PACKAGE_NAME NvCloth-1.1.6-rev2-multiplatform TARGETS NvCloth PACKAGE_HASH 535d927782fa5d3086c5f813c46392ee3c294fc117dcd87b055d469c3f034356) +ly_associate_package(PACKAGE_NAME NvCloth-v1.1.6-4-gd243404-pr58-rev1-ios TARGETS NvCloth PACKAGE_HASH 62e17ed51da9a3452b7397a4e1f64aca79e8f4c70181a75aeb6ca596c6692971) set(PAL_TRAIT_NVCLOTH_USE_STUB FALSE) diff --git a/Gems/PhysX/Code/CMakeLists.txt b/Gems/PhysX/Code/CMakeLists.txt index 21f9172055..9b867a7652 100644 --- a/Gems/PhysX/Code/CMakeLists.txt +++ b/Gems/PhysX/Code/CMakeLists.txt @@ -74,9 +74,6 @@ ly_create_alias(NAME PhysX.Servers NAMESPACE Gem TARGETS Gem::PhysX) if(PAL_TRAIT_BUILD_HOST_TOOLS) - ly_associate_package(PACKAGE_NAME poly2tri-0.3.3-rev2-multiplatform TARGETS poly2tri PACKAGE_HASH 04092d06716f59b936b61906eaf3647db23b685d81d8b66131eb53e0aeaa1a38) - ly_associate_package(PACKAGE_NAME v-hacd-2.0-rev1-multiplatform TARGETS v-hacd PACKAGE_HASH 5c71aef19cc9787d018d64eec076e9f51ea5a3e0dc6b6e22e57c898f6cc4afe3) - ly_add_target( NAME PhysX.Editor.Static STATIC NAMESPACE Gem diff --git a/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake b/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake index 9033ea99c2..492d0957c7 100644 --- a/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake +++ b/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake @@ -6,3 +6,8 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) + +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_associate_package(PACKAGE_NAME poly2tri-7f0487a-rev1-linux TARGETS poly2tri PACKAGE_HASH b16eef8f0bc469de0e3056d28d7484cf42659667e39b68b239f0d3a4cbb533d0) + ly_associate_package(PACKAGE_NAME v-hacd-2.3-1a49edf-rev1-linux TARGETS v-hacd PACKAGE_HASH 777bed3c7805a63446ddfea51c505b35398744f9245fa7ddc58e6a25d034e682) +endif() diff --git a/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake b/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake index 9033ea99c2..88c3808ed9 100644 --- a/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake +++ b/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake @@ -6,3 +6,8 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) + +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_associate_package(PACKAGE_NAME poly2tri-7f0487a-rev1-mac TARGETS poly2tri PACKAGE_HASH 23e49e6b06d79327985d17b40bff20ab202519c283a842378f5f1791c1bf8dbc) + ly_associate_package(PACKAGE_NAME v-hacd-2.3-1a49edf-rev1-mac TARGETS v-hacd PACKAGE_HASH c1de9fadb2c0db42416a1bd5fe3423401c6f41b58409bc652064b5ad23667c09) +endif() diff --git a/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake b/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake index 9033ea99c2..cc671f7014 100644 --- a/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake +++ b/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake @@ -6,3 +6,8 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) + +if(PAL_TRAIT_BUILD_HOST_TOOLS) + ly_associate_package(PACKAGE_NAME poly2tri-7f0487a-rev1-windows TARGETS poly2tri PACKAGE_HASH 5fea2bf294e5130e0654fbfa39f192e6369f3853901dde90bb9b3f3a11edcb1e) + ly_associate_package(PACKAGE_NAME v-hacd-2.3-1a49edf-rev1-windows TARGETS v-hacd PACKAGE_HASH c5826ec28aedc3b5931ddf655d055395872cd3e75cd829f5745a2e607deb7468) +endif()