diff --git a/src/sgl/device/helpers.cpp b/src/sgl/device/helpers.cpp index 3ce2c1da..afc648da 100644 --- a/src/sgl/device/helpers.cpp +++ b/src/sgl/device/helpers.cpp @@ -3,9 +3,9 @@ #include "sgl/core/config.h" #include "sgl/core/macros.h" +#include "sgl/core/format.h" #include -#include #if SGL_HAS_D3D12 #include @@ -50,7 +50,7 @@ std::string get_last_gfx_layer_error() // used by SLANG_CALL. std::string build_slang_failed_message(const char* call, SlangResult result) { - auto msg = std::format("Slang call {} failed with error: {}\n", call, result); + auto msg = fmt::format("Slang call {} failed with error: {}\n", call, result); if (static_cast(result) >= 0x80000000U) { std::string gfx_error = get_last_gfx_layer_error(); if (!gfx_error.empty()) { diff --git a/src/sgl/device/helpers.h b/src/sgl/device/helpers.h index d515d029..47e0ad66 100644 --- a/src/sgl/device/helpers.h +++ b/src/sgl/device/helpers.h @@ -5,7 +5,6 @@ #include "sgl/core/error.h" #include -#include namespace sgl { diff --git a/src/sgl/device/tests/test_hot_reload.cpp b/src/sgl/device/tests/test_hot_reload.cpp index def3a3f1..022030c8 100644 --- a/src/sgl/device/tests/test_hot_reload.cpp +++ b/src/sgl/device/tests/test_hot_reload.cpp @@ -1,13 +1,13 @@ // SPDX-License-Identifier: Apache-2.0 #include "testing.h" +#include "sgl/core/format.h" #include "sgl/device/device.h" #include "sgl/device/shader.h" #include "sgl/device/kernel.h" #include "sgl/device/hot_reload.h" #include #include -#include #include #include @@ -28,7 +28,7 @@ static void write_shader(const WriteShaderDesc& desc) imports += "import " + i + ";\n"; } - std::string formatted = std::format( + std::string formatted = fmt::format( R"SHADER( {3} RWStructuredBuffer {0}; @@ -65,7 +65,7 @@ static void write_module(const WriteModuleDesc& desc) imports += "import " + i + ";\n"; } - std::string formatted = std::format( + std::string formatted = fmt::format( R"SHADER( {0} int {1}()