mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-06-18 10:46:37 +02:00
update tracy to v0.9 and adopt
This commit is contained in:
@ -69,11 +69,11 @@ void Engine::cleanup(void) {
|
||||
}
|
||||
|
||||
void Engine::update(void) {
|
||||
FrameMarkStart("update")
|
||||
FrameMarkStart("update");
|
||||
|
||||
_update_strategy->doUpdate(*this);
|
||||
|
||||
FrameMarkEnd("update")
|
||||
FrameMarkEnd("update");
|
||||
}
|
||||
|
||||
#ifdef __EMSCRIPTEN__
|
||||
|
@ -72,7 +72,7 @@ bool Sequential::disableService(const entt::id_type service_id) {
|
||||
}
|
||||
|
||||
void Sequential::doUpdate(MM::Engine& engine) {
|
||||
ZoneScopedN("MM::UpdateStrategies::Sequential::doUpdate")
|
||||
ZoneScopedN("MM::UpdateStrategies::Sequential::doUpdate");
|
||||
// TODO: caching
|
||||
std::set<update_key_t> pre_tasks;
|
||||
std::set<update_key_t> main_tasks;
|
||||
@ -93,22 +93,22 @@ void Sequential::doUpdate(MM::Engine& engine) {
|
||||
}
|
||||
|
||||
{ // pre
|
||||
ZoneScopedN("MM::UpdateStrategies::Sequential::doUpdate::pre")
|
||||
ZoneScopedN("MM::UpdateStrategies::Sequential::doUpdate::pre");
|
||||
doGraphSequential(engine, pre_tasks);
|
||||
}
|
||||
|
||||
{ // main
|
||||
ZoneScopedN("MM::UpdateStrategies::Sequential::doUpdate::main")
|
||||
ZoneScopedN("MM::UpdateStrategies::Sequential::doUpdate::main");
|
||||
doGraphSequential(engine, main_tasks);
|
||||
}
|
||||
|
||||
{ // post
|
||||
ZoneScopedN("MM::UpdateStrategies::Sequential::doUpdate::post")
|
||||
ZoneScopedN("MM::UpdateStrategies::Sequential::doUpdate::post");
|
||||
doGraphSequential(engine, post_tasks);
|
||||
}
|
||||
|
||||
{ // simulate async
|
||||
ZoneScopedN("MM::UpdateStrategies::Sequential::doUpdate::async")
|
||||
ZoneScopedN("MM::UpdateStrategies::Sequential::doUpdate::async");
|
||||
for (size_t i = 0; !_async_queue.empty() && i < _max_async_per_tick; i++) {
|
||||
_async_queue.back()(engine);
|
||||
_async_queue.pop_back();
|
||||
@ -116,7 +116,7 @@ void Sequential::doUpdate(MM::Engine& engine) {
|
||||
}
|
||||
|
||||
{
|
||||
ZoneScopedN("MM::UpdateStrategies::Sequential::doUpdate::deferred")
|
||||
ZoneScopedN("MM::UpdateStrategies::Sequential::doUpdate::deferred");
|
||||
if (!_deferred_queue.empty()) {
|
||||
for (auto&& fn : _deferred_queue) {
|
||||
fn(engine);
|
||||
|
@ -35,7 +35,7 @@ class tracy_sink : public ::spdlog::sinks::base_sink <Mutex> {
|
||||
spdlog::memory_buf_t formatted;
|
||||
base_sink<Mutex>::formatter_->format(msg, formatted);
|
||||
auto string = fmt::to_string(formatted);
|
||||
TracyMessageC(string.data(), string.size(), level_to_color(msg.level))
|
||||
TracyMessageC(string.data(), string.size(), level_to_color(msg.level));
|
||||
}
|
||||
|
||||
void flush_() override {
|
||||
|
@ -92,7 +92,7 @@ glm::vec3 Camera3D::getViewDir(void) const {
|
||||
}
|
||||
|
||||
std::array<glm::vec4, 6> Camera3D::getFrustumPlanes(void) const {
|
||||
ZoneScopedN("Camera3D::getFrustumPlanes")
|
||||
ZoneScopedN("Camera3D::getFrustumPlanes");
|
||||
|
||||
std::array<glm::vec4, 6> planes;
|
||||
|
||||
|
Reference in New Issue
Block a user