Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format code for PR #6455 #18

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions source/slang-glslang/slang-glslang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <windows.h>
Expand Down Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions tools/gfx/renderer-shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1178,8 +1178,8 @@ Result ShaderProgramBase::compileShaders(RendererBase* device)
{
ComPtr<slang::IBlob> diagnosticsBlob;
auto result = precompileService->getPrecompiledTargetCode(
compileTarget,
downstreamIR.writeRef(),
compileTarget,
downstreamIR.writeRef(),
diagnosticsBlob.writeRef());
if (result == SLANG_OK)
{
Expand Down
3 changes: 2 additions & 1 deletion tools/gfx/vulkan/glslang-module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ namespace gfx
{
using namespace Slang;

// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! GlslangModule !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! GlslangModule
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Slang::Result GlslangModule::init()
{
Expand Down
8 changes: 4 additions & 4 deletions tools/gfx/vulkan/glslang-module.h
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
2 changes: 1 addition & 1 deletion tools/gfx/vulkan/vk-device.h
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
3 changes: 1 addition & 2 deletions tools/gfx/vulkan/vk-shader-program.cpp
Original file line number Diff line number Diff line change
@@ -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
{

Expand Down
Loading