mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-24 15:59:03 +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];
|
unsigned char *buffer = &buffer_vec[0];
|
||||||
|
|
||||||
prog = clCreateProgramWithIL(context, buffer, file_bytes, &err);
|
if (gCoreILProgram) {
|
||||||
SPIRV_CHECK_ERROR(err, "Failed to create program with clCreateProgramWithIL");
|
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,
|
err = clCompileProgram(prog, 1, &deviceID,
|
||||||
NULL, // options
|
NULL, // options
|
||||||
|
|||||||
@@ -28,8 +28,27 @@ TEST_SPIRV_FUNC(op_type_opaque_simple)
|
|||||||
}
|
}
|
||||||
unsigned char *buffer = &buffer_vec[0];
|
unsigned char *buffer = &buffer_vec[0];
|
||||||
|
|
||||||
clProgramWrapper prog = clCreateProgramWithIL(context, buffer, file_bytes, &err);
|
clProgramWrapper prog;
|
||||||
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,
|
err = clCompileProgram(prog, 1, &deviceID,
|
||||||
NULL, // options
|
NULL, // options
|
||||||
|
|||||||
Reference in New Issue
Block a user