Browse Source

Fixes

Signed-off-by: Martin Sattlecker <[email protected]>
Martin Sattlecker 1 năm trước cách đây
mục cha
commit
1a4e085b24

+ 8 - 1
Gem/Code/Source/MultiGPURPIExampleComponent.cpp

@@ -104,7 +104,14 @@ namespace AtomSampleViewer
 
         m_imguiScope = {}; // restores previous ImGui context.
 
-        m_scene->RemoveRenderPipeline(m_pipeline->GetId());
+        if (m_currentlyUsingCopyPipline)
+        {
+            m_scene->RemoveRenderPipeline(m_copyPipeline->GetId());
+        }
+        else
+        {
+            m_scene->RemoveRenderPipeline(m_pipeline->GetId());
+        }
         m_scene->AddRenderPipeline(m_originalPipeline);
 
         m_pipeline = nullptr;

+ 1 - 1
Gem/Code/Source/RHI/MultiGPUExampleComponent.cpp

@@ -671,7 +671,7 @@ namespace AtomSampleViewer
             {
                 RHI::BufferScopeAttachmentDescriptor descriptor{};
                 descriptor.m_attachmentId = m_bufferAttachmentIds[1];
-                descriptor.m_bufferViewDescriptor = RHI::BufferViewDescriptor::CreateRaw(0, m_stagingBufferToCPU->GetDescriptor().m_byteCount);
+                descriptor.m_bufferViewDescriptor = RHI::BufferViewDescriptor::CreateRaw(0, static_cast<uint32_t>(m_stagingBufferToCPU->GetDescriptor().m_byteCount));
                 descriptor.m_loadStoreAction.m_loadAction = RHI::AttachmentLoadAction::DontCare;
                 descriptor.m_loadStoreAction.m_storeAction = RHI::AttachmentStoreAction::Store;
                 frameGraph.UseCopyAttachment(descriptor, RHI::ScopeAttachmentAccess::Write);