mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
BlackBox tests - fix passing options to oclocInvoke
Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
df84232ef2
commit
2114a85ec7
@@ -14,9 +14,11 @@ std::vector<uint8_t> compileToSpirV(const std::string &src, const std::string &o
|
||||
|
||||
const char *mainFileName = "main.cl";
|
||||
const char *argv[] = {"ocloc", "-q", "-device", "skl", "-file", mainFileName, "", ""};
|
||||
uint32_t numArgs = sizeof(argv) / sizeof(argv[0]) - 2;
|
||||
if (options.size() > 0) {
|
||||
argv[6] = "-options";
|
||||
argv[7] = options.c_str();
|
||||
numArgs += 2;
|
||||
}
|
||||
const unsigned char *sources[] = {reinterpret_cast<const unsigned char *>(src.c_str())};
|
||||
size_t sourcesLengths[] = {src.size() + 1};
|
||||
@@ -26,7 +28,7 @@ std::vector<uint8_t> compileToSpirV(const std::string &src, const std::string &o
|
||||
size_t *ouputLengths = nullptr;
|
||||
char **outputNames = nullptr;
|
||||
|
||||
int result = oclocInvoke(sizeof(argv) / sizeof(argv[0]), argv,
|
||||
int result = oclocInvoke(numArgs, argv,
|
||||
1, sources, sourcesLengths, sourcesNames,
|
||||
0, nullptr, nullptr, nullptr,
|
||||
&numOutputs, &outputs, &ouputLengths, &outputNames);
|
||||
|
||||
Reference in New Issue
Block a user