diff options
Diffstat (limited to 'src/shader_recompiler/main.cpp')
| -rw-r--r-- | src/shader_recompiler/main.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shader_recompiler/main.cpp b/src/shader_recompiler/main.cpp index 3ca1677c4..92358232c 100644 --- a/src/shader_recompiler/main.cpp +++ b/src/shader_recompiler/main.cpp | |||
| @@ -38,7 +38,8 @@ void RunDatabase() { | |||
| 38 | map.emplace_back(std::make_unique<FileEnvironment>(path.string().c_str())); | 38 | map.emplace_back(std::make_unique<FileEnvironment>(path.string().c_str())); |
| 39 | }); | 39 | }); |
| 40 | auto block_pool{std::make_unique<ObjectPool<Flow::Block>>()}; | 40 | auto block_pool{std::make_unique<ObjectPool<Flow::Block>>()}; |
| 41 | auto t0 = std::chrono::high_resolution_clock::now(); | 41 | using namespace std::chrono; |
| 42 | auto t0 = high_resolution_clock::now(); | ||
| 42 | int N = 1; | 43 | int N = 1; |
| 43 | int n = 0; | 44 | int n = 0; |
| 44 | for (int i = 0; i < N; ++i) { | 45 | for (int i = 0; i < N; ++i) { |
| @@ -55,9 +56,8 @@ void RunDatabase() { | |||
| 55 | // const std::string code{EmitGLASM(program)}; | 56 | // const std::string code{EmitGLASM(program)}; |
| 56 | } | 57 | } |
| 57 | } | 58 | } |
| 58 | auto t = std::chrono::high_resolution_clock::now(); | 59 | auto t = high_resolution_clock::now(); |
| 59 | fmt::print(stdout, "{} ms", | 60 | fmt::print(stdout, "{} ms", duration_cast<milliseconds>(t - t0).count() / double(N)); |
| 60 | std::chrono::duration_cast<std::chrono::milliseconds>(t - t0).count() / double(N)); | ||
| 61 | } | 61 | } |
| 62 | 62 | ||
| 63 | int main() { | 63 | int main() { |
| @@ -67,8 +67,8 @@ int main() { | |||
| 67 | auto inst_pool{std::make_unique<ObjectPool<IR::Inst>>()}; | 67 | auto inst_pool{std::make_unique<ObjectPool<IR::Inst>>()}; |
| 68 | auto block_pool{std::make_unique<ObjectPool<IR::Block>>()}; | 68 | auto block_pool{std::make_unique<ObjectPool<IR::Block>>()}; |
| 69 | 69 | ||
| 70 | FileEnvironment env{"D:\\Shaders\\Database\\Oninaki\\CS8F146B41DB6BD826.bin"}; | 70 | // FileEnvironment env{"D:\\Shaders\\Database\\Oninaki\\CS8F146B41DB6BD826.bin"}; |
| 71 | // FileEnvironment env{"D:\\Shaders\\shader.bin"}; | 71 | FileEnvironment env{"D:\\Shaders\\shader.bin"}; |
| 72 | for (int i = 0; i < 1; ++i) { | 72 | for (int i = 0; i < 1; ++i) { |
| 73 | block_pool->ReleaseContents(); | 73 | block_pool->ReleaseContents(); |
| 74 | inst_pool->ReleaseContents(); | 74 | inst_pool->ReleaseContents(); |