mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Review fixes - add clCreateProgramWithILKHR in linkage and op_opaque tests
This commit is contained in:
committed by
Alastair Murray
parent
2a8cecb925
commit
75dfd356d7
@@ -33,8 +33,25 @@ static int test_linkage_compile(cl_device_id deviceID,
|
||||
}
|
||||
unsigned char *buffer = &buffer_vec[0];
|
||||
|
||||
prog = clCreateProgramWithIL(context, buffer, file_bytes, &err);
|
||||
SPIRV_CHECK_ERROR(err, "Failed to create program with clCreateProgramWithIL");
|
||||
if (gCoreILProgram) {
|
||||
prog = clCreateProgramWithIL(context, buffer, file_bytes, &err);
|
||||
SPIRV_CHECK_ERROR(err, "Failed to create program with clCreateProgramWithIL");
|
||||
}
|
||||
else {
|
||||
cl_platform_id platform;
|
||||
err = clGetDeviceInfo(deviceID, CL_DEVICE_PLATFORM, sizeof(cl_platform_id), &platform, NULL);
|
||||
SPIRV_CHECK_ERROR(err, "Failed to get platform info with clGetDeviceInfo");
|
||||
clCreateProgramWithILKHR_fn clCreateProgramWithILKHR = NULL;
|
||||
|
||||
clCreateProgramWithILKHR = (clCreateProgramWithILKHR_fn)clGetExtensionFunctionAddressForPlatform(platform, "clCreateProgramWithILKHR");
|
||||
if (clCreateProgramWithILKHR == NULL)
|
||||
{
|
||||
log_error("ERROR: clGetExtensionFunctionAddressForPlatform failed\n");
|
||||
return -1;
|
||||
}
|
||||
prog = clCreateProgramWithILKHR(context, buffer, file_bytes, &err);
|
||||
SPIRV_CHECK_ERROR(err, "Failed to create program with clCreateProgramWithILKHR");
|
||||
}
|
||||
|
||||
err = clCompileProgram(prog, 1, &deviceID,
|
||||
NULL, // options
|
||||
|
||||
Reference in New Issue
Block a user