mirror of
https://git.citron-emu.org/Citron/Citron.git
synced 2025-03-14 23:44:48 +00:00
Update fmt library to version 11.0.2 and make necessary adjustments: - Replace fmt/format.h includes with fmt/ranges.h - Add const qualifiers to formatter::format functions - Update CMake to require fmt version 11 Additional dependency updates: - Update SDL2 bundled version from 2.28.2 to 2.32.0 - Update catch2 to version 3.8.0 - Update vcpkg baseline to c82f74667287d3dc386bce81e44964370c91a289
31 lines
858 B
C++
31 lines
858 B
C++
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#include <map>
|
|
#include <string>
|
|
|
|
#include <fmt/ranges.h>
|
|
|
|
#include "shader_recompiler/frontend/ir/basic_block.h"
|
|
#include "shader_recompiler/frontend/ir/program.h"
|
|
#include "shader_recompiler/frontend/ir/value.h"
|
|
|
|
namespace Shader::IR {
|
|
|
|
std::string DumpProgram(const Program& program) {
|
|
size_t index{0};
|
|
std::map<const IR::Inst*, size_t> inst_to_index;
|
|
std::map<const IR::Block*, size_t> block_to_index;
|
|
|
|
for (const IR::Block* const block : program.blocks) {
|
|
block_to_index.emplace(block, index);
|
|
++index;
|
|
}
|
|
std::string ret;
|
|
for (const auto& block : program.blocks) {
|
|
ret += IR::DumpBlock(*block, block_to_index, inst_to_index, index) + '\n';
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
} // namespace Shader::IR
|