MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / spvTextToBinaryWithOptions

Function spvTextToBinaryWithOptions

source/text.cpp:976–996  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

974}
975
976spv_result_t spvTextToBinaryWithOptions(const spv_const_context context,
977 const char* input_text,
978 const size_t input_text_size,
979 const uint32_t options,
980 spv_binary* pBinary,
981 spv_diagnostic* pDiagnostic) {
982 spv_context_t hijack_context = *context;
983 if (pDiagnostic) {
984 *pDiagnostic = nullptr;
985 spvtools::UseDiagnosticAsMessageConsumer(&hijack_context, pDiagnostic);
986 }
987
988 spv_text_t text = {input_text, input_text_size};
989 spvtools::AssemblyGrammar grammar(&hijack_context);
990
991 spv_result_t result = spvTextToBinaryInternal(
992 grammar, hijack_context.consumer, &text, options, pBinary);
993 if (pDiagnostic && *pDiagnostic) (*pDiagnostic)->isTextSource = true;
994
995 return result;
996}
997
998void spvTextDestroy(spv_text text) {
999 if (text) {

Callers 7

mainFunction · 0.85
spvTextToBinaryFunction · 0.85
AssembleMethod · 0.85
ToBinaryAndBackFunction · 0.85
LLVMFuzzerTestOneInputFunction · 0.85
CompileSuccessfullyMethod · 0.85

Calls 2

spvTextToBinaryInternalFunction · 0.85

Tested by 2

ToBinaryAndBackFunction · 0.68