Skip to content

Commit a8fe4ae

Browse files
committed
Fix Apple build and logger crash
1 parent 8b8e380 commit a8fe4ae

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

Modules/Graphics/RHI/Base/Sources/Methane/Graphics/Base/RenderCommandList.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ void RenderCommandList::SetViewState(Rhi::IViewState& view_state)
138138
return;
139139
}
140140

141-
META_LOG("{} Command list '{}' SET VIEW STATE:\n{}", magic_enum::enum_name(GetType()), GetName(), static_cast<std::string>(drawing_state.view_state_ptr->GetSettings()));
141+
META_LOG("{} Command list '{}' SET VIEW STATE:\n{}",
142+
magic_enum::enum_name(GetType()), GetName(),
143+
drawing_state.view_state_ptr ? static_cast<std::string>(drawing_state.view_state_ptr->GetSettings()) : std::string());
142144
drawing_state.view_state_ptr = static_cast<ViewState*>(&view_state);
143145
drawing_state.view_state_ptr->Apply(*this);
144146
drawing_state.changes |= DrawingState::Change::ViewState;

Modules/Graphics/RHI/Metal/Include/Methane/Graphics/Metal/CommandQueue.hh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private:
6262
void Reset();
6363

6464
id<MTLCommandQueue> m_mtl_command_queue = nil;
65-
Ptr<TimestampQueryPool> m_timestamp_query_pool_ptr = std::make_shared<TimestampQueryPool>(*this, 1000U);
65+
Ptr<Rhi::ITimestampQueryPool> m_timestamp_query_pool_ptr = std::make_shared<TimestampQueryPool>(*this, 1000U);
6666
};
6767

6868
} // namespace Methane::Graphics::Metal

Modules/Graphics/RHI/Null/Include/Methane/Graphics/Null/CommandQueue.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CommandQueue final
4949
const Ptr<Rhi::ITimestampQueryPool>& GetTimestampQueryPoolPtr() override { return m_timestamp_query_pool_ptr; }
5050

5151
private:
52-
Ptr<TimestampQueryPool> m_timestamp_query_pool_ptr = std::make_shared<TimestampQueryPool>(*this, 1000U);
52+
const Ptr<Rhi::ITimestampQueryPool> m_timestamp_query_pool_ptr = std::make_shared<TimestampQueryPool>(*this, 1000U);
5353
};
5454

5555
} // namespace Methane::Graphics::Null

0 commit comments

Comments
 (0)