mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
ocloc - don't require device for src->spv
Change-Id: Idb2acd9af4e09f59958e3bc622885423a3f79227
This commit is contained in:
@@ -577,18 +577,18 @@ int OfflineCompiler::parseCommandLine(size_t numArgs, const std::vector<std::str
|
||||
} else if (inputFile.empty()) {
|
||||
argHelper->printf("Error: Input file name missing.\n");
|
||||
retVal = INVALID_COMMAND_LINE;
|
||||
} else if (deviceName.empty()) {
|
||||
} else if (deviceName.empty() && (false == onlySpirV)) {
|
||||
argHelper->printf("Error: Device name missing.\n");
|
||||
retVal = INVALID_COMMAND_LINE;
|
||||
} else if (!argHelper->fileExists(inputFile)) {
|
||||
argHelper->printf("Error: Input file %s missing.\n", inputFile.c_str());
|
||||
retVal = INVALID_FILE;
|
||||
} else {
|
||||
retVal = getHardwareInfo(deviceName.c_str());
|
||||
if (retVal != SUCCESS) {
|
||||
retVal = deviceName.empty() ? 0 : getHardwareInfo(deviceName.c_str());
|
||||
if (retVal != 0) {
|
||||
argHelper->printf("Error: Cannot get HW Info for device %s.\n", deviceName.c_str());
|
||||
} else {
|
||||
std::string extensionsList = getExtensionsList(hwInfo);
|
||||
} else if (false == deviceName.empty()) {
|
||||
std::string extensionsList = deviceName.empty() ? "" : getExtensionsList(hwInfo);
|
||||
if (requiresOpenClCFeatures(options)) {
|
||||
OpenClCFeaturesContainer openclCFeatures;
|
||||
getOpenclCFeaturesList(hwInfo, openclCFeatures);
|
||||
@@ -601,6 +601,8 @@ int OfflineCompiler::parseCommandLine(size_t numArgs, const std::vector<std::str
|
||||
auto compilerExtensions = convertEnabledExtensionsToCompilerInternalOptions(extensionsList.c_str(), emptyOpenClCFeatures);
|
||||
CompilerOptions::concatenateAppend(internalOptions, compilerExtensions);
|
||||
}
|
||||
} else {
|
||||
this->internalOptions = CompilerOptions::concatenate("-cl-ext=-all,+cl_khr_3d_image_writes", this->internalOptions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user