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 #16

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
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
14 changes: 7 additions & 7 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 Expand Up @@ -71,14 +70,14 @@ VkPipelineShaderStageCreateInfo ShaderProgramImpl::compileEntryPoint(
return shaderStageCreateInfo;
}

static ComPtr<ISlangBlob> LinkUsingSPIRVTools(List<ComPtr<ISlangBlob> > kernelCodes)
static ComPtr<ISlangBlob> LinkUsingSPIRVTools(List<ComPtr<ISlangBlob>> kernelCodes)
{
spvtools::Context context(SPV_ENV_UNIVERSAL_1_5);
spvtools::LinkerOptions options;
spvtools::MessageConsumer consumer = [](spv_message_level_t level,
const char* source,
const spv_position_t& position,
const char* message)
const char* source,
const spv_position_t& position,
const char* message)
{
printf("SPIRV-TOOLS: %s\n", message);
printf("SPIRV-TOOLS: %s\n", source);
Expand Down Expand Up @@ -108,7 +107,8 @@ static ComPtr<ISlangBlob> LinkUsingSPIRVTools(List<ComPtr<ISlangBlob> > kernelCo

// Replace kernel code with linked binary
// Creates a new blob with the linked binary
linkedKernelCode = RawBlob::create(linked_binary.data(), linked_binary.size() * sizeof(uint32_t));
linkedKernelCode =
RawBlob::create(linked_binary.data(), linked_binary.size() * sizeof(uint32_t));

return linkedKernelCode;
}
Expand Down
Loading