Skip to content

Commit 8de4b1c

Browse files
aparshin-inteligcbot
authored andcommitted
fix extra option processing for CM online compilation
1 parent c3cd2e7 commit 8de4b1c

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

IGC/VectorCompiler/igcdeps/src/TranslationInterface.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -247,17 +247,6 @@ std::error_code vc::translateBuild(const TC::STB_TranslateInputArgs *InputArgs,
247247
return true;
248248
};
249249

250-
std::string AuxApiOptions;
251-
std::string AuxInternalOptions;
252-
if (getAuxiliaryOptions(IGC_GET_REGKEYSTRING(VCApiOptions),
253-
ApiOptions, AuxApiOptions)) {
254-
ApiOptions = { AuxApiOptions.data(), AuxApiOptions.size() };
255-
}
256-
if (getAuxiliaryOptions(IGC_GET_REGKEYSTRING(VCInternalOptions),
257-
InternalOptions, AuxInternalOptions)) {
258-
InternalOptions = { AuxInternalOptions.data(), AuxInternalOptions.size() };
259-
}
260-
261250
llvm::ArrayRef<char> Input{InputArgs->pInput, InputArgs->InputSize};
262251

263252
std::unique_ptr<vc::ShaderDumper> Dumper;
@@ -280,6 +269,17 @@ std::error_code vc::translateBuild(const TC::STB_TranslateInputArgs *InputArgs,
280269
InternalOptions = InputArgs->pInput + NewPathPayload.VcOptsOffset;
281270
Input = Input.take_front(static_cast<size_t>(NewPathPayload.IrSize));
282271
}
272+
std::string AuxApiOptions;
273+
std::string AuxInternalOptions;
274+
if (getAuxiliaryOptions(IGC_GET_REGKEYSTRING(VCApiOptions),
275+
ApiOptions, AuxApiOptions)) {
276+
ApiOptions = { AuxApiOptions.data(), AuxApiOptions.size() };
277+
}
278+
if (getAuxiliaryOptions(IGC_GET_REGKEYSTRING(VCInternalOptions),
279+
InternalOptions, AuxInternalOptions)) {
280+
InternalOptions = { AuxInternalOptions.data(), AuxInternalOptions.size() };
281+
}
282+
283283

284284
if (IGC_IS_FLAG_ENABLED(ShaderDumpEnable)) {
285285
Dumper->dumpText(ApiOptions, "options.txt");

0 commit comments

Comments
 (0)