Download Source Code/Yuzu/src/shader_recompiler/frontend/ir/program.cpp from GilbertClaus/Emulator: direct link, hf CLI and curl.
- Browser
- Download file 858 Bytes
-
https://huggingface.co/GilbertClaus/Emulator/resolve/main/Source%20Code/Yuzu/src/shader_recompiler/frontend/ir/program.cpp
- Command line
-
hf download 'hf://GilbertClaus/Emulator/Source Code/Yuzu/src/shader_recompiler/frontend/ir/program.cpp'
-
curl -L -o program.cpp https://huggingface.co/GilbertClaus/Emulator/resolve/main/Source%20Code/Yuzu/src/shader_recompiler/frontend/ir/program.cpp
858 Bytes
| // SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project | |
| // SPDX-License-Identifier: GPL-2.0-or-later | |
| 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 | |