mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
Fix code format errors
This commit is contained in:
committed by
Alastair Murray
parent
c85527cec7
commit
44a240367e
@@ -30,34 +30,43 @@ TEST_SPIRV_FUNC(op_type_opaque_simple)
|
||||
|
||||
clProgramWrapper prog;
|
||||
|
||||
if (gCoreILProgram) {
|
||||
if (gCoreILProgram)
|
||||
{
|
||||
prog = clCreateProgramWithIL(context, buffer, file_bytes, &err);
|
||||
SPIRV_CHECK_ERROR(err, "Failed to create program with clCreateProgramWithIL");
|
||||
SPIRV_CHECK_ERROR(
|
||||
err, "Failed to create program with clCreateProgramWithIL");
|
||||
}
|
||||
else {
|
||||
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");
|
||||
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");
|
||||
clCreateProgramWithILKHR = (clCreateProgramWithILKHR_fn)
|
||||
clGetExtensionFunctionAddressForPlatform(
|
||||
platform, "clCreateProgramWithILKHR");
|
||||
if (clCreateProgramWithILKHR == NULL)
|
||||
{
|
||||
log_error("ERROR: clGetExtensionFunctionAddressForPlatform failed\n");
|
||||
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");
|
||||
SPIRV_CHECK_ERROR(
|
||||
err, "Failed to create program with clCreateProgramWithILKHR");
|
||||
}
|
||||
|
||||
err = clCompileProgram(prog, 1, &deviceID,
|
||||
NULL, // options
|
||||
0, // num headers
|
||||
0, // num headers
|
||||
NULL, // input headers
|
||||
NULL, // header include names
|
||||
NULL, // callback
|
||||
NULL // User data
|
||||
);
|
||||
NULL // User data
|
||||
);
|
||||
SPIRV_CHECK_ERROR(err, "Failed to compile spv program");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user