Rename gSpirVPath to gCompilationCachePath

gSpirVPath controls the location of the compilation cache for SPIR-V
offline compilation, but its use would also make sense for binary
offline compilation.  This change renames it to gCompilationCachePath.
This commit is contained in:
Stuart Brady
2019-06-27 18:15:15 +01:00
committed by Kévin Petit
parent 0b1520f508
commit 6eec559ffd
3 changed files with 8 additions and 8 deletions

View File

@@ -173,7 +173,7 @@ std::string add_build_options(const std::string &baseName, const char *options)
do
{
i++;
std::string fileName = gSpirVPath + slash + get_file_name(baseName, i, ".options");
std::string fileName = gCompilationCachePath + slash + get_file_name(baseName, i, ".options");
long fileSize = get_file_size(fileName);
if (fileSize == 0)
break;
@@ -187,7 +187,7 @@ std::string add_build_options(const std::string &baseName, const char *options)
if (equal)
return get_file_name(baseName, i, "");
std::string fileName = gSpirVPath + slash + get_file_name(baseName, i, ".options");
std::string fileName = gCompilationCachePath + slash + get_file_name(baseName, i, ".options");
std::ofstream ofs(fileName.c_str(), std::ios::binary);
if (!ofs.good())
{
@@ -266,8 +266,8 @@ static int create_single_kernel_helper_create_program(cl_context context,
kernelName = add_build_options(kernelName, buildOptions);
std::string sourceFilename = gSpirVPath + slash + kernelName + ".cl";
std::string outputFilename = gSpirVPath + slash + kernelName;
std::string sourceFilename = gCompilationCachePath + slash + kernelName + ".cl";
std::string outputFilename = gCompilationCachePath + slash + kernelName;
// Get device CL_DEVICE_ADDRESS_BITS
cl_uint device_address_space_size = 0;