Skip to content

Commit c2e2e31

Browse files
Remove unnecessary method
1 parent 0f84efa commit c2e2e31

File tree

1 file changed

+0
-33
lines changed

1 file changed

+0
-33
lines changed

src/spirv/SPIRVHelper.cpp

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -711,39 +711,6 @@ std::vector<uint32_t> spirv::readStreamOfWords(std::istream* in)
711711
return words;
712712
}
713713

714-
void spirv::linkSPIRVModules(const std::vector<std::istream*>& inputModules, std::ostream& output)
715-
{
716-
#ifndef SPIRV_FRONTEND
717-
throw CompilationError(CompilationStep::LINKER, "SPIRV-Tools linker is not available!");
718-
#else
719-
std::vector<std::vector<uint32_t>> binaries;
720-
binaries.reserve(inputModules.size());
721-
std::transform(inputModules.begin(), inputModules.end(), std::back_inserter(binaries), readStreamOfWords);
722-
723-
spvtools::LinkerOptions options;
724-
options.SetCreateLibrary(false);
725-
options.SetVerifyIds(true);
726-
// the VC4CL intrinsics are not provided by any input module
727-
options.SetAllowPartialLinkage(true);
728-
729-
spvtools::Context spvContext(SPV_ENV_OPENCL_EMBEDDED_1_2);
730-
731-
std::vector<uint32_t> linkedModules;
732-
spv_result_t result = spvtools::Link(spvContext, binaries, &linkedModules, options);
733-
734-
if(result != SPV_SUCCESS)
735-
throw CompilationError(CompilationStep::PARSER, getErrorMessage(result));
736-
737-
for(const uint32_t u : linkedModules)
738-
{
739-
output.write(reinterpret_cast<const char*>(&u), sizeof(uint32_t));
740-
}
741-
CPPLOG_LAZY(logging::Level::DEBUG,
742-
log << "Linked " << inputModules.size() << " modules into a single module with " << linkedModules.size()
743-
<< " words of data." << logging::endl);
744-
#endif
745-
}
746-
747714
void spirv::addFunctionAliases(Module& module)
748715
{
749716
/*

0 commit comments

Comments
 (0)