Remove source transformation support

This change removes support for the "source" mode of offline compilation
which is commented with "to be removed in the future as we will use
offline compiler here".

The "source" mode allowed for the CL source to be transformed by
build_script_source.py and then passed to clCreateProgramWithSource(),
and appears to have been developed only for the purpose of testing the
offline compilation infrastructure.
This commit is contained in:
Stuart Brady
2019-07-03 19:32:44 +01:00
committed by Kévin Petit
parent e1874ba732
commit 7486dd13ad
5 changed files with 7 additions and 54 deletions

View File

@@ -1,7 +0,0 @@
# Script parameters:
# 1 - input file
# 2 - output file
# 3 - architecture: 32 or 64
# 4 - one of the strings: binary, source, spir_v
# 5 - OpenCL version: 12, 20
# 6 - build options

View File

@@ -423,7 +423,7 @@ int test_get_program_source(cl_device_id deviceID, cl_context context, cl_comman
/* Try getting the length */
error = clGetProgramInfo( program, CL_PROGRAM_SOURCE, NULL, NULL, &length );
test_error( error, "Unable to get program source length" );
if (length != strlen(sample_kernel_code_single_line[0]) + 1 && !(gOfflineCompiler && gOfflineCompilerOutputType != kSource))
if (length != strlen(sample_kernel_code_single_line[0]) + 1 && !gOfflineCompiler)
{
log_error( "ERROR: Length returned for program source is incorrect!\n" );
return -1;
@@ -432,7 +432,7 @@ int test_get_program_source(cl_device_id deviceID, cl_context context, cl_comman
/* Try normal source */
error = clGetProgramInfo( program, CL_PROGRAM_SOURCE, sizeof( buffer ), buffer, NULL );
test_error( error, "Unable to get program source" );
if (strlen(buffer) != strlen(sample_kernel_code_single_line[0]) && !(gOfflineCompiler && gOfflineCompilerOutputType != kSource))
if (strlen(buffer) != strlen(sample_kernel_code_single_line[0]) && !gOfflineCompiler)
{
log_error( "ERROR: Length of program source is incorrect!\n" );
return -1;
@@ -441,12 +441,12 @@ int test_get_program_source(cl_device_id deviceID, cl_context context, cl_comman
/* Try both at once */
error = clGetProgramInfo( program, CL_PROGRAM_SOURCE, sizeof( buffer ), buffer, &length );
test_error( error, "Unable to get program source" );
if (strlen(buffer) != strlen(sample_kernel_code_single_line[0]) && !(gOfflineCompiler && gOfflineCompilerOutputType != kSource))
if (strlen(buffer) != strlen(sample_kernel_code_single_line[0]) && !gOfflineCompiler)
{
log_error( "ERROR: Length of program source is incorrect!\n" );
return -1;
}
if (length != strlen(sample_kernel_code_single_line[0]) + 1 && !(gOfflineCompiler && gOfflineCompilerOutputType != kSource))
if (length != strlen(sample_kernel_code_single_line[0]) + 1 && !gOfflineCompiler)
{
log_error( "ERROR: Returned length of program source is incorrect!\n" );
return -1;