diff --git a/source/slang-glslang/slang-glslang.cpp b/source/slang-glslang/slang-glslang.cpp index 419ae6d73f..82cb22e574 100644 --- a/source/slang-glslang/slang-glslang.cpp +++ b/source/slang-glslang/slang-glslang.cpp @@ -6,8 +6,8 @@ #include "glslang/Public/ShaderLang.h" #include "slang.h" #include "spirv-tools/libspirv.h" -#include "spirv-tools/optimizer.hpp" #include "spirv-tools/linker.hpp" +#include "spirv-tools/optimizer.hpp" #ifdef _WIN32 #include @@ -1028,14 +1028,16 @@ extern "C" if (success == SPV_SUCCESS) { request->linkResult = new uint32_t[linkedBinary.size()]; - memcpy((void*)request->linkResult, linkedBinary.data(), + memcpy( + (void*)request->linkResult, + linkedBinary.data(), linkedBinary.size() * sizeof(uint32_t)); request->linkResultSize = linkedBinary.size(); } return success; } - catch(...) + catch (...) { return false; } diff --git a/tools/gfx/renderer-shared.cpp b/tools/gfx/renderer-shared.cpp index 5349049016..ae4ea3eefa 100644 --- a/tools/gfx/renderer-shared.cpp +++ b/tools/gfx/renderer-shared.cpp @@ -1178,8 +1178,8 @@ Result ShaderProgramBase::compileShaders(RendererBase* device) { ComPtr diagnosticsBlob; auto result = precompileService->getPrecompiledTargetCode( - compileTarget, - downstreamIR.writeRef(), + compileTarget, + downstreamIR.writeRef(), diagnosticsBlob.writeRef()); if (result == SLANG_OK) { diff --git a/tools/gfx/vulkan/glslang-module.cpp b/tools/gfx/vulkan/glslang-module.cpp index c2817cfce9..03afef7947 100644 --- a/tools/gfx/vulkan/glslang-module.cpp +++ b/tools/gfx/vulkan/glslang-module.cpp @@ -17,7 +17,8 @@ namespace gfx { using namespace Slang; -// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! GlslangModule !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! GlslangModule +// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Slang::Result GlslangModule::init() { diff --git a/tools/gfx/vulkan/glslang-module.h b/tools/gfx/vulkan/glslang-module.h index fedf7f33c9..cda9035779 100644 --- a/tools/gfx/vulkan/glslang-module.h +++ b/tools/gfx/vulkan/glslang-module.h @@ -1,12 +1,12 @@ // glslang-module.h #pragma once -#include "slang-com-ptr.h" -#include "slang-com-helper.h" #include "core/slang-list.h" -#include "slang.h" -#include "slang-glslang/slang-glslang.h" #include "external/spirv-tools/include/spirv-tools/linker.hpp" +#include "slang-com-helper.h" +#include "slang-com-ptr.h" +#include "slang-glslang/slang-glslang.h" +#include "slang.h" namespace gfx { diff --git a/tools/gfx/vulkan/vk-device.h b/tools/gfx/vulkan/vk-device.h index dc37137122..27cc4c3ce8 100644 --- a/tools/gfx/vulkan/vk-device.h +++ b/tools/gfx/vulkan/vk-device.h @@ -1,9 +1,9 @@ // vk-device.h #pragma once +#include "glslang-module.h" #include "vk-base.h" #include "vk-framebuffer.h" -#include "glslang-module.h" namespace gfx { diff --git a/tools/gfx/vulkan/vk-shader-program.cpp b/tools/gfx/vulkan/vk-shader-program.cpp index 7fe18c3af3..1627c95a7a 100644 --- a/tools/gfx/vulkan/vk-shader-program.cpp +++ b/tools/gfx/vulkan/vk-shader-program.cpp @@ -1,11 +1,10 @@ // vk-shader-program.cpp #include "vk-shader-program.h" +#include "external/spirv-tools/include/spirv-tools/linker.hpp" #include "vk-device.h" #include "vk-util.h" -#include "external/spirv-tools/include/spirv-tools/linker.hpp" - namespace gfx {