Skip to content

Commit 94c806d

Browse files
authored
Merge pull request #17 from slangbot/format-6455-cheneym2/precompiledtestcrash
Format code for PR #6455
2 parents 2125a96 + 9503fc2 commit 94c806d

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

source/slang-glslang/slang-glslang.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include "glslang/Public/ShaderLang.h"
77
#include "slang.h"
88
#include "spirv-tools/libspirv.h"
9-
#include "spirv-tools/optimizer.hpp"
109
#include "spirv-tools/linker.hpp"
10+
#include "spirv-tools/optimizer.hpp"
1111

1212
#ifdef _WIN32
1313
#include <windows.h>
@@ -1028,14 +1028,16 @@ extern "C"
10281028
if (success == SPV_SUCCESS)
10291029
{
10301030
request->linkResult = new uint32_t[linkedBinary.size()];
1031-
memcpy((void*)request->linkResult, linkedBinary.data(),
1031+
memcpy(
1032+
(void*)request->linkResult,
1033+
linkedBinary.data(),
10321034
linkedBinary.size() * sizeof(uint32_t));
10331035
request->linkResultSize = linkedBinary.size();
10341036
}
10351037

10361038
return success;
10371039
}
1038-
catch(...)
1040+
catch (...)
10391041
{
10401042
return false;
10411043
}

tools/gfx/renderer-shared.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1178,8 +1178,8 @@ Result ShaderProgramBase::compileShaders(RendererBase* device)
11781178
{
11791179
ComPtr<slang::IBlob> diagnosticsBlob;
11801180
auto result = precompileService->getPrecompiledTargetCode(
1181-
compileTarget,
1182-
downstreamIR.writeRef(),
1181+
compileTarget,
1182+
downstreamIR.writeRef(),
11831183
diagnosticsBlob.writeRef());
11841184
if (result == SLANG_OK)
11851185
{

tools/gfx/vulkan/vk-device.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// vk-device.h
22
#pragma once
33

4+
#include "glslang-module.h"
45
#include "vk-base.h"
56
#include "vk-framebuffer.h"
6-
#include "glslang-module.h"
77

88
namespace gfx
99
{

tools/gfx/vulkan/vk-shader-program.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
// vk-shader-program.cpp
22
#include "vk-shader-program.h"
33

4+
#include "external/spirv-tools/include/spirv-tools/linker.hpp"
45
#include "vk-device.h"
56
#include "vk-util.h"
67

7-
#include "external/spirv-tools/include/spirv-tools/linker.hpp"
8-
98
namespace gfx
109
{
1110

0 commit comments

Comments
 (0)